From cfd6ffc649eadbc3b8d0f33d13ec302873cb9743 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Jan 2021 16:06:30 -0600 Subject: Adding files for cpu temperature fix --- shared-bindings/microcontroller/__init__.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'shared-bindings/microcontroller/__init__.c') diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c index 035587c30..4ba856131 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) }, -- cgit v1.2.3 From e1838ff335f2daef9ad2389b7231b73da43057eb Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Jan 2021 11:57:36 -0600 Subject: Fix typo in documentation. --- shared-bindings/microcontroller/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared-bindings/microcontroller/__init__.c') diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c index 4ba856131..dba66fa4f 100644 --- a/shared-bindings/microcontroller/__init__.c +++ b/shared-bindings/microcontroller/__init__.c @@ -58,7 +58,7 @@ //| 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. +//| (clock frequency) on chips with more than 1 cpu. The index selects which cpu. //| This object is an instance of `microcontroller.Processor`.""" //| -- cgit v1.2.3