From v0.9 to v0.10

Use this guide to update an existing RMK v0.9 firmware project. For new projects, follow the current processor guide.

Processors

Update registration first, then choose whether to keep your existing run loop.

Remove registration mode arguments

In each keyboard.toml keyboard module, replace #[register_processor(event)] or #[register_processor(poll)] with the bare attribute:

- #[register_processor(event)]
+ #[register_processor]

Registration now starts the type's Runnable implementation. Check the type's #[processor] options to preserve the behavior you want:

Previous setupWhat to keep or change
(poll) with a polling processorKeep poll_interval and poll().
(event) with an event-only processorKeep subscribe without timer options.
(event) used to bypass the type's polling loopRemove poll_interval to keep event-only behavior.
A type with a custom RunnableKeep that implementation and its #[runnable_generated] marker; registration now starts your loop.

Rust API projects that already use run_all! do not need a registration change.

Use the generated deadline loop

Existing DeadlineProcessor::deadline() and on_deadline() methods keep their names. If you want RMK to generate the run loop for an existing deadline processor:

  1. Add deadline to its #[processor] attribute.
  2. Keep deadline() and on_deadline() in impl DeadlineProcessor.
  3. Remove the old impl Runnable and #[runnable_generated] marker.

Keep the marker and impl Runnable if your custom loop is still needed. The inactivity example shows a complete processor with the generated loop.