Git Product home page Git Product logo

Comments (7)

MabezDev avatar MabezDev commented on August 16, 2024 1

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.

bjoernQ avatar bjoernQ commented on August 16, 2024 1

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.

jessebraham avatar jessebraham commented on August 16, 2024

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.

bjoernQ avatar bjoernQ commented on August 16, 2024

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.

bjoernQ avatar bjoernQ commented on August 16, 2024

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.

MabezDev avatar MabezDev commented on August 16, 2024

I spent a bit of time playing with fugit, it's very nice in some respects, but there might be a few issues.

  1. The biggest one, korken89/fugit#26 (comment). Meaning that calling let hz = 1.MHz() will not compile because the NOM & DENOM const generics don't have defaults. Looks like this will be fixed in the next stable release of Rust though.
  2. 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:)
  3. 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.

jessebraham avatar jessebraham commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.