[DISCO_F746NG] Typo corrections

pull/1209/head
bcostm 2015-06-25 16:00:00 +02:00
parent 5f282b2053
commit 763c9a1292
7 changed files with 18 additions and 17 deletions

View File

@ -84,7 +84,7 @@ const PinMap PinMap_PWM[] = {
// {PB_9, PWM_11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 - ARDUINO D14
// {PB_14, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - ARDUINO D12
// {PB_14, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - ARDUINO D12
{PB_14, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - ARDUINO D12
{PB_14, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - ARDUINO D12
// {PB_15, PWM_1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - ARDUINO D11
// {PB_15, PWM_8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N - ARDUINO D11
{PB_15, PWM_12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 - ARDUINO D11

View File

@ -67,7 +67,7 @@ void analogout_init(dac_t *obj, PinName pin)
DacHandle.Instance = DAC;
status = HAL_DAC_Init(&DacHandle);
if ( status != HAL_OK ) {
if (status != HAL_OK) {
error("HAL_DAC_Init failed");
}
@ -75,7 +75,7 @@ void analogout_init(dac_t *obj, PinName pin)
sConfig.DAC_OutputBuffer = DAC_OUTPUTBUFFER_ENABLE;
if (obj->channel == 1) {
channel = DAC_CHANNEL_1;
channel = DAC_CHANNEL_1;
} else {
channel = DAC_CHANNEL_2;
}
@ -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);
}
if ( status != HAL_OK ) {
if (status != HAL_OK) {
error("DAC pin mapping failed");
}
}
@ -120,7 +120,7 @@ static inline int dac_read(dac_t *obj)
} else if (obj->channel == 2) {
return (int)HAL_DAC_GetValue(&DacHandle, DAC_CHANNEL_2);
}
return 0; /* Just silented warning */
return 0; /* Just silented warning */
}
void analogout_write(dac_t *obj, float value)

View File

@ -63,7 +63,8 @@ static inline int gpio_read(gpio_t *obj)
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;
}

View File

@ -125,7 +125,7 @@ void pwmout_write(pwmout_t* obj, float value)
if (HAL_TIM_PWM_ConfigChannel(&TimHandle, &sConfig, channel) != HAL_OK) {
error("Cannot configure PWM channel");
}
if (obj->inverted) {
HAL_TIMEx_PWMN_Start(&TimHandle, channel);
} else {
@ -169,7 +169,7 @@ void pwmout_period_us(pwmout_t* obj, int us)
case PWM_5:
case PWM_12:
case PWM_13:
case PWM_14:
case PWM_14:
PclkFreq = HAL_RCC_GetPCLK1Freq();
break;
case PWM_1:
@ -188,7 +188,7 @@ void pwmout_period_us(pwmout_t* obj, int us)
TimHandle.Init.Prescaler = (uint16_t)((PclkFreq * 2) / 1000000) - 1; // 1 us tick
TimHandle.Init.ClockDivision = 0;
TimHandle.Init.CounterMode = TIM_COUNTERMODE_UP;
if (HAL_TIM_PWM_Init(&TimHandle) != HAL_OK) {
error("Cannot initialize PWM");
}

View File

@ -59,8 +59,8 @@ void rtc_init(void)
// Enable LSE Oscillator
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
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.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
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) {
// Connect LSE to RTC
__HAL_RCC_RTC_CLKPRESCALER(RCC_RTCCLKSOURCE_LSE);

View File

@ -285,21 +285,21 @@ static void uart2_irq(void)
}
#if defined(USART3_BASE)
static void uart3_irq(void)
static void uart3_irq(void)
{
uart_irq(UART_3, 2);
}
#endif
#if defined(UART4_BASE)
static void uart4_irq(void)
static void uart4_irq(void)
{
uart_irq(UART_4, 3);
}
#endif
#if defined(UART5_BASE)
static void uart5_irq(void)
static void uart5_irq(void)
{
uart_irq(UART_5, 4);
}
@ -311,14 +311,14 @@ static void uart6_irq(void)
}
#if defined(UART7_BASE)
static void uart7_irq(void)
static void uart7_irq(void)
{
uart_irq(UART_7, 6);
}
#endif
#if defined(UART8_BASE)
static void uart8_irq(void)
static void uart8_irq(void)
{
uart_irq(UART_8, 7);
}

View File

@ -54,7 +54,7 @@ void deepsleep(void)
// Request to enter STOP mode with regulator in low power mode
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();
}