FreeCalypso > hg > fc-selenite
comparison src/cs/drivers/drv_core/armio/armio.c @ 171:3a8c90814d1a
armio.c: GTM900 support from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 19 Jun 2019 04:27:44 +0000 |
parents | 7409b22cac61 |
children | 2a9935250c95 |
comparison
equal
deleted
inserted
replaced
170:7290e92f71a9 | 171:3a8c90814d1a |
---|---|
261 // set IOs 1 and 8 to 13 as high | 261 // set IOs 1 and 8 to 13 as high |
262 // set IOs 0 and 2 to 7 as low | 262 // set IOs 0 and 2 to 7 as low |
263 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, | 263 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier, |
264 // but on Openmoko's modem it is the interrupt to the AP. | 264 // but on Openmoko's modem it is the interrupt to the AP. |
265 // On the FCDEV3B it also controls the audio amplifier. | 265 // On the FCDEV3B it also controls the audio amplifier. |
266 // For now we initialize it to low on all targets. | 266 // On the GTM900 GPIOs 0 and 1 are RI and DSR outputs, respectively. |
267 #if 1 | 267 // For targets other than GTM900, we enable the audio amplifier |
268 // if we are in an MMI!=0 build - for ACI builds use the AT@SPKR command. | |
269 #ifdef CONFIG_TARGET_GTM900 | |
270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01; | |
271 #elif (MMI != 0) | |
272 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; | |
273 #else | |
268 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; | 274 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; |
269 #else | |
270 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; | |
271 #endif | 275 #endif |
272 | 276 |
273 // ARMIO_CNTL_REG register configuration : | 277 // ARMIO_CNTL_REG register configuration : |
274 // set IOs 1,2,5,7,9,14 and 15 as ouputs. | 278 // set IOs 1,2,5,7,9,14 and 15 as ouputs. |
275 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM | 279 // bits conditionalized on CONFIG_TARGET_GTAMODEM or CONFIG_TARGET_FCFAM |
276 // are FreeCalypso additions | 280 // are FreeCalypso additions |
277 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) | 281 #if defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_FCFAM) || \ |
282 defined(CONFIG_TARGET_GTM900) | |
278 AI_ConfigBitAsOutput(0); | 283 AI_ConfigBitAsOutput(0); |
279 #endif | 284 #endif |
280 AI_ConfigBitAsOutput(1); | 285 AI_ConfigBitAsOutput(1); |
281 AI_ConfigBitAsOutput(2); | 286 AI_ConfigBitAsOutput(2); |
282 #ifdef CONFIG_TARGET_GTAMODEM | 287 #ifdef CONFIG_TARGET_GTAMODEM |