FreeCalypso > hg > fc-magnetite
view src/cs/drivers/drv_app/fchg/fchg_struct.h @ 673:62a5285e014a
Lorekeeping: allow tpudrv-leonardo.lib on Leonardo/Tango
Back in 2015 the Mother's idea was to produce a FreeCalypso development
board that would be a clone of TI Leonardo, including the original
quadband RFFE; one major additional stipulation was that this board
needed to be able to run original unmodified TCS211-20070608 firmware
with all blobs intact, with only minimal binary patches to main.lib
and tpudrv.lib. The necessary patched libs were produced at that time
in the tcs211-patches repository.
That plan was changed and we produced FCDEV3B instead, with Openmoko's
triband RFFE instead of Leonardo quadband, but when FC Magnetite started
in 2016, a TPUDRV_blob= provision was still made, allowing the possibility
of patching OM's tpudrv.lib for a restored Leonardo RFFE.
Now in 2020 we have FC Tango which is essentially a verbatim clone of
Leonardo core, including the original quadband RFFE. We have also
deblobbed our firmware so much that we have absolutely no real need
for a blob version of tpudrv.lib - but I thought it would be neat to put
the ancient TPUDRV_blob= mechanism (classic config) to its originally
intended use, just for the heck of it.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 29 May 2020 03:55:36 +0000 |
parents | 4c3d05866531 |
children |
line wrap: on
line source
/* * Internal structure definitions for the FCHG SWE reside here. * abb_inth.c will also need to include this header in order to * get our T_PWR_CTRL_BLOCK definition. */ #ifndef __FCHG_STRUCT_H #define __FCHG_STRUCT_H #include "rv/rv_general.h" #include "rvf/rvf_api.h" #include "fchg/fchg_common.h" struct charging_config { UINT16 start_delay; UINT16 start_thresh; UINT16 restart_thresh; UINT16 ci2cv_thresh; UINT16 cv_init_set; UINT16 cv_ctrl_loop_high; UINT16 cv_ctrl_loop_low; UINT16 cv_dac_max_incr; UINT16 cv_dac_max_decr; UINT16 cv_samples_needed; UINT16 overvoltage; UINT16 ci_current; UINT16 end_current; UINT16 ichg_max_spike; UINT16 ichg_samples_needed; UINT16 charge_time_limit; UINT16 recharge_delay; UINT16 bciconf; }; /* from original PWR SWE */ typedef struct { UINT16 bat_voltage; T_PWR_PERCENT remain_capa; } T_PWR_THRESHOLDS; #define MAX_THRESHOLDS 101 #define ICHG_AVG_WINDOW 6 typedef struct { /* RiViera boilerplate */ T_RVF_ADDR_ID addr_id; T_RVF_MB_ID prim_id; /* configuration */ struct charging_config config; BOOL config_present; T_PWR_THRESHOLDS batt_thresholds[MAX_THRESHOLDS]; UINT16 nb_thresholds; /* state */ enum fchg_state state; UINT16 batt_mv; UINT16 curr_disch_thresh; /* valid only during a charging cycle */ UINT16 i2v_offset; UINT16 cv_dac_init; UINT16 cv_dac_curr; UINT16 cv_high_vbat_count; UINT16 cv_low_vbat_count; UINT16 ichg_avg_buf[ICHG_AVG_WINDOW]; UINT16 ichg_fill_level; UINT16 ichg_ring_ptr; UINT16 ichg_average; UINT16 ichg_low_count; UINT32 start_time; } T_PWR_CTRL_BLOCK; #endif /* include guard */