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.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
CANController/CANController.h@24:f58a3c0071c3, 2014-11-07 (annotated)
- Committer:
- martydd3
- Date:
- Fri Nov 07 21:26:46 2014 +0000
- Revision:
- 24:f58a3c0071c3
- Parent:
- 22:fc802e7715f8
finally compiles
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| martydd3 | 22:fc802e7715f8 | 1 | #ifndef _FILE_CANCONTRL_H |
| martydd3 | 22:fc802e7715f8 | 2 | #define _FILE_CANCONTRL_H |
| martydd3 | 22:fc802e7715f8 | 3 | |
| martydd3 | 22:fc802e7715f8 | 4 | #include "DC_DC.h" |
| martydd3 | 22:fc802e7715f8 | 5 | #include "FanPump.h" |
| martydd3 | 22:fc802e7715f8 | 6 | |
| martydd3 | 22:fc802e7715f8 | 7 | enum ContrlPinName{ |
| martydd3 | 22:fc802e7715f8 | 8 | FAN1, FAN2, FAN3, PUMP |
| martydd3 | 24:f58a3c0071c3 | 9 | }; |
| martydd3 | 22:fc802e7715f8 | 10 | |
| martydd3 | 22:fc802e7715f8 | 11 | class CANController{ |
| martydd3 | 22:fc802e7715f8 | 12 | public: |
| martydd3 | 22:fc802e7715f8 | 13 | CANController(); |
| martydd3 | 22:fc802e7715f8 | 14 | bool dc_on(); |
| martydd3 | 22:fc802e7715f8 | 15 | void set_dc(bool status); |
| martydd3 | 22:fc802e7715f8 | 16 | bool write_contrl(ContrlPinName name, float duty); |
| martydd3 | 22:fc802e7715f8 | 17 | void direct_off(ContrlPinName name, float duty); |
| martydd3 | 22:fc802e7715f8 | 18 | float *read_control(); |
| martydd3 | 22:fc802e7715f8 | 19 | |
| martydd3 | 22:fc802e7715f8 | 20 | private: |
| martydd3 | 22:fc802e7715f8 | 21 | FanPump *contrl_pins[6]; |
| martydd3 | 22:fc802e7715f8 | 22 | DC dc; |
| martydd3 | 24:f58a3c0071c3 | 23 | }; |
| martydd3 | 24:f58a3c0071c3 | 24 | |
| martydd3 | 24:f58a3c0071c3 | 25 | #endif |
