APM:Libraries
AP_BattMonitor_SMBus_Maxell.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <AP_Common/AP_Common.h>
4 #include <AP_Param/AP_Param.h>
5 #include <AP_Math/AP_Math.h>
6 #include "AP_BattMonitor_SMBus.h"
7 #include <AP_HAL/I2CDevice.h>
8 
10 {
11 public:
12 
13  // Constructor
16  AP_BattMonitor_Params &params,
18 
19 private:
20 
21  void timer(void) override;
22 
23  // check if PEC supported with the version value in SpecificationInfo() function
24  // returns true once PEC is confirmed as working or not working
25  bool check_pec_support();
26 
27  // read_block - returns number of characters read if successful, zero if unsuccessful
28  uint8_t read_block(uint8_t reg, uint8_t* data, bool append_zero) const;
29 
30  uint8_t _pec_confirmed; // count of the number of times PEC has been confirmed as working
31 };
A system for managing and storing variables that are of general interest to the system.
static AP_HAL::OwnPtr< AP_HAL::Device > dev
Definition: ICM20789.cpp:16
uint8_t read_block(uint8_t reg, uint8_t *data, bool append_zero) const
Common definitions and utility routines for the ArduPilot libraries.
AP_BattMonitor_SMBus_Maxell(AP_BattMonitor &mon, AP_BattMonitor::BattMonitor_State &mon_state, AP_BattMonitor_Params &params, AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev)