📄 os_cpu_a.lst
字号:
131
132 #if defined(PC0)
133 # define PORTC0 PC0
134 #endif
135 #if defined(PC1)
136 # define PORTC1 PC1
137 #endif
138 #if defined(PC2)
139 # define PORTC2 PC2
140 #endif
141 #if defined(PC3)
142 # define PORTC3 PC3
143 #endif
144 #if defined(PC4)
145 # define PORTC4 PC4
146 #endif
147 #if defined(PC5)
148 # define PORTC5 PC5
149 #endif
150 #if defined(PC6)
151 # define PORTC6 PC6
152 #endif
153 #if defined(PC7)
154 # define PORTC7 PC7
155 #endif
156
157 /* PORT D */
158
159 #if defined(PD0)
160 # define PORTD0 PD0
161 #endif
162 #if defined(PD1)
163 # define PORTD1 PD1
164 #endif
165 #if defined(PD2)
166 # define PORTD2 PD2
167 #endif
168 #if defined(PD3)
169 # define PORTD3 PD3
170 #endif
171 #if defined(PD4)
172 # define PORTD4 PD4
173 #endif
174 #if defined(PD5)
175 # define PORTD5 PD5
176 #endif
177 #if defined(PD6)
178 # define PORTD6 PD6
179 #endif
180 #if defined(PD7)
181 # define PORTD7 PD7
182 #endif
183
184 /* PORT E */
185
186 #if defined(PE0)
187 # define PORTE0 PE0
188 #endif
189 #if defined(PE1)
190 # define PORTE1 PE1
191 #endif
192 #if defined(PE2)
193 # define PORTE2 PE2
194 #endif
195 #if defined(PE3)
196 # define PORTE3 PE3
197 #endif
198 #if defined(PE4)
199 # define PORTE4 PE4
200 #endif
201 #if defined(PE5)
202 # define PORTE5 PE5
203 #endif
204 #if defined(PE6)
205 # define PORTE6 PE6
206 #endif
207 #if defined(PE7)
208 # define PORTE7 PE7
209 #endif
210
211 /* PORT F */
212
213 #if defined(PF0)
214 # define PORTF0 PF0
215 #endif
216 #if defined(PF1)
217 # define PORTF1 PF1
218 #endif
219 #if defined(PF2)
220 # define PORTF2 PF2
221 #endif
222 #if defined(PF3)
223 # define PORTF3 PF3
224 #endif
225 #if defined(PF4)
226 # define PORTF4 PF4
227 #endif
228 #if defined(PF5)
229 # define PORTF5 PF5
230 #endif
231 #if defined(PF6)
232 # define PORTF6 PF6
233 #endif
234 #if defined(PF7)
235 # define PORTF7 PF7
236 #endif
237
238 /* PORT G */
239
240 #if defined(PG0)
241 # define PORTG0 PG0
242 #endif
243 #if defined(PG1)
244 # define PORTG1 PG1
245 #endif
246 #if defined(PG2)
247 # define PORTG2 PG2
248 #endif
249 #if defined(PG3)
250 # define PORTG3 PG3
251 #endif
252 #if defined(PG4)
253 # define PORTG4 PG4
254 #endif
255 #if defined(PG5)
256 # define PORTG5 PG5
257 #endif
257
65
66 #define OS_CPU_A
67 #include "os_cpu.h"
1 /*
2 ***************************************************************************************************
3 * uC/OS-II
4 * The Real-Time Kernel
5 *
6 * AVR Specific code
7 *
8 * File : OS_CPU.H
9 * By : Ole Saether
10 * Port Version : V1.01
11 *
12 * AVR-GCC port version : 1.0 2001-04-02 modified/ported to avr-gcc by Jesper Hansen (jesperh@telia
13 *
14 *
15 ***************************************************************************************************
16 */
17
18 /* Definition moved here so it can be used in the assembler file OS_CPU_A.ASM */
19 /* See below for the meaning of this define */
20
21 #define OS_CRITICAL_METHOD 1
22
23
24 #ifndef OS_CPU_A /* skip the rest if we're including from the assembler file */
25
26 #ifdef OS_CPU_GLOBALS
27 #define OS_CPU_EXT
28 #else
29 #define OS_CPU_EXT extern
30 #endif
31
32 /*
33 ***************************************************************************************************
34 * DATA TYPES
35 * (Compiler Specific)
36 ***************************************************************************************************
37 */
38
39 typedef unsigned char BOOLEAN;
40 typedef unsigned char INT8U; /* Unsigned 8 bit quantity
41 typedef signed char INT8S; /* Signed 8 bit quantity
42 typedef unsigned int INT16U; /* Unsigned 16 bit quantity
43 typedef signed int INT16S; /* Signed 16 bit quantity
44 typedef unsigned long INT32U; /* Unsigned 32 bit quantity
45 typedef signed long INT32S; /* Signed 32 bit quantity
46 typedef float FP32; /* Single precision floating point
47
48 typedef unsigned char OS_STK; /* Each stack entry is 8-bit wide
49
50 /*
51 ***************************************************************************************************
52 * Atmel AVR
53 *
54 *
55 * Method #1: Disable/Enable interrupts using simple instructions. After critical section, interru
56 * will be enabled even if they were disabled before entering the critical section.
57 *
58 * Method #2: Disable/Enable interrupts by preserving the state of interrupts. In other words, if
59 * interrupts were disabled before entering the critical section, they will be disabled
60 * leaving the critical section. Here's what happens in the macro below :
61 *
62 * OS_ENTER_CRITICAL:
63 *
64 * input SREG to a free register, Rn
65 * push Rn
66 *
67 * OS_EXIT_CRITICAL:
68 *
68 #define typedef ;
69 #include "os_cfg.h"
1
2
3 #ifndef OS_CFG_H
4 #define OS_CFG_H
5
6 #define CPU_CLOCK_HZ 14745600
7
8 #define OS_TASK_DEF_STK_SIZE 128 /* Default stack size
9
10 /* ---------------------- MISCELLANEOUS --------------------
11 #define OS_ARG_CHK_EN 0 /* Enable (1) or Disable (0) argument checking
12 #define OS_CPU_HOOKS_EN 1 /* uC/OS-II hooks are found in the processor port files
13
14 #define OS_DEBUG_EN 0 /* Enable(1) debug variables
15
16 #define OS_EVENT_NAME_SIZE 32 /* Determine the size of the name of a Sem, Mutex, Mbox or Q
17
18 #define OS_LOWEST_PRIO 15 /* Defines the lowest priority that can be assigned ...
19 /* ... MUST NEVER be higher than 63!
20
21 #define OS_MAX_EVENTS 10 /* Max. number of event control blocks in your application
22 #define OS_MAX_FLAGS 0 /* Max. number of Event Flag Groups in your application
23 #define OS_MAX_MEM_PART 0 /* Max. number of memory partitions
24 #define OS_MAX_QS 0 /* Max. number of queue control blocks in your application
25 #define OS_MAX_TASKS 6 /* Max. number of tasks in your application, MUST be >= 2
26
27 #define OS_SCHED_LOCK_EN 1 /* Include code for OSSchedLock() and OSSchedUnlock()
28
29 #define OS_TASK_IDLE_STK_SIZE OS_TASK_DEF_STK_SIZE
30 /* Idle task stack size (# of OS_STK wide entries)
31
32 #define OS_TASK_STAT_EN 1 /* Enable (1) or Disable(0) the statistics task
33 #define OS_TASK_STAT_STK_SIZE OS_TASK_DEF_STK_SIZE
34 /* Statistics task stack size (# of OS_STK wide entries)
35 #define OS_TASK_STAT_STK_CHK_EN 1 /* Check task stacks from statistic task
36
37 #define OS_TICK_STEP_EN 0 /* Enable tick stepping feature for uC/OS-View
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -