modm API documentation
|
#include <modm/driver/adc/ad7280a.hpp>
Public Types | |
enum | Cell { BALANCER_OFF = 0, CB1 = (1 << 2), CB2 = (1 << 3), CB3 = (1 << 4), CB4 = (1 << 5), CB5 = (1 << 6), CB6 = (1 << 7), BALANCER_ALL = 0xfc } |
enum | Channel { CELL_VOLTAGE_1 = 0x0, CELL_VOLTAGE_2 = 0x1, CELL_VOLTAGE_3 = 0x2, CELL_VOLTAGE_4 = 0x3, CELL_VOLTAGE_5 = 0x4, CELL_VOLTAGE_6 = 0x5, AUX_ADC_1 = 0x6, AUX_ADC_2 = 0x7, AUX_ADC_3 = 0x8, AUX_ADC_4 = 0x9, AUX_ADC_5 = 0xA, AUX_ADC_6 = 0xB, SELF_TEST = 0xC } |
enum | Register { CTRL_HB = 0xD, CTRL_LB = 0xE, CELL_OVERVOLTAGE = 0xF, CELL_UNDERVOLTAGE = 0x10, AUX_ADC_OVERVOLTAGE = 0x11, AUX_ADC_UNDERVOLTAGE = 0x12, ALERT = 0x13, CELL_BALANCE = 0x14, CB1_TIMER = 0x15, CB2_TIMER = 0x16, CB3_TIMER = 0x17, CB4_TIMER = 0x18, CB5_TIMER = 0x19, CB6_TIMER = 0x1A, PD_TIMER = 0x1B, READ = 0x1C, CNVST_CONTROL = 0x1D } |
enum | Device { MASTER = 0 } |
enum | Average { NO_AVERAGE = (0 << 1), AVERAGE_BY_2 = (1 << 1), AVERAGE_BY_4 = (2 << 1), AVERAGE_BY_8 = (3 << 1) } |
Static Public Member Functions | |
static void | initialize (ad7280a::Average average=ad7280a::NO_AVERAGE) |
static bool | chainSetup () |
static void | enableBalancer (uint8_t device, uint8_t cells) |
static bool | performSelftest () |
static void | softwareReset () |
static bool | readChannel (uint8_t device, ad7280a::Channel channel, uint16_t *value) |
static bool | readAllChannels (uint16_t *values) |
Friends | |
class | ::Ad7280aTest |
|
static |
Enable/Disable the six cell balance outputs.
|
static |
Perform a conversion and read the results back.
[out] | values | Array containing the results |
|
static |
Read a single channel