Common definitions¶
CAN stack common definitions.
This module defines the common part of the CAN stack, including structures and messages.
-
enum
canopt_t
¶ - CANOPT_BITTIMING
- bit timing parameter
- CANOPT_RX_FILTERS
- rx filters
- CANOPT_TEC
- Transmit Error Counter.
- CANOPT_REC
- Receive Error Counter.
- CANOPT_LEC
- Last Error Code.
- CANOPT_CLOCK
- controller main clock
- CANOPT_BITTIMING_CONST
- controller bittiming parameters
- CANOPT_STATE
- set controller state
sys/include/can/common.h::canopt_state_t
-
enum
canopt_state_t
¶ - CANOPT_STATE_OFF
- powered off
- CANOPT_STATE_SLEEP
- sleep mode
- CANOPT_STATE_LISTEN_ONLY
- listen only mode
- CANOPT_STATE_ON
- power on, rx / tx mode
-
enum
can_msg
¶ - CAN_MSG_ACK
= 0x100
- acknowledgment
- CAN_MSG_SEND_FRAME
- send a frame
- CAN_MSG_ABORT_FRAME
- abort a frame
- CAN_MSG_SET
- set an option
- CAN_MSG_GET
- get an option
- CAN_MSG_SET_FILTER
- set a filter
- CAN_MSG_REMOVE_FILTER
- remove a filter
- CAN_MSG_POWER_UP
- power up
- CAN_MSG_POWER_DOWN
- power down
- CAN_MSG_SET_TRX
- set a transceiver
- CAN_MSG_EVENT
= 0x200
- driver event
- CAN_MSG_WAKE_UP
- driver has been woken up by bus
- CAN_MSG_TX_CONFIRMATION
- a frame has been sent
- CAN_MSG_RX_INDICATION
- a frame has been received
- CAN_MSG_TX_ERROR
- there was an error when transmitting
- CAN_MSG_RX_ERROR
- there was an error when receiving
- CAN_MSG_BUS_OFF
- bus-off detected
- CAN_MSG_ERROR_PASSIVE
- driver switched in error passive
- CAN_MSG_ERROR_WARNING
- driver reached error warning
- CAN_MSG_PM
- power management event
- CAN_MSG_ISOTP_RX_TIMEOUT
= 0x400
- isotp rx timeout
- CAN_MSG_ISOTP_TX_TIMEOUT
- isotp tx timeout
- CAN_MSG_ACK
-
enum
can_reg_type_t
¶ - CAN_TYPE_DEFAULT
= 0
- default entry (use msg)
- CAN_TYPE_MBOX
- mbox entry
- CAN_TYPE_DEFAULT
-
struct can_rx_data
can_rx_data_t
¶ Received data structure.
This structure is used when a layer sends received data to the upper layer
-
struct can_reg_entry
can_reg_entry_t
¶ registry entry
This structure is used through the stack to describe how to contact the upper layer and which CAN interface to use
-
struct
can_opt_t
¶ Structure to pass a CAN option.
-
sys/include/can/common.h::canopt_t
opt
¶ the option to get/set
-
uint16_t
context
¶ (optional) context for that option
-
void *
data
¶ data to set or buffer to read into
-
uint16_t
data_len
¶ size of the data / the buffer
-
-
struct
can_rx_data
¶ Received data structure.
This structure is used when a layer sends received data to the upper layer
-
void *
arg
¶ upper layer private param
-
include/net/gnrc/pkt.h::gnrc_pktsnip_t
*snip
¶ pointer to the allocated snip
-
void *
-
struct
can_reg_entry
¶ registry entry
This structure is used through the stack to describe how to contact the upper layer and which CAN interface to use
-
struct can_reg_entry *
next
¶ next for linked list
-
int
ifnum
¶ interface number for the entry
-
kernel_types.h::kernel_pid_t
pid
¶ pid of the thread when using msg
-
union can_reg_entry::@178
target
¶ entry target
-
sys/include/can/common.h::can_reg_type_t
type
¶ entry type
-
struct can_reg_entry *