FreeCalypso > hg > fc-magnetite
view src/cs/drivers/drv_app/fchg/fchg_default_batt.c @ 632:d968a3216ba0
new tangomdm build target
TCS211/Magnetite built for target leonardo runs just fine on the Tango-based
Caramel board, but a more proper tangomdm build target is preferable in order
to better market these Tango modems to prospective commercial customers. The
only differences are in GPIO and MCSI config:
* MCSI is enabled in the tangomdm build config.
* GPIO 1 is loudspeaker amplifier control on Leonardo, but on Tango platforms
it can be used for anything. On Caramel boards this GPIO should be
configured as an output driving high.
* GPIO 2 needs to be configured as Calypso input on Leonardo, but on Tango
platforms it can be used for anything. On Caramel boards this GPIO should be
configured as an output, either high or low is OK.
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sat, 04 Jan 2020 19:27:41 +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); }
