Contiki-NG
Loading...
Searching...
No Matches
serial-line.h File Reference

Generic serial I/O process header filer. More...

#include "contiki.h"

Go to the source code of this file.

Functions

int serial_line_input_byte (unsigned char c)
 Get one byte of input from the serial driver.
 

Variables

process_event_t serial_line_event_message
 Event posted when a line of input has been received.
 

Detailed Description

Generic serial I/O process header filer.

Author
Adam Dunkels

Definition in file serial-line.h.

Function Documentation

◆ serial_line_input_byte()

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.

Parameters
cThe data that is received.
Returns
Non-zero if the CPU should be powered up, zero otherwise.

Definition at line 64 of file serial-line.c.

References process_poll(), and ringbuf_put().

Variable Documentation

◆ serial_line_event_message

process_event_t serial_line_event_message
extern

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.

Definition at line 60 of file serial-line.c.