RKTK API Docs RKTK Home Repo

rktk/
lib.rs

1//! # rktk
2//! ## Overview
3//! `rktk` is a framework to build keyboard firmware. Using rktk, you can easily make feature-rich
4//! highly customizable keyboard firmware.
5//!
6//! ## `rktk` crate
7//!
8//! This `rktk` crate is the main crate of the project. It contains the main logic of the
9//! keyboard firmware and does not depend on any specific hardware.
10//!
11//! This crate consists of the following modules:
12//! - [`task`]: The main task that runs the keyboard firmware.
13//! - [`drivers`]: Drivers that are used by the task.
14//! - [`hooks`]: Hooks that can be used to customize the behavior of the application.
15//! - [`config`]: Configuration of the keyboard.
16//!
17//! Basically, by passing [`drivers::Drivers`], [`hooks::Hooks`] and [`config::keymap::Keymap`] to [`task::start`], you can start the keyboard firmware.
18//!
19//! ## Feature flags
20#![doc = document_features::document_features!()]
21//!
22//! ### `alloc` feature
23//! Embassy has the limitation that tasks with generics cannot be spawned.
24//! For this reason, rktk, which makes heavy use of generics, uses the `join` method of embassy-sync to execute all tasks instead of spawning them.
25//! However, this may be inferior to using spawning in terms of performance and power consumption.
26//!
27//! So if we enable `alloc` feature and provide an allocator, we can remove this limitation by spawning tasks in the heap.
28//!
29//! ## Note about statically configured value
30//! You may see hard-coded values is used in some places (ex: [`config::keymap::Keymap`]).
31//! These types are actually not hardcoded, but are configurable using json file.
32//! Just a random value is provided because it is required to generate docs.
33//!
34//! For more detail, see [`config`].
35//!
36#![no_std]
37
38#[cfg(feature = "alloc")]
39extern crate alloc;
40
41pub mod config;
42pub mod dongle_task;
43pub mod drivers;
44pub mod hooks;
45pub mod task;
46pub mod utils;
47
48#[doc(hidden)]
49pub mod reexports {
50    pub use heapless;
51    pub use static_cell;
52}