ESPHome  2022.12.8
ektf2232.h
Go to the documentation of this file.
1 #pragma once
2 
7 #include "esphome/core/hal.h"
8 
9 namespace esphome {
10 namespace ektf2232 {
11 
13  volatile bool touch;
15 
16  static void gpio_intr(EKTF2232TouchscreenStore *store);
17 };
18 
19 using namespace touchscreen;
20 
21 class EKTF2232Touchscreen : public Touchscreen, public Component, public i2c::I2CDevice {
22  public:
23  void setup() override;
24  void loop() override;
25  void dump_config() override;
26 
27  void set_interrupt_pin(InternalGPIOPin *pin) { this->interrupt_pin_ = pin; }
28  void set_rts_pin(GPIOPin *pin) { this->rts_pin_ = pin; }
29 
30  void set_power_state(bool enable);
31  bool get_power_state();
32 
33  protected:
34  void hard_reset_();
35  bool soft_reset_();
36 
40  uint16_t x_resolution_;
41  uint16_t y_resolution_;
42 };
43 
44 } // namespace ektf2232
45 } // namespace esphome
void setup()
void loop()
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
Definition: gpio.h:66
void set_interrupt_pin(InternalGPIOPin *pin)
Definition: ektf2232.h:27
static void gpio_intr(EKTF2232TouchscreenStore *store)
Definition: ektf2232.cpp:18
EKTF2232TouchscreenStore store_
Definition: ektf2232.h:39
Definition: a4988.cpp:4