12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #ifndef RTOS_H
- #define RTOS_H
- #include "stm32g0xx.h"
- #define MAX_TASKS 20
- typedef struct task
- {
- void (*pFunc) (void);
- uint32_t delay;
- uint32_t period;
- uint8_t run;
- } task;
- void RTOS_Init (void);
- void RTOS_SetTask (void (*taskFunc)(void), uint32_t taskDelay, uint32_t taskPeriod);
- void RTOS_DeleteTask (void (*taskFunc)(void));
- void RTOS_DispatchTask (void);
- void RTOS_Timer (void);
- void tdelay_ms(uint32_t msek);
- #endif
|