Skip to content

Conversation

@jessebraham
Copy link
Member

The changes in the new embedded-hal release affect Delay, I2C, and SPI.

The changes for Delay and I2C were trivial. SPI was a bit more interesting; SpiDevice has changed, and there are additionally now SpiDeviceRead and SpiDeviceWrite traits.

We don't really have any examples exercising the alpha Delay or I2C traits, so wasn't really able to test that. Assuming the previous implementation works, though, there's no reason to believe these changes should make any difference.

I was able to test SpiDevice at least using the spi_eh1_device_loopback example, which succeeded, however the new traits have not been directly tested. With that said, their implementations are the same as SpiDevice, so no reason to expect them not to work.

My knowledge is admittedly lacking when it comes to the core::cell module, so I wasn't really sure why I had to dereference the bus variable, but that made the compiler happy at least. If there's better syntax for this lemme know.

Closes #468

@jessebraham jessebraham requested review from MabezDev and bjoernQ April 21, 2023 11:37
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

As you said there is not much to test but the code changes look good to me

@jessebraham jessebraham merged commit 5950a04 into esp-rs:main Apr 21, 2023
@jessebraham jessebraham deleted the fixes/eh-alpha branch April 21, 2023 13:53
i404788 pushed a commit to i404788/esp-hal that referenced this pull request Jul 22, 2023
…pha.2` (esp-rs#487)

* Update `embedded-hal-1` and `embedded-hal-nb` dependencies to latest versions

* Update the `Delay` and `I2c` trait implementations

* Update the `SpiDevice` trait, implement `SpiDeviceRead` and `SpiDeviceWrite`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to newest eh alpha

2 participants