mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
Added data parameter to UART RX callback
This commit is contained in:
parent
4476921cac
commit
8cb7abd15f
49 changed files with 112 additions and 67 deletions
|
@ -270,7 +270,7 @@ void uartIrqHandler(uartPort_t *s)
|
|||
{
|
||||
if (!s->rxDMAStream && (USART_GetITStatus(s->USARTx, USART_IT_RXNE) == SET)) {
|
||||
if (s->port.rxCallback) {
|
||||
s->port.rxCallback(s->USARTx->DR);
|
||||
s->port.rxCallback(s->USARTx->DR, s->port.rxCallbackData);
|
||||
} else {
|
||||
s->port.rxBuffer[s->port.rxBufferHead] = s->USARTx->DR;
|
||||
s->port.rxBufferHead = (s->port.rxBufferHead + 1) % s->port.rxBufferSize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue