📄 os_flag.lst
字号:
214 0068 3130 cpi r19,lo8(1)
215 006a 39F4 brne .L11
131:../OSsrc/os_flag.c **** pgrp->OSFlagFlags &= ~flags_rdy; /* Clear ONLY the flags that we wanted
217 .LM20:
218 006c 822F mov r24,r18
219 006e 8095 com r24
220 0070 9823 and r25,r24
221 0072 9383 std Z+3,r25
222 0074 02C0 rjmp .L11
223 .L9:
132:../OSsrc/os_flag.c **** }
133:../OSsrc/os_flag.c **** } else {
134:../OSsrc/os_flag.c **** *perr = OS_ERR_FLAG_NOT_RDY;
225 .LM21:
226 0076 80E7 ldi r24,lo8(112)
227 0078 8C93 st X,r24
228 .L11:
135:../OSsrc/os_flag.c **** }
136:../OSsrc/os_flag.c **** OS_EXIT_CRITICAL();
230 .LM22:
231 /* #APP */
232 007a 7894 sei
137:../OSsrc/os_flag.c **** break;
234 .LM23:
235 /* #NOAPP */
236 007c 30C0 rjmp .L7
237 .L12:
138:../OSsrc/os_flag.c ****
139:../OSsrc/os_flag.c **** case OS_FLAG_WAIT_SET_ANY:
140:../OSsrc/os_flag.c **** flags_rdy = (OS_FLAGS)(pgrp->OSFlagFlags & flags); /* Extract only the bits we wan
239 .LM24:
240 007e 9381 ldd r25,Z+3
241 0080 292F mov r18,r25
242 0082 2623 and r18,r22
141:../OSsrc/os_flag.c **** if (flags_rdy != (OS_FLAGS)0) { /* See if any flag set
244 .LM25:
245 0084 39F0 breq .L13
142:../OSsrc/os_flag.c **** if (consume == OS_TRUE) { /* See if we need to consume the flags
247 .LM26:
248 0086 3130 cpi r19,lo8(1)
249 0088 39F4 brne .L15
143:../OSsrc/os_flag.c **** pgrp->OSFlagFlags &= ~flags_rdy; /* Clear ONLY the flags that we got
251 .LM27:
252 008a 822F mov r24,r18
253 008c 8095 com r24
254 008e 9823 and r25,r24
255 0090 9383 std Z+3,r25
256 0092 02C0 rjmp .L15
257 .L13:
144:../OSsrc/os_flag.c **** }
145:../OSsrc/os_flag.c **** } else {
146:../OSsrc/os_flag.c **** *perr = OS_ERR_FLAG_NOT_RDY;
259 .LM28:
260 0094 80E7 ldi r24,lo8(112)
261 0096 8C93 st X,r24
262 .L15:
147:../OSsrc/os_flag.c **** }
148:../OSsrc/os_flag.c **** OS_EXIT_CRITICAL();
264 .LM29:
265 /* #APP */
266 0098 7894 sei
149:../OSsrc/os_flag.c **** break;
268 .LM30:
269 /* #NOAPP */
270 009a 21C0 rjmp .L7
271 .L16:
150:../OSsrc/os_flag.c ****
151:../OSsrc/os_flag.c **** #if OS_FLAG_WAIT_CLR_EN > 0
152:../OSsrc/os_flag.c **** case OS_FLAG_WAIT_CLR_ALL: /* See if all required flags are cleared
153:../OSsrc/os_flag.c **** flags_rdy = (OS_FLAGS)(~pgrp->OSFlagFlags & flags); /* Extract only the bits we want
273 .LM31:
274 009c 8381 ldd r24,Z+3
275 009e 282F mov r18,r24
276 00a0 2095 com r18
277 00a2 2623 and r18,r22
154:../OSsrc/os_flag.c **** if (flags_rdy == flags) { /* Must match ALL the bits that we want
279 .LM32:
280 00a4 2617 cp r18,r22
281 00a6 29F4 brne .L17
155:../OSsrc/os_flag.c **** if (consume == OS_TRUE) { /* See if we need to consume the flags
283 .LM33:
284 00a8 3130 cpi r19,lo8(1)
285 00aa 29F4 brne .L19
156:../OSsrc/os_flag.c **** pgrp->OSFlagFlags |= flags_rdy; /* Set ONLY the flags that we wanted
287 .LM34:
288 00ac 822B or r24,r18
289 00ae 8383 std Z+3,r24
290 00b0 02C0 rjmp .L19
291 .L17:
157:../OSsrc/os_flag.c **** }
158:../OSsrc/os_flag.c **** } else {
159:../OSsrc/os_flag.c **** *perr = OS_ERR_FLAG_NOT_RDY;
293 .LM35:
294 00b2 80E7 ldi r24,lo8(112)
295 00b4 8C93 st X,r24
296 .L19:
160:../OSsrc/os_flag.c **** }
161:../OSsrc/os_flag.c **** OS_EXIT_CRITICAL();
298 .LM36:
299 /* #APP */
300 00b6 7894 sei
162:../OSsrc/os_flag.c **** break;
302 .LM37:
303 /* #NOAPP */
304 00b8 12C0 rjmp .L7
305 .L20:
163:../OSsrc/os_flag.c ****
164:../OSsrc/os_flag.c **** case OS_FLAG_WAIT_CLR_ANY:
165:../OSsrc/os_flag.c **** flags_rdy = (OS_FLAGS)(~pgrp->OSFlagFlags & flags); /* Extract only the bits we want
307 .LM38:
308 00ba 8381 ldd r24,Z+3
309 00bc 282F mov r18,r24
310 00be 2095 com r18
311 00c0 2623 and r18,r22
166:../OSsrc/os_flag.c **** if (flags_rdy != (OS_FLAGS)0) { /* See if any flag cleared
313 .LM39:
314 00c2 29F0 breq .L21
167:../OSsrc/os_flag.c **** if (consume == OS_TRUE) { /* See if we need to consume the flags
316 .LM40:
317 00c4 3130 cpi r19,lo8(1)
318 00c6 29F4 brne .L23
168:../OSsrc/os_flag.c **** pgrp->OSFlagFlags |= flags_rdy; /* Set ONLY the flags that we got
320 .LM41:
321 00c8 822B or r24,r18
322 00ca 8383 std Z+3,r24
323 00cc 02C0 rjmp .L23
324 .L21:
169:../OSsrc/os_flag.c **** }
170:../OSsrc/os_flag.c **** } else {
171:../OSsrc/os_flag.c **** *perr = OS_ERR_FLAG_NOT_RDY;
326 .LM42:
327 00ce 80E7 ldi r24,lo8(112)
328 00d0 8C93 st X,r24
329 .L23:
172:../OSsrc/os_flag.c **** }
173:../OSsrc/os_flag.c **** OS_EXIT_CRITICAL();
331 .LM43:
332 /* #APP */
333 00d2 7894 sei
174:../OSsrc/os_flag.c **** break;
335 .LM44:
336 /* #NOAPP */
337 00d4 04C0 rjmp .L7
338 .L24:
175:../OSsrc/os_flag.c **** #endif
176:../OSsrc/os_flag.c ****
177:../OSsrc/os_flag.c **** default:
178:../OSsrc/os_flag.c **** OS_EXIT_CRITICAL();
340 .LM45:
341 /* #APP */
342 00d6 7894 sei
179:../OSsrc/os_flag.c **** flags_rdy = (OS_FLAGS)0;
344 .LM46:
345 /* #NOAPP */
346 00d8 20E0 ldi r18,lo8(0)
180:../OSsrc/os_flag.c **** *perr = OS_ERR_FLAG_WAIT_TYPE;
348 .LM47:
349 00da 8FE6 ldi r24,lo8(111)
350 00dc 8C93 st X,r24
351 .L7:
181:../OSsrc/os_flag.c **** break;
182:../OSsrc/os_flag.c **** }
183:../OSsrc/os_flag.c **** return (flags_rdy);
353 .LM48:
354 00de 3327 clr r19
355 .L1:
184:../OSsrc/os_flag.c **** }
357 .LM49:
358 00e0 C901 movw r24,r18
359 /* epilogue: frame size=0 */
360 00e2 0895 ret
361 /* epilogue end (size=1) */
362 /* function OSFlagAccept size 122 (121) */
369 .Lscope0:
373 .global OSFlagCreate
375 OSFlagCreate:
185:../OSsrc/os_flag.c **** #endif
186:../OSsrc/os_flag.c ****
187:../OSsrc/os_flag.c **** /*$PAGE*/
188:../OSsrc/os_flag.c **** /*
189:../OSsrc/os_flag.c **** ***************************************************************************************************
190:../OSsrc/os_flag.c **** * CREATE AN EVENT FLAG
191:../OSsrc/os_flag.c **** *
192:../OSsrc/os_flag.c **** * Description: This function is called to create an event flag group.
193:../OSsrc/os_flag.c **** *
194:../OSsrc/os_flag.c **** * Arguments : flags Contains the initial value to store in the event flag group.
195:../OSsrc/os_flag.c **** *
196:../OSsrc/os_flag.c **** * perr is a pointer to an error code which will be returned to your applicati
197:../OSsrc/os_flag.c **** * OS_ERR_NONE if the call was successful.
198:../OSsrc/os_flag.c **** * OS_ERR_CREATE_ISR if you attempted to create an Event Flag
199:../OSsrc/os_flag.c **** * ISR.
200:../OSsrc/os_flag.c **** * OS_ERR_FLAG_GRP_DEPLETED if there are no more event flag groups
201:../OSsrc/os_flag.c **** *
202:../OSsrc/os_flag.c **** * Returns : A pointer to an event flag group or a NULL pointer if no more groups are available.
203:../OSsrc/os_flag.c **** *
204:../OSsrc/os_flag.c **** * Called from: Task ONLY
205:../OSsrc/os_flag.c **** ***************************************************************************************************
206:../OSsrc/os_flag.c **** */
207:../OSsrc/os_flag.c ****
208:../OSsrc/os_flag.c **** OS_FLAG_GRP *OSFlagCreate (OS_FLAGS flags, INT8U *perr)
209:../OSsrc/os_flag.c **** {
377 .LM50:
378 /* prologue: frame size=0 */
379 /* prologue end (size=0) */
380 00e4 282F mov r18,r24
381 00e6 DB01 movw r26,r22
210:../OSsrc/os_flag.c **** OS_FLAG_GRP *pgrp;
211:../OSsrc/os_flag.c **** #if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register
212:../OSsrc/os_flag.c **** OS_CPU_SR cpu_sr = 0;
213:../OSsrc/os_flag.c **** #endif
214:../OSsrc/os_flag.c ****
215:../OSsrc/os_flag.c ****
216:../OSsrc/os_flag.c ****
217:../OSsrc/os_flag.c **** #if OS_ARG_CHK_EN > 0
218:../OSsrc/os_flag.c **** if (perr == (INT8U *)0) { /* Validate 'perr'
383 .LM51:
384 00e8 6115 cp r22,__zero_reg__
385 00ea 7105 cpc r23,__zero_reg__
386 00ec 29F1 breq .L26
219:../OSsrc/os_flag.c **** return ((OS_FLAG_GRP *)0);
220:../OSsrc/os_flag.c **** }
221:../OSsrc/os_flag.c **** #endif
222:../OSsrc/os_flag.c **** if (OSIntNesting > 0) { /* See if called from ISR ...
388 .LM52:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -