1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Added data parameter to UART RX callback

This commit is contained in:
Martin Budden 2017-11-25 07:06:02 +00:00
parent 4476921cac
commit 8cb7abd15f
49 changed files with 112 additions and 67 deletions

View file

@ -193,7 +193,7 @@ void uartIrqHandler(uartPort_t *s)
if (SR & USART_FLAG_RXNE && !s->rxDMAChannel) {
// If we registered a callback, pass crap there
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;
if (s->port.rxBufferHead >= s->port.rxBufferSize) {