Skip to content
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

TimerHandle lacks SetCallback #44

Open
m00dawg opened this issue May 13, 2022 · 1 comment
Open

TimerHandle lacks SetCallback #44

m00dawg opened this issue May 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@m00dawg
Copy link

m00dawg commented May 13, 2022

This may already be known since it appears to be in the TODO in tim.h (Dispatch periodic callback(s)) but thought I'd log it here as I ran into that tonight and it took me some time to realize it was missing from DaisyDuino when looking at the general libDaisy docs (https://electro-smith.github.io/libDaisy/classdaisy_1_1_timer_handle.html#a6a3a083902c7b5fbfc431242d60571f4).

I wanted to attach a callback to an interrupt much like the audio interrupt only I'll be adjusting the timer's counter so I can do variable sample rate stuff. I can do this in the while loop but thought the interrupt route would be more efficient and I could avoid cluttering up the main loop (which I was going to use for checking CV inputs and things).

@stephenhensley
Copy link
Collaborator

Hi @m00dawg

This is indeed a planned feature, and was only recently added to libDaisy. There's usually a bit of a lag between updates to libDaisy, and DaisyDuino.

That said, DaisyDuino is just a wrapper for Daisy-specific pins, and features not directly provided by the STM32 Core (most specifically audio).

For other, more generic peripherals (timers, serial communication, etc.) you can most likely accomplish your goals with the ST provided API.
It looks like there is a specific HardwareTimer class as part of the ST Arduino Core.

The Daisy Seed datasheet provides a table with the relevant stm32 pin names.

Hope that helps! :)

@stephenhensley stephenhensley added the enhancement New feature or request label May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants