Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SDC21XX_Motor SDC21XX_Motor
CANopen.h@2:3a8e39e5e13f, 2016-05-30 (annotated)
- Committer:
- kkoichy
- Date:
- Mon May 30 11:47:38 2016 +0000
- Revision:
- 2:3a8e39e5e13f
- Parent:
- 0:0f99b1d63054
- Child:
- 3:a70bff10b56c
V1.1; Corrected the includes (CAN.h for nucleo boards), so that the library can be used with any plateform
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| kkoichy | 0:0f99b1d63054 | 1 | #ifndef CANOPEN_H |
| kkoichy | 0:0f99b1d63054 | 2 | #define CANOPEN_H |
| kkoichy | 0:0f99b1d63054 | 3 | |
| kkoichy | 0:0f99b1d63054 | 4 | #include "mbed.h" |
| kkoichy | 0:0f99b1d63054 | 5 | |
| kkoichy | 0:0f99b1d63054 | 6 | |
| kkoichy | 0:0f99b1d63054 | 7 | namespace mbed { |
| kkoichy | 0:0f99b1d63054 | 8 | class CANopen { |
| kkoichy | 0:0f99b1d63054 | 9 | |
| kkoichy | 0:0f99b1d63054 | 10 | public : |
| kkoichy | 0:0f99b1d63054 | 11 | |
| kkoichy | 0:0f99b1d63054 | 12 | CANopen(short _id, CAN * _can); |
| kkoichy | 0:0f99b1d63054 | 13 | CANopen(short _id, CAN * _can, int _baud); |
| kkoichy | 0:0f99b1d63054 | 14 | int Send_Initiate_SDO_Download(short index, short subindex, long data); |
| kkoichy | 0:0f99b1d63054 | 15 | int Send_Initiate_SDO_Upload(short index, short subindex); |
| kkoichy | 0:0f99b1d63054 | 16 | short GetNodeID(void); |
| kkoichy | 0:0f99b1d63054 | 17 | void SetNodeID(short _id); |
| kkoichy | 0:0f99b1d63054 | 18 | |
| kkoichy | 0:0f99b1d63054 | 19 | private : |
| kkoichy | 0:0f99b1d63054 | 20 | |
| kkoichy | 0:0f99b1d63054 | 21 | |
| kkoichy | 0:0f99b1d63054 | 22 | protected : |
| kkoichy | 0:0f99b1d63054 | 23 | |
| kkoichy | 0:0f99b1d63054 | 24 | short node_id; |
| kkoichy | 0:0f99b1d63054 | 25 | CAN * can; |
| kkoichy | 0:0f99b1d63054 | 26 | |
| kkoichy | 0:0f99b1d63054 | 27 | |
| kkoichy | 0:0f99b1d63054 | 28 | |
| kkoichy | 0:0f99b1d63054 | 29 | };//end class |
| kkoichy | 0:0f99b1d63054 | 30 | |
| kkoichy | 0:0f99b1d63054 | 31 | |
| kkoichy | 0:0f99b1d63054 | 32 | |
| kkoichy | 0:0f99b1d63054 | 33 | }//end namespace |
| kkoichy | 0:0f99b1d63054 | 34 | |
| kkoichy | 0:0f99b1d63054 | 35 | #endif |