FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_core/armio/armio.c @ 534:6c96725718c3
armio.c: C11x GPIO setup properly separated from C139
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 05 Nov 2018 17:10:06 +0000 |
parents | 09afc37e8069 |
children | f2e752052db5 |
comparison
equal
deleted
inserted
replaced
533:09afc37e8069 | 534:6c96725718c3 |
---|---|
205 | 205 |
206 // ARMIO_OUT register configuration : | 206 // ARMIO_OUT register configuration : |
207 // set IOs 8,9,10,11,12 and 13 as high | 207 // set IOs 8,9,10,11,12 and 13 as high |
208 // set IOs 0 to 7 as low | 208 // set IOs 0 to 7 as low |
209 | 209 |
210 #if defined(CONFIG_TARGET_C139) || defined(CONFIG_TARGET_C11X) | 210 #ifdef CONFIG_TARGET_C11X |
211 /* C11x GPIO configuration mimics what the original fw sets */ | |
212 | |
213 /* GPIO out all zeros */ | |
214 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; | |
215 | |
216 /* setting of GPIOs as outputs: register setting from the original fw */ | |
217 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2209; | |
218 | |
219 #elif defined(CONFIG_TARGET_C139) | |
211 /* C139 GPIO configuration mimics what the original fw sets */ | 220 /* C139 GPIO configuration mimics what the original fw sets */ |
212 | 221 |
213 /* GPIO out all zeros - the LCD backlight is OFF */ | 222 /* GPIO out all zeros - the LCD backlight is OFF */ |
214 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; | 223 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; |
215 | 224 |
216 /* setting of GPIOs as outputs also mimics what the original fw sets */ | 225 /* setting of GPIOs as outputs: register setting from the original fw */ |
217 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09; | 226 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09; |
218 | 227 |
219 #elif defined(CONFIG_TARGET_C155) | 228 #elif defined(CONFIG_TARGET_C155) |
220 /* C155 GPIO config based on the available schematics */ | 229 /* C155 GPIO config based on the available schematics */ |
221 | 230 |