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

📄 os_mbox.lst

📁 称植到lpc2124上的UCOS2.85版 是本人初学移植和ARM的成果 可能已有人上传类似的了
💻 LST
📖 第 1 页 / 共 5 页
字号:
 823 02bc CA01      		movw r24,r20
 824               	/* epilogue: frame size=0 */
 825 02be DF91      		pop r29
 826 02c0 CF91      		pop r28
 827 02c2 1F91      		pop r17
 828 02c4 0F91      		pop r16
 829 02c6 FF90      		pop r15
 830 02c8 0895      		ret
 831               	/* epilogue end (size=6) */
 832               	/* function OSMboxPendAbort size 76 (65) */
 837               	.Lscope4:
 841               	.global	OSMboxPost
 843               	OSMboxPost:
 426:../OSsrc/os_mbox.c **** #endif
 427:../OSsrc/os_mbox.c **** 
 428:../OSsrc/os_mbox.c **** /*$PAGE*/
 429:../OSsrc/os_mbox.c **** /*
 430:../OSsrc/os_mbox.c **** ***************************************************************************************************
 431:../OSsrc/os_mbox.c **** *                                       POST MESSAGE TO A MAILBOX
 432:../OSsrc/os_mbox.c **** *
 433:../OSsrc/os_mbox.c **** * Description: This function sends a message to a mailbox
 434:../OSsrc/os_mbox.c **** *
 435:../OSsrc/os_mbox.c **** * Arguments  : pevent        is a pointer to the event control block associated with the desired ma
 436:../OSsrc/os_mbox.c **** *
 437:../OSsrc/os_mbox.c **** *              pmsg          is a pointer to the message to send.  You MUST NOT send a NULL pointer
 438:../OSsrc/os_mbox.c **** *
 439:../OSsrc/os_mbox.c **** * Returns    : OS_ERR_NONE          The call was successful and the message was sent
 440:../OSsrc/os_mbox.c **** *              OS_ERR_MBOX_FULL     If the mailbox already contains a message.  You can can only se
 441:../OSsrc/os_mbox.c **** *                                   message at a time and thus, the message MUST be consumed before
 442:../OSsrc/os_mbox.c **** *                                   are allowed to send another one.
 443:../OSsrc/os_mbox.c **** *              OS_ERR_EVENT_TYPE    If you are attempting to post to a non mailbox.
 444:../OSsrc/os_mbox.c **** *              OS_ERR_PEVENT_NULL   If 'pevent' is a NULL pointer
 445:../OSsrc/os_mbox.c **** *              OS_ERR_POST_NULL_PTR If you are attempting to post a NULL pointer
 446:../OSsrc/os_mbox.c **** *
 447:../OSsrc/os_mbox.c **** * Note(s)    : 1) HPT means Highest Priority Task
 448:../OSsrc/os_mbox.c **** ***************************************************************************************************
 449:../OSsrc/os_mbox.c **** */
 450:../OSsrc/os_mbox.c **** 
 451:../OSsrc/os_mbox.c **** #if OS_MBOX_POST_EN > 0
 452:../OSsrc/os_mbox.c **** INT8U  OSMboxPost (OS_EVENT *pevent, void *pmsg)
 453:../OSsrc/os_mbox.c **** {
 845               	.LM127:
 846               	/* prologue: frame size=0 */
 847               	/* prologue end (size=0) */
 848 02ca FC01      		movw r30,r24
 454:../OSsrc/os_mbox.c **** #if OS_CRITICAL_METHOD == 3                           /* Allocate storage for CPU status register  
 455:../OSsrc/os_mbox.c ****     OS_CPU_SR  cpu_sr = 0;
 456:../OSsrc/os_mbox.c **** #endif
 457:../OSsrc/os_mbox.c **** 
 458:../OSsrc/os_mbox.c **** 
 459:../OSsrc/os_mbox.c **** 
 460:../OSsrc/os_mbox.c **** #if OS_ARG_CHK_EN > 0
 461:../OSsrc/os_mbox.c ****     if (pevent == (OS_EVENT *)0) {                    /* Validate 'pevent'                         
 850               	.LM128:
 851 02cc 892B      		or r24,r25
 852 02ce 19F4      		brne .L60
 462:../OSsrc/os_mbox.c ****         return (OS_ERR_PEVENT_NULL);
 854               	.LM129:
 855 02d0 84E0      		ldi r24,lo8(4)
 856 02d2 90E0      		ldi r25,hi8(4)
 857 02d4 0895      		ret
 858               	.L60:
 463:../OSsrc/os_mbox.c ****     }
 464:../OSsrc/os_mbox.c ****     if (pmsg == (void *)0) {                          /* Make sure we are not posting a NULL pointe
 860               	.LM130:
 861 02d6 6115      		cp r22,__zero_reg__
 862 02d8 7105      		cpc r23,__zero_reg__
 863 02da 19F4      		brne .L61
 465:../OSsrc/os_mbox.c ****         return (OS_ERR_POST_NULL_PTR);
 865               	.LM131:
 866 02dc 83E0      		ldi r24,lo8(3)
 867 02de 90E0      		ldi r25,hi8(3)
 868 02e0 0895      		ret
 869               	.L61:
 466:../OSsrc/os_mbox.c ****     }
 467:../OSsrc/os_mbox.c **** #endif
 468:../OSsrc/os_mbox.c ****     if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {  /* Validate event block type                 
 871               	.LM132:
 872 02e2 8081      		ld r24,Z
 873 02e4 8130      		cpi r24,lo8(1)
 874 02e6 19F0      		breq .L62
 469:../OSsrc/os_mbox.c ****         return (OS_ERR_EVENT_TYPE);
 876               	.LM133:
 877 02e8 81E0      		ldi r24,lo8(1)
 878 02ea 90E0      		ldi r25,hi8(1)
 879 02ec 0895      		ret
 880               	.L62:
 470:../OSsrc/os_mbox.c ****     }
 471:../OSsrc/os_mbox.c ****     OS_ENTER_CRITICAL();
 882               	.LM134:
 883               	/* #APP */
 884 02ee F894      		cli
 472:../OSsrc/os_mbox.c ****     if (pevent->OSEventGrp != 0) {                    /* See if any task pending on mailbox        
 886               	.LM135:
 887               	/* #NOAPP */
 888 02f0 8581      		ldd r24,Z+5
 889 02f2 8823      		tst r24
 890 02f4 59F0      		breq .L63
 473:../OSsrc/os_mbox.c ****                                                       /* Ready HPT waiting on event                
 474:../OSsrc/os_mbox.c ****         (void)OS_EventTaskRdy(pevent, pmsg, OS_STAT_MBOX, OS_STAT_PEND_OK);
 892               	.LM136:
 893 02f6 20E0      		ldi r18,lo8(0)
 894 02f8 42E0      		ldi r20,lo8(2)
 895 02fa CF01      		movw r24,r30
 896 02fc 0E94 0000 		call OS_EventTaskRdy
 475:../OSsrc/os_mbox.c ****         OS_EXIT_CRITICAL();
 898               	.LM137:
 899               	/* #APP */
 900 0300 7894      		sei
 476:../OSsrc/os_mbox.c ****         OS_Sched();                                   /* Find highest priority task ready to run   
 902               	.LM138:
 903               	/* #NOAPP */
 904 0302 0E94 0000 		call OS_Sched
 477:../OSsrc/os_mbox.c ****         return (OS_ERR_NONE);
 906               	.LM139:
 907 0306 80E0      		ldi r24,lo8(0)
 908 0308 90E0      		ldi r25,hi8(0)
 909 030a 0895      		ret
 910               	.L63:
 478:../OSsrc/os_mbox.c ****     }
 479:../OSsrc/os_mbox.c ****     if (pevent->OSEventPtr != (void *)0) {            /* Make sure mailbox doesn't already have a m
 912               	.LM140:
 913 030c 8181      		ldd r24,Z+1
 914 030e 9281      		ldd r25,Z+2
 915 0310 892B      		or r24,r25
 916 0312 21F0      		breq .L64
 480:../OSsrc/os_mbox.c ****         OS_EXIT_CRITICAL();
 918               	.LM141:
 919               	/* #APP */
 920 0314 7894      		sei
 481:../OSsrc/os_mbox.c ****         return (OS_ERR_MBOX_FULL);
 922               	.LM142:
 923               	/* #NOAPP */
 924 0316 84E1      		ldi r24,lo8(20)
 925 0318 90E0      		ldi r25,hi8(20)
 926 031a 0895      		ret
 927               	.L64:
 482:../OSsrc/os_mbox.c ****     }
 483:../OSsrc/os_mbox.c ****     pevent->OSEventPtr = pmsg;                        /* Place message in mailbox                  
 929               	.LM143:
 930 031c 7283      		std Z+2,r23
 931 031e 6183      		std Z+1,r22
 484:../OSsrc/os_mbox.c ****     OS_EXIT_CRITICAL();
 933               	.LM144:
 934               	/* #APP */
 935 0320 7894      		sei
 485:../OSsrc/os_mbox.c ****     return (OS_ERR_NONE);
 937               	.LM145:
 938               	/* #NOAPP */
 939 0322 80E0      		ldi r24,lo8(0)
 940 0324 90E0      		ldi r25,hi8(0)
 486:../OSsrc/os_mbox.c **** }
 942               	.LM146:
 943 0326 0895      		ret
 944               	/* epilogue: frame size=0 */
 945               	/* epilogue: noreturn */
 946               	/* epilogue end (size=0) */
 947               	/* function OSMboxPost size 51 (51) */
 949               	.Lscope5:
 954               	.global	OSMboxPostOpt
 956               	OSMboxPostOpt:
 487:../OSsrc/os_mbox.c **** #endif
 488:../OSsrc/os_mbox.c **** 
 489:../OSsrc/os_mbox.c **** /*$PAGE*/
 490:../OSsrc/os_mbox.c **** /*
 491:../OSsrc/os_mbox.c **** ***************************************************************************************************
 492:../OSsrc/os_mbox.c **** *                                       POST MESSAGE TO A MAILBOX
 493:../OSsrc/os_mbox.c **** *
 494:../OSsrc/os_mbox.c **** * Description: This function sends a message to a mailbox
 495:../OSsrc/os_mbox.c **** *
 496:../OSsrc/os_mbox.c **** * Arguments  : pevent        is a pointer to the event control block associated with the desired ma
 497:../OSsrc/os_mbox.c **** *
 498:../OSsrc/os_mbox.c **** *              pmsg          is a pointer to the message to send.  You MUST NOT send a NULL pointer
 499:../OSsrc/os_mbox.c **** *
 500:../OSsrc/os_mbox.c **** *              opt           determines the type of POST performed:
 501:../OSsrc/os_mbox.c **** *                            OS_POST_OPT_NONE         POST to a single waiting task
 502:../OSsrc/os_mbox.c **** *                                                     (Identical to OSMboxPost())
 503:../OSsrc/os_mbox.c **** *                            OS_POST_OPT_BROADCAST    POST to ALL tasks that are waiting on the mai
 504:../OSsrc/os_mbox.c **** *
 505:../OSsrc/os_mbox.c **** *                            OS_POST_OPT_NO_SCHED     Indicates that the scheduler will NOT be invo
 506:../OSsrc/os_mbox.c **** *
 507:../OSsrc/os_mbox.c **** * Returns    : OS_ERR_NONE          The call was successful and the message was sent
 508:../OSsrc/os_mbox.c **** *              OS_ERR_MBOX_FULL     If the mailbox already contains a message.  You can can only se
 509:../OSsrc/os_mbox.c **** *                                   message at a time and thus, the message MUST be consumed before
 510:../OSsrc/os_mbox.c **** *                                   are allowed to send another one.
 511:../OSsrc/os_mbox.c **** *              OS_ERR_EVENT_TYPE    If you are attempting to post to a non mailbox.
 512:../OSsrc/os_mbox.c **** *              OS_ERR_PEVENT_NULL   If 'pevent' is a NULL pointer
 513:../OSsrc/os_mbox.c **** *              OS_ERR_POST_NULL_PTR If you are attempting to post a NULL pointer
 514:../OSsrc/os_mbox.c **** *
 515:../OSsrc/os_mbox.c **** * Note(s)    : 1) HPT means Highest Priority Task
 516:../OSsrc/os_mbox.c **** *
 517:../OSsrc/os_mbox.c **** * Warning    : Interrupts can be disabled for a long time if you do a 'broadcast'.  In fact, the
 518:../OSsrc/os_mbox.c **** *              interrupt disable time is proportional to the number of tasks waiting on the mailbox
 519:../OSsrc/os_mbox.c **** ***************************************************************************************************
 520:../OSsrc/os_mbox.c **** */
 521:../OSsrc/os_mbox.c **** 
 522:../OSsrc/os_mbox.c **** #if OS_MBOX_POST_OPT_EN > 0
 523:../OSsrc/os_mbox.c **** INT8U  OSMboxPostOpt (OS_EVENT *pevent, void *pmsg, INT8U opt)
 524:../OSsrc/os_mbox.c **** {
 958               	.LM147:
 959               	/* prologue: frame size=0 */
 960 0328 EF92      		push r14
 961 032a FF92      		push r15
 962 032c 0F93      		push r16
 963 032e 1F93      		push r17
 964 0330 CF93      		push r28
 965 0332 DF93      		push r29
 966               	/* prologue end (size=6) */
 967 0334 EC01      		movw r28,r24
 968 0336 8B01      		movw r16,r22
 525:../OSsrc/os_mbox.c **** #if OS_CRITICAL_METHOD == 3                           /* Allocate storage for CPU status register  
 526:../OSsrc/os_mbox.c ****     OS_CPU_SR  cpu_sr = 0;
 527:../OSsrc/os_mbox.c **** #endif
 528:../OSsrc/os_mbox.c **** 
 529:../OSsrc/os_mbox.c **** 
 530:../OSsrc/os_mbox.c **** 
 531:../OSsrc/os_mbox.c **** #if OS_ARG_CHK_EN > 0
 532:../OSsrc/os_mbox.c ****     if (pevent == (OS_EVENT *)0) {                    /* Validate 'pevent'                         
 970               	.LM148:
 971 0338 892B      		or r24,r25
 972 033a 19F4      		brne .L66
 533:../OSsrc/os_mbox.c ****         return (OS_ERR_PEVENT_NULL);
 974               	.LM149:
 975 033c 84E0      		ldi r24,lo8(4)
 976 033e 90E0      		ldi r25,hi8(4)
 977 0340 36C0      		rjmp .L65
 978               	.L66:
 534:../OSsrc/os_mbox.c ****     }
 535:../OSsrc/os_mbox.c ****     if (pmsg == (void *)0) {                          /* Make sure we are not posting a NULL pointe
 980               	.LM150:
 981 0342 6115      		cp r22,__zero_reg__
 982 0344 7105      		cpc r23,__zero_reg__
 983 0346 19F4      		brne .L67
 536:../OSsrc/os_mbox.c ****         return (OS_ERR_POST_NULL_PTR);
 985               	.LM151:
 986 0348 83E0      		ldi r24,lo8(3)
 987 034a 90E0      		ldi r25,hi8(3)
 988 034c 30C0      		rjmp .L65
 989               	.L67:
 537:../OSsrc/os_mbox.c ****     }
 538:../OSsrc/os_mbox.c **** #endif
 539:../OSsrc/os_mbox.c ****     if (pevent->OSEventType != OS_EVENT_TYPE_MBOX) {  /* Validate event block type                 
 991               	.LM152:
 992 034e 8881      		ld r24,Y
 993 0350 8130      		cpi r24,lo8(1)
 994 0352 19F0      		breq .L68
 540:../OSsrc/os_mbox.c *

⌨️ 快捷键说明

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