1#![doc = include_str!("../README.md")]
2#![cfg_attr(target_os = "none", no_std)]
13#![cfg_attr(target_os = "none", no_main)]
14#![cfg_attr(docsrs, feature(doc_cfg))]
15#![allow(async_fn_in_trait, reason = "single-threaded embedded")]
16
17#[cfg(all(target_os = "none", not(any(feature = "pico1", feature = "pico2"))))]
19compile_error!("Must enable exactly one board feature: 'pico1' or 'pico2'");
20
21#[cfg(all(target_os = "none", feature = "pico1", feature = "pico2"))]
22compile_error!("Cannot enable both 'pico1' and 'pico2' features simultaneously");
23
24#[cfg(all(target_os = "none", not(any(feature = "arm", feature = "riscv"))))]
26compile_error!("Must enable exactly one architecture feature: 'arm' or 'riscv'");
27
28#[cfg(all(target_os = "none", feature = "arm", feature = "riscv"))]
29compile_error!("Cannot enable both 'arm' and 'riscv' features simultaneously");
30
31#[cfg(all(target_os = "none", feature = "pico1", feature = "riscv"))]
33compile_error!("Pico 1 (RP2040) only supports ARM architecture, not RISC-V");
34
35#[cfg(target_os = "none")]
37#[doc(hidden)]
38pub mod pio_irqs;
39#[cfg(any(target_os = "none", all(test, feature = "host")))]
41pub mod audio_player;
42#[cfg(target_os = "none")]
43pub mod button;
44#[cfg(all(feature = "wifi", target_os = "none"))]
45pub mod clock_sync;
46mod error;
47#[cfg(target_os = "none")]
48pub mod flash_block;
49#[cfg(target_os = "none")]
50pub mod ir;
51#[cfg(target_os = "none")]
52pub mod lcd_text;
53#[cfg(target_os = "none")]
54pub mod led;
55pub mod led2d;
56#[cfg(target_os = "none")]
57pub mod led4;
58pub mod led_strip;
59#[cfg(target_os = "none")]
60pub mod rfid;
61#[cfg(target_os = "none")]
62pub mod servo;
63#[cfg(target_os = "none")]
64mod servo_player;
65#[cfg(all(feature = "wifi", target_os = "none"))]
66pub mod wifi_auto;
67
68#[cfg(doc)]
69pub mod docs {
70 #[doc = include_str!("docs/development_guide.md")]
72 pub mod development_guide {}
73}
74
75pub use crate::error::{Error, Result};
77pub use device_envoy_core::tone;
78#[doc(hidden)]
80pub use paste::paste as __paste;
81
82#[doc(hidden)]
84#[macro_export]
85macro_rules! __validate_keyword_fields_expr {
86 (
87 macro_name: $macro_name:literal,
88 allowed_macro: $allowed_macro:path,
89 fields: [ $( $field:ident : $value:expr ),* $(,)? ]
90 ) => {
91 const _: () = {
92 $( $allowed_macro!($field, $macro_name); )*
93 #[allow(non_snake_case)]
94 mod __device_envoy_keyword_fields_uniqueness {
95 $( pub(super) mod $field {} )*
96 }
97 };
98 };
99
100 (
101 macro_name: $macro_name:literal,
102 allowed_macro: $allowed_macro:path,
103 fields: [ $($fields:tt)* ]
104 ) => {
105 compile_error!(concat!($macro_name, " fields must use `name: value` syntax"));
106 };
107}