예제 #1
0
/*
** Configurations for DS0
*/
static void PowerDownConfig(void)
{
    unsigned int index = 0;

    for(index = 0; index < 16; index++)
    {
        /* Configure LCD DATA IO Pads for low power mode */
        IOPadConfigure(CONTROL_CONF_LCD_DATA(index), IOPAD_GPIO);

        /* Skip LCD DATA Clock from configuration */
        IOPadSel(&ctrlContext, CONTROL_CONF_LCD_DATA(index), true);
    }

    /* Configure Ethernet Clocks for low power mode */
    IOPadConfigure(CONTROL_CONF_RMII1_REFCLK, IOPAD_GPIO);
    IOPadConfigure(CONTROL_CONF_MDIO_CLK, IOPAD_GPIO);

    /* Skip Ethernet Clock from configuration */
    IOPadSel(&ctrlContext, CONTROL_CONF_RMII1_REFCLK, true);
    IOPadSel(&ctrlContext, CONTROL_CONF_MDIO_CLK, true);

    /* Skip system I2C Bus from configuration */
    IOPadSel(&ctrlContext, CONTROL_CONF_I2C0_SDA, true);
    IOPadSel(&ctrlContext, CONTROL_CONF_I2C0_SCL, true);

    /* Skip IO pads from CONTROL_CONF_NRESETIN_OUT to DDR for configuration */
    for(index = 0u;
            index < (CONTROL_CONF_AIN0 - CONTROL_CONF_NRESETIN_OUT)/4u; index++)
    {
        IOPadSel(&ctrlContext, CONTROL_CONF_NRESETIN_OUT + (4u * index), true);
    }

    /* Skip configuration of touchscreen IO Pads here */

    /* Skip other IO pads from CONTROL_CONF_VREFP for configuration */
    for(index = 0u;
               index <= (CONTROL_CONF_TESTOUT - CONTROL_CONF_VREFP)/4u; index++)
    {
        IOPadSel(&ctrlContext, CONTROL_CONF_VREFP + (4u * index), true);
    }

    /* Add Emulation IO Pads for low power mode configuration */
    IOPadSel(&ctrlContext, CONTROL_CONF_EMU(0u), false);
    IOPadSel(&ctrlContext, CONTROL_CONF_EMU(1u), false);

    /* Add USB VBUS IO Pads for low power mode configuration */
    IOPadSel(&ctrlContext, CONTROL_CONF_USB_DRVVBUS(0u), false);
    IOPadSel(&ctrlContext, CONTROL_CONF_USB_DRVVBUS(1u), false);

    /* Configure other IO Pads */
    IOPadSelConfigure(&ctrlContext, IOPAD_GPIO_PULLDN_RXACTIVE);
}
예제 #2
0
void modulo3(int nGpio){
    switch(nGpio){
    	case GPIO_0 ... GPIO_4:
    	selectMII1(nGpio);
    	break;

    	case GPIO_5 ... GPIO_6:
    	selectI2C0(nGpio);
    	break;

    	case GPIO_7 ... GPIO_8:
    	GPIOPinMuxSetup(CONTROL_CONF_EMU(0), CONTROL_CONF_MUXMODE(7));
    	break;

    	case GPIO_9 ... GPIO_10:
    	selectMII1(nGpio);
    	break;

    	case GPIO_13:
    	GPIOPinMuxSetup(CONTROL_CONF_USB_DRVVBUS(1), CONTROL_CONF_MUXMODE(7));
    	break;

    	case GPIO_14 ... GPIO_21:
    	selectMCASPO(nGpio);
    	break;
    }
}