gt9x 0.1.0

A no_std driver for the GT9x series of capacitive touch screen controllers, supporting both async and blocking interfaces.
Documentation
//! # 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 on `embedded-hal-async`. This is a default feature.
//! - `blocking`: Enables the blocking driver based on `embedded-hal`.
//! - `defmt`: Enables logging with `defmt`.
//!
//! ## Usage
//!
//! ### Asynchronous Driver
//!
//! ```no_run
//! use gt9x::{Gt911, Gt9x};
//! # use embedded_hal_async::i2c::I2c;
//! # use embedded_hal_async::digital::Wait;
//!
//! // 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
//!
//! ```no_run
//! use gt9x::{Gt911, Gt9xBlocking};
//! # use embedded_hal::i2c::I2c;
//!
//! // let i2c: I2c = ...;
//! // let mut buf = [0u8; 64];
//!
//! // let mut gt9x = Gt9xBlocking::<Gt911, _>::new(i2c, &mut buf);
//! ```
#![no_std]
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

/// Asynchronous driver implementation
#[cfg(feature = "async")]
pub mod asynchronous;
/// Blocking driver implementation
#[cfg(feature = "blocking")]
pub mod blocking;
mod chip;
mod reg;

pub use chip::*;

#[cfg(feature = "async")]
pub use asynchronous::{CacheMaintenance, Gt9x, IntPin, NoIntPin};

#[cfg(feature = "blocking")]
pub use blocking::Gt9x as Gt9xBlocking;