MCPcopy Create free account
hub / github.com/FastLED/FastLED / contextSwitch

Method contextSwitch

src/platforms/arm/teensy/coroutine_teensy.impl.hpp:238–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238void 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
246bool CoroutinePlatformTeensy::inInterruptContext() const FL_NOEXCEPT {
247 fl::u32 ipsr;

Callers 3

entry_trampolineMethod · 0.80
resumeMethod · 0.80
suspendMethod · 0.80

Calls 1

context_switchFunction · 0.85

Tested by

no test coverage detected