Expand description
§Hynitron CST820 touch controller driver
A platform-agnostic driver to interface with the Hynitron CST820 touch controller.
This driver was built using embedded-hal 1.0 and cst820-registers. Enable the
async feature for an equivalent driver on embedded-hal-async in the asynch module.
§Standby
The chip enters standby after registers::AutoSleepTime seconds
(default: 2) without touch, and then does not acknowledge on the bus until touched.
Read the chip after its interrupt fires, or disable auto-sleep with
Cst820::set_auto_sleep right after reset.
§Limitations
The CST820 supports two-point touch, but the register layout of the second point is undocumented. Only the first point is reported.
Re-exports§
pub use cst820_registers as registers;
Modules§
- asynch
async - Async driver on
embedded-hal-async.
Structs§
Enums§
- Gesture
- A detected gesture, as reported by
GestureId. - Touch
Event - The touch event, as reported in the upper bits of
XposH.
Constants§
- BOOT_
DELAY_ MS - How long to wait after releasing
RSTbefore talking to the chip, in milliseconds. - CST820_
CHIP_ ID - The value of the
ChipIdregister for a CST820. - DEFAULT_
DEVICE_ ADDRESS - The I²C bus address.
- RESET_
PULSE_ US - How long
RSTis held low duringreset, in microseconds.
Functions§
- reset
- Resets the chip via its active-low
RSTpin and waits until it has booted.