-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathos_cfg.h
78 lines (62 loc) · 2.89 KB
/
os_cfg.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*------------------------------------------------------------------------
| FILE DESCRIPTION |
------------------------------------------------------------------------*/
/*------------------------------------------------------------------------
| - File name : os_config.h
| - Author : zevorn
| - Update date : 2021.05.07
| - Copyright(C) : 2021-2021 zevorn. All rights reserved.
------------------------------------------------------------------------*/
/*------------------------------------------------------------------------
| COPYRIGHT NOTICE |
------------------------------------------------------------------------*/
/*
* Copyright (C) 2021, zevorn ([email protected])
* This file is part of Ant Real Time Operating System.
* Ant Real Time Operating System is free software: you can redistribute
* it and/or modify it under the terms of the Apache-2.0 License.
* Ant Real Time Operating System is distributed in the hope that it will
* be useful,but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Apache-2.0 License License for more details.
* You should have received a copy of the Apache-2.0 License.Ant Real Time
* Operating System. If not, see <http://www.apache.org/licenses/>.
**/
/*------------------------------------------------------------------------
| CONFIG |
------------------------------------------------------------------------*/
#ifndef __OS_CONFIG_H_
#define __OS_CONFIG_H_
#include "STC8Hx_REG.h"
/**
* @brief The kernel stack size, the maximum allowed is 256 byte
* The thread stack cannot exceed this size
**/
#define OS_KERNEL_STK_SIZE (128)
/**
* @brief The idle thread stack size, the maximum allowable
* OS_KERNEL_STK_SIZE bytes
**/
#define OS_IDLE_THREAD_STK_SIZE (64)
/**
* @brief The size of the system memory pool the maximum cannot exceed the size of XRAM
* @note The smallest unit of the memory pool is a memory block,
* which consists of a message header + memory,
* and the message header occupies 5 bytes.
* Suppose you have applied for 10 bytes of memory,
* which actually occupies 15 bytes, remember.
**/
#define OS_MEM_POOL_SIZE (256*2)
/**
* @brief The number of threads can be up to 31.
* @note If the software timer is enabled, there are only 30.
**/
#define OS_THREAD_MAX_NUM (3)
/**
* @brief Software timer switch, write 1 to open, write 0 to close.
**/
#define OS_SOFT_TIMER_CTRL (0)
/*------------------------------------------------------------------------
| END OF FLIE. (C) COPYRIGHT zevorn |
------------------------------------------------------------------------*/
#endif