From 1865ee93595991de6b664440e0f53e7b0bb67dfd Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 30 Nov 2018 17:56:33 +0100 Subject: [PATCH] cpu/esp8266: fix of adc_res_t cpu/esp8266/include/periph_cpu.h overrides the default definition of adc_res_t from periph/adc with a definition which contains only one resolution. This gives compilation errorss if an application uses other resolutions. According to the documentation, adc_sample should return -1 if the resolution is not supported. All other CPUs override adc_res_t either to add new resolutions or to mark resolutions as unsupported. But they all allow to use them at the interface. Therefore, esp8266 uses now the default definition of adc_res_t and returns -1 if a solution is used in adc_sample that is not supported. --- cpu/esp8266/include/periph_cpu.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cpu/esp8266/include/periph_cpu.h b/cpu/esp8266/include/periph_cpu.h index f404c52721..a1d5be5973 100644 --- a/cpu/esp8266/include/periph_cpu.h +++ b/cpu/esp8266/include/periph_cpu.h @@ -27,16 +27,6 @@ extern "C" { #endif -/** - * @brief Override the ADC resolution configuration - * @{ - */ -#define HAVE_ADC_RES_T -typedef enum { - ADC_RES_10BIT /* only one resolution is supported */ -} adc_res_t; -/** @} */ - /** * @brief Length of the CPU_ID in octets */