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