From e0c20d529481f8232a79e5b149f2c6e60a97ced7 Mon Sep 17 00:00:00 2001 From: Rob Vlaar Date: Thu, 31 Jan 2019 08:55:51 +0100 Subject: [PATCH] fixed indentation --- targets/TARGET_STM/TARGET_STM32L0/analogin_device.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32L0/analogin_device.c b/targets/TARGET_STM/TARGET_STM32L0/analogin_device.c index fec3a4af9c..251fe4cbbb 100644 --- a/targets/TARGET_STM/TARGET_STM32L0/analogin_device.c +++ b/targets/TARGET_STM/TARGET_STM32L0/analogin_device.c @@ -175,13 +175,13 @@ uint16_t adc_read(analogin_t *obj) HAL_ADC_Start(&obj->handle); // Start conversion // Wait end of conversion and get value - uint16_t adcValue = 0; + uint16_t adcValue = 0; if (HAL_ADC_PollForConversion(&obj->handle, 10) == HAL_OK) { adcValue = (uint16_t)HAL_ADC_GetValue(&obj->handle); - } - sConfig.Rank = ADC_RANK_NONE; - HAL_ADC_ConfigChannel(&obj->handle, &sConfig); - return adcValue; + } + sConfig.Rank = ADC_RANK_NONE; + HAL_ADC_ConfigChannel(&obj->handle, &sConfig); + return adcValue; } #endif