ESPHome 2026.5.3
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
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 hard_reset_();
31 void update_touches() override;
32
35 uint8_t threshold_{FT6X36_DEFAULT_THRESHOLD};
36
37 uint8_t read_touch_number_();
38
39 uint16_t read_touch_x_(uint8_t touch);
40 uint16_t read_touch_y_(uint8_t touch);
41 uint8_t read_touch_event_(uint8_t touch);
42 uint8_t read_touch_id_(uint8_t touch);
43 uint8_t read_touch_weight_(uint8_t touch);
44 uint8_t read_touch_misc_(uint8_t touch);
45
46 uint8_t read_byte_(uint8_t addr);
47};
48
49} // namespace esphome::ft63x6
uint16_t read_touch_y_(uint8_t touch)
Definition ft63x6.cpp:111
void set_interrupt_pin(InternalGPIOPin *pin)
Definition ft63x6.h:25
uint8_t read_touch_misc_(uint8_t touch)
Definition ft63x6.cpp:126
uint8_t read_touch_id_(uint8_t touch)
Definition ft63x6.cpp:120
void set_threshold(uint8_t threshold)
Definition ft63x6.h:27
uint8_t read_touch_weight_(uint8_t touch)
Definition ft63x6.cpp:123
uint8_t read_byte_(uint8_t addr)
Definition ft63x6.cpp:130
uint16_t read_touch_x_(uint8_t touch)
Definition ft63x6.cpp:105
uint8_t read_touch_event_(uint8_t touch)
Definition ft63x6.cpp:117
void set_reset_pin(GPIOPin *pin)
Definition ft63x6.h:26
InternalGPIOPin * interrupt_pin_
Definition ft63x6.h:33
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:132