38 #ifdef SERIAL_LINE_CONF_BUFSIZE
39 #define BUFSIZE SERIAL_LINE_CONF_BUFSIZE
44 #if (BUFSIZE & (BUFSIZE - 1)) != 0
45 #error SERIAL_LINE_CONF_BUFSIZE must be a power of two (i.e., 1, 2, 4, 8, 16, 32, 64, ...).
46 #error Change SERIAL_LINE_CONF_BUFSIZE in contiki-conf.h.
49 #define IGNORE_CHAR(c) (c == 0x0d)
53 static uint8_t rxbuf_data[BUFSIZE];
55 PROCESS(serial_line_process,
"Serial driver");
57 process_event_t serial_line_event_message;
61 serial_line_input_byte(
unsigned char c)
63 static uint8_t overflow = 0;
90 static char buf[BUFSIZE];
107 if(ptr < BUFSIZE-1) {
108 buf[ptr++] = (uint8_t)c;
114 buf[ptr++] = (uint8_t)
'\0';
117 process_post(PROCESS_BROADCAST, serial_line_event_message, buf);
133 serial_line_init(
void)