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
SysMngmt.h@0:e516fcccccda, 2014-10-01 (annotated)
- Committer:
- martydd3
- Date:
- Wed Oct 01 12:52:26 2014 +0000
- Revision:
- 0:e516fcccccda
Added LPCDigitalOut, LPCDigitalIn, and CANBuffer Libaries; Comments on code in SysMngmt.cpp involving register and pin access; Note: LPCDigitalOut.h defines a void mode(PinMode) which isn't in LPCDigitalOut.cpp, causes a linking error if used
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| martydd3 | 0:e516fcccccda | 1 | #ifndef _SYSMNGMT_ |
| martydd3 | 0:e516fcccccda | 2 | #define _SYSMNGMT_ |
| martydd3 | 0:e516fcccccda | 3 | #include "mbed.h" |
| martydd3 | 0:e516fcccccda | 4 | |
| martydd3 | 0:e516fcccccda | 5 | #define MSEC_HRS 2.77778e-7 |
| martydd3 | 0:e516fcccccda | 6 | #define DC_DC_ISENSE_OFFSET_V 0.5 |
| martydd3 | 0:e516fcccccda | 7 | #define DC_DC_ISENSE_INCREMENT 0.133 |
| martydd3 | 0:e516fcccccda | 8 | |
| martydd3 | 0:e516fcccccda | 9 | #define BAT_ISENSE_OFFSET_V 1.65 |
| martydd3 | 0:e516fcccccda | 10 | #define BAT_ISENSE_INCREMENT 0.5297 |
| martydd3 | 0:e516fcccccda | 11 | |
| martydd3 | 0:e516fcccccda | 12 | Serial pc(USBTX,USBRX); |
| martydd3 | 0:e516fcccccda | 13 | CAN CAN_SysM(p30,p29); |
| martydd3 | 0:e516fcccccda | 14 | |
| martydd3 | 0:e516fcccccda | 15 | //Temperature Input |
| martydd3 | 0:e516fcccccda | 16 | AnalogIn Coolant1(p17); //Brass ones |
| martydd3 | 0:e516fcccccda | 17 | AnalogIn Coolant2(p16); //Brass ones |
| martydd3 | 0:e516fcccccda | 18 | AnalogIn DC_DC(p18); //Murata |
| martydd3 | 0:e516fcccccda | 19 | AnalogIn ChargerFET(p15);//Murata |
| martydd3 | 0:e516fcccccda | 20 | AnalogIn BatISense(p19); |
| martydd3 | 0:e516fcccccda | 21 | AnalogIn DCSense(p20); |
| martydd3 | 0:e516fcccccda | 22 | |
| martydd3 | 0:e516fcccccda | 23 | typedef union convert{ |
| martydd3 | 0:e516fcccccda | 24 | float FLOAT; |
| martydd3 | 0:e516fcccccda | 25 | char C_FLOAT[4]; |
| martydd3 | 0:e516fcccccda | 26 | }ftc; |
| martydd3 | 0:e516fcccccda | 27 | |
| martydd3 | 0:e516fcccccda | 28 | // Call function at reccuring interval |
| martydd3 | 0:e516fcccccda | 29 | Ticker ReadIMD, PollSDSwitch, ReadTemperature, ReadBatteryState; |
| martydd3 | 0:e516fcccccda | 30 | |
| martydd3 | 0:e516fcccccda | 31 | double BATmA_Hr; |
| martydd3 | 0:e516fcccccda | 32 | float DCA_msec,BATA_msec; |
| martydd3 | 0:e516fcccccda | 33 | float Bat_I_Ratio,DC_I_Ratio; |
| martydd3 | 0:e516fcccccda | 34 | CANMessage RxBuffer[10]={}; |
| martydd3 | 0:e516fcccccda | 35 | |
| martydd3 | 0:e516fcccccda | 36 | /* |
| martydd3 | 0:e516fcccccda | 37 | PwmOut Pump(p26); |
| martydd3 | 0:e516fcccccda | 38 | PwmOut Fan1(p25); |
| martydd3 | 0:e516fcccccda | 39 | PwmOut Fan2(p24); |
| martydd3 | 0:e516fcccccda | 40 | PwmOut Fan3(p23); |
| martydd3 | 0:e516fcccccda | 41 | */ |
| martydd3 | 0:e516fcccccda | 42 | #endif /* _SYSMNGMT_ */ |
