| 70 | } |
| 71 | |
| 72 | bool SystemClass::queueCallback(TaskCallback callback, void* param) |
| 73 | { |
| 74 | if(callback == nullptr) { |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | #ifdef ENABLE_TASK_COUNT |
| 79 | auto level = noInterrupts(); |
| 80 | ++taskCount; |
| 81 | if(taskCount > maxTaskCount) { |
| 82 | maxTaskCount = taskCount; |
| 83 | } |
| 84 | restoreInterrupts(level); |
| 85 | #endif |
| 86 | |
| 87 | return system_os_post(USER_TASK_PRIO_1, reinterpret_cast<os_signal_t>(callback), |
| 88 | reinterpret_cast<os_param_t>(param)); |
| 89 | } |
| 90 | |
| 91 | bool SystemClass::queueCallback(InterruptCallback callback) |
| 92 | { |
no test coverage detected