picofuse

Data Structures | Typedefs | Enumerations
stmpe610.h File Reference

STMicroelectronics STMPE610 resistive touch controller interface. More...

#include <picofuse/hw.h>
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for stmpe610.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dev_stmpe610_config_t
 Optional STMPE610 initialization options. More...
 
struct  dev_stmpe610_touch_t
 The single touch contact reported to a dev_stmpe610_callback_t - unlike a capacitive controller, STMPE610 is resistive and only ever reports one point at a time. More...
 

Typedefs

typedef struct dev_stmpe610_t dev_stmpe610_t
 Opaque STMPE610 handle.
 
typedef void(* dev_stmpe610_callback_t) (dev_stmpe610_t *stmpe610, const dev_stmpe610_touch_t *touch, void *userdata)
 Touch event callback invoked from dev_stmpe610_poll(). More...
 

Enumerations

enum  dev_stmpe610_touch_event_t { dev_stmpe610_touch_up = 0, dev_stmpe610_touch_down = 1, dev_stmpe610_touch_move = 2 }
 Touch contact state reported to a dev_stmpe610_callback_t. More...
 

Functions

Lifecycle
void dev_stmpe610_default_config (dev_stmpe610_config_t *config)
 Fill an STMPE610 config struct with safe defaults. More...
 
dev_stmpe610_tdev_stmpe610_init (hw_deviceio_t *device, hw_gpio_t *int_pin, dev_stmpe610_callback_t callback, void *userdata, const dev_stmpe610_config_t *config)
 Initialize an STMPE610 resistive touch controller over SPI. More...
 
void dev_stmpe610_deinit (dev_stmpe610_t *stmpe610)
 Deinitialize an STMPE610 controller. More...
 
Properties
bool dev_stmpe610_irq_active (const dev_stmpe610_t *stmpe610)
 Report whether the STMPE610 interrupt line is currently asserted. More...
 
Methods
void dev_stmpe610_poll (dev_stmpe610_t *stmpe610)
 Poll the controller, invoking the callback if the touch state changed. More...
 

Detailed Description

STMicroelectronics STMPE610 resistive touch controller interface.

Definition in file stmpe610.h.