extmod/modmachine: Provide common Python bindings for machine.idle().

And use it in all ports.  The ports are unchanged, except esp8266 which now
just returns None from this function instead of the time elapsed (to match
other ports), and qemu-arm which gains this function.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2023-11-23 16:36:52 +11:00
parent 7d39db2503
commit 30a63a204d
16 changed files with 39 additions and 57 deletions

View File

@@ -32,3 +32,7 @@
// This variable is needed for machine.soft_reset(), but the variable is otherwise unused.
int pyexec_system_exit = 0;
STATIC void mp_machine_idle(void) {
// Do nothing.
}