Skip to content

Commit

Permalink
Fix naming violations for SPI Address and Command enums (#2906)
Browse files Browse the repository at this point in the history
* Fix naming violations for SPI `Address` and `Command` enums

* Update migration guide

* Update `CHANGELOG.md`
  • Loading branch information
jessebraham authored Jan 8, 2025
1 parent 246e7f1 commit 7d0b39d
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 210 deletions.
1 change: 1 addition & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- UART: Remove blocking version of `read_bytes` and rename `drain_fifo` to `read_bytes` instead (#2895)
- Renamed variants of `CpuClock`, made the enum non-exhaustive (#2899)
- SPI: Fix naming violations for `Mode` enum variants (#2902)
- SPI: Fix naming violations for `Address` and `Command` enum variants (#2906)

### Fixed

Expand Down
11 changes: 10 additions & 1 deletion esp-hal/MIGRATING-0.22.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,20 @@ The specific CPU clock variants are renamed from e.g. `Clock80MHz` to `_80MHz`.

Additionally the enum is marked as non-exhaustive.

## SPI Modes
## SPI Changes

The SPI mode variants are renamed from e.g. `Mode0` to `_0`.

```diff
- Mode::Mode0
+ Mode::_0
```

The Address and Command enums have similarly had their variants changed from e.g. `Address1` to `_1Bit` and `Command1` to `_1Bit` respectively:

```diff
- Address::Address1
+ Address::_1Bit
- Command::Command1
+ Command::_1Bit
```
Loading

0 comments on commit 7d0b39d

Please sign in to comment.