Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.3.1 using float for interval
Browse files Browse the repository at this point in the history
### Releases v1.3.1

1. Using `float` instead of `ulong` for better interval accuracy
  • Loading branch information
khoih-prog authored Sep 30, 2022
1 parent f010d88 commit b7d8f4b
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/Argument_Complex/Argument_Complex.ino
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ volatile pinStruct myOutputPins = { LED_BUILTIN, 0, 1 };

bool TimerHandler(struct repeating_timer *t)
{
(void) t;

static bool toggle = false;

//timer interrupt toggles pins
Expand Down
4 changes: 4 additions & 0 deletions examples/Argument_None/Argument_None.ino
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

bool TimerHandler0(struct repeating_timer *t)
{
(void) t;

static bool toggle0 = false;

#if (TIMER_INTERRUPT_DEBUG > 0)
Expand All @@ -65,6 +67,8 @@ bool TimerHandler0(struct repeating_timer *t)

bool TimerHandler1(struct repeating_timer *t)
{
(void) t;

static bool toggle1 = false;

#if (TIMER_INTERRUPT_DEBUG > 0)
Expand Down
4 changes: 4 additions & 0 deletions examples/Argument_Simple/Argument_Simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ RPI_PICO_Timer ITimer2(2);

bool TimerHandler1(struct repeating_timer *t)
{
(void) t;

static bool toggle1 = false;

#if (TIMER_INTERRUPT_DEBUG > 0)
Expand All @@ -61,6 +63,8 @@ bool TimerHandler1(struct repeating_timer *t)

bool TimerHandler2(struct repeating_timer *t)
{
(void) t;

static bool toggle2 = false;

#if (TIMER_INTERRUPT_DEBUG > 0)
Expand Down
4 changes: 4 additions & 0 deletions examples/Change_Interval/Change_Interval.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ volatile uint32_t Timer1Count = 0;

bool TimerHandler0(struct repeating_timer *t)
{
(void) t;

static bool toggle0 = false;

// Flag for checking to be sure ISR is working as Serial.print is not OK here in ISR
Expand All @@ -70,6 +72,8 @@ bool TimerHandler0(struct repeating_timer *t)

bool TimerHandler1(struct repeating_timer *t)
{
(void) t;

static bool toggle1 = false;

// Flag for checking to be sure ISR is working as Serial.print is not OK here in ISR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ RPI_PICO_ISR_Timer ISR_Timer;
// Never use Serial.print inside this ISR. Will hang the system
bool TimerHandler(struct repeating_timer *t)
{
(void) t;

static bool toggle = false;
static int timeRun = 0;

Expand Down
2 changes: 2 additions & 0 deletions examples/ISR_Timers_Array_Simple/ISR_Timers_Array_Simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ volatile uint32_t previousMillis5s = 0;

bool TimerHandler(struct repeating_timer *t)
{
(void) t;

static bool toggle = false;
static int timeRun = 0;

Expand Down
2 changes: 2 additions & 0 deletions examples/RPM_Measure/RPM_Measure.ino
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ volatile int debounceCounter;

bool TimerHandler0(struct repeating_timer *t)
{
(void) t;

if ( !digitalRead(SWPin) && (debounceCounter >= DEBOUNCING_INTERVAL_MS / TIMER0_INTERVAL_MS ) )
{
//min time between pulses has passed
Expand Down
2 changes: 2 additions & 0 deletions examples/SwitchDebounce/SwitchDebounce.ino
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ volatile bool SWLongPressed = false;

bool TimerHandler1(struct repeating_timer *t)
{
(void) t;

static unsigned int debounceCountSWPressed = 0;
static unsigned int debounceCountSWReleased = 0;

Expand Down
4 changes: 4 additions & 0 deletions examples/TimerInterruptTest/TimerInterruptTest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@

bool TimerHandler0(struct repeating_timer *t)
{
(void) t;

static bool toggle0 = false;
static bool started = false;

Expand All @@ -70,6 +72,8 @@ bool TimerHandler0(struct repeating_timer *t)

bool TimerHandler1(struct repeating_timer *t)
{
(void) t;

static bool toggle1 = false;
static bool started = false;

Expand Down

0 comments on commit b7d8f4b

Please sign in to comment.