![]() |
GaIA BIOS Library
|
Serial Driver. More...
#include <stdint.h>#include <stdbool.h>Data Structures | |
| struct | serial_data_t |
| The serial data. More... | |
| struct | serial_t |
| SERIAL Peripheral Descriptor. More... | |
Functions | |
| void | serial_lib_init (void) |
| Initializes the SERIAL library. | |
| uint8_t | ser_init (uint8_t port, uint8_t baud, uint8_t frame, void(*tx_int)(void *arg), void(*rx_int)(void *arg), void *arg) |
| Initializes a serial port. | |
| void | ser_change_baud (uint8_t port, uint8_t baud) |
| Changes baudrate for an initialized serial port. | |
| void | ser_outchar (uint8_t port, uint16_t data) |
| Send out a character. | |
| serial_data_t | ser_inchar (uint8_t port) |
| Reads a character. | |
| void | ser_enable485 (uint8_t port) |
| Enables 485 serial transmission. | |
| void | ser_disable485 (uint8_t port) |
| Disables 485 serial transmission. | |
| uint16_t | ser_time485 (uint8_t port, uint8_t baudrate) |
| When required, computes the time to wait, before disabling the 485 tranceiver in order to let it transmit the last character. | |
| void | ser_enable_interrupts (uint8_t port) |
| Enables serial interrupts for the given port. | |
| void | ser_disable_interrupts (uint8_t port) |
| Disables serial interrupts for the given port. | |
| void | ser_enable_tx_interrupt (uint8_t port) |
| Enables Tx interrupt for the given port. | |
| void | ser_disable_tx_interrupt (uint8_t port) |
| Disables Tx interrupt for the given port. | |
| void | ser_set_tx_interrupt (uint8_t port) |
| Set Tx interrupt (sets interrupts flag) Triggers a tx interrupt. | |
| void | ser_clear_tx_interrupt (uint8_t port) |
| Clears Tx interrupt (clears the interrupt flag) | |
| void | ser_enable_rx_interrupt (uint8_t port) |
| Enables Rx Interrupt. | |
| void | ser_disable_rx_interrupt (uint8_t port) |
| Disables Rx Interrupt. | |
Serial Driver.
Serial driver.