picofuse

Data Structures | Macros | Typedefs | Enumerations
ft6236.h File Reference

FocalTech FT6236 capacitive touch controller interface. More...

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

Go to the source code of this file.

Data Structures

struct  dev_ft6236_config_t
 Optional FT6236 initialization options. More...
 
struct  dev_ft6236_touch_t
 A single touch contact. More...
 

Macros

#define DEV_FT6236_I2C_ADDR_DEFAULT   0x38u
 Fixed 7-bit I2C address - FT6236 has no address-select pin, so this is the only address it ever responds at. More...
 
#define DEV_FT6236_MAX_POINTS   2u
 Maximum number of simultaneous touch contacts reported by FT6236.
 

Typedefs

typedef struct dev_ft6236_t dev_ft6236_t
 Opaque FT6236 handle.
 

Enumerations

enum  dev_ft6236_touch_event_t { dev_ft6236_touch_up = 0, dev_ft6236_touch_down = 1, dev_ft6236_touch_move = 2 }
 Touch contact state reported by dev_ft6236_poll(). More...
 

Functions

Lifecycle
void dev_ft6236_default_config (dev_ft6236_config_t *config)
 Fill an FT6236 config struct with safe defaults. More...
 
dev_ft6236_tdev_ft6236_init (hw_deviceio_t *device, hw_gpio_t *int_pin, const dev_ft6236_config_t *config)
 Initialize an FT6236-compatible touch controller over I2C. More...
 
void dev_ft6236_deinit (dev_ft6236_t *ft6236)
 Deinitialize an FT6236 controller. More...
 
Properties
bool dev_ft6236_irq_active (const dev_ft6236_t *ft6236)
 Report whether the FT6236 interrupt line is currently asserted. More...
 
Methods
bool dev_ft6236_poll (dev_ft6236_t *ft6236, dev_ft6236_touch_t touches[DEV_FT6236_MAX_POINTS], uint8_t *out_touch_count)
 Poll the controller and parse the latest touch frame. More...
 

Detailed Description

FocalTech FT6236 capacitive touch controller interface.

Definition in file ft6236.h.