tetris/sound-driver/scheduler.h

29 lines
474 B
C
Raw Normal View History

2024-03-26 10:44:23 +01:00
#ifndef PONTCOOPSCHEDULER_H_
#define PONTCOOPSCHEDULER_H_
#include <stdint.h>
2024-04-17 15:30:45 +02:00
#define MAX_NUM_OF_TASKS 4
2024-03-26 10:44:23 +01:00
typedef struct {
uint16_t delay;
uint16_t period;
uint8_t run;
void (*exec)(void *handle);
void *handle;
} tTask;
void schInit();
2024-03-26 23:13:59 +01:00
uint16_t schAdd(void (*exec)(void *), void *handle, uint32_t delay, uint32_t period);
// void schDel(void (*exec)(void *), void *handle);
void schDel(uint16_t taskId);
2024-03-26 10:44:23 +01:00
void schExec();
#endif /* PONTCOOPSCHEDULER_H_ */