changeset 561 | f9be4262c68d |
parent 528 | 0a30e161d63c |
child 691 | 17d9c0736935 |
560:0bb927393dd0 | 561:f9be4262c68d |
---|---|
18 You should have received a copy of the GNU Lesser General Public |
18 You should have received a copy of the GNU Lesser General Public |
19 License along with this library; if not, write to the Free Software |
19 License along with this library; if not, write to the Free Software |
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 */ |
21 */ |
22 |
22 |
23 /** |
|
24 * @defgroup can CAN Management |
|
25 * @ingroup userapi |
|
26 */ |
|
27 |
|
28 #ifndef __can_h__ |
23 #ifndef __can_h__ |
29 #define __can_h__ |
24 #define __can_h__ |
30 |
25 |
31 #include "applicfg.h" |
26 #include "applicfg.h" |
32 /** Used for the Can message structure */ |
27 |
33 /* |
28 /* |
34 union SHORT_CAN { |
29 union SHORT_CAN { |
35 struct { UNS8 b0,b1; } b; |
30 struct { UNS8 b0,b1; } b; |
36 UNS32 w; |
31 UNS32 w; |
37 }; |
32 }; |
43 */ |
38 */ |
44 |
39 |
45 /** |
40 /** |
46 * @brief The CAN message structure |
41 * @brief The CAN message structure |
47 * @ingroup can |
42 * @ingroup can |
48 * @{ |
|
49 */ |
43 */ |
50 typedef struct { |
44 typedef struct { |
51 UNS16 cob_id; /* l'ID du mesg */ |
45 UNS16 cob_id; /**< message's ID */ |
52 UNS8 rtr; /**< remote transmission request. 0 if not rtr, |
46 UNS8 rtr; /**< remote transmission request. (0 if not rtr message, 1 if rtr message) */ |
53 1 for a rtr message */ |
47 UNS8 len; /**< message's length (0 to 8) */ |
54 UNS8 len; /**< message length (0 to 8) */ |
48 UNS8 data[8]; /**< message's datas */ |
55 UNS8 data[8]; /**< data */ |
|
56 } Message; |
49 } Message; |
57 /** @} */ |
|
58 |
50 |
59 #define Message_Initializer {0,0,0,{0,0,0,0,0,0,0,0}} |
51 #define Message_Initializer {0,0,0,{0,0,0,0,0,0,0,0}} |
60 |
52 |
61 typedef UNS8 (*canSend_t)(Message *); |
53 typedef UNS8 (*canSend_t)(Message *); |
62 |
54 |