[NUCLEO_F401RE] Fix compilation error with error.h include file

pull/220/head
bcostm 2014-03-19 15:38:39 +01:00
parent 8e21b1ac83
commit 87a83a8603
1 changed files with 10 additions and 3 deletions

View File

@ -64,7 +64,6 @@
*/
#include "stm32f4xx_hal.h"
#include "error.h" /* [ADDED FOR MBED] */
/**
* @}
@ -292,7 +291,11 @@ void SystemClock_Config(void)
RCC_OscInitStruct.PLL.PLLQ = 7;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
error("System clock initialization failed.");
// System clock initialization failed
while(1)
{
// [TODO] Put something here to tell the user that a problem occured...
}
}
/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 clocks dividers */
@ -303,7 +306,11 @@ void SystemClock_Config(void)
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; // 84 MHz (SPI1 clock...)
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
error("System clock initialization failed.");
// System clock initialization failed
while(1)
{
// [TODO] Put something here to tell the user that a problem occured...
}
}
/* Update the SystemCoreClock variable