|
24 | 24 | //! |
25 | 25 | //! Ensure that the right features are enabled for your chip. See [Examples](https://github.com/esp-rs/esp-hal/tree/main/examples#examples) for more examples. |
26 | 26 | //! |
| 27 | +//! You will also need a dynamic memory allocator, and a preemptive task scheduler in your |
| 28 | +//! application. For the dynamic allocator, we recommend using `esp-alloc`. For the task scheduler, |
| 29 | +//! the simplest option that is supported by us is `esp-rtos`, but you may use Ariel |
| 30 | +//! OS or other operating systems as well. |
| 31 | +//! |
27 | 32 | //! ```toml |
28 | 33 | //! [dependencies.esp-radio] |
29 | 34 | //! # A supported chip needs to be specified, as well as specific use-case features |
30 | | -#![doc = concat!(r#"features = [""#, chip!(), r#"", "wifi", "esp-now"]"#)] |
| 35 | +#![doc = concat!(r#"features = [""#, chip!(), r#"", "wifi", "esp-now", "esp-alloc"]"#)] |
| 36 | +//! [dependencies.esp-rtos] |
| 37 | +#![doc = concat!(r#"features = [""#, chip!(), r#"", "esp-radio", "esp-alloc"]"#)] |
| 38 | +//! [dependencies.esp-alloc] |
| 39 | +#![doc = concat!(r#"features = [""#, chip!(), r#""]"#)] |
31 | 40 | //! ``` |
32 | 41 | //! |
33 | 42 | //! ### Optimization Level |
|
57 | 66 | //! Please note that the configuration keys are usually named slightly different and not all configuration keys apply. |
58 | 67 | # and `ESP_PHY_PHY_ENABLE_USB` is enabled by default." |
| 69 | + doc = "By default the power-saving mode is [`PowerSaveMode::None`](crate::wifi::PowerSaveMode::None) and `ESP_PHY_CONFIG_PHY_ENABLE_USB` is enabled by default." |
61 | 70 | )] |
62 | 71 | //! In addition pay attention to these configuration keys: |
63 | 72 | //! - `ESP_RADIO_RX_QUEUE_SIZE` |
|
70 | 79 | "\n\n", |
71 | 80 | "BLE and Wi-Fi can also be run on the second core.", |
72 | 81 | "\n\n", |
73 | | - "`esp_rtos::init` and `esp_radio::init` _must_ be called on the core on", |
74 | | - "which you intend to run the wireless code. This will correctly initialize", |
75 | | - "the radio peripheral to run on that core, and ensure that interrupts are", |
76 | | - "serviced by the correct core.", |
| 82 | + "`esp_radio::init` is recommended to be called on the first core. The tasks ", |
| 83 | + "created by `esp-radio` are pinned to the first core.", |
77 | 84 | "\n\n", |
78 | | - "It's also important to allocate adequate stack for the second core; in many", |
79 | | - "cases 8kB is not enough, and 16kB or more may be required depending on your", |
80 | | - "use case. Failing to allocate adequate stack may result in strange behaviour,", |
| 85 | + "It's also important to allocate adequate stack for the second core; in many ", |
| 86 | + "cases 8kB is not enough, and 16kB or more may be required depending on your ", |
| 87 | + "use case. Failing to allocate adequate stack may result in strange behaviour, ", |
81 | 88 | "such as your application silently failing at some point during execution." |
82 | 89 | ) |
83 | 90 | )] |
84 | | -//! # Features flags |
| 91 | +//! ## Feature flags |
85 | 92 | //! |
86 | 93 | //! Note that not all features are available on every MCU. For example, `ble` |
87 | 94 | //! (and thus, `coex`) is not available on ESP32-S2. |
|
0 commit comments