Skip to content

Commit

Permalink
stmhal: Fix unused variables when HW_CLK_LAST_FREQ not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgeorge committed Nov 23, 2015
1 parent 86aa16b commit 056abbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stmhal/modmachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,11 @@ STATIC mp_obj_t machine_freq(mp_uint_t n_args, const mp_obj_t *args) {
} else {
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
}
#if defined(MICROPY_HW_CLK_LAST_FREQ) && MICROPY_HW_CLK_LAST_FREQ
uint32_t h = RCC_ClkInitStruct.AHBCLKDivider >> 4;
uint32_t b1 = RCC_ClkInitStruct.APB1CLKDivider >> 10;
uint32_t b2 = RCC_ClkInitStruct.APB2CLKDivider >> 10;
#endif
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
goto fail;
}
Expand Down

0 comments on commit 056abbc

Please sign in to comment.