This commit is contained in:
woutervhoof 2022-12-19 21:08:55 +00:00 committed by GitHub
commit 0e1aa742f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -158,7 +158,6 @@ static void setup_adc(gpio_num_t measure)
{
// Init ADC
adc1_channel_t channel = gpio_to_adc[measure];
adc_gpio_init(ADC_UNIT_1, channel);
adc1_config_width(ADC_WIDTH_BIT_10);
adc1_config_channel_atten(channel, ADC_ATTEN_DB_11);
}

View file

@ -13,13 +13,14 @@ extern "C" {
#include <stdbool.h>
#include "driver/gpio.h"
#include "driver/adc.h"
#include "soc/adc_channel.h"
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#define TOUCHSCREEN_RESISTIVE_PIN_YU CONFIG_LV_TOUCHSCREEN_RESSITIVE_PIN_YU // Y+ any gpio
#define TOUCHSCREEN_RESISTIVE_PIN_YU CONFIG_LV_TOUCHSCREEN_RESISTIVE_PIN_YU // Y+ any gpio
#define TOUCHSCREEN_RESISTIVE_PIN_YD CONFIG_LV_TOUCHSCREEN_RESISTIVE_PIN_YD // Y- also ADC
#define TOUCHSCREEN_RESISTIVE_PIN_XL CONFIG_LV_TOUCHSCREEN_RESISTIVE_PIN_XL // X- any gpio
#define TOUCHSCREEN_RESISTIVE_PIN_XR CONFIG_LV_TOUCHSCREEN_RESISTIVE_PIN_XR // X+ also ADC