]> rtime.felk.cvut.cz Git - CanFestival-3.git/blob - include/unix/canfestival.h
Second time, Re-write doxygen tags in headers files to generate User API documentation
[CanFestival-3.git] / include / unix / canfestival.h
1 #ifndef UNIX_H_
2 #define UNIX_H_
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include "timerscfg.h"
9 #include "can_driver.h"
10 #include "data.h"
11 #include "timers_driver.h"
12
13 #ifndef __KERNEL__
14 #include <dlfcn.h>
15 #endif
16
17 typedef void* LIB_HANDLE;
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  */
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  */
44 LIB_HANDLE LoadCanDriver(const char* driver_name);
45
46 /**
47  * @brief Send a CAN message
48  * @param port CanFestival file descriptor
49  * @param *m The message to send
50  * @return 0 if succes
51  */
52 UNS8 canSend(CAN_PORT port, Message *m);
53
54 /**
55  * @ingroup can
56  * @brief Open a CANopen device
57  * @param *board Pointer on the board structure that contains busname and baudrate 
58  * @param *d Pointer on the CAN object data structure
59  * @return port CanFestival file descriptor
60  */
61 CAN_PORT canOpen(s_BOARD *board, CO_Data * d);
62
63 /**
64  * @ingroup can
65  * @brief Close a CANopen device
66  * @param *d Pointer on the CAN object data structure
67  * @return 0 if succes
68  */
69 int canClose(CO_Data * d);
70
71 /**
72  * @ingroup can
73  * @brief Change the CANopen device baudrate 
74  * @param port CanFestival file descriptor 
75  * @param *baud The new baudrate to assign
76  * @return 0 if succes
77  */
78 UNS8 canChangeBaudRate(CAN_PORT port, char* baud);
79 /** @} */
80
81
82 #ifdef __cplusplus
83 };
84 #endif
85
86 #endif /*UNIX_H_*/