|
typedef uint32_t | canid_t |
|
typedef void(* | can_tx_callback_t) (uint32_t error_flags, void *arg) |
| Define the application callback handler function signature. More...
|
|
typedef void(* | can_rx_callback_t) (struct zcan_frame *msg, void *arg) |
| Define the application callback handler function signature for receiving. More...
|
|
typedef void(* | can_state_change_isr_t) (enum can_state state, struct can_bus_err_cnt err_cnt) |
| Defines the state change isr handler function signature. More...
|
|
typedef int(* | can_set_timing_t) (const struct device *dev, const struct can_timing *timing, const struct can_timing *timing_data) |
|
typedef int(* | can_set_mode_t) (const struct device *dev, enum can_mode mode) |
|
typedef int(* | can_send_t) (const struct device *dev, const struct zcan_frame *msg, k_timeout_t timeout, can_tx_callback_t callback_isr, void *callback_arg) |
|
typedef int(* | can_attach_msgq_t) (const struct device *dev, struct k_msgq *msg_q, const struct zcan_filter *filter) |
|
typedef int(* | can_attach_isr_t) (const struct device *dev, can_rx_callback_t isr, void *callback_arg, const struct zcan_filter *filter) |
|
typedef void(* | can_detach_t) (const struct device *dev, int filter_id) |
|
typedef int(* | can_recover_t) (const struct device *dev, k_timeout_t timeout) |
|
typedef enum can_state(* | can_get_state_t) (const struct device *dev, struct can_bus_err_cnt *err_cnt) |
|
typedef void(* | can_register_state_change_isr_t) (const struct device *dev, can_state_change_isr_t isr) |
|
typedef int(* | can_get_core_clock_t) (const struct device *dev, uint32_t *rate) |
|
|
static uint8_t | can_dlc_to_bytes (uint8_t dlc) |
| Convert the DLC to the number of bytes. More...
|
|
static uint8_t | can_bytes_to_dlc (uint8_t num_bytes) |
| Convert a number of bytes to the DLC. More...
|
|
int | can_send (const struct device *dev, const struct zcan_frame *msg, k_timeout_t timeout, can_tx_callback_t callback_isr, void *callback_arg) |
| Perform data transfer to CAN bus. More...
|
|
static int | can_write (const struct device *dev, const uint8_t *data, uint8_t length, uint32_t id, enum can_rtr rtr, k_timeout_t timeout) |
| Write a set amount of data to the can bus. More...
|
|
int | can_attach_workq (const struct device *dev, struct k_work_q *work_q, struct zcan_work *work, can_rx_callback_t callback, void *callback_arg, const struct zcan_filter *filter) |
| Attach a CAN work queue to a single or group of identifiers. More...
|
|
int | can_attach_msgq (const struct device *dev, struct k_msgq *msg_q, const struct zcan_filter *filter) |
| Attach a message queue to a single or group of identifiers. More...
|
|
static int | can_attach_isr (const struct device *dev, can_rx_callback_t isr, void *callback_arg, const struct zcan_filter *filter) |
| Attach an isr callback function to a single or group of identifiers. More...
|
|
void | can_detach (const struct device *dev, int filter_id) |
| Detach an isr or message queue from the identifier filtering. More...
|
|
int | can_get_core_clock (const struct device *dev, uint32_t *rate) |
| Read the core clock value. More...
|
|
int | can_calc_timing (const struct device *dev, struct can_timing *res, uint32_t bitrate, uint16_t sample_pnt) |
| Calculate timing parameters from bitrate and sample point. More...
|
|
int | can_calc_prescaler (const struct device *dev, struct can_timing *timing, uint32_t bitrate) |
| Fill in the prescaler value for a given bitrate and timing. More...
|
|
int | can_set_mode (const struct device *dev, enum can_mode mode) |
| Set the controller to the given mode. More...
|
|
int | can_set_timing (const struct device *dev, const struct can_timing *timing, const struct can_timing *timing_data) |
| Configure timing of a host controller. More...
|
|
static int | can_set_bitrate (const struct device *dev, uint32_t bitrate, uint32_t bitrate_data) |
| Set the bitrate of the CAN controller. More...
|
|
static int | can_configure (const struct device *dev, enum can_mode mode, uint32_t bitrate) |
| Configure operation of a host controller. More...
|
|
enum can_state | can_get_state (const struct device *dev, struct can_bus_err_cnt *err_cnt) |
| Get current state. More...
|
|
int | can_recover (const struct device *dev, k_timeout_t timeout) |
| Recover from bus-off state. More...
|
|
static void | can_register_state_change_isr (const struct device *dev, can_state_change_isr_t isr) |
| Register an ISR callback for state change interrupt. More...
|
|
static void | can_copy_frame_to_zframe (const struct can_frame *frame, struct zcan_frame *zframe) |
| Converter that translates between can_frame and zcan_frame structs. More...
|
|
static void | can_copy_zframe_to_frame (const struct zcan_frame *zframe, struct can_frame *frame) |
| Converter that translates between zcan_frame and can_frame structs. More...
|
|
static void | can_copy_filter_to_zfilter (const struct can_filter *filter, struct zcan_filter *zfilter) |
| Converter that translates between can_filter and zcan_frame_filter structs. More...
|
|
static void | can_copy_zfilter_to_filter (const struct zcan_filter *zfilter, struct can_filter *filter) |
| Converter that translates between zcan_filter and can_filter structs. More...
|
|
Public APIs for the CAN drivers.