gokul/macro-six-usbc
A six-key macro keyboard PCB paired with a separate physical enclosure.
- Version
- 0.1.16
- License
- unset
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone gokul/macro-six-usbc # download the package files into ./macro-six-usbc
tsci add gokul/macro-six-usbc # add it to your project as @tsci/gokul.macro-six-usbcIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
firmware/inputs.h
#pragma once
#include <stdint.h>
#define DEBOUNCE_MS 5
// EC11E18244AU: 18 quadrature pulses / 36 detents = 2 transitions per detent.
#define ENCODER_TRANSITIONS_PER_DETENT 2
typedef struct {
uint8_t stable, candidate, count[7], previous_ab;
int8_t quarter_steps, volume_steps;
uint8_t mute_presses;
} Inputs;
void inputs_init(Inputs *inputs, uint8_t ab);
void inputs_tick(Inputs *inputs, uint8_t pressed, uint8_t ab);