2016-02-17 21:25:15 -04:00
|
|
|
#pragma once
|
2014-11-25 01:57:54 -04:00
|
|
|
|
|
|
|
#include "AP_BattMonitor_SMBus.h"
|
2016-04-19 13:11:29 -03:00
|
|
|
|
2017-02-08 20:28:14 -04:00
|
|
|
class AP_BattMonitor_SMBus_Solo : public AP_BattMonitor_SMBus
|
2014-11-25 01:57:54 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
// Constructor
|
2017-04-24 03:25:52 -03:00
|
|
|
AP_BattMonitor_SMBus_Solo(AP_BattMonitor &mon,
|
2016-04-19 13:11:29 -03:00
|
|
|
AP_BattMonitor::BattMonitor_State &mon_state,
|
2017-10-27 02:36:49 -03:00
|
|
|
AP_BattMonitor_Params ¶ms,
|
2016-04-19 13:11:29 -03:00
|
|
|
AP_HAL::OwnPtr<AP_HAL::I2CDevice> dev);
|
2014-11-25 01:57:54 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2017-10-26 00:58:56 -03:00
|
|
|
void timer(void) override;
|
2016-11-04 00:54:51 -03:00
|
|
|
|
2014-11-25 01:57:54 -04:00
|
|
|
// read_block - returns number of characters read if successful, zero if unsuccessful
|
2019-12-21 05:02:28 -04:00
|
|
|
uint8_t read_block(uint8_t reg, uint8_t* data, uint8_t max_len) const;
|
2014-12-29 22:10:01 -04:00
|
|
|
|
2017-02-08 20:28:14 -04:00
|
|
|
uint8_t _button_press_count;
|
2014-11-25 01:57:54 -04:00
|
|
|
};
|