comparison src/cs/drivers/drv_app/fchg/fchg_task.c @ 70:032a561fab2b

GPF-Riviera sync: make MMI task startup wait for FCHG
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 23 Oct 2020 04:52:28 +0000
parents 4e78acac3d88
children c336ed5691a5
comparison
equal deleted inserted replaced
69:77321341946c 70:032a561fab2b
6 #include "fchg/fchg_func_i.h" 6 #include "fchg/fchg_func_i.h"
7 #include "rv/rv_general.h" 7 #include "rv/rv_general.h"
8 #include "rvf/rvf_api.h" 8 #include "rvf/rvf_api.h"
9 #include "rvm/rvm_use_id_list.h" 9 #include "rvm/rvm_use_id_list.h"
10 #include "abb/abb.h" 10 #include "abb/abb.h"
11
12 /* startup synchronization with MMI task in GPF land */
13 int fchg_is_running;
11 14
12 static void set_initial_state(void) 15 static void set_initial_state(void)
13 { 16 {
14 SYS_UWORD16 abb_status; 17 SYS_UWORD16 abb_status;
15 18
32 RV_TRACE_LEVEL_DEBUG_LOW, FCHG_USE_ID); 35 RV_TRACE_LEVEL_DEBUG_LOW, FCHG_USE_ID);
33 pwr_load_ffs_batt_table(); 36 pwr_load_ffs_batt_table();
34 pwr_load_ffs_charging_config(); 37 pwr_load_ffs_charging_config();
35 set_initial_state(); 38 set_initial_state();
36 pwr_init_discharge(); 39 pwr_init_discharge();
40 fchg_is_running = 1;
37 41
38 /* loop to process messages */ 42 /* loop to process messages */
39 while (error_occured == FALSE) 43 while (error_occured == FALSE)
40 { 44 {
41 /* Wait for the necessary events (infinite wait for a msg in the mailbox 0). */ 45 /* Wait for the necessary events (infinite wait for a msg in the mailbox 0). */