forked from future-proof-iot/RIOT-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(arch): introduce
riot-rs-arch
dispatch crate
- Loading branch information
Showing
15 changed files
with
127 additions
and
64 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
[package] | ||
name = "riot-rs-arch" | ||
version = "0.1.0" | ||
license.workspace = true | ||
edition = "2021" | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
cfg-if.workspace = true | ||
|
||
[target.'cfg(context = "esp")'.dependencies] | ||
riot-rs-esp = { path = "../riot-rs-esp" } | ||
|
||
[target.'cfg(context = "nrf")'.dependencies] | ||
riot-rs-nrf = { path = "../riot-rs-nrf" } | ||
|
||
[target.'cfg(context = "rp")'.dependencies] | ||
riot-rs-rp = { path = "../riot-rs-rp" } | ||
|
||
[target.'cfg(context = "stm32")'.dependencies] | ||
riot-rs-stm32 = { workspace = true } | ||
|
||
[features] | ||
external-interrupts = [ | ||
"riot-rs-esp/external-interrupts", | ||
"riot-rs-nrf/external-interrupts", | ||
"riot-rs-rp/external-interrupts", | ||
"riot-rs-stm32/external-interrupts", | ||
] | ||
|
||
i2c = [ | ||
"riot-rs-esp/i2c", | ||
"riot-rs-nrf/i2c", | ||
"riot-rs-rp/i2c", | ||
"riot-rs-stm32/i2c", | ||
] | ||
|
||
spi = [ | ||
"riot-rs-esp/spi", | ||
"riot-rs-nrf/spi", | ||
"riot-rs-rp/spi", | ||
"riot-rs-stm32/spi", | ||
] | ||
|
||
usb = [ | ||
#"riot-rs-esp/usb", | ||
"riot-rs-nrf/usb", | ||
"riot-rs-rp/usb", | ||
"riot-rs-stm32/usb", | ||
] | ||
|
||
hwrng = [ | ||
#"riot-rs-esp/hwrng", | ||
"riot-rs-nrf/hwrng", | ||
"riot-rs-rp/hwrng", | ||
"riot-rs-stm32/hwrng", | ||
] | ||
|
||
wifi-cyw43 = ["riot-rs-rp/wifi-cyw43"] | ||
wifi-esp = ["riot-rs-esp/wifi-esp"] | ||
|
||
threading = ["riot-rs-esp/threading"] | ||
|
||
executor-single-thread = ["riot-rs-esp/executor-single-thread"] | ||
|
||
executor-interrupt = [ | ||
#"riot-rs-esp/executor-interrupt", | ||
"riot-rs-nrf/executor-interrupt", | ||
"riot-rs-rp/executor-interrupt", | ||
"riot-rs-stm32/executor-interrupt", | ||
] | ||
|
||
defmt = [ | ||
"riot-rs-esp/defmt", | ||
"riot-rs-nrf/defmt", | ||
"riot-rs-rp/defmt", | ||
"riot-rs-stm32/defmt", | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//! This module dispatches between the riot-rs architecture support crates. | ||
|
||
#![no_std] | ||
|
||
cfg_if::cfg_if! { | ||
if #[cfg(context = "nrf")] { | ||
pub use riot_rs_nrf::*; | ||
} else if #[cfg(context = "rp")] { | ||
pub use riot_rs_rp::*; | ||
} else if #[cfg(context = "esp")] { | ||
pub use riot_rs_esp::*; | ||
} else if #[cfg(context = "stm32")] { | ||
pub use riot_rs_stm32::*; | ||
} else if #[cfg(context = "riot-rs")] { | ||
compile_error!("this architecture is not supported"); | ||
} else { | ||
mod dummy; | ||
pub use dummy::*; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters