Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
net_can_api Struct Reference

#include <can.h>

Data Fields

struct net_if_api iface_api
 
int(* send )(const struct device *dev, const struct zcan_frame *frame, can_tx_callback_t cb, void *cb_arg, k_timeout_t timeout)
 
int(* attach_filter )(const struct device *dev, can_rx_callback_t cb, void *cb_arg, const struct zcan_filter *filter)
 
void(* detach_filter )(const struct device *dev, int filter_id)
 
int(* enable )(const struct device *dev, bool enable)
 

Detailed Description

CAN L2 driver API. Used by 6loCAN.

Field Documentation

◆ attach_filter

int(* net_can_api::attach_filter) (const struct device *dev, can_rx_callback_t cb, void *cb_arg, const struct zcan_filter *filter)

Attach a filter with it's callback

◆ detach_filter

void(* net_can_api::detach_filter) (const struct device *dev, int filter_id)

Detach a filter

◆ enable

int(* net_can_api::enable) (const struct device *dev, bool enable)

Enable or disable the reception of frames for net CAN

◆ iface_api

struct net_if_api net_can_api::iface_api

The net_if_api must be placed in first position in this struct so that we are compatible with network interface API.

◆ send

int(* net_can_api::send) (const struct device *dev, const struct zcan_frame *frame, can_tx_callback_t cb, void *cb_arg, k_timeout_t timeout)

Send a single CAN frame


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