Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 880 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 880 Bytes

FT6336 driver

This is a simple driver to be used on a M5Stack Core2 rust project.

Notes

The touch panel used by M5Stack Core2 cannot detect 2 simultaneous touches on the same horizonal line due to a hardware limitation.

Usage

let mut touch_panel = Ft6336::new(SharedI2cBus::new(mutex_i2c_bus));

// the init call ensures the panel in working mode(rather than enginnering mode)
touch_panel.init().unwrap();
// adjust interrupt mode
touch_panel.interrupt_by_pulse().unwrap();

// print current active points
for event in touch_panel.touch_points_iter().unwrap() {
    log::info!(event);
}