Hynitron CST820 Touch Controller Driver
A platform-agnostic driver to interface with the Hynitron CST820 touch controller.
Built on embedded-hal 1.0 and the cst820-registers map. Enable the async
feature for a driver on embedded-hal-async.
use ;
reset?;
let mut touch = new;
assert!;
// Wait for the INT pin to go low, then:
let t = touch.read_touch?;
if t.pressed
Implemented so far
- Touch readout (coordinates, finger count, event, gesture) in a single burst read
- Chip identification
- Interrupt, auto-sleep and deep sleep configuration
- Hardware reset with datasheet timing
- Direct access to registers via
cst820-registersstructs andhardware-registerstraits
The chip enters standby after 2 s without touch and then does not acknowledge on the bus.
Disable auto-sleep via set_auto_sleep(None) right after reset if you need to poll.
License
Copyright © 2026 Markus Mayer
Triple licensed under your choice of either of:
- European Union Public Licence, Version 1.2, (LICENSE-EUPL or https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12)
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)