drivers: can: change can_tx_callback_t function signature
Change the can_tx_callback_t function signature to use an "int" (not an uint32_t) for representing transmission errors. The "error" callback function parameter is functionally equivalent to the return value from can_send() and thus needs to use the same data type and needs to be able to hold negative errno values. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
522eff91e5
commit
b1b77c1774
11 changed files with 39 additions and 39 deletions
|
@ -94,7 +94,7 @@ static void canopen_rx_isr_callback(struct zcan_frame *msg, void *arg)
|
|||
buffer->pFunct(buffer->object, &rxMsg);
|
||||
}
|
||||
|
||||
static void canopen_tx_isr_callback(uint32_t error_flags, void *arg)
|
||||
static void canopen_tx_isr_callback(int error, void *arg)
|
||||
{
|
||||
CO_CANmodule_t *CANmodule = arg;
|
||||
|
||||
|
@ -103,7 +103,7 @@ static void canopen_tx_isr_callback(uint32_t error_flags, void *arg)
|
|||
return;
|
||||
}
|
||||
|
||||
if (error_flags == 0) {
|
||||
if (error == 0) {
|
||||
CANmodule->first_tx_msg = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue