/* Button matrix (rows GP2 GP3 GP5, columns GP6–GP9), SEED (GP13), RUN (GP14), encoder push (GP12). All active-low with pull-ups (RP2350 erratum E9). Call inputs_scan() about once per millisecond. */ #ifndef SEEDBOX_INPUTS_H #define SEEDBOX_INPUTS_H #include /* bit index: matrix key = row * 4 + col (row 0..2, col 0..3), then the switches */ enum { IN_MATRIX = 12, IN_SEED = 12, IN_RUN = 13, IN_PUSH = 14, IN_COUNT = 15 }; /* matrix key -> track index (engine order), -1 = no button. Same as PANEL in app.js. */ extern const int8_t INPUT_KEY_TRACK[12]; void inputs_init(void); uint32_t inputs_scan(void); /* returns the debounced state, bit set = pressed / RUN on */ #endif