-
Notifications
You must be signed in to change notification settings - Fork 2
/
ucos-gcc.h
38 lines (38 loc) · 1.33 KB
/
ucos-gcc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
************************************************************
* UCOS-GCC.H
************************************************************
* CONSTANTS
************************************************************
*/
#define UCOS 0xF1 /* Context switch vector number */
#define OS_MAX_TASKS 64
#define IDLE_TASK_STK_SIZE 0x80
#define MONITOR_TASK_STK_SIZE 0x200
/*
************************************************************
* MACROS
************************************************************
*/
#define OS_ENTER_CRITICAL() asm("cli")
#define OS_EXIT_CRITICAL() asm("sti")
#define OS_TASK_SW() asm("int $0xF1")
/*
************************************************************
* DATA TYPES
************************************************************
*/
typedef unsigned char BOOLEAN;
typedef unsigned char UBYTE;
typedef signed char BYTE;
typedef unsigned int UDWORD;
typedef signed int DWORD;
/*
************************************************************
* FUNCTIONS
************************************************************
*/
extern void OSSetVect(unsigned char InterruptNumber, void (*Handler)(void));
extern void _start(void);
extern void OSMonitorTask(void *data);
extern void UserInit(void);