/* ** Enable all the peripherals in use */ static void PeripheralsSetUp(void) { DMTimer2ModuleClkConfig(); DMTimer3ModuleClkConfig(); DMTimer4ModuleClkConfig(); RTCModuleClkConfig(); CPSWPinMuxSetup(); CPSWClkEnable(); EDMAModuleClkConfig(); GPIO1ModuleClkConfig(); GPIO1Pin23PinMuxSetup(); HSMMCSDPinMuxSetup(); HSMMCSDModuleClkConfig(); }
/* ** Enable all the peripherals in use */ static void PeripheralsSetUp(void) { enableModuleClock(CLK_UART0); enableModuleClock(CLK_I2C0); /* Timer6 is used for Standby wakeup */ enableModuleClock(CLK_TIMER6); GPIO0ModuleClkConfig(); DMTimer2ModuleClkConfig(); DMTimer3ModuleClkConfig(); DMTimer4ModuleClkConfig(); RTCModuleClkConfig(); CPSWPinMuxSetup(); CPSWClkEnable(); EDMAModuleClkConfig(); GPIO1ModuleClkConfig(); GPIO1Pin23PinMuxSetup(); HSMMCSDPinMuxSetup(); HSMMCSDModuleClkConfig(); I2CPinMuxSetup(0); }
void gpioInit(void) { // enable clock for gpio 0,1,2 GPIO0ModuleClkConfig(); GPIO1ModuleClkConfig(); GPIO2ModuleClkConfig(); // select gpio pins for use gpioPinMux(); /* Enabling the GPIO module. */ GPIOModuleEnable(GPIO_BASE1); GPIOModuleEnable(GPIO_BASE0); GPIOModuleEnable(GPIO_BASE2); /* Resetting the GPIO module. */ GPIOModuleReset(GPIO_BASE0); GPIOModuleReset(GPIO_BASE1); GPIOModuleReset(GPIO_BASE2); // set directions for the gpio pins in use gpioDirModeSet(); }