Skip to content

Commit 8fc54fb

Browse files
committed
fixed cast for callback
1 parent 1c79c80 commit 8fc54fb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ReadMe.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ Updated keywords.txt file to include all functions.
2727
1.3 by Sandy Walsh
2828
o Added a "context" parameter to callbacks. You can pass in the context
2929
when the event is created and it will be sent back to callback when
30-
called.
30+
called. If you don't have any context data you want to pass in (let's
31+
say you're using separate callbacks for each timer), you can just
32+
pass in 0 and ignore it in the callback.

Timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int8_t Timer::oscillate(uint8_t pin, unsigned long period, uint8_t startingValue
7272
_events[i].lastEventTime = millis();
7373
_events[i].count = 0;
7474
_events[i].context = (void*)0;
75-
_events[i].callback = (void*)0;
75+
_events[i].callback = (void (*)(void*))0;
7676
return i;
7777
}
7878

0 commit comments

Comments
 (0)