13using namespace touchscreen;
16 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW,
17 spi::CLOCK_PHASE_LEADING, spi::DATA_RATE_2MHZ> {
24 void setup()
override;
29 static int16_t
best_two_avg(int16_t value1, int16_t value2, int16_t value3);
The SPIDevice is what components using the SPI will create.
void set_irq_pin(InternalGPIOPin *pin)
Set the pin used to detect the touch.
void update_touches() override
int16_t read_adc_(uint8_t ctrl)
static int16_t best_two_avg(int16_t value1, int16_t value2, int16_t value3)
void set_threshold(int16_t threshold)
Set the threshold for the touch detection.
InternalGPIOPin * irq_pin_
void dump_config() override
Providing packet encoding functions for exchanging data with a remote host.