ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
ft63x6.h
Go to the documentation of this file.
1/**************************************************************************/
6/**************************************************************************/
7
8#pragma once
9
13
14namespace esphome::ft63x6 {
15
16using namespace touchscreen;
17
18static const uint8_t FT6X36_DEFAULT_THRESHOLD = 22;
19
20class FT63X6Touchscreen final : public Touchscreen, public i2c::I2CDevice {
21 public:
22 void setup() override;
23 void dump_config() override;
24
26 void set_reset_pin(GPIOPin *pin) { this->reset_pin_ = pin; }
27 void set_threshold(uint8_t threshold) { this->threshold_ = threshold; }
28
29 protected:
30 void update_touches() override;
31
34 uint8_t threshold_{FT6X36_DEFAULT_THRESHOLD};
35
36 uint8_t read_touch_number_();
37
38 uint16_t read_touch_x_(uint8_t touch);
39 uint16_t read_touch_y_(uint8_t touch);
40 uint8_t read_touch_event_(uint8_t touch);
41 uint8_t read_touch_id_(uint8_t touch);
42 uint8_t read_touch_weight_(uint8_t touch);
43 uint8_t read_touch_misc_(uint8_t touch);
44
45 uint8_t read_byte_(uint8_t addr);
46};
47
48} // namespace esphome::ft63x6
uint16_t read_touch_y_(uint8_t touch)
Definition ft63x6.cpp:101
void set_interrupt_pin(InternalGPIOPin *pin)
Definition ft63x6.h:25
uint8_t read_touch_misc_(uint8_t touch)
Definition ft63x6.cpp:116
uint8_t read_touch_id_(uint8_t touch)
Definition ft63x6.cpp:110
void set_threshold(uint8_t threshold)
Definition ft63x6.h:27
uint8_t read_touch_weight_(uint8_t touch)
Definition ft63x6.cpp:113
uint8_t read_byte_(uint8_t addr)
Definition ft63x6.cpp:120
uint16_t read_touch_x_(uint8_t touch)
Definition ft63x6.cpp:95
uint8_t read_touch_event_(uint8_t touch)
Definition ft63x6.cpp:107
void set_reset_pin(GPIOPin *pin)
Definition ft63x6.h:26
InternalGPIOPin * interrupt_pin_
Definition ft63x6.h:32
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144