⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ucos-ii.lss

📁 avr ucos 代码 测试环境:source insight WINAVR 2个进程
💻 LSS
📖 第 1 页 / 共 5 页
字号:
     198:	88 23       	and	r24, r24
     19a:	d9 f7       	brne	.-10     	; 0x192 <OSEventNameSet+0x60>
        *pdest++ = *psrc++;
        len++;
    }
    *pdest = OS_ASCII_NUL;
     19c:	10 82       	st	Z, r1
        OS_EXIT_CRITICAL();
        *perr = OS_ERR_EVENT_NAME_TOO_LONG;
        return;
    }
    (void)OS_StrCopy(pevent->OSEventName, pname);     /* Yes, copy name to the event control block     */
    OS_EXIT_CRITICAL();
     19e:	78 94       	sei
    *perr = OS_ERR_NONE;
     1a0:	1c 92       	st	X, r1
}
     1a2:	df 91       	pop	r29
     1a4:	cf 91       	pop	r28
     1a6:	08 95       	ret

000001a8 <OSIntEnter>:
*********************************************************************************************************
*/

void  OSIntEnter (void)
{
    if (OSRunning == OS_TRUE) {
     1a8:	80 91 0b 02 	lds	r24, 0x020B
     1ac:	81 30       	cpi	r24, 0x01	; 1
     1ae:	39 f4       	brne	.+14     	; 0x1be <OSIntEnter+0x16>
        if (OSIntNesting < 255u) {
     1b0:	80 91 16 03 	lds	r24, 0x0316
     1b4:	8f 3f       	cpi	r24, 0xFF	; 255
     1b6:	19 f0       	breq	.+6      	; 0x1be <OSIntEnter+0x16>
            OSIntNesting++;                      /* Increment ISR nesting level                        */
     1b8:	8f 5f       	subi	r24, 0xFF	; 255
     1ba:	80 93 16 03 	sts	0x0316, r24
     1be:	08 95       	ret

000001c0 <OSVersion>:
*/

INT16U  OSVersion (void)
{
    return (OS_VERSION);
}
     1c0:	8d e1       	ldi	r24, 0x1D	; 29
     1c2:	91 e0       	ldi	r25, 0x01	; 1
     1c4:	08 95       	ret

000001c6 <OS_EventTaskRdy>:
* Note       : This function is INTERNAL to uC/OS-II and your application should not call it.
*********************************************************************************************************
*/
#if OS_EVENT_EN
INT8U  OS_EventTaskRdy (OS_EVENT *pevent, void *pmsg, INT8U msk, INT8U pend_stat)
{
     1c6:	df 92       	push	r13
     1c8:	ef 92       	push	r14
     1ca:	ff 92       	push	r15
     1cc:	0f 93       	push	r16
     1ce:	1f 93       	push	r17
     1d0:	cf 93       	push	r28
     1d2:	df 93       	push	r29
     1d4:	ec 01       	movw	r28, r24
     1d6:	8b 01       	movw	r16, r22
     1d8:	d4 2e       	mov	r13, r20
     1da:	e2 2e       	mov	r14, r18
    INT16U  *ptbl;
#endif


#if OS_LOWEST_PRIO <= 63
    y     = OSUnMapTbl[pevent->OSEventGrp];             /* Find HPT waiting for message                */
     1dc:	5d 81       	ldd	r21, Y+5	; 0x05
     1de:	e5 2f       	mov	r30, r21
     1e0:	f0 e0       	ldi	r31, 0x00	; 0
     1e2:	e8 5f       	subi	r30, 0xF8	; 248
     1e4:	fe 4f       	sbci	r31, 0xFE	; 254
     1e6:	40 81       	ld	r20, Z
    bity  = (INT8U)(1 << y);
     1e8:	64 2f       	mov	r22, r20
     1ea:	70 e0       	ldi	r23, 0x00	; 0
     1ec:	21 e0       	ldi	r18, 0x01	; 1
     1ee:	30 e0       	ldi	r19, 0x00	; 0
     1f0:	c9 01       	movw	r24, r18
     1f2:	04 2e       	mov	r0, r20
     1f4:	02 c0       	rjmp	.+4      	; 0x1fa <OS_EventTaskRdy+0x34>
     1f6:	88 0f       	add	r24, r24
     1f8:	99 1f       	adc	r25, r25
     1fa:	0a 94       	dec	r0
     1fc:	e2 f7       	brpl	.-8      	; 0x1f6 <OS_EventTaskRdy+0x30>
     1fe:	f8 2e       	mov	r15, r24
    x     = OSUnMapTbl[pevent->OSEventTbl[y]];
     200:	de 01       	movw	r26, r28
     202:	a6 0f       	add	r26, r22
     204:	b7 1f       	adc	r27, r23
     206:	16 96       	adiw	r26, 0x06	; 6
     208:	9c 91       	ld	r25, X
     20a:	16 97       	sbiw	r26, 0x06	; 6
     20c:	e9 2f       	mov	r30, r25
     20e:	f0 e0       	ldi	r31, 0x00	; 0
     210:	e8 5f       	subi	r30, 0xF8	; 248
     212:	fe 4f       	sbci	r31, 0xFE	; 254
     214:	80 81       	ld	r24, Z
    bitx  = (INT8U)(1 << x);
     216:	08 2e       	mov	r0, r24
     218:	02 c0       	rjmp	.+4      	; 0x21e <OS_EventTaskRdy+0x58>
     21a:	22 0f       	add	r18, r18
     21c:	33 1f       	adc	r19, r19
     21e:	0a 94       	dec	r0
     220:	e2 f7       	brpl	.-8      	; 0x21a <OS_EventTaskRdy+0x54>
    prio  = (INT8U)((y << 3) + x);                      /* Find priority of task getting the msg       */
     222:	44 0f       	add	r20, r20
     224:	44 0f       	add	r20, r20
     226:	44 0f       	add	r20, r20
     228:	48 0f       	add	r20, r24
    }
    bitx = (INT16U)(1 << x);
    prio = (INT8U)((y << 4) + x);                       /* Find priority of task getting the msg       */
#endif

    pevent->OSEventTbl[y] &= ~bitx;                     /* Remove this task from the waiting list      */
     22a:	82 2f       	mov	r24, r18
     22c:	80 95       	com	r24
     22e:	89 23       	and	r24, r25
     230:	16 96       	adiw	r26, 0x06	; 6
     232:	8c 93       	st	X, r24
    if (pevent->OSEventTbl[y] == 0) {
     234:	88 23       	and	r24, r24
     236:	21 f4       	brne	.+8      	; 0x240 <OS_EventTaskRdy+0x7a>
        pevent->OSEventGrp &= ~bity;                    /* Clr group bit if this was only task pending */
     238:	8f 2d       	mov	r24, r15
     23a:	80 95       	com	r24
     23c:	58 23       	and	r21, r24
     23e:	5d 83       	std	Y+5, r21	; 0x05
    }
    ptcb                 =  OSTCBPrioTbl[prio];         /* Point to this task's OS_TCB                 */
     240:	e4 2f       	mov	r30, r20
     242:	f0 e0       	ldi	r31, 0x00	; 0
     244:	ee 0f       	add	r30, r30
     246:	ff 1f       	adc	r31, r31
     248:	ed 57       	subi	r30, 0x7D	; 125
     24a:	f8 4f       	sbci	r31, 0xF8	; 248
     24c:	01 90       	ld	r0, Z+
     24e:	f0 81       	ld	r31, Z
     250:	e0 2d       	mov	r30, r0
    ptcb->OSTCBDly       =  0;                          /* Prevent OSTimeTick() from readying task     */
     252:	10 8e       	std	Z+24, r1	; 0x18
     254:	17 8a       	std	Z+23, r1	; 0x17
    ptcb->OSTCBEventPtr  = (OS_EVENT *)0;               /* Unlink ECB from this task                   */
     256:	13 8a       	std	Z+19, r1	; 0x13
     258:	12 8a       	std	Z+18, r1	; 0x12
#if ((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0)
    ptcb->OSTCBMsg       =  pmsg;                       /* Send message directly to waiting task       */
     25a:	15 8b       	std	Z+21, r17	; 0x15
     25c:	04 8b       	std	Z+20, r16	; 0x14
#else
    pmsg                 =  pmsg;                       /* Prevent compiler warning if not used        */
#endif
    ptcb->OSTCBStatPend  =  pend_stat;                  /* Set pend status of post or abort            */
     25e:	e2 8e       	std	Z+26, r14	; 0x1a
    ptcb->OSTCBStat     &= ~msk;                        /* Clear bit associated with event type        */
     260:	8d 2d       	mov	r24, r13
     262:	80 95       	com	r24
     264:	91 8d       	ldd	r25, Z+25	; 0x19
     266:	89 23       	and	r24, r25
     268:	81 8f       	std	Z+25, r24	; 0x19
    if (ptcb->OSTCBStat ==  OS_STAT_RDY) {              /* See if task is ready (could be susp'd)      */
     26a:	88 23       	and	r24, r24
     26c:	59 f4       	brne	.+22     	; 0x284 <OS_EventTaskRdy+0xbe>
        OSRdyGrp        |=  bity;                       /* Put task in the ready to run list           */
     26e:	80 91 0b 03 	lds	r24, 0x030B
     272:	8f 29       	or	r24, r15
     274:	80 93 0b 03 	sts	0x030B, r24
        OSRdyTbl[y]     |=  bitx;
     278:	fb 01       	movw	r30, r22
     27a:	e4 5f       	subi	r30, 0xF4	; 244
     27c:	fc 4f       	sbci	r31, 0xFC	; 252
     27e:	80 81       	ld	r24, Z
     280:	28 2b       	or	r18, r24
     282:	20 83       	st	Z, r18
    }
    return (prio);
}
     284:	84 2f       	mov	r24, r20
     286:	df 91       	pop	r29
     288:	cf 91       	pop	r28
     28a:	1f 91       	pop	r17
     28c:	0f 91       	pop	r16
     28e:	ff 90       	pop	r15
     290:	ef 90       	pop	r14
     292:	df 90       	pop	r13
     294:	08 95       	ret

00000296 <OS_EventTaskWait>:
* Note       : This function is INTERNAL to uC/OS-II and your application should not call it.
*********************************************************************************************************
*/
#if OS_EVENT_EN
void  OS_EventTaskWait (OS_EVENT *pevent)
{
     296:	cf 93       	push	r28
     298:	df 93       	push	r29
     29a:	ec 01       	movw	r28, r24
    INT8U  y;


    OSTCBCur->OSTCBEventPtr =  pevent;            /* Store pointer to event control block in TCB       */
     29c:	a0 91 17 03 	lds	r26, 0x0317
     2a0:	b0 91 18 03 	lds	r27, 0x0318
     2a4:	53 96       	adiw	r26, 0x13	; 19
     2a6:	9c 93       	st	X, r25
     2a8:	8e 93       	st	-X, r24
     2aa:	52 97       	sbiw	r26, 0x12	; 18
    y                       =  OSTCBCur->OSTCBY;  /* Task no longer ready                              */
    OSRdyTbl[y]            &= ~OSTCBCur->OSTCBBitX;
     2ac:	5d 96       	adiw	r26, 0x1d	; 29
     2ae:	8c 91       	ld	r24, X
     2b0:	5d 97       	sbiw	r26, 0x1d	; 29
     2b2:	28 2f       	mov	r18, r24
     2b4:	30 e0       	ldi	r19, 0x00	; 0
     2b6:	5e 96       	adiw	r26, 0x1e	; 30
     2b8:	4c 91       	ld	r20, X
     2ba:	5e 97       	sbiw	r26, 0x1e	; 30
     2bc:	f9 01       	movw	r30, r18
     2be:	e4 5f       	subi	r30, 0xF4	; 244
     2c0:	fc 4f       	sbci	r31, 0xFC	; 252
     2c2:	84 2f       	mov	r24, r20
     2c4:	80 95       	com	r24
     2c6:	90 81       	ld	r25, Z
     2c8:	89 23       	and	r24, r25
     2ca:	80 83       	st	Z, r24
    if (OSRdyTbl[y] == 0) {
     2cc:	88 23       	and	r24, r24
     2ce:	49 f4       	brne	.+18     	; 0x2e2 <OS_EventTaskWait+0x4c>
        OSRdyGrp &= ~OSTCBCur->OSTCBBitY;         /* Clear event grp bit if this was only task pending */
     2d0:	5f 96       	adiw	r26, 0x1f	; 31
     2d2:	9c 91       	ld	r25, X
     2d4:	5f 97       	sbiw	r26, 0x1f	; 31
     2d6:	90 95       	com	r25
     2d8:	80 91 0b 03 	lds	r24, 0x030B
     2dc:	89 23       	and	r24, r25
     2de:	80 93 0b 03 	sts	0x030B, r24
    }
    pevent->OSEventTbl[OSTCBCur->OSTCBY] |= OSTCBCur->OSTCBBitX;          /* Put task in waiting list  */
     2e2:	fe 01       	movw	r30, r28
     2e4:	e2 0f       	add	r30, r18
     2e6:	f3 1f       	adc	r31, r19
     2e8:	86 81       	ldd	r24, Z+6	; 0x06
     2ea:	84 2b       	or	r24, r20
     2ec:	86 83       	std	Z+6, r24	; 0x06
    pevent->OSEventGrp                   |= OSTCBCur->OSTCBBitY;
     2ee:	8d 81       	ldd	r24, Y+5	; 0x05
     2f0:	5f 96       	adiw	r26, 0x1f	; 31
     2f2:	9c 91       	ld	r25, X
     2f4:	89 2b       	or	r24, r25
     2f6:	8d 83       	std	Y+5, r24	; 0x05
}
     2f8:	df 91       	pop	r29
     2fa:	cf 91       	pop	r28
     2fc:	08 95       	ret

000002fe <OS_EventTOAbort>:
* Note       : This function is INTERNAL to uC/OS-II and your application should not call it.
*********************************************************************************************************
*/
#if OS_EVENT_EN
void  OS_EventTOAbort (OS_EVENT *pevent)
{
     2fe:	cf 93       	push	r28
     300:	df 93       	push	r29
     302:	ec 01       	movw	r28, r24
    INT8U  y;


    y                       =  OSTCBCur->OSTCBY;
     304:	a0 91 17 03 	lds	r26, 0x0317
     308:	b0 91 18 03 	lds	r27, 0x0318
    pevent->OSEventTbl[y]  &= ~OSTCBCur->OSTCBBitX;    /* Remove task from wait list                   */
     30c:	5d 96       	adiw	r26, 0x1d	; 29
     30e:	8c 91       	ld	r24, X
     310:	5d 97       	sbiw	r26, 0x1d	; 29
     312:	fe 01       	movw	r30, r28
     314:	e8 0f       	add	r30, r24
     316:	f1 1d       	adc	r31, r1
     318:	5e 96       	adiw	r26, 0x1e	; 30
     31a:	8c 91       	ld	r24, X
     31c:	5e 97       	sbiw	r26, 0x1e	; 30
     31e:	80 95       	com	r24
     320:	96 81       	ldd	r25, Z+6	; 0x06
     322:	89 23       	and	r24, r25
     324:	86 83       	std	Z+6, r24	; 0x06
    if (pevent->OSEventTbl[y] == 0x00) {
     326:	88 23       	and	r24, r24
     328:	39 f4       	brne	.+14     	; 0x338 <OS_EventTOAbort+0x3a>
        pevent->OSEventGrp &= ~OSTCBCur->OSTCBBitY;
     32a:	5f 96       	adiw	r26, 0x1f	; 31
     32c:	9c 91       	ld	r25, X
     32e:	5f 97       	sbiw	r26, 0x1f	; 31
     330:	90 95       	com	r25
     332:	8d 81       	ldd	r24, Y+5	; 0x05
     334:	89 23       	and	r24, r25
     336:	8d 83       	std	Y+5, r24	; 0x05
    }
    OSTCBCur->OSTCBStatPend =  OS_STAT_PEND_OK;        /* Clear pend status                            */
     338:	5a 96       	adiw	r26, 0x1a	; 26
     33a:	1c 92       	st	X, r1
     33c:	5a 97       	sbiw	r26, 0x1a	; 26
    OSTCBCur->OSTCBStat     =  OS_STAT_RDY;            /* Set status to ready                          */
     33e:	59 96       	adiw	r26, 0x19	; 25
     340:	1c 92       	st	X, r1
     342:	59 97       	sbiw	r26, 0x19	; 25
    OSTCBCur->OSTCBEventPtr = (OS_EVENT *)0;           /* No longer waiting for event                  */
     344:	53 96       	adiw	r26, 0x13	; 19
     346:	1c 92       	st	X, r1
     348:	1e 92       	st	-X, r1
     34a:	52 97       	sbiw	r26, 0x12	; 18
}
     34c:	df 91       	pop	r29
     34e:	cf 91       	pop	r28
     350:	08 95       	ret

00000352 <OS_EventWaitListInit>:
* Note       : This function is INTERNAL to uC/OS-II and your application should not call it.
*********************************************************************************************************
*/
#if OS_EVENT_EN
void  OS_EventWaitListInit (OS_EVENT *pevent)
{
     352:	fc 01       	movw	r30, r24
    INT16U *ptbl;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -