+ static RCC_ClocksTypeDef RCC_Clocks;
+ static GPIO_InitTypeDef GPIO_InitStructure;
+
+ /* Configure Clocks for Application need */
+ RCC_Configuration();
+
+ /* Configure RTC Clocks */
+ RTC_Configuration();
+
+ /* Set internal voltage regulator to 1.8V */
+ PWR_VoltageScalingConfig(PWR_VoltageScaling_Range1);
+
+ /* Wait Until the Voltage Regulator is ready */
+ while (PWR_GetFlagStatus(PWR_FLAG_VOS) != RESET) ;
+
+ /* configure gpios */
+
+ /* Enable GPIOs clock */
+ RCC_AHBPeriphClockCmd(LD_GPIO_PORT_CLK, ENABLE);
+
+ /* Configure the GPIO_LED pins LD3 & LD4*/
+ GPIO_InitStructure.GPIO_Pin = LD_GREEN_GPIO_PIN | LD_BLUE_GPIO_PIN;
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
+ GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
+ GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
+ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
+ GPIO_Init(LD_GPIO_PORT, &GPIO_InitStructure);
+ GPIO_LOW(LD_GPIO_PORT, LD_GREEN_GPIO_PIN);
+ GPIO_LOW(LD_GPIO_PORT, LD_BLUE_GPIO_PIN);