File Power.cpp
FileList > fw > rbcx-coprocessor > src > Power.cpp
Go to the source code of this file.
#include "stm32f1xx_ll_adc.h"
#include "stm32f1xx_ll_rcc.h"
#include "Bsp.hpp"
#include "BuzzerController.hpp"
#include "Dispatcher.hpp"
#include "Power.hpp"
#include "utils/Debug.hpp"
#include "utils/Flash.hpp"
#include "utils/TaskWrapper.hpp"
#include "utils/TickTimer.hpp"
#include "rbcx.pb.h"
Classes
Public Static Attributes
Public Functions
Public Static Functions
Public Static Attributes Documentation
variable ThresholdNoBatteryMv
constexpr uint16_t ThresholdNoBatteryMv;
variable ThresholdPowerOffMv
constexpr uint16_t ThresholdPowerOffMv;
variable calib
variable calibrationDataMagic
constexpr uint32_t calibrationDataMagic;
variable calibrationDefaults
constexpr CalibrationData calibrationDefaults;
variable dispatchStatPeriodMs
constexpr uint32_t dispatchStatPeriodMs;
variable dispatchStatTimer
TickTimer dispatchStatTimer;
variable rawBattery
variable rawInternalRef
variable rawMidBattery
variable rawTemperature
variable tempAvgSlope
constexpr uint16_t tempAvgSlope;
variable undervoltageCounter
variable undervoltageShutdownThreshold
constexpr int undervoltageShutdownThreshold;
variable undervoltageWarningOn
bool undervoltageWarningOn;
variable vrefMv
Public Functions Documentation
function AUXILIARY_AND_MOTOR_ADC_IRQ_HANDLER
void AUXILIARY_AND_MOTOR_ADC_IRQ_HANDLER ()
function powerBatteryMidMv
uint16_t powerBatteryMidMv ()
function powerBatteryMv
uint16_t powerBatteryMv ()
function powerCalibrate
void powerCalibrate (
uint16_t vccMv,
uint16_t bMidMv,
uint16_t vref33Mv,
uint16_t currentTemperatureC
)
function powerInit
function powerPoll
function powerShutDown
function powerTemperatureC
uint16_t powerTemperatureC ()
function powerVrefMv
Public Static Functions Documentation
function adcWait
static void adcWait (
uint32_t clockCycles
)
function checkBatteryVoltage
static void checkBatteryVoltage (
uint16_t vccMv
)
function loadCalibration
static void loadCalibration ()
The documentation for this class was generated from the following file fw/rbcx-coprocessor/src/Power.cpp