14 #include <dlfcn.h> |
14 #include <dlfcn.h> |
15 #endif |
15 #endif |
16 |
16 |
17 typedef void* LIB_HANDLE; |
17 typedef void* LIB_HANDLE; |
18 |
18 |
|
19 /** @defgroup userapi User API */ |
|
20 |
|
21 /** @defgroup can CAN management |
|
22 * @ingroup userapi |
|
23 */ |
|
24 |
|
25 /** |
|
26 * @ingroup can |
|
27 * @{ |
|
28 */ |
|
29 |
|
30 /** |
|
31 * @ingroup can |
|
32 * @brief Unload CAN driver interface |
|
33 * @param handle The library handle |
|
34 * @return 0 if succes |
|
35 */ |
19 UNS8 UnLoadCanDriver(LIB_HANDLE handle); |
36 UNS8 UnLoadCanDriver(LIB_HANDLE handle); |
|
37 |
|
38 /** |
|
39 * @ingroup can |
|
40 * @brief Load CAN driver interface |
|
41 * @param *driver_name The location of the library to load |
|
42 * @return handle The library handle |
|
43 */ |
20 LIB_HANDLE LoadCanDriver(const char* driver_name); |
44 LIB_HANDLE LoadCanDriver(const char* driver_name); |
|
45 |
|
46 /** |
|
47 * @ingroup can |
|
48 * @brief Send a CAN message |
|
49 * @param port CanFestival file descriptor |
|
50 * @param *m The message to send |
|
51 * @return 0 if succes |
|
52 */ |
21 UNS8 canSend(CAN_PORT port, Message *m); |
53 UNS8 canSend(CAN_PORT port, Message *m); |
|
54 |
|
55 /** |
|
56 * @ingroup can |
|
57 * @brief Open a CANopen device |
|
58 * @param *board Pointer on the board structure that contains busname and baudrate |
|
59 * @param *d Pointer on the CAN object data structure |
|
60 * @return port CanFestival file descriptor |
|
61 */ |
22 CAN_PORT canOpen(s_BOARD *board, CO_Data * d); |
62 CAN_PORT canOpen(s_BOARD *board, CO_Data * d); |
|
63 |
|
64 /** |
|
65 * @ingroup can |
|
66 * @brief Stop the timer task |
|
67 * @param *d Pointer on the CAN object data structure |
|
68 * @return 0 if succes |
|
69 */ |
23 int canClose(CO_Data * d); |
70 int canClose(CO_Data * d); |
|
71 |
|
72 /** |
|
73 * @ingroup can |
|
74 * @brief Stop the timer task |
|
75 * @param port CanFestival file descriptor |
|
76 * @param *baud The new baudrate to assign |
|
77 * @return 0 if succes |
|
78 */ |
24 UNS8 canChangeBaudRate(CAN_PORT port, char* baud); |
79 UNS8 canChangeBaudRate(CAN_PORT port, char* baud); |
|
80 /** @} */ |
|
81 |
25 |
82 |
26 #ifdef __cplusplus |
83 #ifdef __cplusplus |
27 }; |
84 }; |
28 #endif |
85 #endif |
29 |
86 |