13#ifndef ZEPHYR_INCLUDE_NET_CAN_H_
14#define ZEPHYR_INCLUDE_NET_CAN_H_
52#define NET_CAN_MTU 0x0FFF
55#define NET_CAN_MULTICAST_ADDR 0x3DFF
56#define NET_CAN_DAD_ADDR 0x3DFE
57#define NET_CAN_ETH_TRANSLATOR_ADDR 0x3DF0
58#define NET_CAN_MAX_ADDR 0x3DEF
59#define NET_CAN_MIN_ADDR 0x0100
61#define CAN_NET_IF_ADDR_MASK 0x3FFF
62#define CAN_NET_IF_ADDR_BYTE_LEN 2U
63#define CAN_NET_IF_ADDR_DEST_POS 14U
64#define CAN_NET_IF_ADDR_DEST_MASK (CAN_NET_IF_ADDR_MASK << CAN_NET_IF_ADDR_DEST_POS)
65#define CAN_NET_IF_ADDR_SRC_POS 0U
66#define CAN_NET_IF_ADDR_SRC_MASK (CAN_NET_IF_ADDR_MASK << CAN_NET_IF_ADDR_SRC_POS)
67#define CAN_NET_IF_ADDR_MCAST_POS 28U
68#define CAN_NET_IF_ADDR_MCAST_MASK (1UL << CAN_NET_IF_ADDR_MCAST_POS)
70#define CAN_NET_IF_IS_MCAST_BIT (1U << 14)
72#define CAN_NET_FILTER_NOT_SET -1
116BUILD_ASSERT(offsetof(
struct net_can_api, iface_api) == 0);
120#define CANBUS_L2_CTX_TYPE struct net_canbus_context *
125struct canbus_net_ctx {
137 struct k_fifo rx_err_queue;
148struct net_canbus_lladdr {
159struct canbus_fc_opts {
172struct canbus_isotp_tx_ctx {
178 struct canbus_fc_opts opts;
180 struct net_canbus_lladdr dest_addr;
201struct canbus_isotp_rx_ctx {
223void net_6locan_init(
struct net_if *iface);
ZTEST_BMEM int timeout
Definition: main.c:31
Public APIs for the CAN drivers.
void
Definition: eswifi_shell.c:15
void(* can_rx_callback_t)(struct zcan_frame *msg, void *arg)
Define the application callback handler function signature for receiving.
Definition: can.h:318
void(* can_tx_callback_t)(uint32_t error_flags, void *arg)
Define the application callback handler function signature.
Definition: can.h:308
net_verdict
Net Verdict.
Definition: net_core.h:97
#define K_KERNEL_STACK_MEMBER(sym, size)
Declare an embedded stack memory region.
Definition: thread_stack.h:285
state
Definition: http_parser_state.h:30
Public API for network interface.
IPv6 and IPv4 definitions.
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
__INT8_TYPE__ int8_t
Definition: stdint.h:42
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
Definition: kernel.h:2153
Kernel timeout type.
Definition: sys_clock.h:65
A structure used to submit work.
Definition: kernel.h:3623
int(* send)(const struct device *dev, const struct zcan_frame *frame, can_tx_callback_t cb, void *cb_arg, k_timeout_t timeout)
Definition: can.h:102
int(* attach_filter)(const struct device *dev, can_rx_callback_t cb, void *cb_arg, const struct zcan_filter *filter)
Definition: can.h:105
int(* enable)(const struct device *dev, bool enable)
Definition: can.h:110
struct net_if_api iface_api
Definition: can.h:99
void(* detach_filter)(const struct device *dev, int filter_id)
Definition: can.h:108
Network Interface structure.
Definition: net_if.h:468
Network packet.
Definition: net_pkt.h:62
CAN filter structure.
Definition: can.h:234
CAN message structure.
Definition: can.h:185