dll.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 OTA keys S.A.
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for more
6  * details.
7  */
8 
20 #ifndef CAN_DLL_H
21 #define CAN_DLL_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include "can/common.h"
28 #include "can/pkt.h"
29 #include "can/device.h"
30 #include "thread.h"
31 
37 int can_dll_init(void);
38 
50 
63 int can_dll_dispatch_rx_frame(struct can_frame *frame, kernel_pid_t pid);
64 
77 
90 
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* CAN_DLL_H */
108 
kernel_pid_t
int16_t kernel_pid_t
Unique process identifier.
Definition: sched.h:125
device.h
Definitions of CAN device interface.
candev
Structure to hold driver state.
Definition: candev.h:78
can_dll_dispatch_rx_frame
int can_dll_dispatch_rx_frame(struct can_frame *frame, kernel_pid_t pid)
Dispatch a received frame.
can_dll_dispatch_tx_error
int can_dll_dispatch_tx_error(can_pkt_t *pkt)
Dispatch a tx error.
can_dll_dispatch_tx_conf
int can_dll_dispatch_tx_conf(can_pkt_t *pkt)
Dispatch a tx confirmation.
common.h
Definitions of high-level CAN interface.
can_frame
Controller Area Network frame.
Definition: can.h:88
can_dll_dispatch_bus_off
int can_dll_dispatch_bus_off(kernel_pid_t pid)
Dispatch RX error from a device.
can_pkt_t
A CAN packet.
Definition: pkt.h:41
pkt.h
CAN memory allocation module.
can_dll_init
int can_dll_init(void)
Initialize the CAN DLL.
candev_dev
candev descriptor to pass to the device thread
Definition: device.h:69
can_dll_register_candev
int can_dll_register_candev(candev_dev_t *candev)
Register a CAN device into the DLL.