task counter added

This commit is contained in:
Wolfgang Hottgenroth 2020-11-14 21:30:53 +01:00
parent 6225e7c47d
commit b7b7d6e95d
No known key found for this signature in database
GPG Key ID: 656C88C7C1734267
2 changed files with 11 additions and 0 deletions

View File

@ -76,3 +76,13 @@ void schUpdate() {
}
}
}
uint8_t schTaskCnt() {
uint8_t cnt = 0;
for (uint8_t i = 0; i < MAX_NUM_OF_TASKS; i++) {
if (tasks[i].exec != NULL){
cnt++;
}
}
return cnt;
}

View File

@ -30,6 +30,7 @@ void schAdd(void (*exec)(void *), void *handle, uint32_t delay, uint32_t period)
void schDel(void (*exec)(void *), void *handle);
void schExec();
void schUpdate();
uint8_t schTaskCnt();
#endif /* PONTCOOPSCHEDULER_H_ */