66 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 77 #define VOXLPM_LTC2946_ADDR_VBATT 0x6a // 0x6a = 0xd4 >> 1 78 #define VOXLPM_LTC2946_ADDR_P5VD 0x6b // 0x6b = 0xd6 >> 1 80 #define VOXLPM_LTC2946_CTRLA_REG 0x00 81 #define VOXLPM_LTC2946_CTRLB_REG 0x01 83 #define VOXLPM_LTC2946_POWER_MSB2_REG 0x05 84 #define VOXLPM_LTC2946_CTRLB_MSG1_REG 0x06 85 #define VOXLPM_LTC2946_CTRLB_LSB_REG 0x07 87 #define VOXLPM_LTC2946_DELTA_SENSE_MSB_REG 0x14 88 #define VOXLPM_LTC2946_DELTA_SENSE_LSB_REG 0x15 90 #define VOXLPM_LTC2946_VIN_MSB_REG 0x1E 91 #define VOXLPM_LTC2946_VIN_LSB_REG 0x1F 105 #define DEFAULT_CTRLA_REG_VAL 0x18 123 #define DEFAULT_CTRLB_REG_VAL 0x01 126 #define VOXLPM_LTC2946_RESOLUTION 4095.0f 129 #define VOXLPM_LTC2946_VFS_SENSE 102.4f 132 #define VOXLPM_LTC2946_VFS_DELTA_SENSE 0.1024f 135 #define VOXLPM_RSENSE_VBATT 0.0005f 138 #define VOXLPM_RSENSE_5VOUT 0.005f 145 class VOXLPM :
public device::I2C,
public px4::ScheduledWorkItem
177 int read_reg_buf(uint8_t addr, uint8_t *buf, uint8_t len);
178 int write_reg(uint8_t value, uint8_t addr);
perf_counter_t _sample_perf
API for the uORB lightweight object broker.
struct power_monitor_s _pm_status
int read_reg_buf(uint8_t addr, uint8_t *buf, uint8_t len)
int write_reg(uint8_t value, uint8_t addr)
struct battery_status_s _bat_status
Library calls for battery functionality.
orb_advert_t _bat_pub_topic
VOXLPM(const char *path, int bus, int address, VOXLPM_CH_TYPE ch_type)
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
uint8_t read_reg(uint8_t addr)
orb_advert_t _pm_pub_topic
Performance measuring tools.
Base class for devices connected via I2C.