FreeCalypso > hg > fc-tourmaline
comparison src/cs/services/fcbm/fcbm_reset_mode.c @ 248:a5b00817a60f
FCBM reset mode implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 10 May 2021 01:54:19 +0000 |
parents | src/cs/services/fcbm/fcbm_charging.c@3eccca3ac219 |
children |
comparison
equal
deleted
inserted
replaced
247:12b20090b46a | 248:a5b00817a60f |
---|---|
1 /* | |
2 * In this module we are going to implement FCBM functions | |
3 * for the reset or miscellaneous boot mode. | |
4 */ | |
5 | |
6 #include "rv/rv_general.h" | |
7 #include "rvf/rvf_api.h" | |
8 #include "rvm/rvm_use_id_list.h" | |
9 #include "fcbm/fcbm_func_i.h" | |
10 #include "fcbm/fcbm_life_cycle.h" | |
11 #include "fcbm/fcbm_timer_i.h" | |
12 #include "r2d/r2d.h" | |
13 #include "r2d/r2d_blrr_api.h" | |
14 | |
15 extern char fcbm_prod_banner_string[]; | |
16 | |
17 void fcbm_process_msg_reset_mode(void) | |
18 { | |
19 if (fcbm_life_cycle_state != FCBM_STATE_INACTIVE) { | |
20 rvf_send_trace("FCBM got reset mode request in wrong state", | |
21 42, fcbm_life_cycle_state, | |
22 RV_TRACE_LEVEL_ERROR, FCBM_USE_ID); | |
23 return; | |
24 } | |
25 rvf_send_trace("Entering reset boot mode", 24, NULL_PARAM, | |
26 RV_TRACE_LEVEL_DEBUG_HIGH, FCBM_USE_ID); | |
27 fcbm_subscribe_kpd(); | |
28 fcbm_display_init(); | |
29 fcbm_display_line(0, fcbm_prod_banner_string); | |
30 fcbm_display_line(1, "Misc boot state"); | |
31 #ifdef LSCREEN | |
32 fcbm_display_line(3, "Long-press Power"); | |
33 fcbm_display_line(4, "button to turn off,"); | |
34 #else | |
35 fcbm_display_line(3, "Long-press PWR"); | |
36 fcbm_display_line(4, "button to OFF,"); | |
37 #endif | |
38 fcbm_display_line(5, "or send fc-tmsh"); | |
39 fcbm_display_line(6, "phone-on command"); | |
40 fcbm_display_line(7, "to boot phone."); | |
41 r2d_flush(); | |
42 blrr_display_ctrl(BLRR_DISPLAY_CHG_BOOT); | |
43 rvf_start_timer(FCBM_TIMER_DSPL_OFF, | |
44 RVF_SECS_TO_TICKS(FCBM_DISPLAY_SECS), FALSE); | |
45 fcbm_life_cycle_state = FCBM_STATE_ACTIVE; | |
46 } |