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

📄 blockq.lst

📁 MSP430 IAR project with FreeRTOS port.
💻 LST
📖 第 1 页 / 共 3 页
字号:
    135          	pxQueueParameters2->psCheckVariable = &( sBlockingProducerCount[ 0 ] );
   \   000056   BB40....0400 MOV.W   #sBlockingProducerCount, 0x4(R11)
    136          
    137          
    138          	/* Note the producer has a lower priority than the consumer when the tasks are
    139          	spawned. */
    140          	xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB1", blckqSTACK_SIZE, ( void * ) pxQueueParameters1, uxPriority, NULL );
   \   00005C   0312         PUSH.W  #0x0
   \   00005E   11120800     PUSH.W  0x8(SP)
   \   000062   0A12         PUSH.W  R10
   \   000064   30124000     PUSH.W  #0x40
   \   000068   3E40....     MOV.W   #`?<Constant "QConsB1">`, R14
   \   00006C   3C40....     MOV.W   #vBlockingQueueConsumer, R12
   \   000070   B012....     CALL    #xTaskCreate
    141          	xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB2", blckqSTACK_SIZE, ( void * ) pxQueueParameters2, tskIDLE_PRIORITY, NULL );
   \   000074   0312         PUSH.W  #0x0
   \   000076   0312         PUSH.W  #0x0
   \   000078   0B12         PUSH.W  R11
   \   00007A   30124000     PUSH.W  #0x40
   \   00007E   3E40....     MOV.W   #`?<Constant "QProdB2">`, R14
   \   000082   3C40....     MOV.W   #vBlockingQueueProducer, R12
   \   000086   B012....     CALL    #xTaskCreate
    142          
    143          	
    144          
    145          	/* Create the second two tasks as described at the top of the file.   This uses
    146          	the same mechanism but reverses the task priorities. */
    147          
    148          	pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
   \   00008A   3C400600     MOV.W   #0x6, R12
   \   00008E   B012....     CALL    #pvPortMalloc
   \   000092   084C         MOV.W   R12, R8
    149          	pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
   \   000094   2E43         MOV.W   #0x2, R14
   \   000096   1C411000     MOV.W   0x10(SP), R12
   \   00009A   B012....     CALL    #xQueueCreate
   \   00009E   884C0000     MOV.W   R12, 0(R8)
    150          	pxQueueParameters3->xBlockTime = xDontBlock;
   \   0000A2   88450200     MOV.W   R5, 0x2(R8)
    151          	pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] );
   \   0000A6   B840....0400 MOV.W   #sBlockingProducerCount + 2, 0x4(R8)
    152          
    153          	pxQueueParameters4 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
   \   0000AC   3C400600     MOV.W   #0x6, R12
   \   0000B0   B012....     CALL    #pvPortMalloc
   \   0000B4   094C         MOV.W   R12, R9
    154          	pxQueueParameters4->xQueue = pxQueueParameters3->xQueue;
   \   0000B6   A9480000     MOV.W   @R8, 0(R9)
    155          	pxQueueParameters4->xBlockTime = xBlockTime;
   \   0000BA   89440200     MOV.W   R4, 0x2(R9)
    156          	pxQueueParameters4->psCheckVariable = &( sBlockingConsumerCount[ 1 ] );
   \   0000BE   B940....0400 MOV.W   #sBlockingConsumerCount + 2, 0x4(R9)
    157          
    158          	xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB3", blckqSTACK_SIZE, ( void * ) pxQueueParameters3, tskIDLE_PRIORITY, NULL );
   \   0000C4   0312         PUSH.W  #0x0
   \   0000C6   0312         PUSH.W  #0x0
   \   0000C8   0812         PUSH.W  R8
   \   0000CA   30124000     PUSH.W  #0x40
   \   0000CE   3E40....     MOV.W   #`?<Constant "QProdB3">`, R14
   \   0000D2   3C40....     MOV.W   #vBlockingQueueProducer, R12
   \   0000D6   B012....     CALL    #xTaskCreate
    159          	xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB4", blckqSTACK_SIZE, ( void * ) pxQueueParameters4, uxPriority, NULL );
   \   0000DA   0312         PUSH.W  #0x0
   \   0000DC   11122000     PUSH.W  0x20(SP)
   \   0000E0   0912         PUSH.W  R9
   \   0000E2   30124000     PUSH.W  #0x40
   \   0000E6   3E40....     MOV.W   #`?<Constant "QConsB4">`, R14
   \   0000EA   3C40....     MOV.W   #vBlockingQueueConsumer, R12
   \   0000EE   B012....     CALL    #xTaskCreate
    160          
    161          
    162          
    163          	/* Create the last two tasks as described above.  The mechanism is again just
    164          	the same.  This time both parameter structures are given a block time. */
    165          	pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
   \   0000F2   3C400600     MOV.W   #0x6, R12
   \   0000F6   B012....     CALL    #pvPortMalloc
   \   0000FA   064C         MOV.W   R12, R6
    166          	pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );
   \   0000FC   2E43         MOV.W   #0x2, R14
   \   0000FE   1C412200     MOV.W   0x22(SP), R12
   \   000102   B012....     CALL    #xQueueCreate
   \   000106   864C0000     MOV.W   R12, 0(R6)
    167          	pxQueueParameters5->xBlockTime = xBlockTime;
   \   00010A   86440200     MOV.W   R4, 0x2(R6)
    168          	pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] );
   \   00010E   B640....0400 MOV.W   #sBlockingProducerCount + 4, 0x4(R6)
    169          
    170          	pxQueueParameters6 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );
   \   000114   3C400600     MOV.W   #0x6, R12
   \   000118   B012....     CALL    #pvPortMalloc
   \   00011C   074C         MOV.W   R12, R7
    171          	pxQueueParameters6->xQueue = pxQueueParameters5->xQueue;
   \   00011E   A7460000     MOV.W   @R6, 0(R7)
    172          	pxQueueParameters6->xBlockTime = xBlockTime;
   \   000122   87440200     MOV.W   R4, 0x2(R7)
    173          	pxQueueParameters6->psCheckVariable = &( sBlockingConsumerCount[ 2 ] );	
   \   000126   B740....0400 MOV.W   #sBlockingConsumerCount + 4, 0x4(R7)
    174          
    175          	xTaskCreate( vBlockingQueueProducer, ( signed portCHAR * ) "QProdB5", blckqSTACK_SIZE, ( void * ) pxQueueParameters5, tskIDLE_PRIORITY, NULL );
   \   00012C   0312         PUSH.W  #0x0
   \   00012E   0312         PUSH.W  #0x0
   \   000130   0612         PUSH.W  R6
   \   000132   30124000     PUSH.W  #0x40
   \   000136   3E40....     MOV.W   #`?<Constant "QProdB5">`, R14
   \   00013A   3C40....     MOV.W   #vBlockingQueueProducer, R12
   \   00013E   B012....     CALL    #xTaskCreate
    176          	xTaskCreate( vBlockingQueueConsumer, ( signed portCHAR * ) "QConsB6", blckqSTACK_SIZE, ( void * ) pxQueueParameters6, tskIDLE_PRIORITY, NULL );
   \   000142   0312         PUSH.W  #0x0
   \   000144   0312         PUSH.W  #0x0
   \   000146   0712         PUSH.W  R7
   \   000148   30124000     PUSH.W  #0x40
   \   00014C   3E40....     MOV.W   #`?<Constant "QConsB6">`, R14
   \   000150   3C40....     MOV.W   #vBlockingQueueConsumer, R12
   \   000154   B012....     CALL    #xTaskCreate
    177          }
   \   000158   31503600     ADD.W   #0x36, SP
   \   00015C   3040....     BR      #?Epilogue8
    178          /*-----------------------------------------------------------*/
    179          

   \                                 In segment CODE, align 2
    180          static portTASK_FUNCTION( vBlockingQueueProducer, pvParameters )
   \                     vBlockingQueueProducer:
    181          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   2183         SUB.W   #0x2, SP
   \   000008   0A4C         MOV.W   R12, R10
    182          unsigned portSHORT usValue = 0;
   \   00000A   81430000     MOV.W   #0x0, 0x0(SP)
    183          xBlockingQueueParameters *pxQueueParameters;
    184          portSHORT sErrorEverOccurred = pdFALSE;
   \   00000E   0843         MOV.W   #0x0, R8
    185          
    186          	pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
   \   000010   0B4A         MOV.W   R10, R11
    187          
    188          	for( ;; )
    189          	{		
    190          		if( xQueueSend( pxQueueParameters->xQueue, ( void * ) &usValue, pxQueueParameters->xBlockTime ) != pdPASS )
   \                     ??vBlockingQueueProducer_0:
   \   000012   1B120200     PUSH.W  0x2(R11)
   \   000016   0E41         MOV.W   SP, R14
   \   000018   2E53         ADD.W   #0x2, R14
   \   00001A   2C4B         MOV.W   @R11, R12
   \   00001C   B012....     CALL    #xQueueSend
   \   000020   2153         ADD.W   #0x2, SP
   \   000022   1C93         CMP.W   #0x1, R12
   \   000024   0224         JEQ     ??vBlockingQueueProducer_1
    191          		{
    192          			sErrorEverOccurred = pdTRUE;
   \   000026   1843         MOV.W   #0x1, R8
   \   000028   F43F         JMP     ??vBlockingQueueProducer_0
    193          		}
    194          		else
    195          		{
    196          			/* We have successfully posted a message, so increment the variable
    197          			used to check we are still running. */
    198          			if( sErrorEverOccurred == pdFALSE )
   \                     ??vBlockingQueueProducer_1:
   \   00002A   0893         CMP.W   #0x0, R8
   \   00002C   0420         JNE     ??vBlockingQueueProducer_2
    199          			{
    200          				( *pxQueueParameters->psCheckVariable )++;
   \   00002E   1F4B0400     MOV.W   0x4(R11), R15
   \   000032   9F530000     ADD.W   #0x1, 0(R15)
    201          			}
    202          
    203          			/* Increment the variable we are going to post next time round.  The
    204          			consumer will expect the numbers to	follow in numerical order. */
    205          			++usValue;
   \                     ??vBlockingQueueProducer_2:
   \   000036   91530000     ADD.W   #0x1, 0x0(SP)
   \   00003A   EB3F         JMP     ??vBlockingQueueProducer_0
    206          		}
    207          	}
    208          }
    209          /*-----------------------------------------------------------*/
    210          

   \                                 In segment CODE, align 2
    211          static portTASK_FUNCTION( vBlockingQueueConsumer, pvParameters )
   \                     vBlockingQueueConsumer:
    212          {
   \   000000   0A12         PUSH.W  R10
   \   000002   0B12         PUSH.W  R11
   \   000004   0812         PUSH.W  R8
   \   000006   0912         PUSH.W  R9
   \   000008   2183         SUB.W   #0x2, SP
   \   00000A   0A4C         MOV.W   R12, R10
    213          unsigned portSHORT usData, usExpectedValue = 0;
   \   00000C   0B43         MOV.W   #0x0, R11
    214          xBlockingQueueParameters *pxQueueParameters;
    215          portSHORT sErrorEverOccurred = pdFALSE;
   \   00000E   0943         MOV.W   #0x0, R9
    216          
    217          	pxQueueParameters = ( xBlockingQueueParameters * ) pvParameters;
   \   000010   084A         MOV.W   R10, R8
    218          
    219          	for( ;; )
    220          	{	
    221          		if( xQueueReceive( pxQueueParameters->xQueue, &usData, pxQueueParameters->xBlockTime ) == pdPASS )
   \                     ??vBlockingQueueConsumer_0:
   \   000012   18120200     PUSH.W  0x2(R8)
   \   000016   0E41         MOV.W   SP, R14
   \   000018   2E53         ADD.W   #0x2, R14
   \   00001A   2C48         MOV.W   @R8, R12
   \   00001C   B012....     CALL    #xQueueReceive
   \   000020   2153         ADD.W   #0x2, SP
   \   000022   1C93         CMP.W   #0x1, R12
   \   000024   F623         JNE     ??vBlockingQueueConsumer_0

⌨️ 快捷键说明

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