mirror of https://github.com/ARMmbed/mbed-os.git
[DISCO_F746NG] Typo corrections
parent
5f282b2053
commit
763c9a1292
|
|
@ -67,7 +67,7 @@ void analogout_init(dac_t *obj, PinName pin)
|
||||||
DacHandle.Instance = DAC;
|
DacHandle.Instance = DAC;
|
||||||
|
|
||||||
status = HAL_DAC_Init(&DacHandle);
|
status = HAL_DAC_Init(&DacHandle);
|
||||||
if ( status != HAL_OK ) {
|
if (status != HAL_OK) {
|
||||||
error("HAL_DAC_Init failed");
|
error("HAL_DAC_Init failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ static inline void dac_write(dac_t *obj, uint16_t value)
|
||||||
status = HAL_DAC_SetValue(&DacHandle, DAC_CHANNEL_2, DAC_ALIGN_12B_R, value);
|
status = HAL_DAC_SetValue(&DacHandle, DAC_CHANNEL_2, DAC_ALIGN_12B_R, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( status != HAL_OK ) {
|
if (status != HAL_OK) {
|
||||||
error("DAC pin mapping failed");
|
error("DAC pin mapping failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@ static inline int gpio_read(gpio_t *obj)
|
||||||
return ((*obj->reg_in & obj->mask) ? 1 : 0);
|
return ((*obj->reg_in & obj->mask) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int gpio_is_connected(const gpio_t *obj) {
|
static inline int gpio_is_connected(const gpio_t *obj)
|
||||||
|
{
|
||||||
return obj->pin != (PinName)NC;
|
return obj->pin != (PinName)NC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,8 @@ void rtc_init(void)
|
||||||
|
|
||||||
// Enable LSE Oscillator
|
// Enable LSE Oscillator
|
||||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
|
||||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; /* Mandatory, otherwise the PLL is reconfigured! */
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE; // Mandatory, otherwise the PLL is reconfigured!
|
||||||
RCC_OscInitStruct.LSEState = RCC_LSE_ON; /* External 32.768 kHz clock on OSC_IN/OSC_OUT */
|
RCC_OscInitStruct.LSEState = RCC_LSE_ON; // External 32.768 kHz clock on OSC_IN/OSC_OUT
|
||||||
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) {
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) {
|
||||||
// Connect LSE to RTC
|
// Connect LSE to RTC
|
||||||
__HAL_RCC_RTC_CLKPRESCALER(RCC_RTCCLKSOURCE_LSE);
|
__HAL_RCC_RTC_CLKPRESCALER(RCC_RTCCLKSOURCE_LSE);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ void deepsleep(void)
|
||||||
// Request to enter STOP mode with regulator in low power mode
|
// Request to enter STOP mode with regulator in low power mode
|
||||||
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
|
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
|
||||||
|
|
||||||
// After wake-up from STOP reconfigure the PLL
|
// After wake-up from STOP need to reconfigure the system clock
|
||||||
SetSysClock();
|
SetSysClock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue