# HG changeset patch # User Mychaela Falconia # Date 1475392023 0 # Node ID 8e5096429fd347b2a1113fc8e215924614e47bcb # Parent d6e59be562fd86d26d7c9b2f27114c44a8ac7195 armio.c: first cleaning step diff -r d6e59be562fd -r 8e5096429fd3 src/cs/drivers/drv_core/armio/armio.c --- a/src/cs/drivers/drv_core/armio/armio.c Sun Oct 02 06:23:18 2016 +0000 +++ b/src/cs/drivers/drv_core/armio/armio.c Sun Oct 02 07:07:03 2016 +0000 @@ -20,6 +20,7 @@ #endif #include "board.cfg" #include "chipset.cfg" +#include "fc-target.cfg" #if (OP_L1_STANDALONE == 0) #include "main/sys_types.h" @@ -157,66 +158,6 @@ } -#if (BOARD == 7) -/* - * AI_InitIOConfig - * - * Configure all GPIOs at initialization in order to optimize the power consumption - * of the B-Sample : - * - select IOs 8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals. - * - configure these IOs in output high. - * - configure the IOs 0 and 1 in output low. - */ -void AI_InitIOConfig(void) -{ - // reset the IOs config - AI_ResetIoConfig(); - - // CLKM_IO_CNTL register configuration : - // select IOs 8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals. - #if (CHIPSET != 12) - AI_EnableBit(4); - #endif - - /* Bits 5,6,7,8 are used to output I/O 9,10,11,12 or MCSI pins */ - /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ -#ifdef BTEMOBILE - #if (CHIPSET != 12) - AI_DisableBit(5); - AI_DisableBit(6); - AI_DisableBit(7); - AI_DisableBit(8); - #endif -#else - #if (CHIPSET != 12) - AI_EnableBit(5); - AI_EnableBit(6); - AI_EnableBit(7); - AI_EnableBit(8); -#endif -#endif - - #if (CHIPSET != 12) - AI_EnableBit(9); - #endif - - // ARMIO_OUT register configuration : - // reset the general output latchs. - *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; - - // ARMIO_CNTL_REG register configuration : - // set IOs 0,1,8,9,10,11,12 and 13 as ouputs. - AI_ConfigBitAsOutput(0); // vibrator - AI_ConfigBitAsOutput(1); // LCD_A0 - AI_ConfigBitAsOutput(8); - AI_ConfigBitAsOutput(9); - AI_ConfigBitAsOutput(10); - AI_ConfigBitAsOutput(11); - AI_ConfigBitAsOutput(12); - AI_ConfigBitAsOutput(13); -} - -#elif ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45)) /* * AI_InitIOConfig * @@ -242,18 +183,18 @@ /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ #ifdef BTEMOBILE #if (CHIPSET != 12) - AI_DisableBit(5); - AI_DisableBit(6); - AI_DisableBit(7); - AI_DisableBit(8); + AI_DisableBit(5); + AI_DisableBit(6); + AI_DisableBit(7); + AI_DisableBit(8); #endif #else #if (CHIPSET != 12) - AI_EnableBit(5); - AI_EnableBit(6); - AI_EnableBit(7); - AI_EnableBit(8); -#endif + AI_EnableBit(5); + AI_EnableBit(6); + AI_EnableBit(7); + AI_EnableBit(8); + #endif #endif #if (CHIPSET != 12) @@ -397,5 +338,3 @@ } /* f_gpio_unmask_it() */ #endif - -#endif /* BOARD 8, 9, 40, 41, 42, 43 or 45*/