annotate src/cs/drivers/drv_app/power/board/power.c @ 240:184a031e38e6

Switch_ON(): start FCBM for charging boot mode
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 02 May 2021 06:00:09 +0000
parents 305d3bb691a5
children 96784b8974eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 *
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * power.c
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 *
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
5 * Purpose: This file contains the functions used for power on and off
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * management of the board.
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
7 * In case of RVM_PWR_SWE, this file contains also the
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
8 * functions used for charger plug and unplug management.
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 * They are all called after the occurence of the ABB interrupt.
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
10 *
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
11 * Author: Candice Bazanegue (c-brille@ti.com)
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
12 *
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
13 * The present FreeCalypso version is heavily modified from TI's original,
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
14 * for the new FreeCalypso way of managing handset on/off state.
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 *
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 ******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #ifndef _WINDOWS
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #include "rv.cfg"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #endif
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #include "abb/abb.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "rvm/rvm_use_id_list.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "spi/spi_env.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #include "power/power.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #include "rv/rv_defined_swe.h" // for RVM_PWR_SWE
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #ifndef _WINDOWS
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "kpd/kpd_power_api.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "ffs/ffs.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #endif // _WINDOWS
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #ifndef _WINDOWS
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 /* Declare the variable containing pressed and released callback. */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 extern T_KPD_KEYPAD Kp;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 extern effs_t ffs_exit(void);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #endif // _WINDOWS
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
240
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
40 #if (MMI != 0)
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
41 #include "fcbm/fcbm_send_msg.h"
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
42 #endif
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
43
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 /// The ABB status used to know the cause of the Switch ON event.
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 static SYS_UWORD16 Power_abb_status = 0;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 ** Function Power_ON_Button
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 **
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
52 ** Description: Informs the Protocol Stack that the Power ON key has been
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
53 ** pressed, and thus allows it to start.
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 *******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 void Power_ON_Button(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 {
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
58 #if (MMI != 0)
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
59 extern void fchs_pwon_button_boot(void);
239
305d3bb691a5 FCHG startup: replace fchg_is_running with fchg_first_vbat
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
60 extern int r2d_is_running, mmi_task_init_done;
305d3bb691a5 FCHG startup: replace fchg_is_running with fchg_first_vbat
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
61 extern UINT16 fchg_first_vbat;
223
740a8e8fc9d7 startup sync logic rework for the new PWON button boot scheme
Mychaela Falconia <falcon@freecalypso.org>
parents: 213
diff changeset
62
239
305d3bb691a5 FCHG startup: replace fchg_is_running with fchg_first_vbat
Mychaela Falconia <falcon@freecalypso.org>
parents: 223
diff changeset
63 while (!fchg_first_vbat || !r2d_is_running || !mmi_task_init_done)
223
740a8e8fc9d7 startup sync logic rework for the new PWON button boot scheme
Mychaela Falconia <falcon@freecalypso.org>
parents: 213
diff changeset
64 rvf_delay(8);
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
66 fchs_pwon_button_boot();
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #endif
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 ** Function Power_OFF_Button
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 **
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
75 ** Description: Informs the Protocol Stack that the Power OFF key has been
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
76 ** pressed, and thus allows it to stop.
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 *******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 void Power_OFF_Button(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 {
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
81 rvf_send_trace("Power off button", 16, NULL_PARAM, RV_TRACE_LEVEL_WARNING,
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
82 LCC_USE_ID);
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
83 if (Kp.pressed && Kp.released) {
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
84 (Kp.pressed)(KPD_PWR); /* tell key is pressed */
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
85 rvf_delay(5);
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
86 (Kp.released)(); /* tell key is released */
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
87 } else
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
88 ABB_Power_Off();
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 /**
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
93 * @brief Sets the cause of the switch ON event.
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 *
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 * This function get the ABB status register and stores it into the
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 * global variable Power_abb_status.
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 *
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 * @noparam
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 *
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 * @noreturn
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 void Set_Switch_ON_Cause(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 Power_abb_status = ABB_Read_Status();
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 ** Function Switch_ON
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 **
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
112 ** Description This function is called by the spi task after the board is
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 ** switched ON. It calls the appropriate function according
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 ** to the ABB status register.
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 ** Warning The Set_Switch_ON_Cause() function has to be called prior.
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 *******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 void Switch_ON(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 if (Power_abb_status & ONBSTS)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 /* Switch on Condition on ON BUTTON Push */
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
124 rvf_send_trace("Push Button from OFF to ON",26, NULL_PARAM,
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
125 RV_TRACE_LEVEL_DEBUG_LOW, LCC_USE_ID);
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 Power_ON_Button();
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
129 else if (Power_abb_status & ONRSTS)
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 /* Switch on Condition on ON REM transition 0->1 */
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
132 rvf_send_trace("ON Remote",9, NULL_PARAM, RV_TRACE_LEVEL_DEBUG_LOW,
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
133 LCC_USE_ID);
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 Power_ON_Remote();
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 else if (Power_abb_status & CHGSTS)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 /* Switch on Condition on CHARGER IC PLUG */
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
140 rvf_send_trace("Boot: Charger Plug",18, NULL_PARAM,
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
141 RV_TRACE_LEVEL_DEBUG_LOW, LCC_USE_ID);
240
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
142 #if (MMI != 0)
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
143 fcbm_message_to_task(FCBM_START_CHG_MODE);
184a031e38e6 Switch_ON(): start FCBM for charging boot mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 239
diff changeset
144 #endif
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 else
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 {
213
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
149 /* In FreeCalypso start from reset is NOT the same as PWON! */
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
150 rvf_send_trace("Start from reset",16, NULL_PARAM,
0947a816580c first stage of FreeCalypso handset switch-on logic rework
Mychaela Falconia <falcon@freecalypso.org>
parents: 211
diff changeset
151 RV_TRACE_LEVEL_DEBUG_LOW, LCC_USE_ID);
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 ** Function Power_ON_Remote
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 **
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
160 ** Description
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 *******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 void Power_ON_Remote(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 ** Function Power_OFF_Remote
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 **
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
173 ** Description
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 *******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 void Power_OFF_Remote(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 /*******************************************************************************
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 ** Function Power_IT_WakeUp
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 **
211
96c7a4eed1df .../power/board/power.c: rm trailing white space
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
186 ** Description
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 **
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 *******************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 void Power_IT_WakeUp(void)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 }