Compare commits

...

2 Commits

Author SHA1 Message Date
b7b7d6e95d task counter added 2020-11-14 21:30:53 +01:00
6225e7c47d increase to max 32 tasks 2020-11-05 14:37:47 +01:00
2 changed files with 12 additions and 1 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

@@ -13,7 +13,7 @@
#define MAX_NUM_OF_TASKS 8
#define MAX_NUM_OF_TASKS 32
typedef struct {
@@ -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_ */