Jesse Braham cf10f07a9e
Add validation to esp-config (#2475)
* 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
2024-11-12 10:14:14 +00:00

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,
);
}