Changeset 51 in projects for punch-card/driver/documation-m200/src/protocol.h
- Timestamp:
- Dec 14, 2009, 9:48:24 PM (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
punch-card/driver/documation-m200/src/protocol.h
r50 r51 1 1 #ifndef __M200_IO_H__ 2 2 #define __M200_IO_H__ 3 4 /** 5 * AVR M200 Punch card reader controller 6 * PC Documation M200 uC Serial Communication Protocol 7 * 8 * The protocol.c file implements all the stdio.h stuff (USART input/output) 9 * and the communication with the client (PC) as well as the main loop. 10 * 11 * This file is part of the Punched Paper Project - Punch Card Device Drivers 12 * Copyright (C) 2009 Sven Koeppel 13 * 14 * This program is free software; you can redistribute it and/or 15 * modify it under the terms of the GNU General Public License as 16 * published by the Free Software Foundation; either version 3 of 17 * the License, or (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU General Public License 25 * along with this program; if not, see 26 * <http://www.gnu.org/licenses/>. 27 **/ 3 28 4 29 … … 8 33 #include <stdio.h> 9 34 10 // type: char 11 #define NO_INPUT 0 12 35 // Modeling the format to be used for output 13 36 enum format_t { 14 37 HEX = M200_CLIENT_HEX, … … 19 42 #define is_valid_format(f) ( f == HEX || f == DEBUG || f == BINARY ) 20 43 21 static struct program_status_t { 22 enum command_t { 23 START_READER, 24 STOP_READER 25 } user_instruction; 26 27 28 // for ISR 29 uint8_t prev_pinc; 30 uint8_t prev_pinb; 31 32 uint8_t reader_waits_for_space; // also defacto der WRITER 33 34 } status; 35 44 // A char value as return value from uart_transmit 45 #define NO_INPUT 0 36 46 37 47 int uart_transmit(char c, FILE* stream);
Note: See TracChangeset
for help on using the changeset viewer.