Conversation
Deploying rmk-rs with
|
| Latest commit: |
5b91e47
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5cd11ce0.rmk-4a2.pages.dev |
| Branch Preview URL: | https://feat-rynk.rmk-4a2.pages.dev |
Size Report
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d170130ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d257c8b to
c56fde3
Compare
Replace the placeholder rmk protocol module with the Rynk wire format: command, endpoint, and topic tables, error and message types, layout and system payloads, plus wire snapshots. Add tsify-based TypeScript type generation for host reuse.
…[keymap.layer]] Separate the physical key map from the keymap: drop the legacy matrix_map/keymap path and its codegen, and add the macro codegen for the new schema.
… handler Route USB and BLE host access through one handler and replace the vial_lock feature with host_lock.
Includes the lock gate, device-info and layout-blob endpoints, and keymap bulk transfer across layer boundaries.
Generates the TypeScript type bindings consumed by the web demo.
… examples Add rp2040_rynk and qemu-riscv-rynk, adapt example sources, and regenerate Cargo.lock files.
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Store each tap-hold's timing profile as a u8 index into a small, deduplicated `taphold_profiles` table rather than an inline 4-byte `MorseProfile`. `KeyAction::TapHold` shrinks from 12 to 7 bytes, which also drops the u32's 4-byte alignment padding across every KeyAction-sized RAM buffer (keymap array, held-key buffer, combos, forks, morse cache). Measured on the nrf52840 example at a 5x14x5 (350-key) board: .bss -2408 bytes, .text -4 bytes (no flash cost). Savings scale with board size; the table cost (CAP*4, default CAP=16 -> 64 B) is fixed. - keyboard.toml: named profiles are interned automatically by the proc-macro; users keep referencing them by name. - pure-Rust: default macros (th!/mt!/lt!/tt!) are unchanged; the custom-profile macros (thp!/mtp!/ltp!/ttp!) now take a table index and the user populates `behavior.morse.taphold_profiles`. - Table capacity is configurable via `[rmk] taphold_profile_max_num`. - Vial wire format is unchanged (profile isn't carried); the stored KeyAction encoding changes but auto-migrates via the build-hash guard. Regenerated the rmk_protocol keymap endpoint snapshots (KeyAction schema change propagates to keymap/combo/encoder/fork endpoints).
* refactor: redesign core rynk traits, achieve full-duplex communication Signed-off-by: Haobo Gu <haobogu@outlook.com> * refactor: update rynk crates to use the new contract Signed-off-by: Haobo Gu <haobogu@outlook.com> * chore(rynk): trim comments * refactor(rynk): third simplification pass - rynk-wasm: drop the label round-trip (JS already owns the picker name) and the WebDevice wrapper — JsByteLink is a local wasm-bindgen type, so it implements RynkDevice directly; device.rs deleted - qemu_behavior: drop six request_raw calls duplicating the typed calls right above them (request delegates to request_raw, same code path) - driver/tests: drop three tests subsumed by supersets (cmd mismatch, topic-during-request, cancelled-request recovery) - rynk-serial: declare the tokio feature actually used (io-util, not time) Signed-off-by: Haobo Gu <haobogu@outlook.com> --------- Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Rebasing onto origin/main linearized away the merge commit 9b8d64c, which carried hand-made changes not present in either parent: the nrf54lm20_ble example tweaks, the rynk_loopback fixture downsize, and the rynk/Cargo.lock removal. Restore them to match the pre-rebase tree.
Signed-off-by: Haobo Gu <haobogu@outlook.com>
|
I tested the Rynk USB path from this PR at CDC OUT worked: the firmware received and decoded requests. CDC IN did not complete on the host, even though the firmware's write future returned successfully. I tried asserting DTR, starting the host read before sending, direct libusb access, 64-byte packets, and changing interface/endpoint order and numbers; none changed the result. Using Rynk's existing 32-byte HID framing on the same build worked reliably. I could read all eight 6×14 keymap layers, and the split central and peripheral both remained connected. This may be specific to the nRF52840/Embassy CDC path rather than Rynk itself, so I don't think the PR should simply replace CDC everywhere. Would a selectable USB HID transport be useful here? I have the firmware and native Linux host changes working and can extract a small patch if that direction makes sense. |
I think it might be a linux specific descriptor bug. |
- features/rynk.md: drop the non-existent `bulk` Cargo feature (the `features = ["bulk"]` snippet failed to compile); bulk is always on with `rynk`, sized by `rynk_buffer_size`. Note the tool-author example needs `embassy-futures`. - migration/v08_v09.md: fix the fabricated `bulk_transfer` -> `bulk` rename (removed, folded into `rynk`); document the `KeyAction::TapHold` u8-index break, the removed `[rmk].protocol_max_bulk_size` key, and the new unknown-key strictness. - configuration/layout.md: remove the `PDF(n)` action (unsupported in keyboard.toml — the keymap grammar has no rule for it), document the `Trns` transparent form, and split two examples that shared one toml fence. - rmk/CHANGELOG.md: add the Rynk feature entry and the BREAKING `keyboard.toml` layout-schema change.
A USB bulk-IN transfer completes on the host only once it sees a packet shorter than the max packet size. A device-to-host frame whose length is a multiple of that size (64 at Full-Speed) ends on a full packet, so the host read stays pending. Wrap the CDC Sender in a small Write adapter that appends a zero-length packet after such a frame. Scoped to the USB transport; run_session, UART, and BLE are untouched. This is an independent robustness fix, not the root cause of the nRF52840 "CDC IN never completes" report — there even the short handshake response and raw libusb hung, which a ZLP cannot explain. Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
run_session now mutes topics until the client requests GetCapabilities (b0c4ec7), so the topic loopback tests hung waiting for frames that were drained. Handshake first, as every real host does at connect. Signed-off-by: Haobo Gu <haobogu@outlook.com> Claude-Session: https://claude.ai/code/session_015SYk627CMYYUUoctAryhzP
Signed-off-by: Haobo Gu <haobogu@outlook.com>
Signed-off-by: Haobo Gu <haobogu@outlook.com>
successor of #848, cleaned the commit history