PX4 Firmware
PX4 Autopilot Software http://px4.io
voxlpm.hpp File Reference

Shared defines for the voxlpm (QTY2 LTC2946) driver. More...

#include <drivers/device/i2c.h>
#include <perf/perf_counter.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <battery/battery.h>
#include <uORB/uORB.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/power_monitor.h>
Include dependency graph for voxlpm.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  VOXLPM
 

Macros

#define VOXLPM_LTC2946_ADDR_VBATT   0x6a
 
#define VOXLPM_LTC2946_ADDR_P5VD   0x6b
 
#define VOXLPM_LTC2946_CTRLA_REG   0x00
 
#define VOXLPM_LTC2946_CTRLB_REG   0x01
 
#define VOXLPM_LTC2946_POWER_MSB2_REG   0x05
 
#define VOXLPM_LTC2946_CTRLB_MSG1_REG   0x06
 
#define VOXLPM_LTC2946_CTRLB_LSB_REG   0x07
 
#define VOXLPM_LTC2946_DELTA_SENSE_MSB_REG   0x14
 
#define VOXLPM_LTC2946_DELTA_SENSE_LSB_REG   0x15
 
#define VOXLPM_LTC2946_VIN_MSB_REG   0x1E
 
#define VOXLPM_LTC2946_VIN_LSB_REG   0x1F
 
#define DEFAULT_CTRLA_REG_VAL   0x18
 
#define DEFAULT_CTRLB_REG_VAL   0x01
 
#define VOXLPM_LTC2946_RESOLUTION   4095.0f
 
#define VOXLPM_LTC2946_VFS_SENSE   102.4f
 
#define VOXLPM_LTC2946_VFS_DELTA_SENSE   0.1024f
 
#define VOXLPM_RSENSE_VBATT   0.0005f
 
#define VOXLPM_RSENSE_5VOUT   0.005f
 

Enumerations

enum  VOXLPM_CH_TYPE { VOXLPM_CH_TYPE_VBATT = 0, VOXLPM_CH_TYPE_P5VDC }
 

Detailed Description

Shared defines for the voxlpm (QTY2 LTC2946) driver.

This is roughly what's goin on:

        +~~~~~~~~~~~~~~+

VBATT --—| RSENSE_VBATT | -------—+------------------—> VBATT TO ESCS | +~~~~~~~~~~~~~~+ | | | +-----—+---—+ +-—+ +-—+ | 5V REGULATOR | | | +-----—+---—+ | | | +~~~~~~~~~~~~~~+ | | +—| RSENSE_5VOUT |—> 5VDC TO COMPUTE | | | +~~~~~~~~~~~~~~+ | | | | V| |A V| |A

LTC2946, 0x6a # # LTC2946, 0x6b

Publishes: Publishes:

Definition in file voxlpm.hpp.

Macro Definition Documentation

◆ DEFAULT_CTRLA_REG_VAL

#define DEFAULT_CTRLA_REG_VAL   0x18

Definition at line 105 of file voxlpm.hpp.

Referenced by VOXLPM::init().

◆ DEFAULT_CTRLB_REG_VAL

#define DEFAULT_CTRLB_REG_VAL   0x01

Definition at line 123 of file voxlpm.hpp.

Referenced by VOXLPM::init().

◆ VOXLPM_LTC2946_ADDR_P5VD

#define VOXLPM_LTC2946_ADDR_P5VD   0x6b

Definition at line 78 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_ADDR_VBATT

#define VOXLPM_LTC2946_ADDR_VBATT   0x6a

Definition at line 77 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_CTRLA_REG

#define VOXLPM_LTC2946_CTRLA_REG   0x00

Definition at line 80 of file voxlpm.hpp.

Referenced by VOXLPM::init().

◆ VOXLPM_LTC2946_CTRLB_LSB_REG

#define VOXLPM_LTC2946_CTRLB_LSB_REG   0x07

Definition at line 85 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_CTRLB_MSG1_REG

#define VOXLPM_LTC2946_CTRLB_MSG1_REG   0x06

Definition at line 84 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_CTRLB_REG

#define VOXLPM_LTC2946_CTRLB_REG   0x01

Definition at line 81 of file voxlpm.hpp.

Referenced by VOXLPM::init().

◆ VOXLPM_LTC2946_DELTA_SENSE_LSB_REG

#define VOXLPM_LTC2946_DELTA_SENSE_LSB_REG   0x15

Definition at line 88 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_DELTA_SENSE_MSB_REG

#define VOXLPM_LTC2946_DELTA_SENSE_MSB_REG   0x14

Definition at line 87 of file voxlpm.hpp.

Referenced by VOXLPM::measure().

◆ VOXLPM_LTC2946_POWER_MSB2_REG

#define VOXLPM_LTC2946_POWER_MSB2_REG   0x05

Definition at line 83 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_RESOLUTION

#define VOXLPM_LTC2946_RESOLUTION   4095.0f

Definition at line 126 of file voxlpm.hpp.

Referenced by VOXLPM::measure().

◆ VOXLPM_LTC2946_VFS_DELTA_SENSE

#define VOXLPM_LTC2946_VFS_DELTA_SENSE   0.1024f

Definition at line 132 of file voxlpm.hpp.

Referenced by VOXLPM::measure().

◆ VOXLPM_LTC2946_VFS_SENSE

#define VOXLPM_LTC2946_VFS_SENSE   102.4f

Definition at line 129 of file voxlpm.hpp.

Referenced by VOXLPM::measure().

◆ VOXLPM_LTC2946_VIN_LSB_REG

#define VOXLPM_LTC2946_VIN_LSB_REG   0x1F

Definition at line 91 of file voxlpm.hpp.

◆ VOXLPM_LTC2946_VIN_MSB_REG

#define VOXLPM_LTC2946_VIN_MSB_REG   0x1E

Definition at line 90 of file voxlpm.hpp.

Referenced by VOXLPM::measure().

◆ VOXLPM_RSENSE_5VOUT

#define VOXLPM_RSENSE_5VOUT   0.005f

Definition at line 138 of file voxlpm.hpp.

Referenced by VOXLPM::VOXLPM().

◆ VOXLPM_RSENSE_VBATT

#define VOXLPM_RSENSE_VBATT   0.0005f

Definition at line 135 of file voxlpm.hpp.

Referenced by VOXLPM::VOXLPM().

Enumeration Type Documentation

◆ VOXLPM_CH_TYPE

Enumerator
VOXLPM_CH_TYPE_VBATT 
VOXLPM_CH_TYPE_P5VDC 

Definition at line 140 of file voxlpm.hpp.