Skip to content

Commit

Permalink
fix esp-wifi docs (#2333)
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev authored Oct 10, 2024
1 parent d08dc3d commit e22103d
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions xtask/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::{
use anyhow::{bail, Context, Result};
use cargo::CargoAction;
use clap::ValueEnum;
use esp_metadata::Chip;
use esp_metadata::{Chip, Config};
use strum::{Display, EnumIter, IntoEnumIterator as _};

use self::cargo::CargoArgsBuilder;
Expand Down Expand Up @@ -125,17 +125,26 @@ pub fn build_documentation(
}
}

let chip = Config::for_chip(&chip);

if matches!(package, Package::EspWifi) {
features.push("utils".to_owned());
features.push("wifi".to_owned());
features.push("wifi-default".to_owned());
features.push("ble".to_owned());
features.push("coex".to_owned());
features.push("esp-now".to_owned());
features.push("sniffer".to_owned());
let wifi = chip.contains("wifi");
let ble = chip.contains("ble");
if wifi {
features.push("wifi".to_owned());
features.push("wifi-default".to_owned());
features.push("esp-now".to_owned());
features.push("sniffer".to_owned());
features.push("utils".to_owned());
features.push("embassy-net".to_owned());
}
if ble {
features.push("ble".to_owned());
}
if wifi && ble {
features.push("coex".to_owned());
}
features.push("async".to_owned());
features.push("embassy-net".to_owned());
features.push("esp-hal/default".to_owned());
}

// Build up an array of command-line arguments to pass to `cargo`:
Expand Down

0 comments on commit e22103d

Please sign in to comment.