Charge control
Dependencies: mbed PowerControl SDFileSystem
hepta_sat/HeptaBattery.h@0:0842f00470eb, 2016-12-09 (annotated)
- Committer:
- tomoya123
- Date:
- Fri Dec 09 05:04:37 2016 +0000
- Revision:
- 0:0842f00470eb
Charge control
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tomoya123 | 0:0842f00470eb | 1 | #ifndef MBED_HEPTABATTERY_H |
tomoya123 | 0:0842f00470eb | 2 | #define MBED_HEPTABATTERY_H |
tomoya123 | 0:0842f00470eb | 3 | #include "mbed.h" |
tomoya123 | 0:0842f00470eb | 4 | #include "PowerControl/PowerControl.h" |
tomoya123 | 0:0842f00470eb | 5 | #include "PowerControl/EthernetPowerControl.h" |
tomoya123 | 0:0842f00470eb | 6 | |
tomoya123 | 0:0842f00470eb | 7 | class HeptaBattery{ |
tomoya123 | 0:0842f00470eb | 8 | public: |
tomoya123 | 0:0842f00470eb | 9 | HeptaBattery( |
tomoya123 | 0:0842f00470eb | 10 | PinName bat, |
tomoya123 | 0:0842f00470eb | 11 | PinName bat_ct, |
tomoya123 | 0:0842f00470eb | 12 | PinName reg_st |
tomoya123 | 0:0842f00470eb | 13 | ); |
tomoya123 | 0:0842f00470eb | 14 | void vol(float* bt); |
tomoya123 | 0:0842f00470eb | 15 | void vol_u16(char* bt_u16, int *dsize); |
tomoya123 | 0:0842f00470eb | 16 | void chargecontrol(int state, int *save_flag); |
tomoya123 | 0:0842f00470eb | 17 | |
tomoya123 | 0:0842f00470eb | 18 | private: |
tomoya123 | 0:0842f00470eb | 19 | AnalogIn _bat; |
tomoya123 | 0:0842f00470eb | 20 | DigitalOut _bat_ct; |
tomoya123 | 0:0842f00470eb | 21 | DigitalOut _reg_st; |
tomoya123 | 0:0842f00470eb | 22 | }; |
tomoya123 | 0:0842f00470eb | 23 | |
tomoya123 | 0:0842f00470eb | 24 | #endif |