equal
deleted
inserted
replaced
166 } canBusInit; |
166 } canBusInit; |
167 |
167 |
168 extern canBusInit bi; |
168 extern canBusInit bi; |
169 |
169 |
170 |
170 |
|
171 |
171 /* |
172 /* |
172 For the received messsage, add a Identificator to |
173 For the received messsage, add a Identificator to |
173 the list of ID to accept. |
174 the list of ID to accept. |
174 You can use several times this function to accept several messages. |
175 You can use several times this function to accept several messages. |
175 It configures registers on 16 bits. |
176 It configures registers on 16 bits. |
185 char canAddIdToFilter ( |
186 char canAddIdToFilter ( |
186 UNS16 adrCAN, |
187 UNS16 adrCAN, |
187 UNS8 nFilter, |
188 UNS8 nFilter, |
188 UNS16 id /* 11 bits, the 5 msb not used */ |
189 UNS16 id /* 11 bits, the 5 msb not used */ |
189 ); |
190 ); |
|
191 |
|
192 /* |
|
193 Use this function to change the CAN message acceptance filters and masks. |
|
194 */ |
|
195 char canChangeFilter (UNS16 adrCAN, canBusFilterInit fi); |
|
196 |
190 |
197 |
191 /* |
198 /* |
192 Enable one of the 5 MSCAN. |
199 Enable one of the 5 MSCAN. |
193 Must be done only one time after a reset of the CPU. |
200 Must be done only one time after a reset of the CPU. |
194 To do before any CAN initialisation |
201 To do before any CAN initialisation |
284 UNS16 adrCAN, /* First address of MSCANx registers */ |
291 UNS16 adrCAN, /* First address of MSCANx registers */ |
285 Message msg /* Message to transmit */ |
292 Message msg /* Message to transmit */ |
286 ); |
293 ); |
287 |
294 |
288 /* |
295 /* |
|
296 Set the interruptions. Must be call just after having left the init mode. |
|
297 */ |
|
298 char canSetInterrupt (UNS16 adrCAN); |
|
299 |
|
300 /* |
289 Put one of the 5 mscan in sleep mode |
301 Put one of the 5 mscan in sleep mode |
290 Beware! If some messages are to be sent, |
302 Beware! If some messages are to be sent, |
291 or if it is receiving, going into sleep mode |
303 or if it is receiving, going into sleep mode |
292 may take time. |
304 may take time. |
293 Wake up is disabled : stay in sleep mode even if |
305 Wake up is disabled : stay in sleep mode even if |