[workspace]
members = ["xtask"]
default-members = ["."]
[package]
edition = "2024"
name = "device-kit"
version = "0.0.1-alpha"
authors = ["Carl M. Kadie"]
description = "Experimental composable, async device abstractions for Raspberry Pi Pico using Embassy (use from GitHub for latest features)"
repository = "https://github.com/CarlKCarlK/device-kit"
license = "MIT OR Apache-2.0"
keywords = ["embedded", "pico", "embassy", "async", "no-std"]
categories = ["embedded", "no-std", "hardware-support"]
readme = "README.md"
[lib]
name = "device_kit"
path = "src/lib.rs"
[[bin]]
name = "led12x4"
path = "tests-compile-only/led12x4.rs"
required-features = ["pico1"]
[[bin]]
name = "led2d_custom_mapping"
path = "tests-compile-only/led2d_custom_mapping.rs"
required-features = ["pico1"]
[[bin]]
name = "led2d_multiple"
path = "tests-compile-only/led2d_multiple.rs"
required-features = ["pico1"]
[features]
default = ["defmt", "pico1", "arm"]
defmt = []
pico1 = ["dep:embassy-rp"]
pico2 = ["dep:embassy-rp", "dep:rp235x-hal"]
arm = [
"dep:cortex-m",
"dep:cortex-m-rt",
"embassy-executor/arch-cortex-m",
"dep:embassy-hal-internal",
"embassy-hal-internal/cortex-m",
"embassy-hal-internal/prio-bits-2",
"critical-section/restore-state-u8",
]
riscv = [
"dep:riscv",
"dep:riscv-rt",
"embassy-executor/arch-riscv32",
"dep:embassy-hal-internal",
"critical-section/restore-state-bool",
]
host = ["dep:png", "dep:tempfile"]
display-trace = []
[dependencies]
defmt = "0.3.10"
defmt-rtt = "1.1.0"
panic-probe = { version = "1.0.0", features = ["print-defmt"] }
cortex-m-rt = { version = "0.7.5", optional = true }
cortex-m = { version = "0.7.7", optional = true }
riscv-rt = { version = "0.12", optional = true }
riscv = { version = "0.11", features = [
"critical-section-single-hart",
], optional = true }
embassy-executor = { version = "0.9", default-features = false, features = [
"executor-thread",
"defmt",
] }
embassy-sync = { version = "0.6" }
embassy-rp = { version = "0.2", default-features = false, features = [
"rt",
"defmt",
"time-driver",
"critical-section-impl",
], optional = true }
embassy-futures = { version = "0.1" }
embassy-time = { version = "0.3", features = [
"defmt",
] }
derive_more = { version = "2.0.1", default-features = false, features = [
"debug",
"display",
"error",
"from",
] }
heapless = { version = "0.8.0", features = ["serde"] }
time = { version = "0.3", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }
postcard = { version = "1.0", default-features = false }
rp235x-hal = { version = "0.3", package = "rp235x-hal", features = [
"rt",
], optional = true }
smart-leds = "0.4.0"
itertools = { version = "0.13.0", default-features = false }
crc32fast = { version = "1.4.0", default-features = false }
critical-section = { version = "1.2.0", default-features = false }
embedded-hal = "1.0.0"
embedded-hal-async = "1.0.0"
embedded-io-async = "0.6.1"
embedded-hal-bus = { version = "0.3.0", features = [
"async",
"portable-atomic",
] }
portable-atomic = { version = "1.11.1", features = ["critical-section"] }
hd44780-driver = "0.4.0"
esp-hal-mfrc522 = "0.3.2"
fixed = "1.28.0"
static_cell = "2.1.0"
embassy-hal-internal = { version = "0.2", default-features = false, optional = true }
paste = "1.0"
embedded-graphics = { version = "0.8", default-features = false }
png = { version = "0.17", optional = true }
tempfile = { version = "3.13", optional = true }
[[test]]
name = "led2d_text_render"
path = "tests/led2d_text_render.rs"
required-features = ["host"]
[lints.rust]
bare_trait_objects = "forbid"
rust_2018_idioms = { level = "warn", priority = -2 }
unfulfilled_lint_expectations = "warn"
unknown_lints = "warn"
unsafe_code = "deny"
unused_variables = "warn"
unexpected_cfgs = "warn"
[lints.clippy]
arithmetic_side_effects = "deny"
float_cmp_const = "deny"
indexing_slicing = "deny"
pedantic = { level = "deny", priority = -2 }
semicolon_if_nothing_returned = "warn"
semicolon_inside_block = "warn"
str_to_string = "warn"
unwrap_used = "deny"
unused_result = "deny"
wildcard_imports = "deny"
all = { level = "warn", priority = -2 }
nursery = { level = "warn", priority = -2 }
allow_attributes = "warn"
allow_attributes_without_reason = "deny"
enum_glob_use = "forbid"
enum_variant_names = "warn"
equatable_if_let = "warn"
error_impl_error = "allow"
implicit_return = "allow"
integer_division_remainder_used = "warn"
items-after-statements = "warn"
iter_nth_zero = "warn"
match_bool = "warn"
match-same-arms = "warn"
min_ident_chars = "warn"
missing_docs_in_private_items = { level = "allow", priority = -1 }
missing_errors_doc = "warn"
missing_trait_methods = "warn"
module_name_repetitions = "warn"
multiple_crate_versions = "allow"
obfuscated_if_else = "warn"
pub_use = "allow"
pub_with_shorthand = "warn"
question_mark_used = "allow"
self_named_module_files = "warn"
semicolon_outside_block = "warn"
separated_literal_suffix = "warn"
shadow_reuse = "warn"
shadow_unrelated = "warn"
similar_names = "warn"
single_call_fn = "allow"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
too_long_first_doc_paragraph = "warn"
unnecessary_wraps = "warn"
unreachable = "warn"
must_use_candidate = "warn"
unused_must_use = "warn"
[profile.dev]
panic = "abort"
[profile.release]
debug = 2
panic = "abort"