| 236 | } |
| 237 | |
| 238 | void CoroutinePlatformTeensy::contextSwitch(void* from_ctx, void* to_ctx) FL_NOEXCEPT { |
| 239 | auto* from = static_cast<TeensyContextState*>(from_ctx); |
| 240 | auto* to = static_cast<TeensyContextState*>(to_ctx); |
| 241 | // Naked asm: saves regs to from->saved_sp, restores from to->saved_sp, |
| 242 | // toggles MSP/PSP via CONTROL.SPSEL |
| 243 | context_switch(&from->saved_sp, to->saved_sp); |
| 244 | } |
| 245 | |
| 246 | bool CoroutinePlatformTeensy::inInterruptContext() const FL_NOEXCEPT { |
| 247 | fl::u32 ipsr; |
no test coverage detected