30#ifdef CAN_HW_DEV_USE_CAN0
31#define CAN_HW_DEV_INTERFACE "can0"
33#define CAN_HW_DEV_INTERFACE "vcan0"
131bool can_hw_receive(uint32_t *
id,
bool *extended, uint64_t *data,
size_t *len);
bool can_hw_receive(uint32_t *id, bool *extended, uint64_t *data, size_t *len)
Receives CAN data from the bus.
Definition: can_hw.c:225
StatusCode can_hw_transmit(uint32_t id, bool extended, const uint8_t *data, size_t len)
Transmits CAN data on the bus.
Definition: can_hw.c:189
StatusCode can_hw_add_filter_in(uint32_t mask, uint32_t filter, bool extended)
Sets a filter on the CAN interface.
Definition: can_hw.c:157
CanHwBusStatus can_hw_bus_status(void)
Fetches the CAN bus status.
Definition: can_hw.c:177
StatusCode can_hw_init(const CanQueue *rx_queue, const CanSettings *settings)
Initialize the CAN interface.
Definition: can_hw.c:90
CanHwBusStatus
CAN Bus status flags.
Definition: can_hw.h:37
CanHwBitrate
Selection for the supported CAN Bitrates.
Definition: can_hw.h:55
@ CAN_HW_BUS_STATUS_OK
Definition: can_hw.h:38
@ CAN_HW_BUS_STATUS_ERROR
Definition: can_hw.h:39
@ CAN_HW_BUS_STATUS_OFF
Definition: can_hw.h:40
@ CAN_HW_BITRATE_500KBPS
Definition: can_hw.h:58
@ CAN_HW_BITRATE_1000KBPS
Definition: can_hw.h:59
@ CAN_HW_BITRATE_125KBPS
Definition: can_hw.h:56
@ CAN_HW_BITRATE_250KBPS
Definition: can_hw.h:57
@ NUM_CAN_HW_BITRATES
Definition: can_hw.h:60
StatusCode
StatusCodes for various errors.
Definition: status.h:27
CAN queue data structure to store received CAN messages.
Definition: can_queue.h:34
CAN Settings.
Definition: bootloader_can.h:58
bool loopback
Definition: bootloader_can.h:61
CanHwBitrate bitrate
Definition: can_hw.h:73
GpioAddress rx
Definition: can_hw.h:75
bool silent
Definition: bootloader_can.h:62
uint16_t device_id
Definition: bootloader_can.h:59
GpioAddress tx
Definition: can_hw.h:74
Port and pin data.
Definition: gpio.h:112