-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial version of code to support multiple hardware timers #2497
Conversation
Philip, this one needs some careful review. I will try to do this in the next couple of days |
Yes. It took a fair amount of head scratching to make it work properly!
…On Sun, Sep 23, 2018, 16:21 Terry Ellison ***@***.***> wrote:
Philip, this one needs some careful review. I will try to do this in the
next couple of days
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2497 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABcFzdL558BV6vMBaH9S0jHPMz1CNF_dks5ud-0ngaJpZM4W1hSO>
.
|
@@ -10,7 +10,7 @@ | |||
#include "pin_map.h" | |||
#include "driver/gpio16.h" | |||
|
|||
#define TIMER_OWNER 'P' | |||
#define TIMER_OWNER (('P' << 8) + 'U') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was one of the problems -- it used the same value as the PWM module.
@@ -434,7 +434,7 @@ static int gpio_pulse_start(lua_State *L) { | |||
pulser->next_adjust = initial_adjust; | |||
|
|||
// Now start things up | |||
if (!platform_hw_timer_init(TIMER_OWNER, FRC1_SOURCE, TRUE)) { | |||
if (!platform_hw_timer_init(TIMER_OWNER, FRC1_SOURCE, FALSE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why I used autoload=true when I first wrote the code. It wasn't needed. I did make the new hw_timer stuff work with autoload=true before I switched this over to FALSE.
I also added some more comments to the code.... |
What is the |
If you click the milestone in the right column (name "Next release") you'll see that the due date is early December. That is the planned dev->master snap. Precondition is that @TerryE or some other committer approves this and merges it to dev until mid November or so. However, we're usually quite flexible with our self-imposed obligations 😉 See https://nodemcu.readthedocs.io/en/latest/#releases for more information on this process. |
Yup. Nag received. Sorry. |
What is preventing this from being merged? |
Just time and effort to review and test this, sorry. |
Adding another voice to encourage moving forward with this. It's essential to what I'm doing (need both gpio.pulse and pwm) so I'm having to maintain a separate local dev branch so I can merge it. No problems with it so far, FWIW. |
Fixes #2494.
dev
branch rather than formaster
.docs/en/*
.This adds support to the hw_timer.c file to be able to have multiple timers running at the same time (multiplexed in software). This code is just about working and could do with some cleanup. It also may crash, burn or cause other problems. However, it does run gpio.pulse and pwm at the same time (in a simple case) and appear to work.