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;
77void can_init(can_t *obj, PinName rd, PinName td);
141void can_irq_init(can_t *obj, can_irq_handler handler, uintptr_t context);
void can_init_freq_direct(can_t *obj, const can_pinmap_t *pinmap, int hz, int data_hz)
Initialize the CAN peripheral.
unsigned char can_rderror(can_t *obj)
Detects read errors - Used to detect read overflow errors.
int can_read(can_t *obj, CAN_Message *msg, int handle)
Read a CAN message from the bus.
int can_frequency(can_t *obj, int hz, int data_hz)
Configure the CAN bus frequency.
CANFormat
Values that represent CAN Format.
void can_reset(can_t *obj)
Reset CAN interface.
void can_irq_init(can_t *obj, can_irq_handler handler, uintptr_t context)
Initialize the CAN IRQ handler.
unsigned char can_tderror(can_t *obj)
Detects write errors - Used to detect write overflow errors.
void can_irq_set(can_t *obj, CanIrqType irq, uint32_t enable)
Enable/disable the CAN IRQ event.
void can_irq_free(can_t *obj)
Remove the CAN IRQ handler.
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.
int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle)
Filter out incomming messages.
void can_free(can_t *obj)
Release the CAN peripheral, not currently invoked.
int can_mode(can_t *obj, CanMode mode)
Change CAN operation to the specified mode.
int canfd_write(can_t *obj, CANFD_Message msg)
Write a CAN FD Message to the bus.
int canfd_read(can_t *obj, CANFD_Message *msg, int handle)
Read a Classical CAN or CAN FD Message from the bus.
void can_monitor(can_t *obj, int silent)
Puts or removes the CAN interface into silent monitoring mode.
void can_init_direct(can_t *obj, const can_pinmap_t *pinmap)
Initialize the CAN peripheral.
void can_init_freq(can_t *obj, PinName rd, PinName td, int hz, int data_hz)
Initialize the CAN peripheral.
int can_write(can_t *obj, CAN_Message msg)
Write a CAN message to the bus.
void can_init(can_t *obj, PinName rd, PinName td)
Initialize the CAN peripheral.
Holder for single CAN message.