mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-28 04:40:52 +00:00

* Clean up and re-organize `lib.rs` a bit (sorry) * Add configuration validation, some other refactoring/improvements * Add a built-in range validator, re-document the `generate_config` function * Update build scripts to reflect new configuration API
21 lines
486 B
Rust
21 lines
486 B
Rust
use std::{env, path::PathBuf};
|
|
|
|
use esp_config::{generate_config, Validator, Value};
|
|
|
|
fn main() {
|
|
let out = PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
|
println!("cargo:rustc-link-search={}", out.display());
|
|
|
|
// emit config
|
|
generate_config(
|
|
"esp_ieee802154",
|
|
&[(
|
|
"rx_queue_size",
|
|
"Size of the RX queue in frames",
|
|
Value::Integer(50),
|
|
Some(Validator::PositiveInteger),
|
|
)],
|
|
true,
|
|
);
|
|
}
|