Macros | |
#define | BUFSIZE 128 |
#define | END 0x0a |
#define | IGNORE_CHAR(c) (c == 0x0d) |
Functions | |
PROCESS (serial_line_process,"Serial driver") | |
PROCESS_THREAD (serial_line_process, ev, data) | |
void | serial_line_init (void) |
int | serial_line_input_byte (unsigned char c) |
Get one byte of input from the serial driver. More... | |
Variables | |
static struct ringbuf | rxbuf |
static uint8_t | rxbuf_data [BUFSIZE] |
process_event_t | serial_line_event_message |
Event posted when a line of input has been received. More... | |
#define BUFSIZE 128 |
Referenced by PROCESS_THREAD().
#define END 0x0a |
Referenced by PROCESS_THREAD(), serial_line_input_byte(), WriteRootCertificate(), and WriteTlsCertificate().
Referenced by serial_line_input_byte().
PROCESS | ( | serial_line_process | , |
"Serial driver" | |||
) |
PROCESS_THREAD | ( | serial_line_process | , |
ev | , | ||
data | |||
) |
void serial_line_init | ( | void | ) |
References NULL, process_start(), ringbuf_init(), rxbuf, and rxbuf_data.
int serial_line_input_byte | ( | unsigned char | c | ) |
Get one byte of input from the serial driver.
This function is to be called from the actual RS232 driver to get one byte of serial data input.
For systems using low-power CPU modes, the return value of the function can be used to determine if the CPU should be woken up or not. If the function returns non-zero, the CPU should be powered up. If the function returns zero, the CPU can continue to be powered down.
c | The data that is received. |
References END, IGNORE_CHAR, process_poll(), ringbuf_put(), and rxbuf.
|
static |
Referenced by PROCESS_THREAD(), serial_line_init(), and serial_line_input_byte().
|
static |
Referenced by serial_line_init().
process_event_t serial_line_event_message |
Event posted when a line of input has been received.
This event is posted when an entire line of input has been received from the serial port. A data pointer to the incoming line of input is sent together with the event.
Referenced by PROCESS_THREAD().