![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Battery
Dependencies: mbed PowerControl SDFileSystem
Fork of HeptaBattery by
hepta_sat/HeptaBattery.h@1:166ddf929155, 2016-12-13 (annotated)
- Committer:
- tomoya123
- Date:
- Tue Dec 13 06:37:27 2016 +0000
- Revision:
- 1:166ddf929155
- Parent:
- 0:d53e9c6fc771
HeptaBattery
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tomoya123 | 0:d53e9c6fc771 | 1 | #ifndef MBED_HEPTABATTERY_H |
tomoya123 | 0:d53e9c6fc771 | 2 | #define MBED_HEPTABATTERY_H |
tomoya123 | 0:d53e9c6fc771 | 3 | #include "mbed.h" |
tomoya123 | 0:d53e9c6fc771 | 4 | #include "PowerControl/PowerControl.h" |
tomoya123 | 0:d53e9c6fc771 | 5 | #include "PowerControl/EthernetPowerControl.h" |
tomoya123 | 0:d53e9c6fc771 | 6 | |
tomoya123 | 0:d53e9c6fc771 | 7 | class HeptaBattery{ |
tomoya123 | 0:d53e9c6fc771 | 8 | public: |
tomoya123 | 0:d53e9c6fc771 | 9 | HeptaBattery( |
tomoya123 | 0:d53e9c6fc771 | 10 | PinName bat, |
tomoya123 | 0:d53e9c6fc771 | 11 | PinName bat_ct, |
tomoya123 | 0:d53e9c6fc771 | 12 | PinName reg_st |
tomoya123 | 0:d53e9c6fc771 | 13 | ); |
tomoya123 | 0:d53e9c6fc771 | 14 | void vol(float* bt); |
tomoya123 | 0:d53e9c6fc771 | 15 | void vol_u16(char* bt_u16, int *dsize); |
tomoya123 | 0:d53e9c6fc771 | 16 | void chargecontrol(int state, int *save_flag); |
tomoya123 | 0:d53e9c6fc771 | 17 | |
tomoya123 | 0:d53e9c6fc771 | 18 | private: |
tomoya123 | 0:d53e9c6fc771 | 19 | AnalogIn _bat; |
tomoya123 | 0:d53e9c6fc771 | 20 | DigitalOut _bat_ct; |
tomoya123 | 0:d53e9c6fc771 | 21 | DigitalOut _reg_st; |
tomoya123 | 0:d53e9c6fc771 | 22 | }; |
tomoya123 | 0:d53e9c6fc771 | 23 | |
tomoya123 | 0:d53e9c6fc771 | 24 | #endif |