summaryrefslogtreecommitdiff
path: root/shared-bindings/microcontroller/__init__.c
diff options
context:
space:
mode:
authorHosted Weblate <hosted@weblate.org>2021-02-01 18:50:47 +0100
committerHosted Weblate <hosted@weblate.org>2021-02-01 18:50:47 +0100
commit4db7772d4e211e0210c15ee276e8af63af37a72b (patch)
treec82dfab54fc8ba75fa6bf7a1f527d4f4e81fc919 /shared-bindings/microcontroller/__init__.c
parentc3aa1ec10edff00513ecb1deac8d563e4617a2d5 (diff)
parent459f3232477877b6dbc011f93ebc9d3544d918c3 (diff)
Merge remote-tracking branch 'origin/main' into main
Diffstat (limited to 'shared-bindings/microcontroller/__init__.c')
-rw-r--r--shared-bindings/microcontroller/__init__.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c
index 035587c30..dba66fa4f 100644
--- a/shared-bindings/microcontroller/__init__.c
+++ b/shared-bindings/microcontroller/__init__.c
@@ -53,7 +53,13 @@
//| cpu: Processor
//| """CPU information and control, such as ``cpu.temperature`` and ``cpu.frequency``
//| (clock frequency).
-//| This object is the sole instance of `microcontroller.Processor`."""
+//| This object is an instance of `microcontroller.Processor`."""
+//|
+
+//| cpus: Processor
+//| """CPU information and control, such as ``cpus[0].temperature`` and ``cpus[1].frequency``
+//| (clock frequency) on chips with more than 1 cpu. The index selects which cpu.
+//| This object is an instance of `microcontroller.Processor`."""
//|
//| def delay_us(delay: int) -> None:
@@ -155,6 +161,9 @@ const mp_obj_module_t mcu_pin_module = {
STATIC const mp_rom_map_elem_t mcu_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_microcontroller) },
{ MP_ROM_QSTR(MP_QSTR_cpu), MP_ROM_PTR(&common_hal_mcu_processor_obj) },
+#if CIRCUITPY_PROCESSOR_COUNT > 1
+ { MP_ROM_QSTR(MP_QSTR_cpus), MP_ROM_PTR(&common_hal_multi_processor_obj) },
+#endif
{ MP_ROM_QSTR(MP_QSTR_delay_us), MP_ROM_PTR(&mcu_delay_us_obj) },
{ MP_ROM_QSTR(MP_QSTR_disable_interrupts), MP_ROM_PTR(&mcu_disable_interrupts_obj) },
{ MP_ROM_QSTR(MP_QSTR_enable_interrupts), MP_ROM_PTR(&mcu_enable_interrupts_obj) },