Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update changelog
  • Loading branch information
bugadani committed Sep 4, 2024
commit c586fc1d34561dba1a7d714a6a7c65a478e0dfba
2 changes: 2 additions & 0 deletions esp-hal-embassy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Removed the `clocks` parameter from `esp_hal_embassy::init`. (#1999)

## 0.3.0 - 2024-08-29

### Added
Expand Down
30 changes: 30 additions & 0 deletions esp-hal-embassy/MIGRATING-0.3.md
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);

// ...
}
```
2 changes: 2 additions & 0 deletions esp-hal-smartled/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Removed the `clocks` parameter from `SmartLedsAdapter::new` (#1999)

## 0.13.0 - 2024-08-29

## 0.12.0 - 2024-07-15
Expand Down
6 changes: 4 additions & 2 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Implement `embedded-hal` output pin traits for `DummyPin` (#2019)
- Added `esp_hal::init` to simplify HAL initialisation (#1970)
- Added `esp_hal::init` to simplify HAL initialisation (#1970, #1999)

### Changed

- `Delay::new()` is now a `const` function (#1999)

### Fixed

- Fixed an issue with DMA transfers potentially not waking up the correct async task (#2065)
Expand All @@ -23,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed `NoPinType` in favour of `DummyPin`. (#2068)
- Removed the `async`, `embedded-hal-02`, `embedded-hal`, `embedded-io`, `embedded-io-async`, and `ufmt` features (#2070)
- Removed the `GpioN` type aliasses. Use `GpioPin<N>` instead. (#2073)
- Removed `Peripherals::take`. Use `esp_hal::init` to obtain `Peripherals` (#1999)

## [0.20.1] - 2024-08-30

Expand Down Expand Up @@ -80,7 +83,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed `FlashSafeDma` (#1856)
- Remove redundant WithDmaSpi traits (#1975)
- `IsFullDuplex` and `IsHalfDuplex` traits (#1985)
- `Peripherals::take` (#1999)

## [0.19.0] - 2024-07-15

Expand Down
5 changes: 2 additions & 3 deletions esp-hal/src/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub use fugit::MicrosDurationU64;
///
/// Uses the `SYSTIMER` peripheral internally for RISC-V devices, and the
/// built-in Xtensa timer for Xtensa devices.
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Default)]
#[non_exhaustive]
pub struct Delay;

Expand Down Expand Up @@ -69,8 +69,7 @@ impl embedded_hal::delay::DelayNs for Delay {

impl Delay {
/// Creates a new `Delay` instance.
// Do not remove the argument, it makes sure that the clocks are initialized.
pub fn new() -> Self {
pub const fn new() -> Self {
Self {}
}

Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/lcd_cam/lcd/i8080.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ where
// the LCD_PCLK divider must be at least 2. To make up for this the user
// provided frequency is doubled to match.
let (i, divider) = calculate_clkm(
(frequency.to_Hz() * 2 ) as _,
(frequency.to_Hz() * 2) as _,
&[
clocks.xtal_clock.to_Hz() as _,
clocks.cpu_clock.to_Hz() as _,
Expand Down
2 changes: 1 addition & 1 deletion esp-hal/src/uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ where
let clk = match clock_source {
ClockSource::Apb => clocks.apb_clock.to_Hz(),
ClockSource::RefTick => REF_TICK.to_Hz(), /* ESP32(/-S2) TRM, section 3.2.4.2
* (6.2.4.2 for S2) */
* (6.2.4.2 for S2) */
};

T::register_block().conf0().modify(|_, w| {
Expand Down
2 changes: 2 additions & 0 deletions esp-wifi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- Removed the `clocks` parameter from `esp_wifi::initialize` (#1999)

## 0.8.0 - 2024-08-29

### Added
Expand Down
41 changes: 41 additions & 0 deletions esp-wifi/MIGRATING-0.8.md
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();

// ...
}
```