nrfxlib API 3.3.99
Loading...
Searching...
No Matches
CAN HAL

Hardware access layer for managing the CAN peripheral. More...

Data Structures

struct  nrf_can_config_t
 CAN configuration structure. More...
 
struct  nrf_can_rxfilter_t
 
struct  nrf_can_frame_t
 CAN frame structure. More...
 

Enumerations

enum  nrf_can_task_t { NRF_CAN_TASK_START = offsetof( NRF_SP_CAN_Type , TASKS_START) , NRF_CAN_TASK_RESET }
 CAN tasks. More...
 
enum  nrf_can_event_t { NRF_CAN_EVENT_TXCOMPLETE = offsetof( NRF_SP_CAN_Type , EVENTS_TXCOMPLETE) , NRF_CAN_EVENT_RXCOMPLETE = offsetof( NRF_SP_CAN_Type , EVENTS_RXCOMPLETE) , NRF_CAN_EVENT_ERRORDETECTED = offsetof( NRF_SP_CAN_Type , EVENTS_ERRORDETECTED) , NRF_CAN_EVENT_STATECHANGED = offsetof( NRF_SP_CAN_Type , EVENTS_STATECHANGED) }
 CAN events. More...
 
enum  nrf_can_int_mask_t { NRF_CAN_INT_TXCOMPLETE_MASK = (0x1UL << (0UL) ) , NRF_CAN_INT_RXCOMPLETE_MASK = (0x1UL << (1UL) ) , NRF_CAN_INT_ERRORDETECTED_MASK = (0x1UL << (2UL) ) , NRF_CAN_INT_STATECHANGED_MASK = (0x1UL << (3UL) ) }
 CAN interrupt masks. More...
 
enum  nrf_can_request_t { NRF_CAN_REQUEST_RX = (0x0UL) , NRF_CAN_REQUEST_TX = (0x1UL) }
 CAN request types. More...
 
enum  nrf_can_parsing_t { NRF_CAN_PARSING_NONE = (0x0UL) , NRF_CAN_PARSING_TIMING = (0x1UL) , NRF_CAN_PARSING_MODE = (0x2UL) , NRF_CAN_PARSING_RXFILTER = (0x3UL) }
 
enum  nrf_can_mode_t { NRF_CAN_MODE_NORMAL = (0x0UL) , NRF_CAN_MODE_LOOPBACK = (0x1UL) , NRF_CAN_MODE_LISTENONLY = (0x2UL) , NRF_CAN_MODE_ONESHOT = (0x3UL) }
 CAN operation modes. More...
 
enum  nrf_can_state_t {
  NRF_CAN_STATE_ERRORACTIVE = (0x0UL) , NRF_CAN_STATE_ERRORWARNING = (0x1UL) , NRF_CAN_STATE_ERRORPASSIVE = (0x2UL) , NRF_CAN_STATE_BUSOFF = (0x3UL) ,
  NRF_CAN_STATE_STOPPED = (0x4UL)
}
 

Functions

NRF_STATIC_INLINE void nrf_can_task_trigger (NRF_SP_CAN_Type *p_reg, nrf_can_task_t task)
 
NRF_STATIC_INLINE void nrf_can_task_untrigger (NRF_SP_CAN_Type *p_reg, nrf_can_task_t task)
 
NRF_STATIC_INLINE void nrf_can_enable (NRF_SP_CAN_Type *p_reg)
 
NRF_STATIC_INLINE void nrf_can_disable (NRF_SP_CAN_Type *p_reg)
 
NRF_STATIC_INLINE bool nrf_can_enable_check (NRF_SP_CAN_Type const *p_reg)
 
NRF_STATIC_INLINE void nrf_can_event_clear (NRF_SP_CAN_Type *p_reg, nrf_can_event_t event)
 
NRF_STATIC_INLINE bool nrf_can_event_check (NRF_SP_CAN_Type const *p_reg, nrf_can_event_t event)
 
NRF_STATIC_INLINE uint32_t nrf_can_event_address_get (NRF_SP_CAN_Type const *p_reg, nrf_can_event_t event)
 
NRF_STATIC_INLINE void nrf_can_int_enable (NRF_SP_CAN_Type *p_reg, uint32_t mask)
 
NRF_STATIC_INLINE uint32_t nrf_can_int_enable_check (NRF_SP_CAN_Type const *p_reg, uint32_t mask)
 
NRF_STATIC_INLINE void nrf_can_int_disable (NRF_SP_CAN_Type *p_reg, uint32_t mask)
 
NRF_STATIC_INLINE void nrf_can_rxfilter_set (NRF_SP_CAN_Type *p_reg, nrf_can_rxfilter_t const *p_rxfilter, uint8_t index)
 
NRF_STATIC_INLINE void nrf_can_rxfilter_get (NRF_SP_CAN_Type const *p_reg, nrf_can_rxfilter_t *p_rxfilter, uint8_t index)
 
NRF_STATIC_INLINE void nrf_can_rxfilter_usefilter_set (NRF_SP_CAN_Type *p_reg, uint8_t index, uint8_t value)
 
NRF_STATIC_INLINE bool nrf_can_rxfilter_usefilter_get (NRF_SP_CAN_Type const *p_reg, uint8_t index)
 
NRF_STATIC_INLINE void nrf_can_rxfilter_filtermatched_set (NRF_SP_CAN_Type *p_reg, uint8_t index, uint8_t value)
 
NRF_STATIC_INLINE bool nrf_can_rxfilter_filtermatched_get (NRF_SP_CAN_Type const *p_reg, uint8_t index)
 
NRF_STATIC_INLINE void nrf_can_rxfilter_inmailbox_set (NRF_SP_CAN_Type *p_reg, uint8_t index, uint8_t value)
 
NRF_STATIC_INLINE bool nrf_can_rxfilter_inmailbox_get (NRF_SP_CAN_Type const *p_reg, uint8_t index)
 
NRF_STATIC_INLINE void nrf_can_set_parsing_timing (NRF_SP_CAN_Type *p_reg)
 
NRF_STATIC_INLINE void nrf_can_set_parsing_mode (NRF_SP_CAN_Type *p_reg)
 
NRF_STATIC_INLINE void nrf_can_set_parsing_rxfilter (NRF_SP_CAN_Type *p_reg)
 
NRF_STATIC_INLINE void nrf_can_config_set (NRF_SP_CAN_Type *p_reg, nrf_can_config_t const *p_config)
 
NRF_STATIC_INLINE void nrf_can_config_get (NRF_SP_CAN_Type const *p_reg, nrf_can_config_t *p_config)
 
NRF_STATIC_INLINE void nrf_can_txframe_set (NRF_SP_CAN_Type *p_reg, uint8_t idx, nrf_can_frame_t const *p_frame)
 
NRF_STATIC_INLINE void nrf_can_txframe_get (NRF_SP_CAN_Type const *p_reg, uint8_t idx, nrf_can_frame_t *p_frame)
 
NRF_STATIC_INLINE void nrf_can_rxframe_set (NRF_SP_CAN_Type *p_reg, uint8_t idx, nrf_can_frame_t const *p_frame)
 
NRF_STATIC_INLINE void nrf_can_rxframe_get (NRF_SP_CAN_Type const *p_reg, uint8_t idx, nrf_can_frame_t *p_frame)
 
NRF_STATIC_INLINE nrf_can_state_t nrf_can_state_get (NRF_SP_CAN_Type const *p_reg)
 
NRF_STATIC_INLINE uint32_t nrf_can_error_get (NRF_SP_CAN_Type const *p_reg)
 
NRF_STATIC_INLINE bool nrf_can_status_error_check (uint32_t error_mask)
 
NRF_STATIC_INLINE void nrf_can_handshake_set (NRF_SP_CAN_Type *p_reg, uint32_t val, uint8_t idx)
 
NRF_STATIC_INLINE uint32_t nrf_can_handshake_get (NRF_SP_CAN_Type const *p_reg, uint8_t idx)
 

Detailed Description

Hardware access layer for managing the CAN peripheral.