34 lines
442 B
C
34 lines
442 B
C
/*
|
|
* PontCoopScheduler.h
|
|
*
|
|
* Created on: 29.08.2016
|
|
* Author: wn
|
|
*/
|
|
|
|
#ifndef PONTCOOPSCHEDULER_H_
|
|
#define PONTCOOPSCHEDULER_H_
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#define MAX_NUM_OF_TASKS 3
|
|
|
|
|
|
typedef struct {
|
|
uint32_t delay;
|
|
uint32_t period;
|
|
uint8_t run;
|
|
void (*exec)(void);
|
|
} tTask;
|
|
|
|
|
|
void schInit();
|
|
void schAdd(void (*exec)(void), uint32_t delay, uint32_t period);
|
|
void schExec();
|
|
void schUpdate();
|
|
|
|
|
|
#endif /* PONTCOOPSCHEDULER_H_ */
|