#include <eps_driver.h>
|
enum | String : uint32_t { STRING_SW_VERSION,
STRING_BUILD,
STRING_SERIAL,
NUM_STRINGS
} |
|
enum | Channel : uint32_t {
CHANNEL_LLP_EN,
CHANNEL_MLP_EN,
CHANNEL_HLP_EN,
CHANNEL_USB_PWR_EN,
CHANNEL_AUX_PWR_EN,
CHANNEL_ENET_PWR_EN,
CHANNEL_FAN_EN,
CHANNEL_SPEAKER_EN,
CHANNEL_PAYLOAD_EN_TOP_AFT,
CHANNEL_PAYLOAD_EN_BOT_AFT,
CHANNEL_PAYLOAD_EN_BOT_FRONT,
CHANNEL_PAYLOAD_EN_TOP_FRONT,
CHANNEL_MOTOR_EN1,
CHANNEL_MOTOR_EN2,
CHANNEL_RESERVED0,
CHANNEL_RESERVED1,
CHANNEL_STATUSA2_LED,
CHANNEL_STATUSA1_LED,
CHANNEL_STATUSB2_LED,
CHANNEL_STATUSB1_LED,
CHANNEL_STATUSC2_LED,
CHANNEL_STATUSC1_LED,
CHANNEL_RESERVED2,
CHANNEL_RESERVED3,
CHANNEL_VIDEO_LED,
CHANNEL_AUDIO_LED,
CHANNEL_LIVE_LED,
CHANNEL_RESERVED4,
CHANNEL_RESERVED5,
CHANNEL_RESERVED6,
CHANNEL_RESERVED7,
CHANNEL_RESERVED8,
NUM_CHANNELS
} |
|
enum | State : uint32_t { STATE_POWER,
STATE_DOCK,
NUM_STATES
} |
|
enum | PowerStateValue : uint8_t {
POWER_STATE_UNKNOWN,
POWER_STATE_HIBERNATE,
POWER_STATE_AWAKE_NOMINAL,
POWER_STATE_AWAKE_SAFE,
POWER_STATE_CRITICAL_FAULT,
NUM_POWER_STATES
} |
|
enum | DockStateValue : uint8_t { DOCK_DISCONNECTED,
DOCK_CONNECTING,
DOCK_CONNECTED,
NUM_DOCK_STATES
} |
|
enum | Fault : uint32_t {
FAULT_OC_ENET,
FAULT_OT_FLASHLIGHT_1,
FAULT_OT_FLASHLIGHT_2,
FAULT_OC_FAN,
FAULT_RESERVED0,
FAULT_RESERVED1,
FAULT_RESERVED2,
FAULT_RESERVED3,
FAULT_RESERVED4,
FAULT_OT_MLP,
FAULT_OT_LLP,
FAULT_OT_HLP,
FAULT_RESERVED5,
FAULT_RESERVED6,
FAULT_RESERVED7,
FAULT_RESERVED8,
FAULT_OC_USB,
FAULT_OC_LLP,
FAULT_OC_MLP,
FAULT_OC_HLP,
FAULT_OC_AUX,
FAULT_ST_5A_REG_3,
FAULT_OC_5A_REG_2,
FAULT_OC_5A_REG_1,
FAULT_ST_5A_REG_2,
FAULT_OC_PAYLOAD_4,
FAULT_RESERVED9,
FAULT_ST_5A_REG_1,
FAULT_OC_PAYLOAD_1,
FAULT_OC_5A_REG_3,
FAULT_OC_PAYLOAD_2,
FAULT_OC_PAYLOAD_3,
NUM_FAULTS
} |
|
enum | Housekeeping : uint32_t {
HK_AGND1_V,
HK_SUPPLY_IN_V,
HK_PAYLOAD_PWR3_I,
HK_SUBSYS1_1_PWR_V,
HK_SUBSYS1_2_PWR_V,
HK_UNREG_V,
HK_SYSTEM_I,
HK_BAT4V_V,
HK_BAT3V_V,
HK_BAT2V_V,
HK_BAT1V_V,
HK_SUPPLY_I,
HK_5VLIVE_V,
HK_AGND2_V,
HK_FAN_PWR_I,
HK_AUX_PWR_I,
HK_PAYLOAD_PWR4_I,
HK_PAYLOAD_PWR2_I,
HK_PAYLOAD_PWR1_I,
HK_5A_REG1_PWR_I,
HK_MOTOR1_I,
HK_SUBSYS2_PWR_V,
HK_MOTOR2_I,
HK_5A_REG2_PWR_I,
HK_5A_REG3_PWR_I,
HK_MAIN5_PWR_I,
HK_AUO_PWR_I,
HK_HLP_I,
HK_USB_PWR_I,
HK_LLP_I,
HK_MLP_I,
HK_ENET_PWR_I,
NUM_HOUSEKEEPING
} |
|
enum | Temp : uint32_t { TEMP_BOTTOM,
TEMP_TOP,
TEMP_CONNECTOR,
NUM_TEMPERATURES
} |
|
enum | Battery : uint32_t {
BATTERY_TOP_RIGHT,
BATTERY_BOTTOM_RIGHT,
BATTERY_TOP_LEFT,
BATTERY_BOTTOM_LEFT,
NUM_BATTERIES
} |
|
enum | Charger : uint8_t {
CHARGER_TOP_RIGHT,
CHARGER_BOTTOM_RIGHT,
CHARGER_TOP_LEFT,
CHARGER_BOTTOM_LEFT,
NUM_CHARGERS
} |
|
enum | Led : uint32_t {
LED_SA1,
LED_SA2,
LED_SB1,
LED_SB2,
LED_SC1,
LED_SC2,
LED_VIDEO,
LED_AUDIO,
LED_LIVE,
NUM_LEDS
} |
|
enum | LedMode : uint8_t {
LED_MODE_OFF,
LED_MODE_ON,
LED_MODE_BLINK_2HZ,
LED_MODE_BLINK_1HZ,
LED_MODE_BLINK_0_5HZ,
NUM_LED_MODES
} |
|
|
| EPS (const i2c::Device &i2c_dev, std::function< void(uint32_t)> usleep_cb) |
|
| ~EPS (void) |
|
bool | RingBuzzer (uint16_t freq, uint8_t secs) |
|
bool | EnterBootloader (void) |
|
bool | ClearFaults (void) |
|
bool | Unterminate (void) |
|
bool | Undock (void) |
|
bool | Reboot (void) |
|
bool | GetStrings (uint32_t mask, std::map< String, std::string > &data) |
|
bool | GetStates (uint32_t mask, std::map< State, uint8_t > &data) |
|
bool | GetChannels (uint32_t mask, std::map< Channel, bool > &data) |
|
bool | GetChargers (uint32_t mask, std::map< Charger, bool > &data) |
|
bool | GetFaults (uint32_t mask, std::map< Fault, bool > &data) |
|
bool | GetBatteries (uint32_t mask, std::map< Battery, BatteryInfo > &data) |
|
bool | GetHousekeeping (uint32_t mask, std::map< Housekeeping, double > &data) |
|
bool | GetTemps (uint32_t mask, std::map< Temp, TempInfo > &data) |
|
bool | SetLeds (uint32_t mask, LedMode const value) |
|
bool | SetChargers (uint32_t mask, bool const value) |
|
bool | SetChannels (uint32_t mask, bool const value) |
|
bool | SetPowerState (PowerStateValue const value) |
|
|
static constexpr uint32_t | EVERYTHING = 0xFFFFFF |
|
static constexpr uint8_t | OFF = 0 |
|
static constexpr uint8_t | ON = 1 |
|
|
uint16_t | Read (uint8_t *buff) |
|
uint16_t | Read (uint8_t *buff, uint16_t len) |
|
uint16_t | Write (uint8_t *buff, uint16_t len) |
|
uint8_t | ComputeChecksum (uint8_t *buf, size_t size) |
|
◆ Battery
Enumerator |
---|
BATTERY_TOP_RIGHT | |
BATTERY_BOTTOM_RIGHT | |
BATTERY_TOP_LEFT | |
BATTERY_BOTTOM_LEFT | |
NUM_BATTERIES | |
◆ Channel
Enumerator |
---|
CHANNEL_LLP_EN | |
CHANNEL_MLP_EN | |
CHANNEL_HLP_EN | |
CHANNEL_USB_PWR_EN | |
CHANNEL_AUX_PWR_EN | |
CHANNEL_ENET_PWR_EN | |
CHANNEL_FAN_EN | |
CHANNEL_SPEAKER_EN | |
CHANNEL_PAYLOAD_EN_TOP_AFT | |
CHANNEL_PAYLOAD_EN_BOT_AFT | |
CHANNEL_PAYLOAD_EN_BOT_FRONT | |
CHANNEL_PAYLOAD_EN_TOP_FRONT | |
CHANNEL_MOTOR_EN1 | |
CHANNEL_MOTOR_EN2 | |
CHANNEL_RESERVED0 | |
CHANNEL_RESERVED1 | |
CHANNEL_STATUSA2_LED | |
CHANNEL_STATUSA1_LED | |
CHANNEL_STATUSB2_LED | |
CHANNEL_STATUSB1_LED | |
CHANNEL_STATUSC2_LED | |
CHANNEL_STATUSC1_LED | |
CHANNEL_RESERVED2 | |
CHANNEL_RESERVED3 | |
CHANNEL_VIDEO_LED | |
CHANNEL_AUDIO_LED | |
CHANNEL_LIVE_LED | |
CHANNEL_RESERVED4 | |
CHANNEL_RESERVED5 | |
CHANNEL_RESERVED6 | |
CHANNEL_RESERVED7 | |
CHANNEL_RESERVED8 | |
NUM_CHANNELS | |
◆ Charger
Enumerator |
---|
CHARGER_TOP_RIGHT | |
CHARGER_BOTTOM_RIGHT | |
CHARGER_TOP_LEFT | |
CHARGER_BOTTOM_LEFT | |
NUM_CHARGERS | |
◆ DockStateValue
Enumerator |
---|
DOCK_DISCONNECTED | |
DOCK_CONNECTING | |
DOCK_CONNECTED | |
NUM_DOCK_STATES | |
◆ Fault
Enumerator |
---|
FAULT_OC_ENET | |
FAULT_OT_FLASHLIGHT_1 | |
FAULT_OT_FLASHLIGHT_2 | |
FAULT_OC_FAN | |
FAULT_RESERVED0 | |
FAULT_RESERVED1 | |
FAULT_RESERVED2 | |
FAULT_RESERVED3 | |
FAULT_RESERVED4 | |
FAULT_OT_MLP | |
FAULT_OT_LLP | |
FAULT_OT_HLP | |
FAULT_RESERVED5 | |
FAULT_RESERVED6 | |
FAULT_RESERVED7 | |
FAULT_RESERVED8 | |
FAULT_OC_USB | |
FAULT_OC_LLP | |
FAULT_OC_MLP | |
FAULT_OC_HLP | |
FAULT_OC_AUX | |
FAULT_ST_5A_REG_3 | |
FAULT_OC_5A_REG_2 | |
FAULT_OC_5A_REG_1 | |
FAULT_ST_5A_REG_2 | |
FAULT_OC_PAYLOAD_4 | |
FAULT_RESERVED9 | |
FAULT_ST_5A_REG_1 | |
FAULT_OC_PAYLOAD_1 | |
FAULT_OC_5A_REG_3 | |
FAULT_OC_PAYLOAD_2 | |
FAULT_OC_PAYLOAD_3 | |
NUM_FAULTS | |
◆ Housekeeping
Enumerator |
---|
HK_AGND1_V | |
HK_SUPPLY_IN_V | |
HK_PAYLOAD_PWR3_I | |
HK_SUBSYS1_1_PWR_V | |
HK_SUBSYS1_2_PWR_V | |
HK_UNREG_V | |
HK_SYSTEM_I | |
HK_BAT4V_V | |
HK_BAT3V_V | |
HK_BAT2V_V | |
HK_BAT1V_V | |
HK_SUPPLY_I | |
HK_5VLIVE_V | |
HK_AGND2_V | |
HK_FAN_PWR_I | |
HK_AUX_PWR_I | |
HK_PAYLOAD_PWR4_I | |
HK_PAYLOAD_PWR2_I | |
HK_PAYLOAD_PWR1_I | |
HK_5A_REG1_PWR_I | |
HK_MOTOR1_I | |
HK_SUBSYS2_PWR_V | |
HK_MOTOR2_I | |
HK_5A_REG2_PWR_I | |
HK_5A_REG3_PWR_I | |
HK_MAIN5_PWR_I | |
HK_AUO_PWR_I | |
HK_HLP_I | |
HK_USB_PWR_I | |
HK_LLP_I | |
HK_MLP_I | |
HK_ENET_PWR_I | |
NUM_HOUSEKEEPING | |
◆ Led
Enumerator |
---|
LED_SA1 | |
LED_SA2 | |
LED_SB1 | |
LED_SB2 | |
LED_SC1 | |
LED_SC2 | |
LED_VIDEO | |
LED_AUDIO | |
LED_LIVE | |
NUM_LEDS | |
◆ LedMode
Enumerator |
---|
LED_MODE_OFF | |
LED_MODE_ON | |
LED_MODE_BLINK_2HZ | |
LED_MODE_BLINK_1HZ | |
LED_MODE_BLINK_0_5HZ | |
NUM_LED_MODES | |
◆ PowerStateValue
Enumerator |
---|
POWER_STATE_UNKNOWN | |
POWER_STATE_HIBERNATE | |
POWER_STATE_AWAKE_NOMINAL | |
POWER_STATE_AWAKE_SAFE | |
POWER_STATE_CRITICAL_FAULT | |
NUM_POWER_STATES | |
◆ State
Enumerator |
---|
STATE_POWER | |
STATE_DOCK | |
NUM_STATES | |
◆ String
Enumerator |
---|
STRING_SW_VERSION | |
STRING_BUILD | |
STRING_SERIAL | |
NUM_STRINGS | |
◆ Temp
Enumerator |
---|
TEMP_BOTTOM | |
TEMP_TOP | |
TEMP_CONNECTOR | |
NUM_TEMPERATURES | |
◆ EPS()
eps_driver::EPS::EPS |
( |
const i2c::Device & |
i2c_dev, |
|
|
std::function< void(uint32_t)> |
usleep_cb |
|
) |
| |
|
explicit |
◆ ~EPS()
eps_driver::EPS::~EPS |
( |
void |
| ) |
|
◆ ClearFaults()
bool eps_driver::EPS::ClearFaults |
( |
void |
| ) |
|
◆ ComputeChecksum()
uint8_t eps_driver::EPS::ComputeChecksum |
( |
uint8_t * |
buf, |
|
|
size_t |
size |
|
) |
| |
|
protected |
◆ EnterBootloader()
bool eps_driver::EPS::EnterBootloader |
( |
void |
| ) |
|
◆ GetBatteries()
bool eps_driver::EPS::GetBatteries |
( |
uint32_t |
mask, |
|
|
std::map< Battery, BatteryInfo > & |
data |
|
) |
| |
◆ GetChannels()
bool eps_driver::EPS::GetChannels |
( |
uint32_t |
mask, |
|
|
std::map< Channel, bool > & |
data |
|
) |
| |
◆ GetChargers()
bool eps_driver::EPS::GetChargers |
( |
uint32_t |
mask, |
|
|
std::map< Charger, bool > & |
data |
|
) |
| |
◆ GetFaults()
bool eps_driver::EPS::GetFaults |
( |
uint32_t |
mask, |
|
|
std::map< Fault, bool > & |
data |
|
) |
| |
◆ GetHousekeeping()
bool eps_driver::EPS::GetHousekeeping |
( |
uint32_t |
mask, |
|
|
std::map< Housekeeping, double > & |
data |
|
) |
| |
◆ GetStates()
bool eps_driver::EPS::GetStates |
( |
uint32_t |
mask, |
|
|
std::map< State, uint8_t > & |
data |
|
) |
| |
◆ GetStrings()
bool eps_driver::EPS::GetStrings |
( |
uint32_t |
mask, |
|
|
std::map< String, std::string > & |
data |
|
) |
| |
◆ GetTemps()
bool eps_driver::EPS::GetTemps |
( |
uint32_t |
mask, |
|
|
std::map< Temp, TempInfo > & |
data |
|
) |
| |
◆ Read() [1/2]
uint16_t eps_driver::EPS::Read |
( |
uint8_t * |
buff | ) |
|
|
protected |
◆ Read() [2/2]
uint16_t eps_driver::EPS::Read |
( |
uint8_t * |
buff, |
|
|
uint16_t |
len |
|
) |
| |
|
protected |
◆ Reboot()
bool eps_driver::EPS::Reboot |
( |
void |
| ) |
|
◆ RingBuzzer()
bool eps_driver::EPS::RingBuzzer |
( |
uint16_t |
freq, |
|
|
uint8_t |
secs |
|
) |
| |
◆ SerialToString()
std::string eps_driver::EPS::SerialToString |
( |
uint8_t |
serial[6] | ) |
|
|
static |
◆ SetChannels()
bool eps_driver::EPS::SetChannels |
( |
uint32_t |
mask, |
|
|
bool const |
value |
|
) |
| |
◆ SetChargers()
bool eps_driver::EPS::SetChargers |
( |
uint32_t |
mask, |
|
|
bool const |
value |
|
) |
| |
◆ SetLeds()
bool eps_driver::EPS::SetLeds |
( |
uint32_t |
mask, |
|
|
LedMode const |
value |
|
) |
| |
◆ SetPowerState()
◆ Undock()
bool eps_driver::EPS::Undock |
( |
void |
| ) |
|
◆ Unterminate()
bool eps_driver::EPS::Unterminate |
( |
void |
| ) |
|
◆ Write()
uint16_t eps_driver::EPS::Write |
( |
uint8_t * |
buff, |
|
|
uint16_t |
len |
|
) |
| |
|
protected |
◆ EVERYTHING
constexpr uint32_t eps_driver::EPS::EVERYTHING = 0xFFFFFF |
|
staticconstexpr |
◆ I2C_BUF_MAX_LEN
constexpr size_t eps_driver::EPS::I2C_BUF_MAX_LEN = 256 |
|
staticconstexprprotected |
◆ I2C_CMD_CLR_HW_EXCEPTIONS
constexpr uint8_t eps_driver::EPS::I2C_CMD_CLR_HW_EXCEPTIONS = 0x0B |
|
staticconstexprprotected |
◆ I2C_CMD_CLR_TERMINATE_EVT
constexpr uint8_t eps_driver::EPS::I2C_CMD_CLR_TERMINATE_EVT = 0x42 |
|
staticconstexprprotected |
◆ I2C_CMD_ENTER_BOOTLOADER
constexpr uint8_t eps_driver::EPS::I2C_CMD_ENTER_BOOTLOADER = 0x0E |
|
staticconstexprprotected |
◆ I2C_CMD_GET_BATTERY_STATUS
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_BATTERY_STATUS = 0x40 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_BUILD_TIME
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_BUILD_TIME = 0x03 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CHARGE_STATE
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_CHARGE_STATE = 0x46 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CONN_STATE
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_CONN_STATE = 0x72 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CONNECTED_EPS_STATE
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_CONNECTED_EPS_STATE = 0x71 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_CONNECTION_STATE
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_CONNECTION_STATE = 0x44 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_DIGITAL_TEMPS
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_DIGITAL_TEMPS = 0x0C |
|
staticconstexprprotected |
◆ I2C_CMD_GET_EPS_CMD
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_EPS_CMD = 0x75 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_EPS_POWER_MODE
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_EPS_POWER_MODE = 0x48 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_HK
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_HK = 0x09 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_HW_EXCEPTIONS
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_HW_EXCEPTIONS = 0x0A |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SERIAL_NUMBER
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_SERIAL_NUMBER = 0x0D |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SW_STATES
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_SW_STATES = 0x06 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SW_VERSION
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_SW_VERSION = 0x02 |
|
staticconstexprprotected |
◆ I2C_CMD_GET_SYSTEM_STATE
constexpr uint8_t eps_driver::EPS::I2C_CMD_GET_SYSTEM_STATE = 0x07 |
|
staticconstexprprotected |
◆ I2C_CMD_NONE
constexpr uint8_t eps_driver::EPS::I2C_CMD_NONE = 0x00 |
|
staticconstexprprotected |
◆ I2C_CMD_REBOOT
constexpr uint8_t eps_driver::EPS::I2C_CMD_REBOOT = 0x0F |
|
staticconstexprprotected |
◆ I2C_CMD_RING_BUZZER
constexpr uint8_t eps_driver::EPS::I2C_CMD_RING_BUZZER = 0x41 |
|
staticconstexprprotected |
◆ I2C_CMD_SEND_EPS_STATE_TO_DOCK
constexpr uint8_t eps_driver::EPS::I2C_CMD_SEND_EPS_STATE_TO_DOCK = 0xD0 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_CHARGE_STATE
constexpr uint8_t eps_driver::EPS::I2C_CMD_SET_CHARGE_STATE = 0x45 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_EPS_CMD
constexpr uint8_t eps_driver::EPS::I2C_CMD_SET_EPS_CMD = 0x76 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_EPS_POWER_MODE
constexpr uint8_t eps_driver::EPS::I2C_CMD_SET_EPS_POWER_MODE = 0x47 |
|
staticconstexprprotected |
◆ I2C_CMD_SET_LED_MODES
constexpr uint8_t eps_driver::EPS::I2C_CMD_SET_LED_MODES = 0x08 |
|
staticconstexprprotected |
◆ I2C_CMD_SW_OFF
constexpr uint8_t eps_driver::EPS::I2C_CMD_SW_OFF = 0x05 |
|
staticconstexprprotected |
◆ I2C_CMD_SW_ON
constexpr uint8_t eps_driver::EPS::I2C_CMD_SW_ON = 0x04 |
|
staticconstexprprotected |
◆ I2C_CMD_UNDOCK
constexpr uint8_t eps_driver::EPS::I2C_CMD_UNDOCK = 0x43 |
|
staticconstexprprotected |
◆ I2C_RESP_ACK
constexpr uint8_t eps_driver::EPS::I2C_RESP_ACK = 0xEE |
|
staticconstexprprotected |
◆ I2C_RESP_NACK
constexpr uint8_t eps_driver::EPS::I2C_RESP_NACK = 0xFF |
|
staticconstexprprotected |
◆ OFF
constexpr uint8_t eps_driver::EPS::OFF = 0 |
|
staticconstexpr |
◆ ON
constexpr uint8_t eps_driver::EPS::ON = 1 |
|
staticconstexpr |
The documentation for this class was generated from the following files: