|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
Macros | |
| #define | UART_RX_DMA DMA1_Stream5 |
| #define | UART_RX_DMA_CHANNEL DMA_Channel_4 |
| #define | UART_TX_DMA DMA1_Stream6 |
| #define | UART_TX_DMA_CHANNEL DMA_Channel_4 |
| #define | UART_TX_BUFFER_SIZE 4096 |
| #define | UART_RX_BUFFER_SIZE 512 |
| #define | UART_USER_RX_QUEUE_SIZE 512 |
| #define | UART_DMA_TX_IS_BUSY (DMA_GetCmdStatus(UART_TX_DMA) == ENABLE && DMA_GetCurrDataCounter(UART_TX_DMA) > 0) |
Functions | |
| void | uart_Init (void) |
| Initializes the UART module. More... | |
| void | uart_Step (void) |
| Copies the received bytes into the user-accessible queue. Reads all the available bytes in the DMA RX buffer, and copies them to the user-accessible queue. More... | |
| cb_CircularBuffer * | uart_GetRxQueue (void) |
| Gets the user-accessible queue of the received bytes. More... | |
| void | uart_StartDma (void) |
| Starts the DMA transfer to send bytes to UART peripheral. More... | |
| void | uart_SendByteAsync (uint8_t data) |
| Asynchronously sends the given byte through the UART bus. More... | |
| void | uart_SendBytesAsync (uint8_t *data, int length) |
| Asynchronously sends the given bytes through the UART bus. More... | |
| void | uart_FlushTx (void) |
| Start the DMA to send the bytes waiting in the intermediate buffer. More... | |
Variables | |
| uint8_t | uart_txBuffer [2][UART_TX_BUFFER_SIZE] |
| uint8_t | uart_currentTxBufferToWriteTo |
| uint16_t | uart_txBufferIndex |
| uint16_t | uart_nBytesToTransferDma |
| uint8_t | uart_rxBuffer [UART_RX_BUFFER_SIZE] |
| uint8_t const * | uart_rxBuffTail |
| uint8_t | uart_userRxQueue [UART_USER_RX_QUEUE_SIZE] |
| cb_CircularBuffer | uart_rxQueue |
| #define UART_DMA_TX_IS_BUSY (DMA_GetCmdStatus(UART_TX_DMA) == ENABLE && DMA_GetCurrDataCounter(UART_TX_DMA) > 0) |
| #define UART_RX_BUFFER_SIZE 512 |
| #define UART_RX_DMA DMA1_Stream5 |
| #define UART_RX_DMA_CHANNEL DMA_Channel_4 |
| #define UART_TX_BUFFER_SIZE 4096 |
| #define UART_TX_DMA DMA1_Stream6 |
| #define UART_TX_DMA_CHANNEL DMA_Channel_4 |
| #define UART_USER_RX_QUEUE_SIZE 512 |
| void uart_StartDma | ( | void | ) |
Starts the DMA transfer to send bytes to UART peripheral.
| uint8_t uart_currentTxBufferToWriteTo |
| uint16_t uart_nBytesToTransferDma |
| uint8_t uart_rxBuffer[UART_RX_BUFFER_SIZE] |
| uint8_t const* uart_rxBuffTail |
| cb_CircularBuffer uart_rxQueue |
| uint8_t uart_txBuffer[2][UART_TX_BUFFER_SIZE] |
| uint16_t uart_txBufferIndex |
| uint8_t uart_userRxQueue[UART_USER_RX_QUEUE_SIZE] |
1.8.13