13 using 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;
25 void dump_config()
override;
29 static int16_t best_two_avg(int16_t value1, int16_t value2, int16_t value3);
31 int16_t read_adc_(uint8_t ctrl);
33 void update_touches()
override;
void set_irq_pin(InternalGPIOPin *pin)
Set the pin used to detect the touch.
The SPIDevice is what components using the SPI will create.
void set_threshold(int16_t threshold)
Set the threshold for the touch detection.
Implementation of SPI Controller mode.