tca8418
Platform-agnostic Rust driver for the Texas Instruments TCA8418 I²C keypad scan IC, built on embedded-hal traits.
The TCA8418 supports up to 80 keys (8 rows × 10 columns), with a 10-event FIFO, configurable GPIO pins, hardware debounce, and interrupt output. It operates from 1.65V to 3.6V and communicates over I²C at up to 1 MHz.
Features
no_stdcompatible — works on any microcontroller- Keypad matrix configuration with flexible row/column selection
- 10-event FIFO with iterator-based draining
- GPIO input/output on unused pins
- Interrupt status reading and clearing
- Keypad lock/unlock with configurable timers
- Pull-up resistor and debounce control per pin
Quick Start
This is a simple example using active polling. See the docs for more examples.
use ;
// Create the driver
let mut keypad = new;
// Configure rows 0–6 and columns 0–8 as the keypad matrix
let pins = rows | cols;
keypad.configure_keypad.unwrap;
// Poll for events
loop