Midnight Sun Firmware
Loading...
Searching...
No Matches
LtcAfeStorage

Runtime Data Storage. More...

#include <ltc_afe.h>

Collaboration diagram for LtcAfeStorage:

Public Attributes

uint16_t cell_voltages [LTC_AFE_MAX_CELLS]
 
uint16_t aux_voltages [LTC_AFE_MAX_THERMISTORS]
 
uint16_t cell_result_lookup [LTC_AFE_MAX_CELLS]
 
uint16_t aux_result_lookup [LTC_AFE_MAX_THERMISTORS]
 
uint16_t discharge_cell_lookup [LTC_AFE_MAX_CELLS]
 
LtcAfeSettingssettings
 
LtcAfeWriteConfigPacket * device_configs
 

Detailed Description

Runtime Data Storage.

Stores settings, configs, and voltages for all AFE devices

Note
Raw indices mean
  • Index 0 corresponds to the first cell/aux value of the first AFE device.
  • Index n * max_x_per_device corresponds to the first value of the (n+1)th AFE device.
  • Each AFE's data (voltages, lookups, etc.) is stored contiguously before the next AFE's data.

Member Data Documentation

◆ aux_result_lookup

uint16_t aux_result_lookup[LTC_AFE_MAX_THERMISTORS]

Map raw aux input indices read from AFE to aux_voltages

◆ aux_voltages

uint16_t aux_voltages[LTC_AFE_MAX_THERMISTORS]

Stores aux voltages for all devices

◆ cell_result_lookup

uint16_t cell_result_lookup[LTC_AFE_MAX_CELLS]

Map raw cell indices read from AFE to cell_voltages

◆ cell_voltages

uint16_t cell_voltages[LTC_AFE_MAX_CELLS]

Stores cell voltages for all devices

◆ device_configs

LtcAfeWriteConfigPacket* device_configs

Stores the Configuration of each device in the CFGR register

◆ discharge_cell_lookup

uint16_t discharge_cell_lookup[LTC_AFE_MAX_CELLS]

Map indicies of cell_voltages to raw cell indices

◆ settings

LtcAfeSettings* settings

Stores settings for AFE devices, set by the user


The documentation for this struct was generated from the following file: