electro-smith / libDaisy

Hardware Library for the Daisy Audio Platform
https://www.electro-smith.com/daisy
MIT License
331 stars 143 forks source link

User callbacks to timer peripheral #518

Closed stephenhensley closed 2 years ago

stephenhensley commented 2 years ago

This was useful in the case where there were low priority "background" tasks that need to happen at a regular interval (UI updating, Eventqueue handling, etc.), but actual background tasks that only function with blocking I/O for now (i.e. QSPI writes, and USB Host background process).

Without having the UI, etc. in an IRQ they would stutter/stop/glitch during the QSPI writes/USB processing.

In the rare case where there's a decent amount of processing happening in these callbacks, the Systick was getting missed. So I bumped the NVIC priority of systick to have one position below it.

I'd like to add a priority setting to these callbacks so the user can set it up at the desired level, but for now these callbacks have the lowest priority in the whole system.

github-actions[bot] commented 2 years ago

Unit Test Results

    1 files  ±0    16 suites  ±0   0s :stopwatch: ±0s 147 tests ±0  147 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit 5d8987bc. ± Comparison against base commit e12fb04e.

:recycle: This comment has been updated with latest results.

stephenhensley commented 2 years ago

TODO: