37 #ifdef SERIAL_LINE_CONF_BUFSIZE
38 #define BUFSIZE SERIAL_LINE_CONF_BUFSIZE
43 #if (BUFSIZE & (BUFSIZE - 1)) != 0
44 #error SERIAL_LINE_CONF_BUFSIZE must be a power of two (i.e., 1, 2, 4, 8, 16, 32, 64, ...).
45 #error Change SERIAL_LINE_CONF_BUFSIZE in contiki-conf.h.
48 #define IGNORE_CHAR(c) (c == 0x0d)
52 static uint8_t rxbuf_data[BUFSIZE];
54 PROCESS(serial_line_process,
"Serial driver");
56 process_event_t serial_line_event_message;
60 serial_line_input_byte(
unsigned char c)
62 static uint8_t overflow = 0;
89 static char buf[BUFSIZE];
106 if(ptr < BUFSIZE-1) {
107 buf[ptr++] = (uint8_t)c;
113 buf[ptr++] = (uint8_t)
'\0';
116 process_post(PROCESS_BROADCAST, serial_line_event_message, buf);
132 serial_line_init(
void)