FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_app/fchg/fchg_task.c @ 254:4533ef63fdb0
FCHG BSIM: init_percent logic implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 12 May 2021 23:01:28 +0000 |
parents | 769cf6273fe4 |
children | aec644728174 |
comparison
equal
deleted
inserted
replaced
253:769cf6273fe4 | 254:4533ef63fdb0 |
---|---|
35 if (!pwr_ctrl->bsim_mode) | 35 if (!pwr_ctrl->bsim_mode) |
36 pwr_load_ffs_charging_config(); | 36 pwr_load_ffs_charging_config(); |
37 set_initial_state(); | 37 set_initial_state(); |
38 /* just for safety, clear any previous BCI hardware state */ | 38 /* just for safety, clear any previous BCI hardware state */ |
39 ABB_Write_Register_on_page(PAGE0, BCICTL2, 0); | 39 ABB_Write_Register_on_page(PAGE0, BCICTL2, 0); |
40 pwr_init_discharge(); | 40 if (pwr_ctrl->bsim_mode) |
41 bsim_init_percent(); | |
42 else | |
43 pwr_init_discharge(); | |
41 | 44 |
42 /* loop to process messages */ | 45 /* loop to process messages */ |
43 while (error_occured == FALSE) | 46 while (error_occured == FALSE) |
44 { | 47 { |
45 /* Wait for the necessary events (infinite wait for a msg in the mailbox 0). */ | 48 /* Wait for the necessary events (infinite wait for a msg in the mailbox 0). */ |