Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
can_driver_api Struct Reference

Driver Operations CAN Controller driver operations More...

#include <zephyr/drivers/can.h>

Data Fields

can_get_capabilities_t get_capabilities
  REQ Get the supported modes of the CAN controller.
can_start_t start
  REQ Start the CAN controller.
can_stop_t stop
  REQ Stop the CAN controller.
can_set_mode_t set_mode
  REQ Set the CAN controller to the given operation mode.
can_set_timing_t set_timing
  REQ Configure the bus timing of a CAN controller.
can_send_t send
  REQ Queue a CAN frame for transmission on the CAN bus.
can_add_rx_filter_t add_rx_filter
  REQ Add a callback function for a given CAN filter.
can_remove_rx_filter_t remove_rx_filter
  REQ Remove a CAN RX filter.
can_recover_t recover
  OPT Recover from bus-off state.
can_get_state_t get_state
  REQ Get current CAN controller state.
can_set_state_change_callback_t set_state_change_callback
  REQ Set a callback for CAN controller state change events.
can_get_core_clock_t get_core_clock
  REQ Get the CAN core clock rate.
can_get_max_filters_t get_max_filters
  OPT Get maximum number of RX filters.
struct can_timing timing_min
  REQ Min values for the timing registers
struct can_timing timing_max
  REQ Max values for the timing registers
can_set_timing_data_t set_timing_data
  OPT Configure the bus timing for the data phase of a CAN FD controller.
struct can_timing timing_data_min
 Min values for the timing registers during the data phase.
struct can_timing timing_data_max
 Max values for the timing registers during the data phase.

Detailed Description

Driver Operations CAN Controller driver operations

This is the driver API structure any CAN Controller driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ add_rx_filter

can_add_rx_filter_t can_driver_api::add_rx_filter

REQ Add a callback function for a given CAN filter.

◆ get_capabilities

can_get_capabilities_t can_driver_api::get_capabilities

REQ Get the supported modes of the CAN controller.

◆ get_core_clock

can_get_core_clock_t can_driver_api::get_core_clock

REQ Get the CAN core clock rate.

◆ get_max_filters

can_get_max_filters_t can_driver_api::get_max_filters

OPT Get maximum number of RX filters.

◆ get_state

can_get_state_t can_driver_api::get_state

REQ Get current CAN controller state.

◆ recover

can_recover_t can_driver_api::recover

OPT Recover from bus-off state.

Attention
Available only when the following Kconfig option is enabled: CONFIG_CAN_MANUAL_RECOVERY_MODE.

◆ remove_rx_filter

can_remove_rx_filter_t can_driver_api::remove_rx_filter

REQ Remove a CAN RX filter.

◆ send

can_send_t can_driver_api::send

REQ Queue a CAN frame for transmission on the CAN bus.

◆ set_mode

can_set_mode_t can_driver_api::set_mode

REQ Set the CAN controller to the given operation mode.

◆ set_state_change_callback

can_set_state_change_callback_t can_driver_api::set_state_change_callback

REQ Set a callback for CAN controller state change events.

◆ set_timing

can_set_timing_t can_driver_api::set_timing

REQ Configure the bus timing of a CAN controller.

◆ set_timing_data

can_set_timing_data_t can_driver_api::set_timing_data

OPT Configure the bus timing for the data phase of a CAN FD controller.

Attention
Available only when the following Kconfig option is enabled: CONFIG_CAN_FD_MODE.

◆ start

can_start_t can_driver_api::start

REQ Start the CAN controller.

◆ stop

can_stop_t can_driver_api::stop

REQ Stop the CAN controller.

◆ timing_data_max

struct can_timing can_driver_api::timing_data_max

Max values for the timing registers during the data phase.

REQ if set_timing_data is implemented

◆ timing_data_min

struct can_timing can_driver_api::timing_data_min

Min values for the timing registers during the data phase.

REQ if set_timing_data is implemented

◆ timing_max

struct can_timing can_driver_api::timing_max

REQ Max values for the timing registers

◆ timing_min

struct can_timing can_driver_api::timing_min

REQ Min values for the timing registers


The documentation for this struct was generated from the following file: