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:
Henrik Brix Andersen 2021-12-28 22:28:54 +01:00 committed by Christopher Friedt
commit b1b77c1774
11 changed files with 39 additions and 39 deletions

View file

@ -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;
}