Expand description
§GT9x Touch Screen Controller Driver
This crate provides a no_std
driver for the GT9x series of capacitive touch screen controllers.
It supports both asynchronous and blocking I2C communication.
§Supported Chips
- GT911 (5 points)
- GT928 (10 points)
- GT9147 (5 points)
§Features
async
: Enables the asynchronous driver based onembedded-hal-async
. This is a default feature.blocking
: Enables the blocking driver based onembedded-hal
.defmt
: Enables logging withdefmt
.
§Usage
§Asynchronous Driver
use gt9x::{Gt911, Gt9x};
// let i2c: I2c = ...;
// let mut int_pin: Wait = ...;
// let mut buf = [0u8; 64];
// Without interrupt pin
// let mut gt9x = Gt9x::<Gt911, _, _, _>::new(i2c, &mut buf);
// With interrupt pin
// let mut gt9x_int = Gt9x::<Gt911, _, _, _>::new_int(i2c, &mut buf, int_pin);
§Blocking Driver
use gt9x::{Gt911, Gt9xBlocking};
// let i2c: I2c = ...;
// let mut buf = [0u8; 64];
// let mut gt9x = Gt9xBlocking::<Gt911, _>::new(i2c, &mut buf);
Re-exports§
pub use asynchronous::CacheMaintenance;
pub use asynchronous::Gt9x;
pub use asynchronous::IntPin;
pub use asynchronous::NoIntPin;
Modules§
- asynchronous
- Asynchronous driver implementation
Structs§
- Gt911
- GT911 chip (5 touch points)
- Gt928
- GT928 chip (10 touch points)
- Gt9147
- GT9147 chip (5 touch points)
- Point
- Represents a single touch point.
Traits§
- Chip
- A trait that defines the properties of a GT9x chip.