|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
Driver for the UART serial communication peripheral. More...
Functions | |
| void | exuart_Init (uint32_t baudRate) |
| Initializes the UART module. More... | |
| void | exuart_SendByteAsync (uint8_t data) |
| Asynchronously sends the given byte through the UART bus. More... | |
| void | exuart_SendBytesAsync (uint8_t *data, int length) |
| Asynchronously sends the given bytes through the UART bus. More... | |
| uint16_t | exuart_ReceivedBytesCount (void) |
| Gets the number of bytes received and ready to read. More... | |
| uint8_t | exuart_GetByte (void) |
| Gets the next received byte. More... | |
Driver for the UART serial communication peripheral.
This driver controls the UART peripheral of the STM32, connected to the digital extension connector.
Call exuart_Init() first in the initialization code. To send data, call exuart_SendByteAsync(). To receive data, check first that bytes are available by calling exuart_ReceivedBytesCount(), then call exuart_GetByte().
| uint8_t exuart_GetByte | ( | void | ) |
Gets the next received byte.
| void exuart_Init | ( | uint32_t | baudRate | ) |
Initializes the UART module.
| baudRate | UART communication frequency (baud rate) [b/s]. |
| uint16_t exuart_ReceivedBytesCount | ( | void | ) |
Gets the number of bytes received and ready to read.
| void exuart_SendByteAsync | ( | uint8_t | data | ) |
Asynchronously sends the given byte through the UART bus.
| data | the data byte to send. |
| void exuart_SendBytesAsync | ( | uint8_t * | data, |
| int | length | ||
| ) |
Asynchronously sends the given bytes through the UART bus.
| data | pointer to the data bytes array to send. |
| length | number of bytes to send (array size). |
1.8.13