impure functionPartialPyRuntimeSync
Interface of the sync point PyRuntime_sync: passes the pin states, wakes the worker thread up to its next blocking point, returns the driven state and the next requested wake-up
Outputs
| Type | Name | Default | Description |
| Integer[size(pinBoolIn, 1)] | pinBoolOut | | level driven on each pin (0/1) |
| Integer[size(pinBoolIn, 1)] | pinIsOutput | | direction of each pin (1 = output) |
| Integer[size(pinBoolIn, 1)] | pinPull | | internal pull resistor of each pin (0 = none, 1 = Pin.PULL_UP, 2 = Pin.PULL_DOWN) |
| Real[size(pinBoolIn, 1)] | pwmFreq | | PWM frequency of each pin (Hz), 0 = not in PWM mode - see machine.PWM |
| Real[size(pinBoolIn, 1)] | pwmDuty | | PWM duty cycle of each pin (0-1), relevant only if pwmFreq > 0 |
| Integer | displaySeq | | incremented at each machine.Display.write() on the single logical link MCU.Display0 - see machine.Display |
| String | displayPayload | | last text sent by write() (sample-and-hold) |
| Integer[2] | uartTxPin | | pins assigned to serial transmission, one per UART slot (0 = none, otherwise its index, aligned with pinBoolOut) - slot 1: machine.UART of the script, slot 2: internal radio of the micro:bit - see machine.UART |
| Integer[2] | uartTxLevel | | level to hold on each transmit pin until the next sync point (0/1, idle = high): nextWakeTime falls on the next level CHANGE of a frame, the frame format stays entirely on the C side - Integer for the same reason as uartTxPin |
| Real | nextWakeTime | | |