dll.h¶
Definitions of low-level CAN DLL interface.
-
int
can_dll_init
(void)¶ Initialize the CAN DLL.
Return values
- 0 on success
-
int
can_dll_register_candev
(device.h::candev_dev_t
* candev)¶ Register a CAN device into the DLL.
This function must be called by the device thread to register the device into the DLL
Parameters
candev: the candev to register Return values
- interface number on success
- -ENODEV if ifnum is invalid
-
int
can_dll_dispatch_rx_frame
(struct can_frame * frame,kernel_types.h::kernel_pid_t
pid)¶ Dispatch a received frame.
This function is used to send a message to the DLL thread when a
frame
is received from the device identified by itspid
Parameters
frame: the received frame pid: the pid of the receiver device Return values
- 0 on success
- -ENOMEM if the message can not be sent
-
int
can_dll_dispatch_tx_conf
(can_pkt_t * pkt)¶ Dispatch a tx confirmation.
This function is used to send a message to the sender thread when the
pkt
has been sent correctly.Parameters
pkt: the pkt which has been sent Return values
- 0 on success
- -ENOMEM if the message can not be sent
-
int
can_dll_dispatch_tx_error
(can_pkt_t * pkt)¶ Dispatch a tx error.
This function is used to send a message to the sender thread when the
pkt
has not been sent correctlyParameters
pkt: the pkt which has not been sent correctly Return values
- 0 on success
- -ENOMEM if the message can not be sent
-
int
can_dll_dispatch_bus_off
(kernel_types.h::kernel_pid_t
pid)¶ Dispatch RX error from a device.
Dispatch RX error from a device to receivers threads which have subscribed to frames on that interface
Parameters
pid: the device thread pid Return values
- 0 on success