The inverters in the upper left are a square wave oscillator (around 100 kHz), used to sense capacitive connectivity between X wires and Y wires. The comparators are TLV3404. Inputs A,B,C,D,E,F and outputs G,H,I are connected to an Adafruit Grand Central M4 controller board. Inputs D,E,F select one of eight options in the 4051 analog multiplexer, just prior to the 3-bit flash ADC that generates G,H,I.
Show me Rust code that would run on the Grand Central board to perform a keyboard scan.
I'll help you create Rust code for scanning this capacitive keyboard matrix. From the schematic, we're dealing with: