FreeCalypso > hg > fc-tourmaline
comparison src/cs/services/fcbm/fcbm_charging.c @ 243:35474f3a1782
FCBM: beginning of display output
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 03 May 2021 04:43:06 +0000 |
parents | baa738eeb842 |
children | 3eccca3ac219 |
comparison
equal
deleted
inserted
replaced
242:da5857b13d02 | 243:35474f3a1782 |
---|---|
9 #include "rvm/rvm_use_id_list.h" | 9 #include "rvm/rvm_use_id_list.h" |
10 #include "fcbm/fcbm_func_i.h" | 10 #include "fcbm/fcbm_func_i.h" |
11 #include "fcbm/fcbm_life_cycle.h" | 11 #include "fcbm/fcbm_life_cycle.h" |
12 #include "fcbm/fcbm_timer_i.h" | 12 #include "fcbm/fcbm_timer_i.h" |
13 #include "fchg/fchg_api.h" | 13 #include "fchg/fchg_api.h" |
14 #include "r2d/r2d.h" | |
14 #include "r2d/r2d_blrr_api.h" | 15 #include "r2d/r2d_blrr_api.h" |
15 #include "abb/abb.h" | 16 #include "abb/abb.h" |
17 | |
18 #ifdef LSCREEN | |
19 char fcbm_prod_banner_string[] = "FreeCalypso Handset"; | |
20 #else | |
21 char fcbm_prod_banner_string[] = "FreeCalypso Lite"; | |
22 #endif | |
16 | 23 |
17 void fcbm_process_msg_chg_mode(void) | 24 void fcbm_process_msg_chg_mode(void) |
18 { | 25 { |
19 if (fcbm_life_cycle_state != FCBM_STATE_INACTIVE) { | 26 if (fcbm_life_cycle_state != FCBM_STATE_INACTIVE) { |
20 rvf_send_trace("FCBM got charging mode request in wrong state", | 27 rvf_send_trace("FCBM got charging mode request in wrong state", |
24 } | 31 } |
25 rvf_send_trace("Entering charging boot mode", 27, NULL_PARAM, | 32 rvf_send_trace("Entering charging boot mode", 27, NULL_PARAM, |
26 RV_TRACE_LEVEL_DEBUG_HIGH, FCBM_USE_ID); | 33 RV_TRACE_LEVEL_DEBUG_HIGH, FCBM_USE_ID); |
27 fcbm_subscribe_kpd(); | 34 fcbm_subscribe_kpd(); |
28 fcbm_setup_long_pwon(); | 35 fcbm_setup_long_pwon(); |
29 /* TODO: display charging boot mode info on the LCD */ | 36 fcbm_display_init(); |
37 fcbm_display_line(0, fcbm_prod_banner_string); | |
38 fcbm_display_line(1, "Charge boot mode"); | |
39 r2d_flush(); | |
30 blrr_display_ctrl(BLRR_DISPLAY_CHG_BOOT); | 40 blrr_display_ctrl(BLRR_DISPLAY_CHG_BOOT); |
31 rvf_start_timer(FCBM_TIMER_DSPL_OFF, | 41 rvf_start_timer(FCBM_TIMER_DSPL_OFF, |
32 RVF_SECS_TO_TICKS(FCBM_DISPLAY_SECS), FALSE); | 42 RVF_SECS_TO_TICKS(FCBM_DISPLAY_SECS), FALSE); |
33 rvf_start_timer(FCBM_TIMER_CHG_UPD, | 43 rvf_start_timer(FCBM_TIMER_CHG_UPD, |
34 RVF_MS_TO_TICKS(FCBM_CHG_UPD_INTERVAL), TRUE); | 44 RVF_MS_TO_TICKS(FCBM_CHG_UPD_INTERVAL), TRUE); |
47 abb_status = ABB_Read_Status(); | 57 abb_status = ABB_Read_Status(); |
48 if (abb_status & CHGPRES) | 58 if (abb_status & CHGPRES) |
49 return; | 59 return; |
50 rvf_send_trace("Charger unplug, powering off", 28, NULL_PARAM, | 60 rvf_send_trace("Charger unplug, powering off", 28, NULL_PARAM, |
51 RV_TRACE_LEVEL_DEBUG_HIGH, FCBM_USE_ID); | 61 RV_TRACE_LEVEL_DEBUG_HIGH, FCBM_USE_ID); |
52 /* TODO: display appropriate message on the LCD */ | 62 fcbm_display_line(3, "Charger unplug"); |
63 r2d_flush(); | |
53 blrr_display_ctrl(BLRR_DISPLAY_CHG_BOOT); | 64 blrr_display_ctrl(BLRR_DISPLAY_CHG_BOOT); |
54 rvf_delay(RVF_MS_TO_TICKS(50)); | 65 rvf_delay(RVF_MS_TO_TICKS(1500)); |
55 ABB_Power_Off(); | 66 ABB_Power_Off(); |
56 } | 67 } |
57 | 68 |
58 void fcbm_chg_periodic_timer(void) | 69 void fcbm_chg_periodic_timer(void) |
59 { | 70 { |