Changeset 10667 for firmware/FSC/src/parser.c
- Timestamp:
- 05/11/11 18:33:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
firmware/FSC/src/parser.c
r10244 r10667 1 1 #include "parser.h" 2 2 #include "output.h" 3 #include "application.h" 4 #include "usart.h" 3 5 // this method parses the data, 4 6 // which came in via USART … … 72 74 usart_rx_buffer[i] = 0; 73 75 } 76 77 void parse_non_human_readable_input() { 78 79 80 } 81 82 // this guy checks, if an incoming byte is: 83 // to be stored, because it belongs to a command 84 // to be discarded, because something went wrong, and the bytemade no sense... 85 // the end of a commmand, and so the 'real parser' may do his work. 86 87 void incoming_byte_parser() { 88 static bool receiving_command = false; 89 U08 current_byte = UDR; 90 91 if (!receiving_command) { 92 switch (current_byte) { 93 case 0x01: 94 receiving_command = true; 95 break; 96 } 97 } 98 99 if (receiving_command) 100 { 101 usart_rx_buffer[usart_received_chars] = usart_last_char; 102 usart_received_chars++; 103 } 104 105 106 }
Note:
See TracChangeset
for help on using the changeset viewer.