Lazuli
|
Serial port configuration interface. More...
#include <Lazuli/common.h>
Go to the source code of this file.
Data Structures | |
struct | Lz_SerialConfiguration |
Represents the configuration of a serial interface. More... | |
Enumerations | |
enum | Lz_SerialEnableFlags { LZ_SERIAL_DISABLE_ALL = 0, LZ_SERIAL_ENABLE_TRANSMIT = POSITION(1U), LZ_SERIAL_ENABLE_RECEIVE = POSITION(2U), LZ_SERIAL_ENABLE_ALL = LZ_SERIAL_ENABLE_RECEIVE | LZ_SERIAL_ENABLE_TRANSMIT } |
Define flags for enabling/disabling serial transmission/reception. More... | |
enum | Lz_SerialStopBits { LZ_SERIAL_STOP_BITS_1, LZ_SERIAL_STOP_BITS_2 } |
Define the number of stop bits to use on serial line. More... | |
enum | Lz_SerialParityBit { LZ_SERIAL_PARITY_NONE, LZ_SERIAL_PARITY_EVEN, LZ_SERIAL_PARITY_ODD } |
Define the kind of parity bit to use on serial line. More... | |
enum | Lz_SerialSize { LZ_SERIAL_SIZE_5, LZ_SERIAL_SIZE_6, LZ_SERIAL_SIZE_7, LZ_SERIAL_SIZE_8 } |
Define the size of the character used on serial line. More... | |
enum | Lz_SerialSpeed { LZ_SERIAL_SPEED_2400, LZ_SERIAL_SPEED_4800, LZ_SERIAL_SPEED_9600, LZ_SERIAL_SPEED_19200 } |
Define the baud rate of the serial line. More... | |
Functions | |
void | Lz_Serial_GetConfiguration (Lz_SerialConfiguration *const serialConfiguration) |
Retrieve the configuration of the serial line. More... | |
void | Lz_Serial_SetConfiguration (Lz_SerialConfiguration *const serialConfiguration) |
Set the configuration of the serial line. More... | |
Serial port configuration interface.
This file describes the interface of serial port configuration. Serial port means here UART/USART device.
The configuration is the same for input (Receive/Rx) and ouput (Transmit/Tx).
Definition in file serial.h.
enum Lz_SerialEnableFlags |
Define flags for enabling/disabling serial transmission/reception.
These flags can be combined using bitwise OR (i.e. | operator).
enum Lz_SerialStopBits |
enum Lz_SerialParityBit |
enum Lz_SerialSize |
enum Lz_SerialSpeed |
Define the baud rate of the serial line.
void Lz_Serial_GetConfiguration | ( | Lz_SerialConfiguration *const | serialConfiguration | ) |
Retrieve the configuration of the serial line.
This function will fill the object pointed by the parameter with current serial settings.
serialConfiguration | A pointer to an allocated Lz_SerialConfiguration (e.g. allocated on the stack). |
void Lz_Serial_SetConfiguration | ( | Lz_SerialConfiguration *const | serialConfiguration | ) |
Set the configuration of the serial line.
This function will set the different parameters of the serial line according to the configuration pointed by the serialConfiguration parameter.
serialConfiguration | A pointer to an allocated Lz_SerialConfiguration (e.g. allocated on the stack). |