24 lines
641 B
C++
24 lines
641 B
C++
#pragma once
|
|
|
|
#include "AP_BattMonitor_SMBus.h"
|
|
|
|
class AP_BattMonitor_SMBus_Solo : public AP_BattMonitor_SMBus
|
|
{
|
|
public:
|
|
|
|
// Constructor
|
|
AP_BattMonitor_SMBus_Solo(AP_BattMonitor &mon,
|
|
AP_BattMonitor::BattMonitor_State &mon_state,
|
|
AP_BattMonitor_Params ¶ms,
|
|
AP_HAL::OwnPtr<AP_HAL::I2CDevice> dev);
|
|
|
|
private:
|
|
|
|
void timer(void) override;
|
|
|
|
// read_block - returns number of characters read if successful, zero if unsuccessful
|
|
uint8_t read_block(uint8_t reg, uint8_t* data, uint8_t max_len) const;
|
|
|
|
uint8_t _button_press_count;
|
|
};
|