Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Sep 2, 2024
1 parent cecd2c2 commit 66c432d
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 12 deletions.
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
7 changes: 5 additions & 2 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- 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

### Removed

- `Peripherals::take` (#1999)

## [0.20.1] - 2024-08-30

### Fixed
Expand Down Expand Up @@ -73,7 +77,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 @@ -72,8 +72,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 @@ -123,7 +123,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 @@ -1262,7 +1262,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 @@ -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_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();

// ...
}
```
2 changes: 1 addition & 1 deletion hil-test/tests/qspi_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cfg_if::cfg_if! {
struct Context {
spi: esp_hal::peripherals::SPI2,
dma_channel: Channel<'static, DmaChannel0, Blocking>,
miso: esp_hal::gpio::GpioPin<2>,
miso: GpioPin<2>,
miso_mirror: Output<'static, GpioPin<3>>,
}

Expand Down
6 changes: 3 additions & 3 deletions hil-test/tests/qspi_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use esp_hal::{
dma::{Channel, Dma, DmaPriority, DmaTxBuf},
dma_buffers,
gpio::{Io, Pull},
gpio::{GpioPin, Io, Pull},
pcnt::{
channel::{EdgeMode, PcntInputConfig, PcntSource},
unit::Unit,
Expand Down Expand Up @@ -49,8 +49,8 @@ struct Context {
spi: esp_hal::peripherals::SPI2,
pcnt: esp_hal::peripherals::PCNT,
dma_channel: Channel<'static, DmaChannel0, Blocking>,
mosi: esp_hal::gpio::GpioPin<2>,
mosi_mirror: esp_hal::gpio::GpioPin<3>,
mosi: GpioPin<2>,
mosi_mirror: GpioPin<3>,
}

fn execute(
Expand Down
2 changes: 1 addition & 1 deletion hil-test/tests/qspi_write_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cfg_if::cfg_if! {
struct Context {
spi: esp_hal::peripherals::SPI2,
dma_channel: Channel<'static, DmaChannel0, Blocking>,
mosi: esp_hal::gpio::GpioPin<2>,
mosi: GpioPin<2>,
mosi_mirror: Output<'static, GpioPin<3>>,
}

Expand Down

0 comments on commit 66c432d

Please sign in to comment.