-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Migration Guide from 0.3.x to vNext | ||
==================================== | ||
|
||
Initialsation | ||
------------- | ||
|
||
You no longer have to set up clocks and pass them to `esp_hal_embassy::init`. | ||
|
||
```diff | ||
use esp_hal::{ | ||
- clock::ClockControl, | ||
- peripherals::Peripherals, | ||
prelude::*, | ||
- system::SystemControl, | ||
}; | ||
|
||
#[esp_hal_embassy::main] | ||
async fn main(_spawner: Spawner) -> ! { | ||
- let peripherals = Peripherals::take(); | ||
- let system = SystemControl::new(peripherals.SYSTEM); | ||
- let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); | ||
+ let peripherals = esp_hal::init(esp_hal::Config::default()); | ||
|
||
let timg0 = TimerGroup::new(peripherals.TIMG0); | ||
- esp_hal_embassy::init(&clocks, timg0); | ||
+ esp_hal_embassy::init(timg0); | ||
|
||
// ... | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Migration Guide from 0.3.x to vNext | ||
==================================== | ||
|
||
Initialsation | ||
------------- | ||
|
||
You no longer have to set up clocks and pass them to `esp_wifi::initialize`. | ||
|
||
```diff | ||
use esp_hal::{ | ||
- clock::ClockControl, | ||
- peripherals::Peripherals, | ||
prelude::*, | ||
- system::SystemControl, | ||
}; | ||
use esp_wifi::{ | ||
initialize, | ||
// ... | ||
}; | ||
|
||
#[entry] | ||
fn main() -> ! { | ||
- let peripherals = Peripherals::take(); | ||
- let system = SystemControl::new(peripherals.SYSTEM); | ||
- let clocks = ClockControl::boot_defaults(system.clock_control).freeze(); | ||
+ let peripherals = esp_hal::init(esp_hal::Config::default()); | ||
|
||
let timg0 = TimerGroup::new(peripherals.TIMG0); | ||
|
||
let init = initialize( | ||
EspWifiInitFor::Wifi, | ||
timg0.timer0, | ||
Rng::new(peripherals.RNG), | ||
peripherals.RADIO_CLK, | ||
- &clocks, | ||
) | ||
.unwrap(); | ||
|
||
// ... | ||
} | ||
``` |