[−][src]Module app::touch_sensor
Structs
TouchEventInfo | Touch Event Info for multiple touches. Based on https://github.com/lupyuen/hynitron_i2c_cst0xxse/blob/master/cst0xx_core.h#L104-L115 |
TouchInfo | Touch Info for a single touch. Based on https://github.com/lupyuen/hynitron_i2c_cst0xxse/blob/master/cst0xx_core.h#L104-L115 |
Constants
CFG_MAX_TOUCH_POINTS | Max touch points for the touch controller |
FT_TOUCH_POINT_NUM | |
HYN_MAX_ID | |
HYN_MAX_POINTS | Max touch channels for the touch controller |
HYN_TOUCH_EVENT_POS | |
HYN_TOUCH_ID_POS | |
HYN_TOUCH_MISC | |
HYN_TOUCH_STEP | |
HYN_TOUCH_XY_POS | |
HYN_TOUCH_X_H_POS | |
HYN_TOUCH_X_L_POS | |
HYN_TOUCH_Y_H_POS | |
HYN_TOUCH_Y_L_POS | |
POINT_READ_BUF | |
TOUCH_CONTROLLER_ADDRESS | Touch Controller I2C Address: https://github.com/lupyuen/hynitron_i2c_cst0xxse |
TOUCH_INTERRUPT_PIN | Interrupt Pin for touch controller. We listen for the touch controller interrupt and trigger an event. |
TOUCH_RESET_PIN | Reset Pin for touch controller. Note: NFC antenna pins must be reassigned as GPIO pins for this to work. |
Statics
BUF | Buffer for raw touch data |
I2C_DATA | I2C packet to be sent |
I2C_BUFFER | Buffer containing I2C read/write data |
TOUCH_DATA | Touch data will be populated here |
TOUCH_DELAY | |
TOUCH_EVENT | Event that will be forwarded to the Event Queue when a touch interrupt is triggered |
TOUCH_RESET | Reset GPIO Pin |
Functions
probe | Probe the I2C bus to discover I2C devices |
read_register | Read the I2C register for the specified I2C address (7-bit address) |
read_register_range | Read a range of I2C registers from the I2C address |
read_touchdata | Read touch controller data. This only works when the screen has been tapped and the touch controller wakes up. Ported from https://github.com/lupyuen/hynitron_i2c_cst0xxse/blob/master/cst0xx_core.c#L407-L466 |
start_touch_sensor | Initialise the touch controller. NFC antenna pins must already be reassigned as GPIO pins:
Set |
test | Test reading some registers for I2C devices |
touch_event_callback | Callback for the touch event that is triggered when a touch is detected |
touch_interrupt_handler | Interrupt handler for the touch controller, triggered when a touch is detected |
Type Definitions
MynewtDelay | |
MynewtGPIO |