FreeCalypso > hg > fc-magnetite
annotate src/cs/drivers/drv_app/fchg/fchg_env.h @ 629:3231dd9b38c1
armio.c: make GPIOs 8 & 13 outputs driving 1 on all "classic" targets
Calypso GPIOs 8 & 13 are pinmuxed with MCUEN1 & MCUEN2, respectively,
and on powerup these pins are MCUEN, i.e., outputs driving 1. TI's code
for C-Sample and earlier turns them into GPIOs configured as outputs also
driving 1 - so far, so good - but TI's code for BOARD 41 (which covers
D-Sample, Leonardo and all real world Calypso devices derived from the
latter) switches them from MCUEN to GPIOs, but then leaves them as inputs.
Given that the hardware powerup state of these two pins is outputs driving 1,
every Calypso board design MUST be compatible with such driving; typically
these GPIO signals will be either unused and unconnected or connected as
outputs driving some peripheral. Turning these pins into GPIO inputs will
result in floating inputs on every reasonably-wired board, thus I am
convinced that this configuration is nothing but a bug on the part of
whoever wrote this code at TI.
This floating input bug had already been fixed earlier for GTA modem and
FCDEV3B targets; the present change makes the fix unconditional for all
"classic" targets. The newly affected targets are D-Sample, Leonardo,
Tango and GTM900.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 02 Jan 2020 05:38:26 +0000 (2020-01-02) |
parents | d583a1f5bd6a |
children |
rev | line source |
---|---|
322
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * RiViera environment boilerplate header for the FCHG SWE |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #ifndef __FCHG_ENV_H__ |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #define __FCHG_ENV_H__ |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "rvm/rvm_gen.h" |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "fchg/fchg_struct.h" |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include "fchg/fchg_pool_size.h" |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
334
d583a1f5bd6a
FCHG: charger plug and unplug functions implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
322
diff
changeset
|
12 #define FCHG_MAILBOX RVF_TASK_MBOX_0 |
d583a1f5bd6a
FCHG: charger plug and unplug functions implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
322
diff
changeset
|
13 #define FCHG_TIMER RVF_TIMER_0 |
322
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 /* memory bank size and watermark */ |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #define FCHG_MB_PRIM_SIZE FCHG_MB1_SIZE |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 #define FCHG_MB_PRIM_WATERMARK (FCHG_MB_PRIM_SIZE) |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 #define FCHG_MB_PRIM_INC_SIZE 0 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 #define FCHG_MB_PRIM_INC_WATERMARK 0 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 extern T_PWR_CTRL_BLOCK *pwr_ctrl; |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 /* Prototypes */ |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 T_RVM_RETURN fchg_get_info (T_RVM_INFO_SWE *infoSWE); |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 T_RVM_RETURN fchg_set_info(T_RVF_ADDR_ID addr_id, |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 T_RV_RETURN return_path[], |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 T_RVF_MB_ID mbId[], |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 T_RVM_RETURN (*callBackFct) (T_RVM_NAME SWEntName, |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 T_RVM_RETURN errorCause, |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 T_RVM_ERROR_TYPE errorType, |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 T_RVM_STRING errorMsg)); |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 T_RVM_RETURN fchg_init (void); |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 T_RVM_RETURN fchg_core (void); |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 T_RVM_RETURN fchg_stop (void); |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 T_RVM_RETURN fchg_kill (void); |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 |
c4077830aeeb
FCHG implementation code started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 #endif /* include guard */ |