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

* Extract value and validator modules * Clean up * Replace tuples with ConfigOption * Move generate.rs * Further refactor write_doc_table_line * Carry around the config option, too * Move markdown table processing out of random places * Compare prettified json, use pretty_assertions to diff it * Work with Vec * Emit enumerated cfgs in one place
21 lines
559 B
Rust
21 lines
559 B
Rust
use std::{env, path::PathBuf};
|
|
|
|
use esp_config::{generate_config, ConfigOption, 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",
|
|
&[ConfigOption {
|
|
name: "rx_queue_size",
|
|
description: "Size of the RX queue in frames",
|
|
default_value: Value::Integer(50),
|
|
constraint: Some(Validator::PositiveInteger),
|
|
}],
|
|
true,
|
|
);
|
|
}
|