Files
seedbox/firmware/drivers/inputs.h
Gee 2196633ed5
Some checks failed
check / check (push) Has been cancelled
Seedbox v0.1 + firmware, generic kit/synth, ROOT/SCALE pages
First commit of the repo. Contents beyond the v0.1 simulator and layout:

- Full Pico 2 W firmware (firmware/app, drivers, engine port, host test).
- BANK page and 404 mode A/B removed; learned pads play exactly what was learned.
- 404/MiniFreak renamed to KIT/SYNTH throughout (jacks, code, sim, docs,
  layout labels; wiring rebuilt).
- ROLL returns to page select after a re-roll; a freshly learned track turns on.
- LCD contrast 66.
- ROOT and SCALE pages: 21 scales, AUTO = the seed picks; global and sticky.

Intended music change: the scale table grew from 8 to 21 and AUTO picks from
all of them, so every seed's scale changed. Vectors regenerated with
npm run vectors, plus new key-override cases. Flash record is now version 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:39:36 +03:00

18 lines
702 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 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 <stdint.h>
/* 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