FreeCalypso > hg > fc-magnetite
view src/cs/drivers/drv_app/fchg/fchg_default_batt.c @ 548:9f191ca0051f
implemented ability to enable -D_FF_RV_EXIST_ in TIF library
It is not clear if this quirk is intentional or not, but TI's production
version of tif_na7_db_{fl,ir}.lib was built without -D_FF_RV_EXIST_,
and as a result, the code that is present in the source for the
TRACEMASK_IN_FFS feature was not compiled in, making the feature unavailable.
The present change makes it possible to re-enable this code (when TIF
libraries are being rebuilt from source rather than used as blobs)
by setting TRACEMASK_IN_FFS=1 on the configure line.
The new code is NOT enabled by default: it is not a change which we can
justify inflicting on our production firmwares.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 18 Nov 2018 08:09:17 +0000 |
parents | 919b44c991fc |
children |
line wrap: on
line source
/* * This module provides the default table of battery State-of-Charge * thresholds in the absence of a customized table in FFS. * * The present default table has been taken from Pirelli's firmware. */ #include "fchg/fchg_env.h" #include "fchg/fchg_func_i.h" #include "rv/rv_general.h" #include <string.h> static const T_PWR_THRESHOLDS default_batt_table[] = { {4170, 100}, {4120, 95}, {4070, 90}, {4030, 85}, {3964, 80}, {3930, 75}, {3900, 70}, {3882, 65}, {3847, 60}, {3805, 55}, {3786, 50}, {3771, 45}, {3759, 40}, {3750, 35}, {3745, 30}, {3737, 25}, {3719, 20}, {3688, 15}, {3663, 10}, {3539, 5}, {3370, 0} }; void pwr_set_default_batt_table(void) { memcpy(pwr_ctrl->batt_thresholds, default_batt_table, sizeof default_batt_table); pwr_ctrl->nb_thresholds = sizeof(default_batt_table) / sizeof(T_PWR_THRESHOLDS); }