hottislib/PontCoopScheduler.h

36 lines
535 B
C
Raw Normal View History

2016-09-18 14:09:29 +02:00
/*
* PontCoopScheduler.h
*
* Created on: 29.08.2016
* Author: wn
*/
#ifndef PONTCOOPSCHEDULER_H_
#define PONTCOOPSCHEDULER_H_
#include <stdint.h>
2019-02-09 17:53:37 +01:00
#define MAX_NUM_OF_TASKS 8
2016-09-18 14:09:29 +02:00
typedef struct {
uint32_t delay;
uint32_t period;
uint8_t run;
void (*exec)(void *handle);
void *handle;
} tTask;
void schInit();
void schAdd(void (*exec)(void *), void *handle, uint32_t delay, uint32_t period);
void schDel(void (*exec)(void *), void *handle);
void schExec();
void schUpdate();
#endif /* PONTCOOPSCHEDULER_H_ */