Expand description
FT6336U capacitive touch controller driver (I2C 0x38).
Reads only touch point 1 (single-finger). Returns screen coordinates or None if no touch is active.
Register map (FT6336U datasheet V1.0, §4 “Register Description”): 0x02 TD_STATUS [3:0] = number of touch points (0–2) 0x03 P1_XH [7:6] = event flag (00=down, 01=up, 10=contact, 11=reserved) [3:0] = X position high nibble 0x04 P1_XL [7:0] = X position low byte 0x05 P1_YH [7:6] = (reserved) [3:0] = Y position high nibble 0x06 P1_YL [7:0] = Y position low byte
Ref: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/D-FT6336U-DataSheet-V1.020af.pdf Also: FT6x06 Application Note (Adafruit) for FT6x36 family register compatibility.
Constants§
Functions§
- read_
touch - Read first touch point. Returns
Some((x, y))if touched,Noneotherwise.