ESPHome 2025.5.0
Loading...
Searching...
No Matches
ft63x6.h
Go to the documentation of this file.
1/**************************************************************************/
6/**************************************************************************/
7
8#pragma once
9
13
14namespace esphome {
15namespace ft63x6 {
16
17using namespace touchscreen;
18
19static const uint8_t FT6X36_DEFAULT_THRESHOLD = 22;
20
22 public:
23 void setup() override;
24 void dump_config() override;
25
27 void set_reset_pin(GPIOPin *pin) { this->reset_pin_ = pin; }
28 void set_threshold(uint8_t threshold) { this->threshold_ = threshold; }
29
30 protected:
31 void hard_reset_();
32 void update_touches() override;
33
36 uint8_t threshold_{FT6X36_DEFAULT_THRESHOLD};
37
38 uint8_t read_touch_number_();
39
40 uint16_t read_touch_x_(uint8_t touch);
41 uint16_t read_touch_y_(uint8_t touch);
42 uint8_t read_touch_event_(uint8_t touch);
43 uint8_t read_touch_id_(uint8_t touch);
44 uint8_t read_touch_weight_(uint8_t touch);
45 uint8_t read_touch_misc_(uint8_t touch);
46
47 uint8_t read_byte_(uint8_t addr);
48};
49
50} // namespace ft63x6
51} // namespace esphome
uint16_t read_touch_y_(uint8_t touch)
Definition ft63x6.cpp:110
void set_interrupt_pin(InternalGPIOPin *pin)
Definition ft63x6.h:26
uint8_t read_touch_misc_(uint8_t touch)
Definition ft63x6.cpp:125
uint8_t read_touch_id_(uint8_t touch)
Definition ft63x6.cpp:119
void set_threshold(uint8_t threshold)
Definition ft63x6.h:28
uint8_t read_touch_weight_(uint8_t touch)
Definition ft63x6.cpp:122
uint8_t read_byte_(uint8_t addr)
Definition ft63x6.cpp:129
uint16_t read_touch_x_(uint8_t touch)
Definition ft63x6.cpp:104
uint8_t read_touch_event_(uint8_t touch)
Definition ft63x6.cpp:116
void set_reset_pin(GPIOPin *pin)
Definition ft63x6.h:27
InternalGPIOPin * interrupt_pin_
Definition ft63x6.h:34
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7