Skip to content

Commit 3e6b85b

Browse files
authored
Update i2c/spi instance info (#3627)
* Add instances to drivers * Move AnyI2c * Move AnySpi and DataMode * Generate new semver baseline
1 parent 4524810 commit 3e6b85b

29 files changed

+169
-111
lines changed

esp-hal/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

16+
- `AnyI2c` has been moved from `esp_hal::i2c` to `esp_hal::i2c::master` (#3627)
17+
- `AnySpi` has been moved from `esp_hal::spi` to `esp_hal::spi::master` and `esp_hal::spi::slave` (#3627)
18+
- `DataMode` has been moved from `esp_hal::spi` to `esp_hal::spi::master` (#3627)
1619

1720
### Fixed
1821

esp-hal/MIGRATING-1.0.0-beta.1.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
11
# Migration Guide from 1.0.0-beta.1 to {{currentVersion}}
2+
3+
## AnyI2c and AnySpi have been moved to mode-specific submodules
4+
5+
```diff
6+
-use esp_hal::i2c::AnyI2c;
7+
+use esp_hal::i2c::master::AnyI2c;
8+
```
9+
10+
`AnySpi` has been separated into master and slave counterparts.
11+
12+
```diff
13+
-use esp_hal::spi::AnySpi;
14+
+use esp_hal::spi::master::AnySpi;
15+
+// or:
16+
+use esp_hal:spi::slave::AnySpi;
17+
```
18+
19+
## SPI DataMode has been moved into `esp_hal::spi::master`
20+
21+
```diff
22+
-use esp_hal::spi::DataMode;
23+
+use esp_hal::spi::master::DataMode;
24+
```

esp-hal/api-baseline/esp32.json.gz

2.43 KB
Binary file not shown.
1.63 KB
Binary file not shown.
1.92 KB
Binary file not shown.
1.76 KB
Binary file not shown.
3.56 KB
Binary file not shown.
817 Bytes
Binary file not shown.
4.77 KB
Binary file not shown.

esp-hal/src/dma/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,8 +1663,9 @@ impl<DEG: DmaChannel> DmaChannelConvert<DEG> for DEG {
16631663
///
16641664
/// ```rust,no_run
16651665
#[doc = crate::before_snippet!()]
1666-
/// use esp_hal::spi::AnySpi;
1667-
/// use esp_hal::spi::master::{Spi, SpiDma, Config, Instance as SpiInstance};
1666+
/// use esp_hal::spi::master::{
1667+
/// AnySpi, Spi, SpiDma, Config, Instance as SpiInstance
1668+
/// };
16681669
/// use esp_hal::dma::DmaChannelFor;
16691670
/// use esp_hal::Blocking;
16701671
///

0 commit comments

Comments
 (0)