Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adcraw touch driver fix #212

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lvgl_touch/adcraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion lvgl_touch/adcraw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down