28 |
28 |
29 /* The process_var structure |
29 /* The process_var structure |
30 Used to store the PDO before the transmission or the reception. |
30 Used to store the PDO before the transmission or the reception. |
31 */ |
31 */ |
32 typedef struct struct_s_process_var { |
32 typedef struct struct_s_process_var { |
33 UNS8 count; // Size of data. Ex : for a PDO of 6 bytes of data, count = 6 |
33 UNS8 count; /* Size of data. Ex : for a PDO of 6 bytes of data, count = 6 */ |
34 // WARNING s_process_var.data is subject to ENDIANISATION |
34 /* WARNING s_process_var.data is subject to ENDIANISATION |
35 // (with respect to CANOPEN_BIG_ENDIAN) |
35 * (with respect to CANOPEN_BIG_ENDIAN) |
|
36 */ |
36 UNS8 data[PDO_MAX_LEN]; |
37 UNS8 data[PDO_MAX_LEN]; |
37 }s_process_var; |
38 }s_process_var; |
38 |
39 |
39 #include "data.h" |
40 #include "data.h" |
40 |
41 |
41 /** The PDO structure */ |
42 /** The PDO structure */ |
42 typedef struct struct_s_PDO { |
43 typedef struct struct_s_PDO { |
43 UNS32 cobId; // COB-ID |
44 UNS32 cobId; /* COB-ID */ |
44 UNS8 len; // Number of data transmitted (in data[]) |
45 UNS8 len; /* Number of data transmitted (in data[]) */ |
45 UNS8 data[8]; // Contain the data |
46 UNS8 data[8]; /* Contain the data */ |
46 }s_PDO; |
47 }s_PDO; |
47 |
48 |
48 /** Transmit a PDO data frame on the bus bus_id |
49 /** Transmit a PDO data frame on the bus bus_id |
49 * pdo is a structure which contains the pdo to transmit |
50 * pdo is a structure which contains the pdo to transmit |
50 * bus_id is hardware dependant |
51 * bus_id is hardware dependant |