annotate src/cs/drivers/drv_core/armio/armio.c @ 542:b48e9892ee65

FFS dev.c: Mot C155 flash turns out to be of the same kind as on TI's D-Sample
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 06 Nov 2018 16:30:16 +0000
parents 6c96725718c3
children f2e752052db5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * ARMIO.C
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * Control diagnostic bits
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * Reference : GCS207
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include "l1sw.cfg"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 #include "swconfig.cfg"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #ifdef BLUETOOTH_INCLUDED
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include "btemobile.cfg"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #if (OP_L1_STANDALONE == 1)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #include "l1_macro.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #include "l1_confg.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #include "board.cfg"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #include "chipset.cfg"
81
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
23 #include "fc-target.cfg"
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #if (OP_L1_STANDALONE == 0)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #include "main/sys_types.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #else
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "sys_types.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "memif/mem.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "inth/iq.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "armio/armio.h"
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #include "abb/abb.h" // for AI_Power function : to be removed, use ABB_Power_Off in abb.c file instead !!!
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #if (CHIPSET != 12)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 * AI_EnableBit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 * Enable ARMIO input/output bit (see CLKM module specification)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 void AI_EnableBit(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 *((volatile SYS_UWORD16 *) CLKM_IO_CNTL) |= (1<<bit);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 * AI_DisableBit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 * Disable ARMIO input/output bit (see CLKM module specification)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 void AI_DisableBit(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 *((volatile SYS_UWORD16 *) CLKM_IO_CNTL) &= ~(1<<bit);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #endif /* CHIPSET != 12 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 * AI_SetBit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 * Switch-on one bit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 void AI_SetBit(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 *((volatile SYS_UWORD16 *) ARMIO_OUT) |= (1<<bit);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 * AI_ResetBit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 * Switch-off one bit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 void AI_ResetBit(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 *((volatile SYS_UWORD16 *) ARMIO_OUT) &= ~(1<<bit);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 * AI_ConfigBitAsOutput
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 * Set this bit as an output
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 void AI_ConfigBitAsOutput(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) &= ~(1<<bit);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 * AI_ConfigBitAsInput
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 * Set this bit as an input
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 void AI_ConfigBitAsInput(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) |= (1<<bit);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 * AI_ReadBit
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 * Read value in register
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 SYS_BOOL AI_ReadBit(int bit)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 if ((*((volatile SYS_UWORD16 *) ARMIO_IN)) & (1<<bit))
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 return (1);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 else
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 return (0);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 * AI_Power
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 * Switch-on or off the board
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 * Parameters : SYS_UWORD8 power: 1 to power-on (maintain power)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 * 0 to power-off
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 #if (OP_L1_STANDALONE == 0)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 void AI_Power(SYS_UWORD8 power)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 if (power == 0)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 ABB_Power_Off();
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 * AI_ResetIoConfig
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 * Reset all default IO configurations
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 void AI_ResetIoConfig(void)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 {
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
142 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0xFFFF; // all bits are inputs
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
143 #if (CHIPSET != 12)
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
144 *((volatile SYS_UWORD16 *) CLKM_IO_CNTL) = 0; // default config
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #endif /* CHIPSET != 12 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 * AI_ClockEnable
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 * Enable ARMIO clock module
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 void AI_ClockEnable(void)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 *((volatile SYS_UWORD16 *) ARMIO_CNTL_REG) |= ARMIO_CLOCKEN; // set to 1 bit 5
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 * AI_InitIOConfig
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 * Configure all GPIOs at initialization in order to optimize the power consumption
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 * of the C-Sample :
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 * - select IOs 8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 * - configure these IOs in output high.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 * - configure the IOs 0 (Vibrator LED) and 1 (LCD_A0) in output low.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 void AI_InitIOConfig(void)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 // reset the IOs config
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 AI_ResetIoConfig();
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 // CLKM_IO_CNTL register configuration :
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 // select IOs 6,8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals.
83
cff89030b634 armio.c: drive some more unused pins as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 82
diff changeset
177 AI_EnableBit(0); /* FreeCalypso addition */
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 AI_EnableBit(2);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 AI_EnableBit(4);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
181 #ifdef CONFIG_TARGET_PIRELLI
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
182 AI_EnableBit(1);
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
183 AI_EnableBit(3);
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
184 #endif
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
185
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 /* Bits 5,6,7,8 are used to output I/O 9,10,11,12 or MCSI pins */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */
242
a6360ee05c47 armio.c: enable MCSI pin multiplexing on FCDEV3B
Mychaela Falconia <falcon@freecalypso.org>
parents: 84
diff changeset
188 /*
a6360ee05c47 armio.c: enable MCSI pin multiplexing on FCDEV3B
Mychaela Falconia <falcon@freecalypso.org>
parents: 84
diff changeset
189 * FreeCalypso change: we don't have BT, our new criterion is
a6360ee05c47 armio.c: enable MCSI pin multiplexing on FCDEV3B
Mychaela Falconia <falcon@freecalypso.org>
parents: 84
diff changeset
190 * whether or not a given board is wired for MCSI.
a6360ee05c47 armio.c: enable MCSI pin multiplexing on FCDEV3B
Mychaela Falconia <falcon@freecalypso.org>
parents: 84
diff changeset
191 */
a6360ee05c47 armio.c: enable MCSI pin multiplexing on FCDEV3B
Mychaela Falconia <falcon@freecalypso.org>
parents: 84
diff changeset
192 #if defined(CONFIG_TARGET_FCDEV3B) || defined(CONFIG_TARGET_PIRELLI)
81
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
193 AI_DisableBit(5);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
194 AI_DisableBit(6);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
195 AI_DisableBit(7);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
196 AI_DisableBit(8);
82
e3768114db59 armio.c: 2nd cleaning: removed some (CHIPSET != 12) noise
Mychaela Falconia <falcon@freecalypso.org>
parents: 81
diff changeset
197 #else
81
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
198 AI_EnableBit(5);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
199 AI_EnableBit(6);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
200 AI_EnableBit(7);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
201 AI_EnableBit(8);
8e5096429fd3 armio.c: first cleaning step
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
202 #endif
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 AI_EnableBit(9);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 // ARMIO_OUT register configuration :
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 // set IOs 8,9,10,11,12 and 13 as high
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 // set IOs 0 to 7 as low
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
209
534
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
210 #ifdef CONFIG_TARGET_C11X
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
211 /* C11x GPIO configuration mimics what the original fw sets */
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
212
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
213 /* GPIO out all zeros */
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
214 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
215
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
216 /* setting of GPIOs as outputs: register setting from the original fw */
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
217 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2209;
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
218
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
219 #elif defined(CONFIG_TARGET_C139)
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
220 /* C139 GPIO configuration mimics what the original fw sets */
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
221
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
222 /* GPIO out all zeros - the LCD backlight is OFF */
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
223 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
224
534
6c96725718c3 armio.c: C11x GPIO setup properly separated from C139
Mychaela Falconia <falcon@freecalypso.org>
parents: 533
diff changeset
225 /* setting of GPIOs as outputs: register setting from the original fw */
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
226 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09;
533
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
227
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
228 #elif defined(CONFIG_TARGET_C155)
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
229 /* C155 GPIO config based on the available schematics */
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
230
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
231 /* GPIO out all zeros - the LCD backlight is OFF */
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
232 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
233
533
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
234 AI_ConfigBitAsOutput(1); /* LCD backlight control */
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
235 AI_ConfigBitAsOutput(2); /* headset jack switch */
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
236 AI_ConfigBitAsOutput(3); /* LCDA0 (?) */
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
237 AI_ConfigBitAsOutput(8); /* MUSIC_A0 */
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
238 AI_ConfigBitAsOutput(12); /* MUSIC_ON */
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
239
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
240 #elif defined(CONFIG_TARGET_PIRELLI)
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
241
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
242 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000;
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
243
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
244 AI_ConfigBitAsOutput(1);
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
245 AI_ConfigBitAsOutput(4);
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
246 AI_ConfigBitAsOutput(7);
533
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
247
84
42d766231c46 armio.c: support for C139 and Pirelli targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 83
diff changeset
248 #else /* classic TI/Openmoko/FreeCalypso targets */
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 // set IOs 1 and 8 to 13 as high
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 // set IOs 0 and 2 to 7 as low
409
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
251 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier,
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
252 // but on Openmoko's modem it is the interrupt to the AP.
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
253 // On the FCDEV3B it also controls the audio amplifier.
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
254 // For now we initialize it to low on all targets.
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
255 #if 1
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 #else
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 // ARMIO_CNTL_REG register configuration :
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 // set IOs 1,2,5,7,9,14 and 15 as ouputs.
532
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
263 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCDEV3B
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
264 // are FreeCalypso additions
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
265 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B)
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
266 AI_ConfigBitAsOutput(0);
409
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
267 #endif
533
09afc37e8069 armio.c: added support for C155 target
Mychaela Falconia <falcon@freecalypso.org>
parents: 532
diff changeset
268 AI_ConfigBitAsOutput(1);
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 AI_ConfigBitAsOutput(2);
285
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
270 #ifdef CONFIG_TARGET_GTAMODEM
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
271 AI_ConfigBitAsOutput(3);
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
272 #endif
532
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
273 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B)
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
274 AI_ConfigBitAsOutput(4);
409
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
275 #endif
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 AI_ConfigBitAsOutput(5);
532
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
277 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B)
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
278 AI_ConfigBitAsOutput(6);
409
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
279 #endif
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 AI_ConfigBitAsOutput(7);
532
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
281 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B)
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
282 AI_ConfigBitAsOutput(8);
409
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
283 #endif
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 AI_ConfigBitAsOutput(9);
285
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
285 #ifdef CONFIG_TARGET_GTAMODEM
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
286 AI_ConfigBitAsOutput(10);
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
287 AI_ConfigBitAsOutput(11);
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
288 AI_ConfigBitAsOutput(12);
504c9dcbffb2 GTA0x target: GPIOs 3, 10, 11 and 12 are unconnected, so drive them as outputs
Mychaela Falconia <falcon@freecalypso.org>
parents: 242
diff changeset
289 #endif
532
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
290 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCDEV3B)
5c780d080afc armio.c GPIO directions for classic targets: more explicit
Mychaela Falconia <falcon@freecalypso.org>
parents: 409
diff changeset
291 AI_ConfigBitAsOutput(13);
409
6c3f68021c53 armio.c: GPIO directions restored to TI's original on the D-Sample
Mychaela Falconia <falcon@freecalypso.org>
parents: 377
diff changeset
292 #endif
0
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 AI_ConfigBitAsOutput(14);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 AI_ConfigBitAsOutput(15);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 * AI_SelectIOForIT
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 * Select which IO will be used to generate an interrupt.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 * 'Edge' specifies if interrup must be detected on falling or rising edge.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 * Warning: parameters are not checked.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 void AI_SelectIOForIT (SYS_UWORD16 Pin, SYS_UWORD16 Edge)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 #if (CHIPSET == 12)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 * Update INTERRUPT_LEVEL_REG with Edge configuration on Pin selection
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 GPIO_INTERRUPT_LEVEL_REG = (Edge & 0x0001) << Pin;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 * Update INTERRUPT_MASK_REG to enable interrupt generation on Pin selection
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 GPIO_INTERRUPT_MASK_REG = 1 << Pin;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 #else
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 * Bit SET_GPIO_EVENT_MODE (bit 0) is set to enable the GPIO event mode.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 *((volatile SYS_UWORD16 *) ARMIO_GPIO_EVENT_MODE) = (Pin << 1) + (Edge << 5) + 1;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 #endif
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 #if (CHIPSET != 12)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 * AI_CheckITSource
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 * Check if the interrupt specified by 'Source' is active or not.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 * Output: 0: IT is not active
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 * 1: IT is active
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 * Warning: parameters are not checked.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 * Warning: If the keypad and GPIO interrupts may occur the GPIO interrupt
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 * must be checked first because the GPIO status bit is reset when
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 * the register is read.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 int AI_CheckITSource (SYS_UWORD16 Source)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 return (*((volatile SYS_UWORD16 *) ARMIO_KBD_GPIO_INT) & Source ? 1 : 0);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 * AI_UnmaskIT
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 * Unmask the IT specified by 'Source' (keyboard or GPIO).
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 * Warning: parameters are not checked.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 void AI_UnmaskIT (SYS_UWORD16 Source)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 *((volatile SYS_UWORD16 *) ARMIO_KBD_GPIO_MASKIT) &= ~Source;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 /*
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 * AI_MaskIT
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 * Mask the IT specified by 'Source' (keyboard or GPIO).
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 *
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 * Warning: parameters are not checked.
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 void AI_MaskIT (SYS_UWORD16 Source)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 *((volatile SYS_UWORD16 *) ARMIO_KBD_GPIO_MASKIT) |= Source;
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 }
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 #endif /* CHIPSET != 12 */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 #if (CHIPSET == 12)
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 void AI_MaskIT(SYS_UWORD16 d_io_number) {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 GPIO_INTERRUPT_MASK_REG |= (1 << d_io_number);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 } /* f_gpio_mask_it() */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 void AI_UnmaskIT(SYS_UWORD16 d_io_number) {
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 GPIO_INTERRUPT_MASK_REG &= ~(1 << d_io_number);
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 } /* f_gpio_unmask_it() */
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385
945cf7f506b2 src/cs: chipsetsw import from tcs211-fcmodem
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 #endif