The second core and the chip: rp2040. More...
#include <RP2040.h>
Public Member Functions | |
| void | idleOtherCore () |
| Stops the other core until resumeOtherCore(), and returns once it has stopped. | |
| void | resumeOtherCore () |
| Lets the core stopped by idleOtherCore() carry on. Does nothing if none is stopped. | |
| void | restartCore1 () |
| Resets core 1 and starts it again from setup1(). | |
| int | cpuid () |
| Which core the calling code runs on. | |
| uint32_t | f_cpu () |
| CPU clock (Tools > CPU Speed). | |
| int | getTotalHeap () |
| Size of the heap (memory for new, malloc(), String and, with FreeRTOS, tasks and queues). | |
| int | getUsedHeap () |
| Heap memory in use. | |
| int | getFreeHeap () |
| Heap memory still free: getTotalHeap() - getUsedHeap(). | |
Public Attributes | |
| RP2040FifoClass | fifo |
| Inter-core FIFO: see RP2040FifoClass. | |
The second core and the chip: rp2040.
| int RP2040Class::cpuid | ( | ) |
Which core the calling code runs on.
| uint32_t RP2040Class::f_cpu | ( | ) |
CPU clock (Tools > CPU Speed).
| int RP2040Class::getFreeHeap | ( | ) |
Heap memory still free: getTotalHeap() - getUsedHeap().
| int RP2040Class::getTotalHeap | ( | ) |
Size of the heap (memory for new, malloc(), String and, with FreeRTOS, tasks and queues).
| int RP2040Class::getUsedHeap | ( | ) |
Heap memory in use.
| void RP2040Class::idleOtherCore | ( | ) |
Stops the other core until resumeOtherCore(), and returns once it has stopped.
The other core waits with its interrupts off, so it cannot touch anything in the meantime: use this around code that must not be disturbed (for example writing to flash, which the other core may be running code from). Keep the time short. Does nothing if the other core is not running a sketch (no setup1()/loop1() without FreeRTOS) or is already stopped.
With FreeRTOS, the calling task also stays on its core and is not pre-empted until resumeOtherCore().
| void RP2040Class::restartCore1 | ( | ) |