diff options
| author | MurphyZhao <[email protected]> | 2019-08-07 14:22:54 +0800 |
|---|---|---|
| committer | MurphyZhao <[email protected]> | 2019-08-07 14:24:09 +0800 |
| commit | 1f842df9ce42f8236bffdce5146b82eea191cd0b (patch) | |
| tree | f16490dd499a2764e427b05c89b05fa6cfcbc2cc | |
| parent | 891823521a2c9a5143c72c9c339ac96a68d102a7 (diff) | |
[bsp][stm32] remove C99 feature
Signed-off-by: MurphyZhao <[email protected]>
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/drv_adc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_adc.c b/bsp/stm32/libraries/HAL_Drivers/drv_adc.c index 418c9ea6a6..97ddc4d818 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_adc.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_adc.c @@ -44,8 +44,9 @@ static struct stm32_adc stm32_adc_obj[sizeof(adc_config) / sizeof(adc_config[0]) static rt_err_t stm32_adc_enabled(struct rt_adc_device *device, rt_uint32_t channel, rt_bool_t enabled) { + ADC_HandleTypeDef *stm32_adc_handler; RT_ASSERT(device != RT_NULL); - ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data; + stm32_adc_handler = device->parent.user_data; if (enabled) { @@ -140,11 +141,12 @@ static rt_uint32_t stm32_adc_get_channel(rt_uint32_t channel) static rt_err_t stm32_get_adc_value(struct rt_adc_device *device, rt_uint32_t channel, rt_uint32_t *value) { ADC_ChannelConfTypeDef ADC_ChanConf; + ADC_HandleTypeDef *stm32_adc_handler; RT_ASSERT(device != RT_NULL); RT_ASSERT(value != RT_NULL); - ADC_HandleTypeDef *stm32_adc_handler = device->parent.user_data; + stm32_adc_handler = device->parent.user_data; rt_memset(&ADC_ChanConf, 0, sizeof(ADC_ChanConf)); |
