| Crates.io | embedded-touch |
| lib.rs | embedded-touch |
| version | 0.3.0 |
| created_at | 2025-08-17 17:25:20.677278+00 |
| updated_at | 2025-09-14 18:42:03.800234+00 |
| description | Provides common interfaces for touchscreen devices |
| homepage | |
| repository | https://github.com/riley-williams/embedded-touch |
| max_upload_size | |
| id | 1799591 |
| size | 30,004 |
The primary goal of this crate is to provide a common interface for UI libraries like
buoyant to interact with touchscreen input device
drivers (e.g. FT6113).
Implement the TouchInputDevice trait for blocking operation:
use embedded_touch::{TouchInputDevice, Touch, Error};
struct MyTouchDriver { /* ... */ }
impl TouchInputDevice for MyTouchDriver {
type Error = MyError;
fn touches(&mut self) -> Result<impl IntoIterator<Item = Touch>, Error<Self::Error>> {
// Read touch data from hardware
}
}
Or implement AsyncTouchInputDevice for event-driven operation:
use embedded_touch::{AsyncTouchInputDevice, Touch, Error};
impl AsyncTouchInputDevice for MyTouchDriver {
type Error = MyError;
async fn touches(&mut self) -> Result<impl IntoIterator<Item = Touch>, Error<Self::Error>> {
// Asynchronously wait for touch events
}
}
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.