FreeCalypso > hg > fc-tourmaline
annotate components/nucleus_flash @ 244:96784b8974eb
Switch_ON(): detect charging mode by CHGPRES bit
Consider the following scenario: the phone is on, the user plugs in
the charger, and then executes the power-off operation. In the Iota
VRPC this sequence translates to a switch-off immediately followed
by another switch-on - but the CHGSTS bit doesn't get set on the second
switch-on cycle! Disassembly of Pirelli's fw shows that they check
the CHGPRES bit, and furthermore, if both CHGPRES and ONBSTS are set,
the code they pass to their modified Power_ON_Button() function is
the one for charging - so let's adopt the same CHGPRES check and
the same priority order for switch-on causes.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 03 May 2021 06:51:29 +0000 |
parents | 572c3ee87676 |
children |
rev | line source |
---|---|
30
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 # New Tourmaline component: compiling Nucleus from source (XIP) |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 CFLAGS="-mn -me -mt -o -mw" |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 CPPFLAGS= |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 SRCDIR=$SRC/nucleus |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 cfile_plain $SRCDIR/dmce.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 cfile_plain $SRCDIR/dmd.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 cfile_plain $SRCDIR/dmf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 cfile_plain $SRCDIR/dmi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 cfile_plain $SRCDIR/dms.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 cfile_plain $SRCDIR/erc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 cfile_plain $SRCDIR/erd.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 cfile_plain $SRCDIR/eri.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 cfile_plain $SRCDIR/evc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 cfile_plain $SRCDIR/evce.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 cfile_plain $SRCDIR/evd.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 cfile_plain $SRCDIR/evf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 cfile_plain $SRCDIR/evi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 cfile_plain $SRCDIR/hic.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 cfile_plain $SRCDIR/hid.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 cfile_plain $SRCDIR/hii.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 cfile_plain $SRCDIR/inc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 cfile_plain $SRCDIR/ioc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 cfile_plain $SRCDIR/ioce.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 cfile_plain $SRCDIR/iod.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 cfile_plain $SRCDIR/iof.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 cfile_plain $SRCDIR/ioi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 cfile_plain $SRCDIR/lic.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 cfile_plain $SRCDIR/lid.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 cfile_plain $SRCDIR/mbc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 cfile_plain $SRCDIR/mbce.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 cfile_plain $SRCDIR/mbd.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 cfile_plain $SRCDIR/mbf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 cfile_plain $SRCDIR/mbi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 cfile_plain $SRCDIR/mbs.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 cfile_plain $SRCDIR/mbse.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 cfile_plain $SRCDIR/pic.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 cfile_plain $SRCDIR/pice.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 cfile_plain $SRCDIR/pid.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 cfile_plain $SRCDIR/pif.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 cfile_plain $SRCDIR/pii.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 cfile_plain $SRCDIR/pis.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 cfile_plain $SRCDIR/pise.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 cfile_plain $SRCDIR/pmf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 cfile_plain $SRCDIR/pmi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 cfile_plain $SRCDIR/quc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 cfile_plain $SRCDIR/quce.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 cfile_plain $SRCDIR/qud.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 cfile_plain $SRCDIR/quf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 cfile_plain $SRCDIR/qui.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 cfile_plain $SRCDIR/qus.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 cfile_plain $SRCDIR/quse.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 cfile_plain $SRCDIR/rlc.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 cfile_plain $SRCDIR/rld.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 cfile_plain $SRCDIR/smf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 cfile_plain $SRCDIR/smi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 cfile_plain $SRCDIR/sms.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 cfile_plain $SRCDIR/smse.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 cfile_plain $SRCDIR/tcf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 cfile_plain $SRCDIR/tcfe.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 cfile_plain $SRCDIR/tci.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 cfile_plain $SRCDIR/tcs.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 cfile_plain $SRCDIR/tcse.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 cfile_plain $SRCDIR/tmf.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 cfile_plain $SRCDIR/tmi.c |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 # TCS211 version of Nucleus has dmc.c compiled without -o |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 CFLAGS="-mn -me -mt -mw" |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 |
572c3ee87676
components/nucleus_{flash,intram}: ported from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 cfile_plain $SRCDIR/dmc.c |