src/hello-dmx.c
changeset 98 e743c905cbf5
parent 79 076657910c0a
child 100 d4ff49d86531
equal deleted inserted replaced
97:ce91458641c1 98:e743c905cbf5
    12 #include "dmx.c"
    12 #include "dmx.c"
    13 
    13 
    14 // debug
    14 // debug
    15 #define DEBUG_DDR   DDRB
    15 #define DEBUG_DDR   DDRB
    16 #define DEBUG_PORT  PORTB
    16 #define DEBUG_PORT  PORTB
    17 #define DEBUG_LED   0
    17 #define DEBUG_LED   5
    18 
    18 
    19 void led_init ()
    19 void led_init ()
    20 {
    20 {
    21     sbi(&DEBUG_DDR, DEBUG_LED);
    21     sbi(&DEBUG_DDR, DEBUG_LED);
    22 }
    22 }
   257  * Process console input.
   257  * Process console input.
   258  */
   258  */
   259 char input (char c)
   259 char input (char c)
   260 {
   260 {
   261     // control
   261     // control
   262     if (c == '\r') {
   262     if (c == '\r' || c == '\n') {
   263         char ret = '?';
   263         char ret = '?';
   264 
   264 
   265         if (console.state == CMD) {
   265         if (console.state == CMD) {
   266             console.argc = 0;
   266             console.argc = 0;
   267         } else if (console.state == ARG) {
   267         } else if (console.state == ARG) {