|
HRI board firmware
v2.1
Microcontroller firmware of the board used during the HRI labs.
|
Macros | |
| #define | EXUART_RX_Pin GPIO_Pin_7 |
| #define | EXUART_RX_PinSource GPIO_PinSource7 |
| #define | EXUART_RX_Port GPIOB |
| #define | EXUART_TX_Pin GPIO_Pin_6 |
| #define | EXUART_TX_PinSource GPIO_PinSource6 |
| #define | EXUART_TX_Port GPIOB |
| #define | EXUART_PERIPH USART1 |
| #define | RX_DMA DMA2_Stream2 |
| #define | RX_DMA_CHANNEL DMA_Channel_4 |
| #define | TX_DMA DMA2_Stream7 |
| #define | TX_DMA_CHANNEL DMA_Channel_4 |
| #define | TX_BUFFER_SIZE 512 |
| #define | RX_BUFFER_SIZE 1024 |
| #define | USER_RX_QUEUE_SIZE 2048 |
| #define | UART_DMA_TX_IS_BUSY (DMA_GetCmdStatus(TX_DMA) == ENABLE && DMA_GetCurrDataCounter(TX_DMA) > 0) |
Functions | |
| void | exuart_FlushTx (void) |
| Start the DMA to send the bytes waiting in the intermediate buffer. More... | |
| void | exuart_Init (uint32_t baudRate) |
| Initializes the UART module. 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... | |
| void | exuart_StartDma (void) |
| Starts the DMA transfer to send bytes to UART peripheral. 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... | |
Variables | |
| uint8_t | exuart_txBuffer [2][TX_BUFFER_SIZE] |
| uint8_t | exuart_currentTxBufferToWriteTo |
| uint16_t | exuart_txBufferIndex |
| uint16_t | exuart_nBytesToTransferDma |
| uint8_t | exuart_rxBuffer [RX_BUFFER_SIZE] |
| uint8_t const * | exuart_rxBuffTail |
| uint8_t | exuart_userRxQueue [USER_RX_QUEUE_SIZE] |
| cb_CircularBuffer | exuart_rxQueue |
| #define EXUART_PERIPH USART1 |
| #define EXUART_RX_Pin GPIO_Pin_7 |
| #define EXUART_RX_PinSource GPIO_PinSource7 |
| #define EXUART_RX_Port GPIOB |
| #define EXUART_TX_Pin GPIO_Pin_6 |
| #define EXUART_TX_PinSource GPIO_PinSource6 |
| #define EXUART_TX_Port GPIOB |
| #define RX_BUFFER_SIZE 1024 |
| #define RX_DMA DMA2_Stream2 |
| #define RX_DMA_CHANNEL DMA_Channel_4 |
| #define TX_BUFFER_SIZE 512 |
| #define TX_DMA DMA2_Stream7 |
| #define TX_DMA_CHANNEL DMA_Channel_4 |
| #define UART_DMA_TX_IS_BUSY (DMA_GetCmdStatus(TX_DMA) == ENABLE && DMA_GetCurrDataCounter(TX_DMA) > 0) |
| #define USER_RX_QUEUE_SIZE 2048 |
| void exuart_FlushTx | ( | void | ) |
Start the DMA to send the bytes waiting in the intermediate buffer.
| void exuart_StartDma | ( | void | ) |
Starts the DMA transfer to send bytes to UART peripheral.
| uint8_t exuart_currentTxBufferToWriteTo |
| uint16_t exuart_nBytesToTransferDma |
| uint8_t exuart_rxBuffer[RX_BUFFER_SIZE] |
| uint8_t const* exuart_rxBuffTail |
| cb_CircularBuffer exuart_rxQueue |
| uint8_t exuart_txBuffer[2][TX_BUFFER_SIZE] |
| uint16_t exuart_txBufferIndex |
| uint8_t exuart_userRxQueue[USER_RX_QUEUE_SIZE] |
1.8.13