diff --git a/libs/bio-lib/Cargo.toml b/libs/bio-lib/Cargo.toml index 01cec53b2..4753f5764 100644 --- a/libs/bio-lib/Cargo.toml +++ b/libs/bio-lib/Cargo.toml @@ -12,3 +12,19 @@ bao1x-hal = { path = "../../libs/bao1x-hal", features = ["std"] } bao1x-api = { path = "../../libs/bao1x-api" } bitbybit = "1.4.0" arbitrary-int = "1.2" + +[features] +# C generated +c-math-test = [] + +# hand coded +mac-demo = [] +ws2812 = [] +captouch = [] +av-trng = [] + +# This shouldn't be a default - but provided so that code automation +# targets can easily crawl the whole library with a single flag. +all = ["c-math-test", "mac-demo", "ws2812", "captouch", "av-trng"] + +default = [] diff --git a/libs/bio-lib/src/c/mod.rs b/libs/bio-lib/src/c/mod.rs index c0c236bc6..098d72956 100644 --- a/libs/bio-lib/src/c/mod.rs +++ b/libs/bio-lib/src/c/mod.rs @@ -1 +1,2 @@ +#[cfg(feature = "c-math-test")] pub mod math_test; diff --git a/libs/bio-lib/src/lib.rs b/libs/bio-lib/src/lib.rs index 0566b7f7e..645d30800 100644 --- a/libs/bio-lib/src/lib.rs +++ b/libs/bio-lib/src/lib.rs @@ -33,8 +33,12 @@ //! Core ID & debug: //! - x31 r/- [31:30] -> core ID; [29:0] -> cpu clocks since reset +#[cfg(feature = "av-trng")] pub mod av_trng; pub mod c; +#[cfg(feature = "captouch")] pub mod captouch; +#[cfg(feature = "mac-demo")] pub mod mac_demo; +#[cfg(feature = "ws2812")] pub mod ws2812;