GithubHelp home page GithubHelp logo

Comments (7)

MabezDev avatar MabezDev commented on September 1, 2024 2

I think with that in mind lets close this for now. If the need for something like this pops up again, we can look at changing the whole TimerGroup struct

from esp-hal.

MabezDev avatar MabezDev commented on September 1, 2024

@bjoernQ I think this is already done for TIMG timers? When used with the e-h timer traits they are used in periodic mode? Please correct me if I'm wrong :D.

from esp-hal.

bjoernQ avatar bjoernQ commented on September 1, 2024

🤔 seems you are right 👀 .... but probably it shouldn't be like that?

i.e. by default, it should be one-shot and we should have an "into_periodic" function (like systimer) to turn it into periodic mode?

from esp-hal.

MabezDev avatar MabezDev commented on September 1, 2024

I think that's just the way the e-h traits work, we implement periodic on the timer which has a cancel method to stop the timer at any point - i.e after one iteration.

I guess we could still have the into_periodic function on the timer, and implement the periodic trait on that type 🤔

from esp-hal.

bjoernQ avatar bjoernQ commented on September 1, 2024

Sounds like the best way to go - then it's aligned with systimer 👍

from esp-hal.

MabezDev avatar MabezDev commented on September 1, 2024

We might struggle here, TimerGroup contains two timers (on most chips). We can't use into_periodic(self) on the timers inside, because we can't move the timers out of TimerGroup :/

from esp-hal.

bjoernQ avatar bjoernQ commented on September 1, 2024

Ohh you are right

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.