FrameworkComputer / inputmodule-rs

Framework Laptop 16 Input Module SW/FW
MIT License
223 stars 24 forks source link

Detect DVT1 vs DVT2 ledmatrix by checking led layout #77

Open JohnAZoidberg opened 11 months ago

JohnAZoidberg commented 11 months ago

LED controller has short circuit detection which we should be able to use. Then we can combine into a single firmware.

JohnAZoidberg commented 11 months ago

See: https://github.com/FrameworkComputer/is31fl3741-rs/pull/8

JohnAZoidberg commented 11 months ago

WIP at: https://github.com/FrameworkComputer/inputmodule-rs/tree/open-short

On the old module I expect it to output:

Open 0x03: 00, Open 0x07: 7C, Open 0x08: 00, Open 0x0C: 7C, Open 0x2B:  00, Open 0x2F:  7C
Short0x03: 00, Short0x07: 00, Short0x08: 00, Short0x0C: 00, Short0x2B:  00, Short0x2F:  00

On my intentionally broken module (x:0,y:0 no led - x:1,y:0 short) I expect:

Open 0x03: 01, Open 0x07: 7C, Open 0x08: 00, Open 0x0C: 7C, Open 0x2B:  00, Open 0x2F:  7C
Short0x03: 00, Short0x07: 02, Short0x08: 00, Short0x0C: 00, Short0x2B:  00, Short0x2F:  00

On the early matrix these are connected and the reset are open, no shorts: image Therefore the lowest two bits (CS33, CS34) on 0x07 and 0x0C should be 0, as well as the highest (reserved).