{"id":51263957,"url":"https://github.com/maxaudron/woodox","last_synced_at":"2026-06-29T14:02:18.558Z","repository":{"id":360174861,"uuid":"1175178837","full_name":"maxaudron/woodox","owner":"maxaudron","description":"hall effect split keyboard based on the redox layout with custom firmware","archived":false,"fork":false,"pushed_at":"2026-06-17T16:53:05.000Z","size":34996,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T18:25:28.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxaudron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T10:45:04.000Z","updated_at":"2026-06-17T16:53:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/maxaudron/woodox","commit_stats":null,"previous_names":["maxaudron/woodox"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maxaudron/woodox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxaudron%2Fwoodox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxaudron%2Fwoodox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxaudron%2Fwoodox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxaudron%2Fwoodox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxaudron","download_url":"https://codeload.github.com/maxaudron/woodox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxaudron%2Fwoodox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34929703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-29T14:02:15.819Z","updated_at":"2026-06-29T14:02:18.549Z","avatar_url":"https://github.com/maxaudron.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Woodox Firmware\n\nEmbedded Rust firmware for an analog hall-effect keyboard, targeting the RP2040 (Cortex-M0+). Runs bare-metal with `no_std`.\n\n## Architecture\n\nThe firmware runs on both RP2040 cores simultaneously. Core 1 continuously scans hall-effect switches through analog multiplexers and ADC. Core 0 runs the USB HID stack and sends keyboard reports to the host at 1ms intervals. Switch state is shared between cores via static global memory, avoiding lock overhead.\n\n## Workspace\n\nThe project is split into two crates:\n\n### `board`\n\nHardware-specific code that directly interfaces with RP2040 peripherals.\n\n- **`main.rs`** -- Entry point. Initializes clocks, GPIO pins, ADC, multiplexers, and the USB bus. Spawns the scan loop on core 1 and the USB loop on core 0.\n- **`scan.rs`** -- Scan loop running on core 1. Iterates through all multiplexer channels, reads ADC values for each switch, and updates switch state.\n- **`usb.rs`** -- USB loop running on core 0. Reads the global keyboard state every 1ms and sends NKRO HID reports to the host.\n- **`hardware/mux.rs`** -- Driver for the CD74HC4067 16-channel analog multiplexer. Selects channels by setting four GPIO pins to the binary representation of the channel number.\n- **`hardware/adc.rs`** -- Trait and implementation for reading raw values from the RP2040 ADC. Supports reading a single channel or all multiplexer inputs in sequence.\n- **`dma.rs`** -- Work-in-progress DMA configuration for ADC transfers. Not currently used in the main loop.\n- **`led/mod.rs`** -- Commented-out WS2812 LED driver using PIO. Not currently active.\n\n### `library` (`woodox-lib`)\n\nPlatform-independent logic. Can be tested on the host machine.\n\n- **`matrix/switch.rs`** -- Core switch logic. Each switch tracks its position, press/release state, and hold timing. Supports configurable actuation and release points. Implements rapid trigger, which dynamically fires press/release events based on relative travel distance rather than fixed thresholds.\n- **`matrix/hall.rs`** -- Lookup table that converts raw 8-bit ADC values to physical travel distance in 0.1mm increments, based on the hall-effect sensor response curve.\n- **`matrix/keys.rs`** -- Global keymap and keyboard state. Defines key types: regular keycodes, layer switching, layer-tap (layer on hold / keycode on tap), key-tap (keycode on hold / different keycode on tap), and grave-escape. Resolves key actions by walking down the layer stack.\n- **`matrix/mod.rs`** -- Scan and ScanOrder structs that map physical switch positions (mux ID + channel) to their logical index in the keymap.\n- **`layout/mod.rs`** -- Macros (`switches!`, `keymap!`, `layer!`, `key!`) for declaratively defining keyboard layouts at compile time.\n- **`layout/macropad.rs`** -- Default layout for an 8-key macropad with 1 multiplexer. Defines the physical switch wiring and a two-layer keymap.\n\n## Hardware\n\n- **MCU**: RP2040 (dual Cortex-M0+ at 125 MHz, 12 MHz external crystal)\n- **Switches**: Analog hall-effect sensors read via ADC\n- **Multiplexers**: CD74HC4067 (16-channel analog mux), selecting switches for ADC reading\n- **USB**: Native RP2040 USB with NKRO keyboard HID\n- **LEDs**: WS2812 via PIO (currently disabled)\n\n## Features\n\n- `macropad` (default) -- Builds with the 8-key macropad layout.\n- `timers` -- Enables microsecond-precision scan loop timing via the hardware timer.\n\n## Building\n\nRequires the `thumbv6m-none-eabi` target:\n\n```sh\nrustup target add thumbv6m-none-eabi\ncargo build --release -p woodox\n```\n\n## Flashing\n\nUses `probe-run` via cargo runner, or `cargo-embed` with the provided `Embed.toml`:\n\n```sh\ncargo embed --release -p woodox\n```\n\nDebugger protocol is SWD at 20 MHz. RTT logging is enabled with `defmt` output.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxaudron%2Fwoodox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxaudron%2Fwoodox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxaudron%2Fwoodox/lists"}