Skip to content

Commit 5e3e705

Browse files
Fixed my sample
Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
1 parent 498b67d commit 5e3e705

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

samples/timer_configuration/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ io::GPIO* interruptGPIO2Hz;
1414
io::GPIO* interruptGPIOStopStart;
1515
io::GPIO* reloadGPIO;
1616

17-
void timer2IRQHandler(void* htim) {
17+
void timer2IRQHandler(void* htim, void* context) {
1818
io::GPIO::State state = ledGPIO->readPin();
1919
io::GPIO::State toggleState = state == io::GPIO::State::HIGH ? io::GPIO::State::LOW : io::GPIO::State::HIGH;
2020
ledGPIO->writePin(toggleState);
2121
interruptGPIO2Hz->writePin(toggleState);
2222
}
2323

24-
void timer15IRQHandler(void* htim) {
24+
void timer15IRQHandler(void* htim, void* context) {
2525
io::GPIO::State state = interruptGPIOStopStart->readPin();
2626
io::GPIO::State toggleState = state == io::GPIO::State::HIGH ? io::GPIO::State::LOW : io::GPIO::State::HIGH;
2727
interruptGPIOStopStart->writePin(toggleState);
2828
}
2929

30-
void timer16IRQHandler(void* htim) {
30+
void timer16IRQHandler(void* htim, void* context) {
3131
io::GPIO::State state = reloadGPIO->readPin();
3232
io::GPIO::State toggleState = state == io::GPIO::State::HIGH ? io::GPIO::State::LOW : io::GPIO::State::HIGH;
3333
reloadGPIO->writePin(toggleState);
@@ -65,9 +65,9 @@ int main() {
6565
dev::Timer& sampleTimer3 = dev::getTimer<dev::MCUTimer::Timer16>(1000, configuration);
6666
#endif
6767

68-
sampleTimer1.startTimer(timer2IRQHandler);
69-
sampleTimer2.startTimer(timer15IRQHandler);
70-
sampleTimer3.startTimer(timer16IRQHandler);
68+
sampleTimer1.startTimer(timer2IRQHandler, nullptr);
69+
sampleTimer2.startTimer(timer15IRQHandler, nullptr);
70+
sampleTimer3.startTimer(timer16IRQHandler, nullptr);
7171

7272
while (1) {
7373
core::time::wait(500);

0 commit comments

Comments
 (0)