1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/drivers/candev: add debug output concerning errors

This commit is contained in:
Firas Hamdi 2024-05-14 10:13:41 +02:00
parent 59c9f68307
commit 31003bf323

View File

@ -256,12 +256,15 @@ static void _can_event_callback(candev_t *dev, candev_event_t event, void *arg)
DEBUG("_can_event: CANDEV_EVENT_RX_ERROR\n"); DEBUG("_can_event: CANDEV_EVENT_RX_ERROR\n");
break; break;
case CANDEV_EVENT_BUS_OFF: case CANDEV_EVENT_BUS_OFF:
DEBUG("_can_event: CANDEV_EVENT_BUS_OFF\n");
dev->state = CAN_STATE_BUS_OFF; dev->state = CAN_STATE_BUS_OFF;
break; break;
case CANDEV_EVENT_ERROR_PASSIVE: case CANDEV_EVENT_ERROR_PASSIVE:
DEBUG("_can_event: CANDEV_EVENT_ERROR_PASSIVE\n");
dev->state = CAN_STATE_ERROR_PASSIVE; dev->state = CAN_STATE_ERROR_PASSIVE;
break; break;
case CANDEV_EVENT_ERROR_WARNING: case CANDEV_EVENT_ERROR_WARNING:
DEBUG("_can_event: CANDEV_EVENT_ERROR_WARNING\n");
dev->state = CAN_STATE_ERROR_WARNING; dev->state = CAN_STATE_ERROR_WARNING;
break; break;
default: default: