29#include "PeripheralNames.h"
30#include "hal/can_helper.h"
66typedef void (*can_irq_handler)(uintptr_t context, CanIrqType type);
68typedef struct can_s can_t;
70void can_init(can_t *obj, PinName rd, PinName td);
71void can_init_direct(can_t *obj,
const can_pinmap_t *pinmap);
72void can_init_freq(can_t *obj, PinName rd, PinName td,
int hz);
73void can_init_freq_direct(can_t *obj,
const can_pinmap_t *pinmap,
int hz);
74void can_free(can_t *obj);
75int can_frequency(can_t *obj,
int hz);
77void can_irq_init(can_t *obj, can_irq_handler handler, uintptr_t context);
78void can_irq_free(can_t *obj);
79void can_irq_set(can_t *obj, CanIrqType irq, uint32_t enable);
82int can_read(can_t *obj,
CAN_Message *msg,
int handle);
83int can_mode(can_t *obj, CanMode mode);
84int can_filter(can_t *obj, uint32_t
id, uint32_t mask,
CANFormat format, int32_t handle);
85void can_reset(can_t *obj);
86unsigned char can_rderror(can_t *obj);
87unsigned char can_tderror(can_t *obj);
88void can_monitor(can_t *obj,
int silent);
CANFormat
Values that represent CAN Format.
const PinMap * can_rd_pinmap(void)
Get the pins that support CAN RD.
const PinMap * can_td_pinmap(void)
Get the pins that support CAN TD.
Holder for single CAN message.