/* Set up and initialize all required blocks and functions related to the board hardware */ void Board_Init(void) { /* Sets up DEBUG UART */ DEBUGINIT(); /* Updates SystemCoreClock global var with current clock speed */ SystemCoreClockUpdate(); /* Initializes GPIO */ Chip_GPIO_Init(LPC_GPIO_PORT); /* Setup GPIOs for USB demos */ Chip_SCU_PinMuxSet(0x2, 6, (SCU_MODE_PULLUP | SCU_MODE_INBUFF_EN | SCU_MODE_FUNC4)); /* P2_6 USB1_PWR_EN, USB1 VBus function */ Chip_SCU_PinMuxSet(0x2, 5, (SCU_MODE_INACT | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_FUNC2)); /* P2_5 USB1_VBUS, MUST CONFIGURE THIS SIGNAL FOR USB1 NORMAL OPERATION */ Chip_SCU_PinMuxSet(0x1, 7, (SCU_MODE_PULLUP | SCU_MODE_INBUFF_EN | SCU_MODE_FUNC4)); /* P1_7 USB0_PWR_EN, USB0 VBus function Xplorer */ Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 5, 6); /* GPIO5[6] = USB1_PWR_EN */ Chip_GPIO_SetPinState(LPC_GPIO_PORT, 5, 6, true); /* GPIO5[6] output high */ /* Initialize LEDs */ Board_LED_Init(); #if defined(USE_RMII) Chip_ENET_RMIIEnable(LPC_ETHERNET); #else Chip_ENET_MIIEnable(LPC_ETHERNET); #endif }
/* Set up and initialize all required blocks and functions related to the board hardware */ void Board_Init(void) { /* Sets up DEBUG UART */ DEBUGINIT(); /* Initializes GPIO */ Chip_GPIO_Init(LPC_GPIO_PORT); /* Initialize LEDs */ Board_LED_Init(); Chip_ENET_RMIIEnable(LPC_ETHERNET); }
/* Set up and initialize all required blocks and functions related to the board hardware */ void Board_Init(void) { /* Sets up DEBUG UART */ DEBUGINIT(); /* Initializes GPIO */ Chip_GPIO_Init(LPC_GPIO_PORT); Board_GPIOs_Init(); /* Initialize LEDs */ Board_LED_Init(); /* Initialize uarts */ Board_UART_Init(LPC_USART0); //RS 485 Board_UART_Init(LPC_USART3); // rs232 /* Initialize buttons */ Board_Buttons_Init(); /* Initialize DAC */ Board_DAC_Init(); /* Initialize Timers */ Board_TIMER_Init(); /* Initialize ADCs */ Board_ADC_Init(); /* Initialize Keyboard disabled */ Board_KEYBOARD_disable(); /* Initilize EEPROM */ Board_EEPROM_init(); /* Initialize SPI pins */ Board_SSP_Init(); /* Initialize RTC module */ //Board_RTC_Init(); /* Initialize I2C0 module */ Board_I2C_Master_Init(); Chip_ENET_RMIIEnable(LPC_ETHERNET); }