Comments (7)
I didn't want to decide too early on this which is why I used u32 initially, but I guess we've made decent enough progress that we should discuss this!
I opened this because I'm taking a stab at dropping in some of the drivers from esp32-hal
(the sooner we kill this dinosaur the better :D) and my first issue is the lack of time types 😄.
I also already though about it and I think fugit looks quite good
I've heard good things about fugit
too, seems a bit simpler to use.
from esp-hal.
I'd say let us try it - there are already HALs depending on fugit
(so it's generally usable) and there are workarounds for the things that don't work nicely right now (plus there is hope that those things will get sorted out)
from esp-hal.
I didn't want to decide too early on this which is why I used u32
initially, but I guess we've made decent enough progress that we should discuss this!
Out of the two libraries mentioned I think I'd prefer fugit
just because it's all done at compile-time, but I don't have too strong of feelings about this.
from esp-hal.
I also already though about it and I think fugit looks quite good. Heard good things about it on the Embedded Rust matrix channel
from esp-hal.
Would be nice to be able to retire esp32-hal
One bigger difference there is that esp32-hal
does locking internally where necessary while here it's up to the caller (we probably need to document that somewhere). But it's how most HALs do it (while there are not that many multi-core MCUs besides some of the ESP32 family)
I have to admit that I never personally used fugit
but worked on a HAL that uses embedded-time
- worked fine but definitely fugit
looks better
from esp-hal.
I spent a bit of time playing with fugit
, it's very nice in some respects, but there might be a few issues.
- The biggest one, korken89/fugit#26 (comment). Meaning that calling
let hz = 1.MHz()
will not compile because theNOM
&DENOM
const generics don't have defaults. Looks like this will be fixed in the next stable release of Rust though. - The timer traits in e-hal 0.2 are crippled making it very difficult to use the fugit types (the trait has recently been removed for the 1.0 eh release:tm:)
- Lack of baud type, not really a big deal we can make one
I think it would be good reevaluate fugit 6 weeks time with the new rust release.
One bigger difference there is that esp32-hal does locking internally where necessary while here it's up to the caller (we probably need to document that somewhere). But it's how most HALs do it (while there are not that many multi-core MCUs besides some of the ESP32 family)
This is good point, I'll create another issue to discuss how we'll handle multicore MCU's.
from esp-hal.
There have been a couple new comments in the linked issue, doesn't seem like the next release will fix things after all. There does seem to be a (slightly ugly) workaround, so maybe we can just use that for the time being instead?
from esp-hal.
Related Issues (20)
- Should we remove the `embedded-hal-nb` trait implementations? HOT 3
- Cannot build esp-wifi. toml_cfg errors HOT 6
- Can't produce more than 16MHz from the LEDC driver on the ESP32-C6
- psram-80mhz feature is broken for octal psram. HOT 1
- /esp-hal/src/timer/timg.rs examples do not work for TimerGroup HOT 4
- Unexpected behavior of the time-driver HOT 1
- Prevent modifying INT_ENA (and other shared registers) in a way allowing race-conditions HOT 2
- Cargo.toml example for embassy_i2c.rs HOT 2
- Expose RAW 802.11 transmit API and promiscuous mode on `esp-wifi` HOT 1
- Consider resetting peripherals on driver construction
- ESP32-S2: `systimer` example shows different behavior than before and on other chips HOT 3
- Use SPI Bus for multiple Devices HOT 3
- The `main` procmacro is not re-exported in the current published releases of `esp-hal` and `esp-hal-embassy`
- TWAI is not working for ESP32-S3 HOT 3
- Latest release (v0.2.2) of `xtensa-lx-rt-proc-macros` not used by published `xtensa-lx-rt`
- Unable to Configure Prescaler for MCPWM Timer in esp-hal
- Implement touch support for `esp32s2` and `esp32s3`.
- Add listen only and self-test mode support for TWAI
- I2C slave driver HOT 2
- TWAI HIL test HOT 1
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.