mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +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
|
@ -111,7 +111,7 @@ static tcpPort_t* tcpReconfigure(tcpPort_t *s, int id)
|
|||
return s;
|
||||
}
|
||||
|
||||
serialPort_t *serTcpOpen(int id, serialReceiveCallbackPtr rxCallback, uint32_t baudRate, portMode_e mode, portOptions_e options)
|
||||
serialPort_t *serTcpOpen(int id, serialReceiveCallbackPtr rxCallback, void *rxCallbackData, uint32_t baudRate, portMode_e mode, portOptions_e options)
|
||||
{
|
||||
tcpPort_t *s = NULL;
|
||||
|
||||
|
@ -135,6 +135,7 @@ serialPort_t *serTcpOpen(int id, serialReceiveCallbackPtr rxCallback, uint32_t b
|
|||
|
||||
// callback works for IRQ-based RX ONLY
|
||||
s->port.rxCallback = rxCallback;
|
||||
s->port.rxCallbackData = rxCallbackData;
|
||||
s->port.mode = mode;
|
||||
s->port.baudRate = baudRate;
|
||||
s->port.options = options;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue