From 6a8451f8d9be02204bb8a61d097c8d02f666eb1c Mon Sep 17 00:00:00 2001 From: doctea Date: Fri, 1 Mar 2024 22:44:08 +0000 Subject: [PATCH] add rp2040 to library.properties; minor comment --- library.properties | 2 +- src/platforms/rp2040.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library.properties b/library.properties index fa4b2e8..69b5647 100755 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=BPM clock generator for Arduino platform. paragraph=A Library to implement BPM clock tick calls using hardware interruption. Supported and tested on AVR boards(ATmega168/328, ATmega16u4/32u4 and ATmega2560) and ARM boards(Teensy, Seedstudio XIAO M0. ESP32 and STM32) category=Timing url=https://github.com/midilab/uClock -architectures=avr,arm,samd,stm32,esp32 +architectures=avr,arm,samd,stm32,esp32,rp2040 includes=uClock.h diff --git a/src/platforms/rp2040.h b/src/platforms/rp2040.h index fa6b69e..7cf1069 100644 --- a/src/platforms/rp2040.h +++ b/src/platforms/rp2040.h @@ -1,6 +1,7 @@ #include #include "pico/sync.h" +// todo: make this a build flag, so user can choose which method to use? #define MULTICORE #ifdef MULTICORE @@ -22,8 +23,7 @@ return true; } - void initTimer(uint32_t init_clock) - { + void initTimer(uint32_t init_clock) { // set up RPi interrupt timer // todo: actually should be -init_clock so that timer is set to start init_clock us after last tick, instead of init_clock us after finished processing last tick! add_repeating_timer_us(init_clock, &handlerISR, NULL, &timer);