Comments (5)
According to https://docs.rs/embedded-hal/1.0.0/embedded_hal/spi/index.html#for-hal-authors
HALs must implement SpiBus. Users can combine the bus together with the CS pin (which should implement OutputPin) using HAL-independent SpiDevice implementations such as the ones in embedded-hal-bus.
HALs may additionally implement SpiDevice to take advantage of hardware CS management, which may provide some performance benefits. (There’s no point in a HAL implementing SpiDevice if the CS management is software-only, this task is better left to the HAL-independent implementations).
I agree that we probably should implement SpiDevice since our hardware is capable of managing CS pins
TL;DR should be possible to use embedded-hal-bus with our implementation
from esp-hal.
TL;DR should be possible to use embedded-hal-bus with our implementation
This seems to be for embedded-hal
rather than embedded-hal-async
, unfortunately.
But you're right, that it seems like someone could make a very easy wrapper, particularly since the ESP32C3 implementation of SpiBus
can manage the CS pin itself, the CS management could be a 'no-op'.
However it seems like this should be encoded directly in the type system of the ESP HAL: if the SpiBus
has a CS pin attached, it ought to offer an SpiDevice
interface (as well?).
from esp-hal.
This seems to be for embedded-hal rather than embedded-hal-async, unfortunately.
There is an async feature: https://github.com/rust-embedded/embedded-hal/blob/04b4f1897a126d1f3aebf679489b60d8e994c839/embedded-hal-bus/Cargo.toml#L19
from esp-hal.
ah sorry, yes there is! Thanks :)
from esp-hal.
I don't think there's really anything actionable here so going to go ahead and close the issue. If you disagree feel free to re-open it.
from esp-hal.
Related Issues (20)
- RFC: What to do about `async` vs `direct-vectoring` features? HOT 1
- Find a way to use ROM memset/memcpy - if it can't work, we should ensure memcpy and memset are in RAM somehow HOT 5
- TRNG #1200 breaks esp-wifi for ESP32-S2 HOT 1
- esp-hal 0.16.0 : Can't compile esp-wifi with the new esp-hal 0.16.0 HOT 3
- TWAI Overrun error when compiling in debug mode HOT 3
- Be explicit about the need to build using the `release` profile HOT 2
- Don’t forget to upgrade the defmt version in esp-backtrace and esp-println. HOT 1
- Automatically update the links and version numbers in the documentation index HOT 1
- Try to reduce duplicated code between `I2C`/`LP_I2C` drivers HOT 2
- Add ETM tasks and events for timers HOT 2
- The `resources/index.html` file should be converted to a template, and the packages and their versions should be populated dynamically.
- `UsbSerialJtag`s `core::fmt::Write` impl is blocking HOT 1
- Reading from ADC1 is broken once esp-wifi initialize() function has been called HOT 10
- RFC: Investigate the need for a lower-level layer of abstraction HOT 2
- Unclear behaviour of `GpioPin<Output<OpenDrain>, _>::is_high()` for ESP32 HOT 5
- Rng Initialization breaks ADC1 (at least on ESP32) HOT 4
- variant usage HOT 2
- Critical section crash HOT 6
- ESP32 & ESP32-S2: Wrong I²C frequency
- Nightly CI is broken HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-hal.