Explorar el Código

STM32: ADC warning fix (#13933)

Tanguy Pruvot hace 5 años
padre
commit
e53d7e5517
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2
    3
      Marlin/src/HAL/HAL_STM32F1/HAL.cpp

+ 2
- 3
Marlin/src/HAL/HAL_STM32F1/HAL.cpp Ver fichero

@@ -279,6 +279,7 @@ void HAL_adc_init(void) {
279 279
 void HAL_adc_start_conversion(const uint8_t adc_pin) {
280 280
   TEMP_PINS pin_index;
281 281
   switch (adc_pin) {
282
+    default: return;
282 283
     #if HAS_TEMP_ADC_0
283 284
       case TEMP_0_PIN: pin_index = TEMP_0; break;
284 285
     #endif
@@ -310,8 +311,6 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
310 311
   HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only.
311 312
 }
312 313
 
313
-uint16_t HAL_adc_get_result(void) {
314
-  return HAL_adc_result;
315
-}
314
+uint16_t HAL_adc_get_result(void) { return HAL_adc_result; }
316 315
 
317 316
 #endif // __STM32F1__

Loading…
Cancelar
Guardar