FreeCalypso > hg > tcs211-c139
comparison chipsetsw/drivers/drv_core/armio/armio.c @ 45:e1379873c398
armio.c: GPIO config following Mot's original fw
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 12 Nov 2015 02:38:40 +0000 |
parents | 3f232030c354 |
children |
comparison
equal
deleted
inserted
replaced
44:a39516059f83 | 45:e1379873c398 |
---|---|
229 void AI_InitIOConfig(void) | 229 void AI_InitIOConfig(void) |
230 { | 230 { |
231 // reset the IOs config | 231 // reset the IOs config |
232 AI_ResetIoConfig(); | 232 AI_ResetIoConfig(); |
233 | 233 |
234 /* same minimal config as OsmocomBB and FreeCalypso for now */ | 234 /* C139 GPIO configuration mimics what the original fw sets */ |
235 AI_EnableBit(0); | |
236 AI_EnableBit(2); | |
237 AI_EnableBit(4); | |
238 AI_EnableBit(5); | |
239 AI_EnableBit(6); | |
240 AI_EnableBit(7); | |
241 AI_EnableBit(8); | |
242 AI_EnableBit(9); | |
235 | 243 |
236 /* GPIO out all zeros, except for IO1 enabling the LCD backlight */ | 244 /* GPIO out all zeros, except for IO1 enabling the LCD backlight */ |
237 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0002; | 245 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0002; |
238 /* make GPIOs 1 and 3 outputs */ | 246 |
239 AI_ConfigBitAsOutput(1); | 247 /* setting of GPIOs as outputs also mimics what the original fw sets */ |
240 AI_ConfigBitAsOutput(3); | 248 *((volatile SYS_UWORD16 *) ARMIO_IO_CNTL) = 0x2A09; |
241 } | 249 } |
242 | 250 |
243 /* | 251 /* |
244 * AI_SelectIOForIT | 252 * AI_SelectIOForIT |
245 * | 253 * |