MOS Source Code
|
Go to the source code of this file.
Enumerations | |
enum | serial_modem_status_t { MODEM_DCTS = 1 << 0 , MODEM_DDSR = 1 << 1 , MODEM_TERI = 1 << 2 , MODEM_DDCD = 1 << 3 , MODEM_CLEAR_TO_SEND = 1 << 4 , MODEM_DATA_SET_READY = 1 << 5 , MODEM_RING_INDICATOR = 1 << 6 , MODEM_DATA_CARRIER_DETECT = 1 << 7 } |
enum | serial_modem_control_t { MODEM_DTR = 1 << 0 , MODEM_RTS = 1 << 1 , MODEM_UNUSED_PIN1 = 1 << 2 , MODEM_IRQ = 1 << 3 , MODEM_LOOP = 1 << 4 } |
enum | serial_line_status_t { LINE_DATA_READY = 1 << 0 , LINE_ERR_OVERRUN = 1 << 1 , LINE_ERR_PARITY = 1 << 2 , LINE_ERR_FRAMING = 1 << 3 , LINE_ERR_BREAK = 1 << 4 , LINE_TRANSMITR_BUF_EMPTY = 1 << 5 , LINE_TRANSMITR_EMPTY = 1 << 6 , LINE_ERR_IMPENDING = 1 << 7 } |
Functions | |
static void | set_baudrate_divisor (serial_device_t *dev) |
static void | set_data_bits (serial_device_t *dev) |
static void | set_stop_bits (serial_device_t *dev) |
static void | set_parity (serial_device_t *dev, serial_parity_t parity) |
static void | serial_set_interrupts (serial_device_t *dev, int interrupts) |
static void | serial_set_modem_options (serial_device_t *dev, serial_modem_control_t control, bool enable) |
static char | serial_get_line_status (serial_device_t *dev) |
static __maybe_unused char | serial_get_modem_status (serial_device_t *dev) |
bool | serial_device_setup (serial_device_t *device) |
bool | serial_dev_get_data_ready (serial_device_t *device) |
static void | serial_dev_wait_ready_to_read (serial_device_t *device) |
static void | serial_dev_wait_ready_to_write (serial_device_t *device) |
int | serial_device_write (serial_device_t *device, const char *data, size_t length) |
int | serial_device_read (serial_device_t *device, char *data, size_t length) |
enum serial_line_status_t |
|
static |
Definition at line 41 of file serial.c.
Referenced by serial_device_setup().
|
static |
Definition at line 60 of file serial.c.
Referenced by serial_device_setup().
|
static |
Definition at line 67 of file serial.c.
Referenced by serial_device_setup().
|
static |
Definition at line 74 of file serial.c.
Referenced by serial_device_setup().
|
static |
Definition at line 81 of file serial.c.
Referenced by serial_device_setup().
|
static |
Definition at line 88 of file serial.c.
Referenced by serial_device_setup().
|
static |
Definition at line 102 of file serial.c.
Referenced by serial_dev_get_data_ready(), and serial_dev_wait_ready_to_write().
|
static |
bool serial_device_setup | ( | serial_device_t * | device | ) |
Definition at line 112 of file serial.c.
Referenced by serial_console_setup().
bool serial_dev_get_data_ready | ( | serial_device_t * | device | ) |
Definition at line 141 of file serial.c.
Referenced by serial_console_irq_handler(), and serial_dev_wait_ready_to_read().
|
static |
Definition at line 146 of file serial.c.
Referenced by serial_device_read().
|
static |
Definition at line 152 of file serial.c.
Referenced by serial_device_write().
int serial_device_write | ( | serial_device_t * | device, |
const char * | data, | ||
size_t | length ) |
Definition at line 158 of file serial.c.
Referenced by serial_console_clear(), serial_console_irq_handler(), serial_console_set_color(), serial_console_write(), and serial_device_setup().
int serial_device_read | ( | serial_device_t * | device, |
char * | data, | ||
size_t | length ) |
Definition at line 169 of file serial.c.
Referenced by serial_console_irq_handler(), and serial_device_setup().