Skip to content

Commit

Permalink
fix: add ble feature
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Oct 28, 2023
1 parent 493dc02 commit 00f35a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ license = "MIT/Apache-2.0"
[features]
default = []
embassy = ["dep:embassy-time"]
ble = []

[dependencies]
#ch58x = { version = "0.2.0", path = "../ch32-rs-nightlies/ch58x", features = [
Expand Down
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ fn main() {

fs::write(out_dir.join("libISP583.a"), include_bytes!("vendor/libISP583.a")).unwrap();

fs::write(out_dir.join("libCH58xBLE.a"), include_bytes!("vendor/LIBCH58xBLE.a")).unwrap();
if env::var("CARGO_FEATURE_BLE").is_ok() {
fs::write(out_dir.join("libCH58xBLE.a"), include_bytes!("vendor/LIBCH58xBLE.a")).unwrap();
}

// Put the linker script somewhere the linker can find it.
fs::write(out_dir.join("link.x"), include_bytes!("link.x")).unwrap();
Expand Down

0 comments on commit 00f35a3

Please sign in to comment.