diff options
| author | Dan Halbert <halbert@adafruit.com> | 2021-02-01 12:50:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 12:50:37 -0500 |
| commit | 459f3232477877b6dbc011f93ebc9d3544d918c3 (patch) | |
| tree | cc9d1e43b91725bdb2fea8ddde5e0330f6acffc4 /ports | |
| parent | 0c0b517112100c1ec90ed66fba8bc315bc5440d0 (diff) | |
| parent | e1838ff335f2daef9ad2389b7231b73da43057eb (diff) | |
Merge pull request #4087 from DavePutz/cpu_temp_doc
Fixing microcontroller.cpu on multi-core cpus and adding microcontroller.cpus
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/raspberrypi/common-hal/microcontroller/__init__.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ports/raspberrypi/common-hal/microcontroller/__init__.c b/ports/raspberrypi/common-hal/microcontroller/__init__.c index 774e313bb..85bfc329d 100644 --- a/ports/raspberrypi/common-hal/microcontroller/__init__.c +++ b/ports/raspberrypi/common-hal/microcontroller/__init__.c @@ -80,6 +80,7 @@ void common_hal_mcu_reset(void) { // The singleton microcontroller.Processor object, bound to microcontroller.cpu // It currently only has properties, and no state. +#if CIRCUITPY_PROCESSOR_COUNT > 1 static const mcu_processor_obj_t processor0 = { .base = { .type = &mcu_processor_type, @@ -92,7 +93,7 @@ static const mcu_processor_obj_t processor1 = { }, }; -const mp_rom_obj_tuple_t common_hal_mcu_processor_obj = { +const mp_rom_obj_tuple_t common_hal_multi_processor_obj = { {&mp_type_tuple}, CIRCUITPY_PROCESSOR_COUNT, { @@ -100,6 +101,13 @@ const mp_rom_obj_tuple_t common_hal_mcu_processor_obj = { MP_ROM_PTR(&processor1) } }; +#endif + +const mcu_processor_obj_t common_hal_mcu_processor_obj = { + .base = { + .type = &mcu_processor_type, + }, +}; #if CIRCUITPY_NVM && CIRCUITPY_INTERNAL_NVM_SIZE > 0 // The singleton nvm.ByteArray object. |
