Skip to content

Commit 241f98a

Browse files
committed
canio: mimxrt10xx: Minor fixes in hal/CAN.c
1 parent e3b9814 commit 241f98a

File tree

1 file changed

+3
-3
lines changed
  • ports/mimxrt10xx/common-hal/canio

1 file changed

+3
-3
lines changed

ports/mimxrt10xx/common-hal/canio/CAN.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static uint8_t mimxrt10xx_flexcan_get_free_tx_mbid(canio_can_obj_t *self) {
101101
MICROPY_END_ATOMIC_SECTION(atomic_state);
102102

103103
if (!found_free_tx_mb) {
104-
mp_raise_ValueError(MP_ERROR_TEXT("Unable to send CAN Message: all tx message buffer is busy"));
104+
mp_raise_ValueError(MP_ERROR_TEXT("Unable to send CAN Message: all Tx message buffers are busy"));
105105
}
106106

107107
return MIMXRT10XX_FLEXCAN_TX_ARRID_TO_MBID(tx_array_id);
@@ -146,13 +146,13 @@ static void mimxrt10xx_flexcan_handle_error(canio_can_obj_t *self) {
146146
}
147147
}
148148

149-
static void mimxrt10xx_flexcan_callback(CAN_Type *base, flexcan_handle_t *handle, status_t status, uint32_t result, void *selfPtr)
149+
static FLEXCAN_CALLBACK(mimxrt10xx_flexcan_callback)
150150
{
151151
(void) base; // unused variable
152152
(void) handle; // unused variable
153153
// The result field can either be a message buffer index or a status flags value.
154154

155-
canio_can_obj_t *self = (canio_can_obj_t*) selfPtr;
155+
canio_can_obj_t *self = (canio_can_obj_t*) userData;
156156

157157
switch (status) {
158158

0 commit comments

Comments
 (0)