arkhipenko / TaskScheduler

Cooperative multitasking for Arduino, ESPx, STM32, nRF and other microcontrollers
http://playground.arduino.cc/Code/TaskScheduler
BSD 3-Clause "New" or "Revised" License
1.33k stars 243 forks source link

feature: allow std::function for STM32 #105

Closed shroomist closed 3 years ago

shroomist commented 4 years ago

naive poking showed that std::function works for stm32

Screenshot 2020-10-01 at 12 50 08
arkhipenko commented 4 years ago

I don't use this, but thanks! Will review and merge.

GitMoDu commented 3 years ago

Please review Platform identifiers before merging, as discussed here.

arkhipenko commented 3 years ago

Please review Platform identifiers before merging, as discussed here.

Why would support for general architecture (if it is indeed supported) be worse than listing endless defines for each variety?

GitMoDu commented 3 years ago

It's an option that's more useful for libraries that depend more on Arduino core functionality, or not at all. Since TaskScheduller basically only uses the millis()/micros() from the Arduino API, everything else being plain C++, I'd say I agree with you. Just wanted to make sure you are aware how touchy the subject actually is, because it's a mess right now on STM32 side with 3, concurrent and incompatible Cores (STM32, Roger's and Steve's)

arkhipenko commented 3 years ago

ok. yield() is empty in stm32 implementation, so I did not include the second update. merged into 'testing' branch.