-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathar1021.h
44 lines (34 loc) · 1.01 KB
/
ar1021.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include "esphome.h"
#include "esphome/core/component.h"
#include "esphome/components/touchscreen/touchscreen.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/core/automation.h"
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/core/log.h"
#include "esphome/core/helpers.h"
#include <vector>
namespace esphome {
namespace ar1021 {
using namespace touchscreen;
//struct Store {
// volatile bool touch;
// ISRInternalGPIOPin pin;
//
// static void gpio_intr(Store *store);
//};
class AR1021Component : public Touchscreen, public i2c::I2CDevice {
public:
void setup() override;
void dump_config() override;
void calibrate();
float get_setup_priority() const override;
void set_interrupt_pin(InternalGPIOPin *pin) { this->interrupt_pin_ = pin; }
protected:
void update_touches() override;
InternalGPIOPin *interrupt_pin_;
// Store store_;
};
} //namespace ar1021
} //namespace esphome