NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
eps_driver.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef EPS_DRIVER_EPS_DRIVER_H_
20 #define EPS_DRIVER_EPS_DRIVER_H_
21 
22 #include <i2c/i2c_new.h>
23 
24 #include <functional>
25 #include <vector>
26 #include <string>
27 #include <map>
28 
29 namespace eps_driver {
30 
31 // Class to arbitrate access to the Electrical Power System
32 class EPS {
33  public:
34  // Toggle values
35  static constexpr uint32_t EVERYTHING = 0xFFFFFF;
36  static constexpr uint8_t OFF = 0;
37  static constexpr uint8_t ON = 1;
38 
39  // String type
40  enum String : uint32_t {
45  };
46 
47  // Channel indexes
48  enum Channel : uint32_t {
82  };
83 
84  // States
85  enum State : uint32_t {
89  };
90 
91  // Powe state values
92  enum PowerStateValue : uint8_t {
99  };
100 
101  // Dock state values
102  enum DockStateValue : uint8_t {
107  };
108 
109  // Faults
110  enum Fault : uint32_t {
144  };
145 
146  // Housekeeping
147  enum Housekeeping : uint32_t {
181  };
182 
183  // Temperatures
184  enum Temp : uint32_t {
189  };
190 
191  // Battery
192  enum Battery : uint32_t {
198  };
199 
200  // Charge state
201  enum Charger : uint8_t {
207  };
208 
209  // LEDs
210  enum Led : uint32_t {
221  };
222 
223  // LED mode
224  enum LedMode : uint8_t {
231  };
232 
233  // Structure for holding battery information
234  struct BatteryInfo {
235  uint8_t chan; // Channel
236  bool present; // Is it plegged in?
237  uint16_t voltage; // Voltage in mV
238  int16_t current; // Current draw mA
239  uint16_t full; // Full mAh
240  uint16_t remaining; // Remaining mAh
241  uint16_t design; // Design mAh
242  uint16_t percentage; // [0..100] %
243  uint16_t cell[4]; // Cell voltage mV
244  uint16_t status; // bit mask
245  uint16_t temperature; // Cell temp 0.1 K
246  uint16_t serial; // Serial number
247  };
248 
249  // Temnperature information struct
250  struct TempInfo {
251  uint8_t addr; // i2c address
252  double temp; // current value
253  };
254 
255  // Constructor requires a vaid i2c device and sleep() callback function
256  explicit EPS(
257  const i2c::Device &i2c_dev, std::function<void(uint32_t)> usleep_cb);
258 
259  // Destructor
260  ~EPS(void);
261 
262  // Commands
263  bool RingBuzzer(uint16_t freq, uint8_t secs);
264  bool EnterBootloader(void);
265  bool ClearFaults(void);
266  bool Unterminate(void);
267  bool Undock(void);
268  bool Reboot(void);
269 
270  // Getters
271  bool GetStrings(uint32_t mask, std::map<String, std::string> & data);
272  bool GetStates(uint32_t mask, std::map<State, uint8_t> & data);
273  bool GetChannels(uint32_t mask, std::map<Channel, bool> & data);
274  bool GetChargers(uint32_t mask, std::map<Charger, bool> & data);
275  bool GetFaults(uint32_t mask, std::map<Fault, bool> & data);
276  bool GetBatteries(uint32_t mask, std::map<Battery, BatteryInfo> & data);
277  bool GetHousekeeping(uint32_t mask, std::map<Housekeeping, double> & data);
278  bool GetTemps(uint32_t mask, std::map<Temp, TempInfo> & data);
279 
280  // Setters
281  bool SetLeds(uint32_t mask, LedMode const value);
282  bool SetChargers(uint32_t mask, bool const value);
283  bool SetChannels(uint32_t mask, bool const value);
284  bool SetPowerState(PowerStateValue const value);
285 
286  // Helpers
287  static std::string SerialToString(uint8_t serial[6]);
288 
289  protected:
290  static constexpr size_t I2C_BUF_MAX_LEN = 256;
291  static constexpr uint8_t I2C_RESP_ACK = 0xEE;
292  static constexpr uint8_t I2C_RESP_NACK = 0xFF;
293  static constexpr uint8_t I2C_CMD_NONE = 0x00;
294  static constexpr uint8_t I2C_CMD_GET_SW_VERSION = 0x02;
295  static constexpr uint8_t I2C_CMD_GET_BUILD_TIME = 0x03;
296  static constexpr uint8_t I2C_CMD_SW_ON = 0x04;
297  static constexpr uint8_t I2C_CMD_SW_OFF = 0x05;
298  static constexpr uint8_t I2C_CMD_GET_SW_STATES = 0x06;
299  static constexpr uint8_t I2C_CMD_GET_SYSTEM_STATE = 0x07;
300  static constexpr uint8_t I2C_CMD_SET_LED_MODES = 0x08;
301  static constexpr uint8_t I2C_CMD_GET_HK = 0x09;
302  static constexpr uint8_t I2C_CMD_GET_HW_EXCEPTIONS = 0x0A;
303  static constexpr uint8_t I2C_CMD_CLR_HW_EXCEPTIONS = 0x0B;
304  static constexpr uint8_t I2C_CMD_GET_DIGITAL_TEMPS = 0x0C;
305  static constexpr uint8_t I2C_CMD_GET_SERIAL_NUMBER = 0x0D;
306  static constexpr uint8_t I2C_CMD_REBOOT = 0x0F;
307  static constexpr uint8_t I2C_CMD_ENTER_BOOTLOADER = 0x0E;
308  static constexpr uint8_t I2C_CMD_GET_BATTERY_STATUS = 0x40;
309  static constexpr uint8_t I2C_CMD_RING_BUZZER = 0x41;
310  static constexpr uint8_t I2C_CMD_CLR_TERMINATE_EVT = 0x42;
311  static constexpr uint8_t I2C_CMD_UNDOCK = 0x43;
312  static constexpr uint8_t I2C_CMD_GET_CONNECTION_STATE = 0x44;
313  static constexpr uint8_t I2C_CMD_SET_CHARGE_STATE = 0x45;
314  static constexpr uint8_t I2C_CMD_GET_CHARGE_STATE = 0x46;
315  static constexpr uint8_t I2C_CMD_SET_EPS_POWER_MODE = 0x47;
316  static constexpr uint8_t I2C_CMD_GET_EPS_POWER_MODE = 0x48;
317  static constexpr uint8_t I2C_CMD_GET_CONNECTED_EPS_STATE = 0x71;
318  static constexpr uint8_t I2C_CMD_GET_CONN_STATE = 0x72;
319  static constexpr uint8_t I2C_CMD_GET_EPS_CMD = 0x75;
320  static constexpr uint8_t I2C_CMD_SET_EPS_CMD = 0x76;
321  static constexpr uint8_t I2C_CMD_SEND_EPS_STATE_TO_DOCK = 0xD0;
322 
323  // Read an i2c frame + 1 byte checksum
324  uint16_t Read(uint8_t *buff);
325 
326  // Read an i2c frame size of len.
327  uint16_t Read(uint8_t *buff, uint16_t len);
328 
329  // Write an i2c frame + 1 byte checksum
330  uint16_t Write(uint8_t *buff, uint16_t len);
331 
332  // Compute checksum
333  uint8_t ComputeChecksum(uint8_t *buf, size_t size);
334 
335  private:
336  i2c::Device i2c_dev_; // Device
337  std::function<void(uint32_t)> usleep_cb_; // Fake usleep callback
338 };
339 
340 } // namespace eps_driver
341 
342 #endif // EPS_DRIVER_EPS_DRIVER_H_
eps_driver::EPS::TempInfo::addr
uint8_t addr
Definition: eps_driver.h:251
eps_driver::EPS::HK_PAYLOAD_PWR4_I
@ HK_PAYLOAD_PWR4_I
Definition: eps_driver.h:164
eps_driver::EPS::I2C_CMD_GET_BATTERY_STATUS
static constexpr uint8_t I2C_CMD_GET_BATTERY_STATUS
Definition: eps_driver.h:308
eps_driver::EPS::BatteryInfo::temperature
uint16_t temperature
Definition: eps_driver.h:245
eps_driver::EPS::FAULT_OC_PAYLOAD_1
@ FAULT_OC_PAYLOAD_1
Definition: eps_driver.h:139
eps_driver::EPS::FAULT_OC_HLP
@ FAULT_OC_HLP
Definition: eps_driver.h:130
eps_driver::EPS::I2C_CMD_GET_CONNECTED_EPS_STATE
static constexpr uint8_t I2C_CMD_GET_CONNECTED_EPS_STATE
Definition: eps_driver.h:317
eps_driver::EPS::HK_AGND2_V
@ HK_AGND2_V
Definition: eps_driver.h:161
eps_driver::EPS::FAULT_RESERVED4
@ FAULT_RESERVED4
Definition: eps_driver.h:119
eps_driver::EPS::NUM_POWER_STATES
@ NUM_POWER_STATES
Definition: eps_driver.h:98
eps_driver::EPS::I2C_BUF_MAX_LEN
static constexpr size_t I2C_BUF_MAX_LEN
Definition: eps_driver.h:290
eps_driver::EPS::FAULT_RESERVED8
@ FAULT_RESERVED8
Definition: eps_driver.h:126
eps_driver::EPS::HK_SUPPLY_I
@ HK_SUPPLY_I
Definition: eps_driver.h:159
eps_driver::EPS::CHANNEL_PAYLOAD_EN_BOT_AFT
@ CHANNEL_PAYLOAD_EN_BOT_AFT
Definition: eps_driver.h:58
eps_driver::EPS::DockStateValue
DockStateValue
Definition: eps_driver.h:102
eps_driver::EPS::GetStates
bool GetStates(uint32_t mask, std::map< State, uint8_t > &data)
Definition: eps_driver.cc:103
eps_driver::EPS::I2C_RESP_ACK
static constexpr uint8_t I2C_RESP_ACK
Definition: eps_driver.h:291
eps_driver::EPS::HK_5VLIVE_V
@ HK_5VLIVE_V
Definition: eps_driver.h:160
eps_driver::EPS::LED_MODE_OFF
@ LED_MODE_OFF
Definition: eps_driver.h:225
eps_driver::EPS::CHANNEL_FAN_EN
@ CHANNEL_FAN_EN
Definition: eps_driver.h:55
eps_driver::EPS::NUM_FAULTS
@ NUM_FAULTS
Definition: eps_driver.h:143
eps_driver::EPS::FAULT_OC_LLP
@ FAULT_OC_LLP
Definition: eps_driver.h:128
eps_driver::EPS::I2C_CMD_GET_CONNECTION_STATE
static constexpr uint8_t I2C_CMD_GET_CONNECTION_STATE
Definition: eps_driver.h:312
eps_driver::EPS::HK_BAT2V_V
@ HK_BAT2V_V
Definition: eps_driver.h:157
eps_driver::EPS::DOCK_CONNECTING
@ DOCK_CONNECTING
Definition: eps_driver.h:104
eps_driver::EPS::I2C_CMD_SW_OFF
static constexpr uint8_t I2C_CMD_SW_OFF
Definition: eps_driver.h:297
eps_driver::EPS::BATTERY_TOP_RIGHT
@ BATTERY_TOP_RIGHT
Definition: eps_driver.h:193
eps_driver::EPS::I2C_CMD_SW_ON
static constexpr uint8_t I2C_CMD_SW_ON
Definition: eps_driver.h:296
eps_driver::EPS::I2C_CMD_GET_DIGITAL_TEMPS
static constexpr uint8_t I2C_CMD_GET_DIGITAL_TEMPS
Definition: eps_driver.h:304
eps_driver::EPS::STATE_POWER
@ STATE_POWER
Definition: eps_driver.h:86
eps_driver::EPS::Housekeeping
Housekeeping
Definition: eps_driver.h:147
eps_driver::EPS::HK_MOTOR1_I
@ HK_MOTOR1_I
Definition: eps_driver.h:168
eps_driver::EPS::LED_SC2
@ LED_SC2
Definition: eps_driver.h:216
eps_driver::EPS::CHANNEL_HLP_EN
@ CHANNEL_HLP_EN
Definition: eps_driver.h:51
eps_driver::EPS::DOCK_DISCONNECTED
@ DOCK_DISCONNECTED
Definition: eps_driver.h:103
eps_driver
Definition: eps_driver.h:29
eps_driver::EPS::State
State
Definition: eps_driver.h:85
eps_driver::EPS::POWER_STATE_AWAKE_SAFE
@ POWER_STATE_AWAKE_SAFE
Definition: eps_driver.h:96
eps_driver::EPS::CHARGER_BOTTOM_RIGHT
@ CHARGER_BOTTOM_RIGHT
Definition: eps_driver.h:203
eps_driver::EPS::HK_PAYLOAD_PWR1_I
@ HK_PAYLOAD_PWR1_I
Definition: eps_driver.h:166
eps_driver::EPS::CHARGER_BOTTOM_LEFT
@ CHARGER_BOTTOM_LEFT
Definition: eps_driver.h:205
eps_driver::EPS::NUM_CHANNELS
@ NUM_CHANNELS
Definition: eps_driver.h:81
eps_driver::EPS::LED_LIVE
@ LED_LIVE
Definition: eps_driver.h:219
eps_driver::EPS::LedMode
LedMode
Definition: eps_driver.h:224
eps_driver::EPS::FAULT_OC_PAYLOAD_3
@ FAULT_OC_PAYLOAD_3
Definition: eps_driver.h:142
eps_driver::EPS::Led
Led
Definition: eps_driver.h:210
eps_driver::EPS::CHANNEL_PAYLOAD_EN_BOT_FRONT
@ CHANNEL_PAYLOAD_EN_BOT_FRONT
Definition: eps_driver.h:59
eps_driver::EPS::HK_PAYLOAD_PWR3_I
@ HK_PAYLOAD_PWR3_I
Definition: eps_driver.h:150
eps_driver::EPS::EPS
EPS(const i2c::Device &i2c_dev, std::function< void(uint32_t)> usleep_cb)
Definition: eps_driver.cc:33
eps_driver::EPS::CHANNEL_LLP_EN
@ CHANNEL_LLP_EN
Definition: eps_driver.h:49
eps_driver::EPS::CHANNEL_RESERVED4
@ CHANNEL_RESERVED4
Definition: eps_driver.h:76
eps_driver::EPS::PowerStateValue
PowerStateValue
Definition: eps_driver.h:92
eps_driver::EPS::CHANNEL_STATUSA1_LED
@ CHANNEL_STATUSA1_LED
Definition: eps_driver.h:66
eps_driver::EPS::STRING_SW_VERSION
@ STRING_SW_VERSION
Definition: eps_driver.h:41
eps_driver::EPS::I2C_CMD_GET_HW_EXCEPTIONS
static constexpr uint8_t I2C_CMD_GET_HW_EXCEPTIONS
Definition: eps_driver.h:302
eps_driver::EPS::SerialToString
static std::string SerialToString(uint8_t serial[6])
Definition: eps_driver.cc:281
eps_driver::EPS::GetTemps
bool GetTemps(uint32_t mask, std::map< Temp, TempInfo > &data)
Definition: eps_driver.cc:210
eps_driver::EPS::FAULT_OC_FAN
@ FAULT_OC_FAN
Definition: eps_driver.h:114
eps_driver::EPS::CHANNEL_LIVE_LED
@ CHANNEL_LIVE_LED
Definition: eps_driver.h:75
eps_driver::EPS::DOCK_CONNECTED
@ DOCK_CONNECTED
Definition: eps_driver.h:105
eps_driver::EPS::GetFaults
bool GetFaults(uint32_t mask, std::map< Fault, bool > &data)
Definition: eps_driver.cc:151
eps_driver::EPS::FAULT_RESERVED1
@ FAULT_RESERVED1
Definition: eps_driver.h:116
eps_driver::EPS::I2C_CMD_CLR_HW_EXCEPTIONS
static constexpr uint8_t I2C_CMD_CLR_HW_EXCEPTIONS
Definition: eps_driver.h:303
eps_driver::EPS::BatteryInfo::status
uint16_t status
Definition: eps_driver.h:244
eps_driver::EPS::BatteryInfo::voltage
uint16_t voltage
Definition: eps_driver.h:237
eps_driver::EPS::HK_AUX_PWR_I
@ HK_AUX_PWR_I
Definition: eps_driver.h:163
eps_driver::EPS::CHANNEL_PAYLOAD_EN_TOP_FRONT
@ CHANNEL_PAYLOAD_EN_TOP_FRONT
Definition: eps_driver.h:60
eps_driver::EPS::Temp
Temp
Definition: eps_driver.h:184
eps_driver::EPS::NUM_DOCK_STATES
@ NUM_DOCK_STATES
Definition: eps_driver.h:106
eps_driver::EPS::CHANNEL_STATUSA2_LED
@ CHANNEL_STATUSA2_LED
Definition: eps_driver.h:65
eps_driver::EPS::CHANNEL_RESERVED7
@ CHANNEL_RESERVED7
Definition: eps_driver.h:79
eps_driver::EPS::ON
static constexpr uint8_t ON
Definition: eps_driver.h:37
eps_driver::EPS::String
String
Definition: eps_driver.h:40
eps_driver::EPS::CHANNEL_AUX_PWR_EN
@ CHANNEL_AUX_PWR_EN
Definition: eps_driver.h:53
eps_driver::EPS::BATTERY_BOTTOM_LEFT
@ BATTERY_BOTTOM_LEFT
Definition: eps_driver.h:196
eps_driver::EPS::HK_ENET_PWR_I
@ HK_ENET_PWR_I
Definition: eps_driver.h:179
eps_driver::EPS::HK_5A_REG2_PWR_I
@ HK_5A_REG2_PWR_I
Definition: eps_driver.h:171
eps_driver::EPS::FAULT_RESERVED5
@ FAULT_RESERVED5
Definition: eps_driver.h:123
eps_driver::EPS::NUM_STATES
@ NUM_STATES
Definition: eps_driver.h:88
eps_driver::EPS::SetChannels
bool SetChannels(uint32_t mask, bool const value)
Definition: eps_driver.cc:260
eps_driver::EPS::BatteryInfo::current
int16_t current
Definition: eps_driver.h:238
eps_driver::EPS::FAULT_RESERVED3
@ FAULT_RESERVED3
Definition: eps_driver.h:118
eps_driver::EPS::I2C_CMD_SET_EPS_CMD
static constexpr uint8_t I2C_CMD_SET_EPS_CMD
Definition: eps_driver.h:320
eps_driver::EPS::HK_SUPPLY_IN_V
@ HK_SUPPLY_IN_V
Definition: eps_driver.h:149
eps_driver::EPS::LED_SA1
@ LED_SA1
Definition: eps_driver.h:211
eps_driver::EPS::TEMP_TOP
@ TEMP_TOP
Definition: eps_driver.h:186
eps_driver::EPS::HK_BAT1V_V
@ HK_BAT1V_V
Definition: eps_driver.h:158
eps_driver::EPS::LED_SA2
@ LED_SA2
Definition: eps_driver.h:212
eps_driver::EPS::I2C_RESP_NACK
static constexpr uint8_t I2C_RESP_NACK
Definition: eps_driver.h:292
eps_driver::EPS::HK_BAT3V_V
@ HK_BAT3V_V
Definition: eps_driver.h:156
eps_driver::EPS::SetLeds
bool SetLeds(uint32_t mask, LedMode const value)
Definition: eps_driver.cc:227
eps_driver::EPS::FAULT_ST_5A_REG_1
@ FAULT_ST_5A_REG_1
Definition: eps_driver.h:138
eps_driver::EPS::FAULT_ST_5A_REG_3
@ FAULT_ST_5A_REG_3
Definition: eps_driver.h:132
eps_driver::EPS::HK_5A_REG1_PWR_I
@ HK_5A_REG1_PWR_I
Definition: eps_driver.h:167
eps_driver::EPS::GetStrings
bool GetStrings(uint32_t mask, std::map< String, std::string > &data)
Definition: eps_driver.cc:76
eps_driver::EPS::Reboot
bool Reboot(void)
Definition: eps_driver.cc:71
eps_driver::EPS::NUM_STRINGS
@ NUM_STRINGS
Definition: eps_driver.h:44
mask
uint8_t mask
Definition: signal_lights.h:72
eps_driver::EPS::LED_SB2
@ LED_SB2
Definition: eps_driver.h:214
eps_driver::EPS::FAULT_RESERVED6
@ FAULT_RESERVED6
Definition: eps_driver.h:124
eps_driver::EPS::EVERYTHING
static constexpr uint32_t EVERYTHING
Definition: eps_driver.h:35
eps_driver::EPS::I2C_CMD_GET_CONN_STATE
static constexpr uint8_t I2C_CMD_GET_CONN_STATE
Definition: eps_driver.h:318
eps_driver::EPS::FAULT_RESERVED0
@ FAULT_RESERVED0
Definition: eps_driver.h:115
eps_driver::EPS::I2C_CMD_UNDOCK
static constexpr uint8_t I2C_CMD_UNDOCK
Definition: eps_driver.h:311
eps_driver::EPS::HK_MLP_I
@ HK_MLP_I
Definition: eps_driver.h:178
eps_driver::EPS::CHANNEL_STATUSC2_LED
@ CHANNEL_STATUSC2_LED
Definition: eps_driver.h:69
eps_driver::EPS::BatteryInfo::percentage
uint16_t percentage
Definition: eps_driver.h:242
eps_driver::EPS::I2C_CMD_GET_SW_STATES
static constexpr uint8_t I2C_CMD_GET_SW_STATES
Definition: eps_driver.h:298
eps_driver::EPS::I2C_CMD_GET_BUILD_TIME
static constexpr uint8_t I2C_CMD_GET_BUILD_TIME
Definition: eps_driver.h:295
eps_driver::EPS::SetChargers
bool SetChargers(uint32_t mask, bool const value)
Definition: eps_driver.cc:250
eps_driver::EPS::BatteryInfo
Definition: eps_driver.h:234
eps_driver::EPS::CHANNEL_STATUSB1_LED
@ CHANNEL_STATUSB1_LED
Definition: eps_driver.h:68
eps_driver::EPS::HK_FAN_PWR_I
@ HK_FAN_PWR_I
Definition: eps_driver.h:162
eps_driver::EPS::Channel
Channel
Definition: eps_driver.h:48
eps_driver::EPS::TempInfo
Definition: eps_driver.h:250
eps_driver::EPS::Read
uint16_t Read(uint8_t *buff)
Definition: eps_driver.cc:322
eps_driver::EPS::GetBatteries
bool GetBatteries(uint32_t mask, std::map< Battery, BatteryInfo > &data)
Definition: eps_driver.cc:165
eps_driver::EPS::POWER_STATE_UNKNOWN
@ POWER_STATE_UNKNOWN
Definition: eps_driver.h:93
eps_driver::EPS::CHANNEL_RESERVED1
@ CHANNEL_RESERVED1
Definition: eps_driver.h:64
eps_driver::EPS::GetChannels
bool GetChannels(uint32_t mask, std::map< Channel, bool > &data)
Definition: eps_driver.cc:123
eps_driver::EPS::NUM_TEMPERATURES
@ NUM_TEMPERATURES
Definition: eps_driver.h:188
eps_driver::EPS::HK_SUBSYS1_1_PWR_V
@ HK_SUBSYS1_1_PWR_V
Definition: eps_driver.h:151
eps_driver::EPS::POWER_STATE_AWAKE_NOMINAL
@ POWER_STATE_AWAKE_NOMINAL
Definition: eps_driver.h:95
eps_driver::EPS::LED_MODE_ON
@ LED_MODE_ON
Definition: eps_driver.h:226
eps_driver::EPS::CHANNEL_ENET_PWR_EN
@ CHANNEL_ENET_PWR_EN
Definition: eps_driver.h:54
eps_driver::EPS::NUM_LEDS
@ NUM_LEDS
Definition: eps_driver.h:220
eps_driver::EPS::FAULT_OT_HLP
@ FAULT_OT_HLP
Definition: eps_driver.h:122
eps_driver::EPS::I2C_CMD_GET_SERIAL_NUMBER
static constexpr uint8_t I2C_CMD_GET_SERIAL_NUMBER
Definition: eps_driver.h:305
eps_driver::EPS::HK_PAYLOAD_PWR2_I
@ HK_PAYLOAD_PWR2_I
Definition: eps_driver.h:165
eps_driver::EPS::CHANNEL_USB_PWR_EN
@ CHANNEL_USB_PWR_EN
Definition: eps_driver.h:52
eps_driver::EPS::I2C_CMD_GET_CHARGE_STATE
static constexpr uint8_t I2C_CMD_GET_CHARGE_STATE
Definition: eps_driver.h:314
eps_driver::EPS::CHANNEL_AUDIO_LED
@ CHANNEL_AUDIO_LED
Definition: eps_driver.h:74
eps_driver::EPS::ComputeChecksum
uint8_t ComputeChecksum(uint8_t *buf, size_t size)
Definition: eps_driver.cc:370
eps_driver::EPS::FAULT_OT_FLASHLIGHT_2
@ FAULT_OT_FLASHLIGHT_2
Definition: eps_driver.h:113
eps_driver::EPS::FAULT_OC_AUX
@ FAULT_OC_AUX
Definition: eps_driver.h:131
eps_driver::EPS::HK_SUBSYS2_PWR_V
@ HK_SUBSYS2_PWR_V
Definition: eps_driver.h:169
eps_driver::EPS::HK_SYSTEM_I
@ HK_SYSTEM_I
Definition: eps_driver.h:154
eps_driver::EPS::TempInfo::temp
double temp
Definition: eps_driver.h:252
eps_driver::EPS::CHANNEL_VIDEO_LED
@ CHANNEL_VIDEO_LED
Definition: eps_driver.h:73
eps_driver::EPS::Write
uint16_t Write(uint8_t *buff, uint16_t len)
Definition: eps_driver.cc:356
eps_driver::EPS::GetHousekeeping
bool GetHousekeeping(uint32_t mask, std::map< Housekeeping, double > &data)
Definition: eps_driver.cc:194
eps_driver::EPS::LED_MODE_BLINK_2HZ
@ LED_MODE_BLINK_2HZ
Definition: eps_driver.h:227
eps_driver::EPS::ClearFaults
bool ClearFaults(void)
Definition: eps_driver.cc:56
eps_driver::EPS::I2C_CMD_GET_HK
static constexpr uint8_t I2C_CMD_GET_HK
Definition: eps_driver.h:301
eps_driver::EPS::CHANNEL_MLP_EN
@ CHANNEL_MLP_EN
Definition: eps_driver.h:50
eps_driver::EPS::CHANNEL_RESERVED6
@ CHANNEL_RESERVED6
Definition: eps_driver.h:78
eps_driver::EPS::FAULT_OT_FLASHLIGHT_1
@ FAULT_OT_FLASHLIGHT_1
Definition: eps_driver.h:112
eps_driver::EPS::NUM_CHARGERS
@ NUM_CHARGERS
Definition: eps_driver.h:206
eps_driver::EPS::CHARGER_TOP_LEFT
@ CHARGER_TOP_LEFT
Definition: eps_driver.h:204
eps_driver::EPS::FAULT_OC_5A_REG_2
@ FAULT_OC_5A_REG_2
Definition: eps_driver.h:133
eps_driver::EPS::BatteryInfo::design
uint16_t design
Definition: eps_driver.h:241
eps_driver::EPS::FAULT_RESERVED9
@ FAULT_RESERVED9
Definition: eps_driver.h:137
eps_driver::EPS::I2C_CMD_SEND_EPS_STATE_TO_DOCK
static constexpr uint8_t I2C_CMD_SEND_EPS_STATE_TO_DOCK
Definition: eps_driver.h:321
eps_driver::EPS::CHANNEL_MOTOR_EN2
@ CHANNEL_MOTOR_EN2
Definition: eps_driver.h:62
eps_driver::EPS::HK_AGND1_V
@ HK_AGND1_V
Definition: eps_driver.h:148
eps_driver::EPS::HK_MOTOR2_I
@ HK_MOTOR2_I
Definition: eps_driver.h:170
eps_driver::EPS::I2C_CMD_CLR_TERMINATE_EVT
static constexpr uint8_t I2C_CMD_CLR_TERMINATE_EVT
Definition: eps_driver.h:310
eps_driver::EPS::Battery
Battery
Definition: eps_driver.h:192
eps_driver::EPS::OFF
static constexpr uint8_t OFF
Definition: eps_driver.h:36
eps_driver::EPS::NUM_LED_MODES
@ NUM_LED_MODES
Definition: eps_driver.h:230
eps_driver::EPS::LED_SC1
@ LED_SC1
Definition: eps_driver.h:215
eps_driver::EPS::POWER_STATE_HIBERNATE
@ POWER_STATE_HIBERNATE
Definition: eps_driver.h:94
eps_driver::EPS::I2C_CMD_REBOOT
static constexpr uint8_t I2C_CMD_REBOOT
Definition: eps_driver.h:306
eps_driver::EPS::LED_SB1
@ LED_SB1
Definition: eps_driver.h:213
eps_driver::EPS::FAULT_OC_ENET
@ FAULT_OC_ENET
Definition: eps_driver.h:111
eps_driver::EPS::TEMP_BOTTOM
@ TEMP_BOTTOM
Definition: eps_driver.h:185
i2c_new.h
eps_driver::EPS::POWER_STATE_CRITICAL_FAULT
@ POWER_STATE_CRITICAL_FAULT
Definition: eps_driver.h:97
eps_driver::EPS::HK_USB_PWR_I
@ HK_USB_PWR_I
Definition: eps_driver.h:176
eps_driver::EPS::RingBuzzer
bool RingBuzzer(uint16_t freq, uint8_t secs)
Definition: eps_driver.cc:38
eps_driver::EPS::Fault
Fault
Definition: eps_driver.h:110
eps_driver::EPS::HK_BAT4V_V
@ HK_BAT4V_V
Definition: eps_driver.h:155
eps_driver::EPS::FAULT_RESERVED2
@ FAULT_RESERVED2
Definition: eps_driver.h:117
eps_driver::EPS::FAULT_OC_5A_REG_1
@ FAULT_OC_5A_REG_1
Definition: eps_driver.h:134
eps_driver::EPS::HK_AUO_PWR_I
@ HK_AUO_PWR_I
Definition: eps_driver.h:174
eps_driver::EPS::I2C_CMD_GET_SW_VERSION
static constexpr uint8_t I2C_CMD_GET_SW_VERSION
Definition: eps_driver.h:294
eps_driver::EPS::CHANNEL_RESERVED8
@ CHANNEL_RESERVED8
Definition: eps_driver.h:80
eps_driver::EPS::CHANNEL_STATUSB2_LED
@ CHANNEL_STATUSB2_LED
Definition: eps_driver.h:67
eps_driver::EPS::BatteryInfo::remaining
uint16_t remaining
Definition: eps_driver.h:240
eps_driver::EPS::I2C_CMD_SET_EPS_POWER_MODE
static constexpr uint8_t I2C_CMD_SET_EPS_POWER_MODE
Definition: eps_driver.h:315
eps_driver::EPS::I2C_CMD_GET_EPS_CMD
static constexpr uint8_t I2C_CMD_GET_EPS_CMD
Definition: eps_driver.h:319
eps_driver::EPS::NUM_HOUSEKEEPING
@ NUM_HOUSEKEEPING
Definition: eps_driver.h:180
eps_driver::EPS::LED_MODE_BLINK_0_5HZ
@ LED_MODE_BLINK_0_5HZ
Definition: eps_driver.h:229
eps_driver::EPS::BatteryInfo::cell
uint16_t cell[4]
Definition: eps_driver.h:243
eps_driver::EPS::STRING_SERIAL
@ STRING_SERIAL
Definition: eps_driver.h:43
eps_driver::EPS::NUM_BATTERIES
@ NUM_BATTERIES
Definition: eps_driver.h:197
eps_driver::EPS::CHANNEL_RESERVED5
@ CHANNEL_RESERVED5
Definition: eps_driver.h:77
eps_driver::EPS::CHANNEL_MOTOR_EN1
@ CHANNEL_MOTOR_EN1
Definition: eps_driver.h:61
eps_driver::EPS::BatteryInfo::full
uint16_t full
Definition: eps_driver.h:239
eps_driver::EPS::FAULT_OC_PAYLOAD_4
@ FAULT_OC_PAYLOAD_4
Definition: eps_driver.h:136
eps_driver::EPS::LED_AUDIO
@ LED_AUDIO
Definition: eps_driver.h:218
eps_driver::EPS::CHANNEL_PAYLOAD_EN_TOP_AFT
@ CHANNEL_PAYLOAD_EN_TOP_AFT
Definition: eps_driver.h:57
eps_driver::EPS::HK_UNREG_V
@ HK_UNREG_V
Definition: eps_driver.h:153
eps_driver::EPS::I2C_CMD_SET_CHARGE_STATE
static constexpr uint8_t I2C_CMD_SET_CHARGE_STATE
Definition: eps_driver.h:313
eps_driver::EPS::CHANNEL_STATUSC1_LED
@ CHANNEL_STATUSC1_LED
Definition: eps_driver.h:70
eps_driver::EPS::HK_SUBSYS1_2_PWR_V
@ HK_SUBSYS1_2_PWR_V
Definition: eps_driver.h:152
eps_driver::EPS::BATTERY_TOP_LEFT
@ BATTERY_TOP_LEFT
Definition: eps_driver.h:195
eps_driver::EPS::CHANNEL_RESERVED3
@ CHANNEL_RESERVED3
Definition: eps_driver.h:72
eps_driver::EPS::FAULT_OC_5A_REG_3
@ FAULT_OC_5A_REG_3
Definition: eps_driver.h:140
eps_driver::EPS::FAULT_OC_MLP
@ FAULT_OC_MLP
Definition: eps_driver.h:129
i2c::Device
Definition: i2c_new.h:82
eps_driver::EPS::LED_VIDEO
@ LED_VIDEO
Definition: eps_driver.h:217
eps_driver::EPS::HK_5A_REG3_PWR_I
@ HK_5A_REG3_PWR_I
Definition: eps_driver.h:172
eps_driver::EPS::CHARGER_TOP_RIGHT
@ CHARGER_TOP_RIGHT
Definition: eps_driver.h:202
eps_driver::EPS
Definition: eps_driver.h:32
eps_driver::EPS::HK_HLP_I
@ HK_HLP_I
Definition: eps_driver.h:175
eps_driver::EPS::CHANNEL_RESERVED2
@ CHANNEL_RESERVED2
Definition: eps_driver.h:71
eps_driver::EPS::GetChargers
bool GetChargers(uint32_t mask, std::map< Charger, bool > &data)
Definition: eps_driver.cc:137
eps_driver::EPS::FAULT_OT_MLP
@ FAULT_OT_MLP
Definition: eps_driver.h:120
eps_driver::EPS::FAULT_OT_LLP
@ FAULT_OT_LLP
Definition: eps_driver.h:121
eps_driver::EPS::HK_MAIN5_PWR_I
@ HK_MAIN5_PWR_I
Definition: eps_driver.h:173
eps_driver::EPS::Undock
bool Undock(void)
Definition: eps_driver.cc:66
eps_driver::EPS::STRING_BUILD
@ STRING_BUILD
Definition: eps_driver.h:42
eps_driver::EPS::CHANNEL_RESERVED0
@ CHANNEL_RESERVED0
Definition: eps_driver.h:63
eps_driver::EPS::FAULT_ST_5A_REG_2
@ FAULT_ST_5A_REG_2
Definition: eps_driver.h:135
eps_driver::EPS::SetPowerState
bool SetPowerState(PowerStateValue const value)
Definition: eps_driver.cc:272
eps_driver::EPS::I2C_CMD_SET_LED_MODES
static constexpr uint8_t I2C_CMD_SET_LED_MODES
Definition: eps_driver.h:300
eps_driver::EPS::Charger
Charger
Definition: eps_driver.h:201
eps_driver::EPS::HK_LLP_I
@ HK_LLP_I
Definition: eps_driver.h:177
eps_driver::EPS::BATTERY_BOTTOM_RIGHT
@ BATTERY_BOTTOM_RIGHT
Definition: eps_driver.h:194
eps_driver::EPS::FAULT_RESERVED7
@ FAULT_RESERVED7
Definition: eps_driver.h:125
eps_driver::EPS::I2C_CMD_GET_SYSTEM_STATE
static constexpr uint8_t I2C_CMD_GET_SYSTEM_STATE
Definition: eps_driver.h:299
eps_driver::EPS::LED_MODE_BLINK_1HZ
@ LED_MODE_BLINK_1HZ
Definition: eps_driver.h:228
eps_driver::EPS::FAULT_OC_USB
@ FAULT_OC_USB
Definition: eps_driver.h:127
eps_driver::EPS::BatteryInfo::chan
uint8_t chan
Definition: eps_driver.h:235
eps_driver::EPS::CHANNEL_SPEAKER_EN
@ CHANNEL_SPEAKER_EN
Definition: eps_driver.h:56
eps_driver::EPS::BatteryInfo::serial
uint16_t serial
Definition: eps_driver.h:246
eps_driver::EPS::EnterBootloader
bool EnterBootloader(void)
Definition: eps_driver.cc:51
eps_driver::EPS::BatteryInfo::present
bool present
Definition: eps_driver.h:236
eps_driver::EPS::I2C_CMD_RING_BUZZER
static constexpr uint8_t I2C_CMD_RING_BUZZER
Definition: eps_driver.h:309
eps_driver::EPS::I2C_CMD_ENTER_BOOTLOADER
static constexpr uint8_t I2C_CMD_ENTER_BOOTLOADER
Definition: eps_driver.h:307
eps_driver::EPS::I2C_CMD_NONE
static constexpr uint8_t I2C_CMD_NONE
Definition: eps_driver.h:293
eps_driver::EPS::Unterminate
bool Unterminate(void)
Definition: eps_driver.cc:61
eps_driver::EPS::I2C_CMD_GET_EPS_POWER_MODE
static constexpr uint8_t I2C_CMD_GET_EPS_POWER_MODE
Definition: eps_driver.h:316
eps_driver::EPS::FAULT_OC_PAYLOAD_2
@ FAULT_OC_PAYLOAD_2
Definition: eps_driver.h:141
eps_driver::EPS::STATE_DOCK
@ STATE_DOCK
Definition: eps_driver.h:87
eps_driver::EPS::~EPS
~EPS(void)
Definition: eps_driver.cc:36
eps_driver::EPS::TEMP_CONNECTOR
@ TEMP_CONNECTOR
Definition: eps_driver.h:187