lancaster-university / codal-microbit-v2

CODAL target for the micro:bit v2.x series of devices
MIT License
41 stars 50 forks source link

Should fibers wait for access to serial? #398

Open martinwork opened 7 months ago

martinwork commented 7 months ago

Arising from support ticket https://support.microbit.org/helpdesk/tickets/69177 (private)

Related: https://github.com/lancaster-university/microbit-dal/issues/202

Calls to serial.send may allow a switch to another fiber, but other fibers are locked out and drop intended output.

https://github.com/lancaster-university/codal-core/blob/63f017fdcd12aca769264c36fe47e6071a40e502/source/driver-models/Serial.cpp#L369

See https://makecode.microbit.org/_K5bLjsHMyHtg - serial output from the hardware is always zero,