Definition in file analog.h.
Go to the source code of this file.
Defines | |
| #define | ACCUM_CONV_TIME ACCUM_CONV_TIME_1000 |
| #define | ACCUM_CONV_TIME_1000 ((1<<CADAS1) | (1<<CADAS0)) |
| #define | ACCUM_CONV_TIME_125 ((0<<CADAS1) | (0<<CADAS0)) |
| #define | ACCUM_CONV_TIME_250 ((0<<CADAS1) | (1<<CADAS0)) |
| #define | ACCUM_CONV_TIME_500 ((1<<CADAS1) | (0<<CADAS0)) |
| #define | ACTIVE_CURRENT_THRESHOLD 9 |
| #define | ADC0_READINGS 10 |
| #define | REG_CONV_TIME REG_CONV_TIME_1000 |
| #define | REG_CONV_TIME_1000 ((1<<CADSI1) | (0<<CADSI0)) |
| #define | REG_CONV_TIME_2000 ((1<<CADSI1) | (1<<CADSI0)) |
| #define | REG_CONV_TIME_250 ((0<<CADSI1) | (0<<CADSI0)) |
| #define | REG_CONV_TIME_500 ((0<<CADSI1) | (1<<CADSI0)) |
| #define | REGULAR_CURRENT_SCALE_VALUE 4 |
| #define | VPTAT_READINGS 10 |
Enumerations | |
| enum | CC_MODE { CC_DISABLED = 0, CC_ACCUMULATE, CC_REGULAR } |
Functions | |
| unsigned int | AbsoluteSOC (void) |
| void | ADCinit (void) |
| unsigned int | AtRateOK (void) |
| unsigned int | AtRateTTE (void) |
| unsigned int | AtRateTTF (void) |
| unsigned int | AvgTimeToFull (void) |
| void | CalculateADCresults (void) |
| signed int | CCarray_Average (void) |
| void | CCinit (void) |
| void | CCmode (unsigned char mode) |
| signed int | Current1Sec (void) |
| void | DisableCellBalancing (void) |
| void | EnableCellBalancing (void) |
| void | FullChargeReached (void) |
| unsigned int | FullChgCap (void) |
| void | FullDischargeReached (void) |
| unsigned int | GetTemperature (void) |
| unsigned int | GetVoltage (void) |
| unsigned char | ReadCCOffsetCalibration (void) |
| unsigned int | ReadCell (char) |
| unsigned int | ReadTemperature (unsigned char channel) |
| unsigned char | ReadVrefCalibration (void) |
| unsigned char | RelativeSOC (void) |
| unsigned int | RemainingCap (void) |
| void | SetMaxTopAcc (long value) |
| void | StartAdc (unsigned char select) |
| unsigned int | TimeToEmpty (unsigned char avgd) |
Variables | |
| unsigned char | BGCCRCal |
| unsigned int | cell_current [4] |
| unsigned char | CellToBalance |
| unsigned char | FastRCCal |
| volatile signed int | LatestCCI |
| signed long | RunningAcc |
| unsigned int | SlowRCCal |
| unsigned char | ThermistorSelect |
| #define ACCUM_CONV_TIME ACCUM_CONV_TIME_1000 |
| #define REG_CONV_TIME REG_CONV_TIME_1000 |
| enum CC_MODE |
| unsigned int AbsoluteSOC | ( | void | ) |
| void ADCinit | ( | void | ) |
| unsigned int AtRateOK | ( | void | ) |
Definition at line 280 of file analog.c.
References CAPACITY_MODE, Current1Sec(), GetCharge_mAmins(), GetVoltage(), hibyte, PACK_MINV, SMBV_AtRate, SMBV_BattMode, SMBvar_int, and SMBvariables.
| unsigned int AtRateTTE | ( | void | ) |
Definition at line 252 of file analog.c.
References CAPACITY_MODE, GetCharge_mAmins(), hibyte, PACK_MINV, SMBV_AtRate, SMBV_BattMode, SMBvar_int, and SMBvariables.
| unsigned int AtRateTTF | ( | void | ) |
Definition at line 226 of file analog.c.
References CAPACITY_MODE, GetCharge_mAmins(), hibyte, PACK_DESIGNCAPTYP, SMBV_AtRate, SMBV_BattMode, SMBvar_int, and SMBvariables.
| unsigned int AvgTimeToFull | ( | void | ) |
Definition at line 410 of file analog.c.
References CAPACITY_MODE, Current1Sec(), GetChgUntilFull_mAmins(), GetVoltage(), hibyte, PACK_MINV, SMBV_BattMode, and SMBvariables.
| void CalculateADCresults | ( | void | ) |
Definition at line 1176 of file analog.c.
References ADCbuffer, ADCgain, CELL_TOOLITTLEV, CELL_TOOMUCHV, CellV, DoShutdown(), OnChipTemp, PACKSTACK, SHUTDOWN_REASON_OVERVOLTAGE, SHUTDOWN_REASON_UNDERVOLTAGE, Thermistor, ThermistorSelect, VPA4, and VTgain.
| signed int CCarray_Average | ( | void | ) |
| void CCinit | ( | void | ) |
| void CCmode | ( | unsigned char | mode | ) |
Definition at line 742 of file analog.c.
References ACCUM_CONV_TIME, ACTIVE_CURRENT_THRESHOLD, CC_ACCUMULATE, CC_delay_acc, CC_delay_inst, CC_DISABLED, CC_REGULAR, CCarray_Init(), REG_CONV_TIME, and Timer32KHz.
| signed int Current1Sec | ( | void | ) |
| void EnableCellBalancing | ( | void | ) |
| void FullChargeReached | ( | void | ) |
Definition at line 131 of file analog.c.
References FULLY_CHARGED, FULLY_DISCHARGED, lobyte, MaxBottomAcc, MaxTopAcc, RunningAcc, SMBV_BattStatus, and SMBvariables.
| unsigned int FullChgCap | ( | void | ) |
Definition at line 357 of file analog.c.
References CAPACITY_MODE, GetMaxChg(), hibyte, PACK_NOMINALV, SMBV_BattMode, and SMBvariables.
| void FullDischargeReached | ( | void | ) |
Definition at line 144 of file analog.c.
References FULLY_CHARGED, FULLY_DISCHARGED, lobyte, MaxBottomAcc, MaxTopAcc, RunningAcc, SMBV_BattStatus, and SMBvariables.
| unsigned int GetTemperature | ( | void | ) |
| unsigned int GetVoltage | ( | void | ) |
| unsigned char ReadCCOffsetCalibration | ( | void | ) |
Definition at line 566 of file analog.c.
References EESTORAGE_CC_valid, EESTORAGE_CCIoffset, and EESTORAGE_CCoffset.
| unsigned int ReadTemperature | ( | unsigned char | channel | ) |
Definition at line 1229 of file analog.c.
References OnChipTemp, and Thermistor.
| unsigned char ReadVrefCalibration | ( | void | ) |
| unsigned char RelativeSOC | ( | void | ) |
| unsigned int RemainingCap | ( | void | ) |
Definition at line 341 of file analog.c.
References CAPACITY_MODE, GetCharge(), GetVoltage(), hibyte, SMBV_BattMode, and SMBvariables.
| void StartAdc | ( | unsigned char | select | ) |
| unsigned int TimeToEmpty | ( | unsigned char | avgd | ) |
Definition at line 372 of file analog.c.
References CAPACITY_MODE, CCarray_Average(), Current1Sec(), GetCharge_mAmins(), GetVoltage(), hibyte, PACK_MINV, SMBV_BattMode, and SMBvariables.
| unsigned char BGCCRCal |
Referenced by CalibrateVREF(), ReadFactoryCalibration(), and ReadVrefCalibration().
| unsigned int cell_current[4] |
Referenced by ADC_INT().
| unsigned char CellToBalance |
Referenced by BalanceCheck(), and EnableCellBalancing().
| unsigned char FastRCCal |
Referenced by ReadFactoryCalibration().
| volatile signed int LatestCCI |
Referenced by ADC_INT(), and CC_Instantaneous_ISR().
| signed long RunningAcc |
| unsigned int SlowRCCal |
Referenced by ReadFactoryCalibration().
| unsigned char ThermistorSelect |
Referenced by CalculateADCresults(), and main().
1.5.3