|
void | set_dimensions (int16_t x, int16_t y) |
| Set the logical touch screen dimensions. More...
|
|
void | set_calibration (int16_t x_min, int16_t x_max, int16_t y_min, int16_t y_max) |
| Set the coordinates for the touch screen edges. More...
|
|
void | set_swap_x_y (bool val) |
| If true the x and y axes will be swapped. More...
|
|
void | set_report_interval (uint32_t interval) |
| Set the interval to report the touch point perodically. More...
|
|
uint32_t | get_report_interval () |
|
void | set_threshold (int16_t threshold) |
| Set the threshold for the touch detection. More...
|
|
void | set_irq_pin (InternalGPIOPin *pin) |
| Set the pin used to detect the touch. More...
|
|
void | setup () override |
|
void | dump_config () override |
|
float | get_setup_priority () const override |
|
void | loop () override |
| Detect the touch if the irq pin is specified. More...
|
|
void | update () override |
| Read and process the values from the hardware. More...
|
|
void | set_display (display::DisplayBuffer *display) |
|
display::DisplayBuffer * | get_display () const |
|
Trigger< TouchPoint > * | get_touch_trigger () |
|
void | register_listener (TouchListener *listener) |
|
| PollingComponent () |
|
| PollingComponent (uint32_t update_interval) |
| Initialize this polling component with the given update interval in ms. More...
|
|
virtual void | set_update_interval (uint32_t update_interval) |
| Manually set the update interval in ms for this polling object. More...
|
|
void | call_setup () override |
|
virtual uint32_t | get_update_interval () const |
| Get the update interval in ms of this sensor. More...
|
|
float | get_actual_setup_priority () const |
|
void | set_setup_priority (float priority) |
|
virtual float | get_loop_priority () const |
| priority of loop(). More...
|
|
void | call () |
|
virtual void | on_shutdown () |
|
virtual void | on_safe_shutdown () |
|
uint32_t | get_component_state () const |
|
virtual void | mark_failed () |
| Mark this component as failed. More...
|
|
bool | is_failed () |
|
bool | is_ready () |
|
virtual bool | can_proceed () |
|
bool | status_has_warning () |
|
bool | status_has_error () |
|
void | status_set_warning () |
|
void | status_set_error () |
|
void | status_clear_warning () |
|
void | status_clear_error () |
|
void | status_momentary_warning (const std::string &name, uint32_t length=5000) |
|
void | status_momentary_error (const std::string &name, uint32_t length=5000) |
|
bool | has_overridden_loop () const |
|
void | set_component_source (const char *source) |
| Set where this component was loaded from for some debug messages. More...
|
|
const char * | get_component_source () const |
| Get the integration where this component was declared as a string. More...
|
|
| SPIDevice ()=default |
|
| SPIDevice (SPIComponent *parent, GPIOPin *cs) |
|
void | set_spi_parent (SPIComponent *parent) |
|
void | set_cs_pin (GPIOPin *cs) |
|
void | spi_setup () |
|
void | enable () |
|
void | disable () |
|
uint8_t | read_byte () |
|
void | read_array (uint8_t *data, size_t length) |
|
std::array< uint8_t, N > | read_array () |
|
void | write_byte (uint8_t data) |
|
void | write_byte16 (uint16_t data) |
|
void | write_array16 (const uint16_t *data, size_t length) |
|
void | write_array (const uint8_t *data, size_t length) |
|
void | write_array (const std::array< uint8_t, N > &data) |
|
void | write_array (const std::vector< uint8_t > &data) |
|
uint8_t | transfer_byte (uint8_t data) |
|
void | transfer_array (uint8_t *data, size_t length) |
|
void | transfer_array (std::array< uint8_t, N > &data) |
|
|
int16_t | read_adc_ (uint8_t ctrl) |
|
void | check_touch_ () |
|
void | send_touch_ (TouchPoint tp) |
| Call this function to send touch points to the on_touch listener and the binary_sensors. More...
|
|
virtual void | call_loop () |
|
virtual void | call_dump_config () |
|
void | set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f) |
| Set an interval function with a unique name. More...
|
|
void | set_interval (uint32_t interval, std::function< void()> &&f) |
|
bool | cancel_interval (const std::string &name) |
| Cancel an interval function. More...
|
|
void | set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
| Set an retry function with a unique name. More...
|
|
void | set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
|
bool | cancel_retry (const std::string &name) |
| Cancel a retry function. More...
|
|
void | set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f) |
| Set a timeout function with a unique name. More...
|
|
void | set_timeout (uint32_t timeout, std::function< void()> &&f) |
|
bool | cancel_timeout (const std::string &name) |
| Cancel a timeout function. More...
|
|
void | defer (const std::string &name, std::function< void()> &&f) |
| Defer a callback to the next loop() call. More...
|
|
void | defer (std::function< void()> &&f) |
| Defer a callback to the next loop() call. More...
|
|
bool | cancel_defer (const std::string &name) |
| Cancel a defer callback using the specified name, name must not be empty. More...
|
|
Definition at line 20 of file xpt2046.h.
void esphome::xpt2046::XPT2046Component::update |
( |
| ) |
|
|
overridevirtual |
Read and process the values from the hardware.
Read the raw x, y and touch pressure values from the chip, detect the touch, and if touched, transform to the user x and y coordinates. If the state has changed or if the value should be reported again due to the report interval, run the action and inform the virtual buttons.
Implements esphome::PollingComponent.
Definition at line 36 of file xpt2046.cpp.