]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MicroBlaze/main.c
Update version numbers to V7.4.1.
[freertos] / FreeRTOS / Demo / MicroBlaze / main.c
1 #error This project has been reworked for use with a later version of the Xilinx tools and IP.  Please find more up to date projects in other FreeRTOS/Demo/MicroBlaze_nnn directories.\r
2 \r
3 /*\r
4     FreeRTOS V7.4.1 - Copyright (C) 2013 Real Time Engineers Ltd.\r
5 \r
6     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\r
7     http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
8 \r
9     ***************************************************************************\r
10      *                                                                       *\r
11      *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
12      *    Complete, revised, and edited pdf reference manuals are also       *\r
13      *    available.                                                         *\r
14      *                                                                       *\r
15      *    Purchasing FreeRTOS documentation will not only help you, by       *\r
16      *    ensuring you get running as quickly as possible and with an        *\r
17      *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
18      *    the FreeRTOS project to continue with its mission of providing     *\r
19      *    professional grade, cross platform, de facto standard solutions    *\r
20      *    for microcontrollers - completely free of charge!                  *\r
21      *                                                                       *\r
22      *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
23      *                                                                       *\r
24      *    Thank you for using FreeRTOS, and thank you for your support!      *\r
25      *                                                                       *\r
26     ***************************************************************************\r
27 \r
28 \r
29     This file is part of the FreeRTOS distribution.\r
30 \r
31     FreeRTOS is free software; you can redistribute it and/or modify it under\r
32     the terms of the GNU General Public License (version 2) as published by the\r
33     Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
34 \r
35     >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
36     distribute a combined work that includes FreeRTOS without being obliged to\r
37     provide the source code for proprietary components outside of the FreeRTOS\r
38     kernel.\r
39 \r
40     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
41     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
42     FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\r
43     details. You should have received a copy of the GNU General Public License\r
44     and the FreeRTOS license exception along with FreeRTOS; if not it can be\r
45     viewed here: http://www.freertos.org/a00114.html and also obtained by\r
46     writing to Real Time Engineers Ltd., contact details for whom are available\r
47     on the FreeRTOS WEB site.\r
48 \r
49     1 tab == 4 spaces!\r
50 \r
51     ***************************************************************************\r
52      *                                                                       *\r
53      *    Having a problem?  Start by reading the FAQ "My application does   *\r
54      *    not run, what could be wrong?"                                     *\r
55      *                                                                       *\r
56      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
57      *                                                                       *\r
58     ***************************************************************************\r
59 \r
60 \r
61     http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
62     license and Real Time Engineers Ltd. contact details.\r
63 \r
64     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
65     including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
66     fully thread aware and reentrant UDP/IP stack.\r
67 \r
68     http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
69     Integrity Systems, who sell the code with commercial support, \r
70     indemnification and middleware, under the OpenRTOS brand.\r
71     \r
72     http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
73     engineered and independently SIL3 certified version for use in safety and \r
74     mission critical applications that require provable dependability.\r
75 */\r
76 \r
77 /*\r
78  * Creates all the demo application tasks, then starts the scheduler.  The WEB\r
79  * documentation provides more details of the standard demo application tasks.\r
80  *\r
81  * In addition to the standard tasks, main() creates two "Register Check" \r
82  * tasks.  These tasks write known values into every general purpose register,\r
83  * then check each register to ensure it still contains the expected (written)\r
84  * value.  The register check tasks operate at the idle priority so will get\r
85  * repeatedly preempted.  A register being found to contain an incorrect value\r
86  * following such a preemption would be indicative of an error in the context\r
87  * switch mechanism.\r
88  * \r
89  * Main.c also creates a task called "Check".  This only executes every three \r
90  * seconds but has the highest priority so is guaranteed to get processor time.  \r
91  * Its main function is to check that all the other tasks are still operational.\r
92  * Each task (other than the "flash" tasks) maintains a unique count that is \r
93  * incremented each time the task successfully completes its function.  Should \r
94  * any error occur within such a task the count is permanently halted.  The \r
95  * check task inspects the count of each task to ensure it has changed since\r
96  * the last time the check task executed.  If all the count variables have \r
97  * changed all the tasks are still executing error free, and the check task\r
98  * toggles the onboard LED.  Should any task contain an error at any time \r
99  * the LED toggle rate will change from 3 seconds to 500ms.\r
100  *\r
101  */\r
102 \r
103 /* Scheduler includes. */\r
104 #include "FreeRTOS.h"\r
105 #include "task.h"\r
106 \r
107 /* Demo application includes. */\r
108 #include "partest.h"\r
109 #include "flash.h"\r
110 #include "comtest2.h"\r
111 #include "integer.h"\r
112 #include "semtest.h"\r
113 #include "BlockQ.h"\r
114 #include "dynamic.h"\r
115 #include "PollQ.h"\r
116 \r
117 /* Hardware library includes. */\r
118 #include <xintc.h>\r
119 \r
120 /* The rate at which the 'check' LED will flash when no errors have been\r
121 detected. */\r
122 #define mainNO_ERROR_CHECK_PERIOD       3000\r
123 \r
124 /* The rate at which the 'check' LED will flash when an error has been\r
125 detected in one of the demo tasks. */\r
126 #define mainERROR_CHECK_PERIOD          500\r
127 \r
128 /* Demo application task priorities. */\r
129 #define mainLED_TASK_PRIORITY           ( tskIDLE_PRIORITY + 2 )\r
130 #define mainCHECK_TASK_PRIORITY         ( tskIDLE_PRIORITY + 3 )\r
131 #define mainSEM_TEST_PRIORITY           ( tskIDLE_PRIORITY + 1 )\r
132 #define mainCOM_TEST_PRIORITY           ( tskIDLE_PRIORITY + 2 )\r
133 #define mainBLOCK_Q_PRIORITY            ( tskIDLE_PRIORITY + 2 )\r
134 #define mainQUEUE_POLL_PRIORITY         ( tskIDLE_PRIORITY + 2 )\r
135 \r
136 /* Software cannot influence the BAUD rate used by the simple UART \r
137 implementation. */\r
138 #define mainBAUD_RATE                           0\r
139 \r
140 /* The LED flashed by the 'check' task to indicate the system status. */\r
141 #define mainCHECK_TASK_LED                      3\r
142 \r
143 /* The first LED flashed by the COM port test tasks.  LED mainCOM_TEST_LED + 1\r
144 will also be used. */\r
145 #define mainCOM_TEST_LED                        4\r
146 \r
147 /* The register test task does not make any function calls so does not require\r
148 much stack at all. */\r
149 #define mainTINY_STACK                          70\r
150 \r
151 /*\r
152  * The task that executes at the highest priority and calls \r
153  * prvCheckOtherTasksAreStillRunning().  See the description at the top\r
154  * of the file.\r
155  */\r
156 static void vErrorChecks( void *pvParameters );\r
157 \r
158 /*\r
159  * Checks that all the demo application tasks are still executing without error\r
160  * - as described at the top of the file.\r
161  */\r
162 static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void );\r
163 \r
164 /*\r
165  * The register test task as described at the top of this file.\r
166  */\r
167 static void vRegisterTest( void *pvParameters );\r
168 \r
169 /*\r
170  * Perform any necessary hardware configuration.\r
171  */\r
172 static void prvSetupHardware( void );\r
173 \r
174 /* Set to pdFAIL should an error be discovered in the register test tasks. */\r
175 static unsigned long ulRegisterTestStatus = pdPASS;\r
176 const unsigned long *pulStatusAddr = &ulRegisterTestStatus;\r
177 \r
178 /*-----------------------------------------------------------*/\r
179 \r
180 /*\r
181  * Create all the demo tasks - then start the scheduler.\r
182  */\r
183 int main (void) \r
184 {\r
185         /* When re-starting a debug session (rather than cold booting) we want\r
186         to ensure the installed interrupt handlers do not execute until after the\r
187         scheduler has been started. */\r
188         portDISABLE_INTERRUPTS();\r
189 \r
190         prvSetupHardware();\r
191 \r
192         /* Start the standard demo application tasks. */\r
193         vStartLEDFlashTasks( mainLED_TASK_PRIORITY );\r
194         vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_RATE, mainCOM_TEST_LED );\r
195         vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
196         vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
197         vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
198         vStartDynamicPriorityTasks();\r
199         vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
200         \r
201         /* Create two register check tasks - using a different parameter for each.\r
202         The parameter is used to generate the known values written to the registers. */\r
203         #if configUSE_PREEMPTION == 1\r
204                 xTaskCreate( vRegisterTest, "Reg1", mainTINY_STACK, ( void * ) 10, tskIDLE_PRIORITY, NULL );\r
205                 xTaskCreate( vRegisterTest, "Reg2", mainTINY_STACK, ( void * ) 20, tskIDLE_PRIORITY, NULL );\r
206         #endif\r
207 \r
208         /* Create the 'check' task that is defined in this file. */\r
209         xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
210 \r
211         /* Finally start the scheduler. */\r
212         vTaskStartScheduler();\r
213 \r
214         /* Should not get here as the processor is now under control of the \r
215         scheduler! */\r
216 \r
217         return 0;\r
218 }\r
219 /*-----------------------------------------------------------*/\r
220 \r
221 static void vErrorChecks( void *pvParameters )\r
222 {\r
223 portTickType xDelayPeriod = mainNO_ERROR_CHECK_PERIOD;\r
224 \r
225         /* The parameters are not used. */\r
226         ( void ) pvParameters;\r
227 \r
228         /* Cycle for ever, delaying then checking all the other tasks are still\r
229         operating without error.  The delay period used will depend on whether\r
230         or not an error has been discovered in one of the demo tasks. */\r
231         for( ;; )\r
232         {\r
233                 vTaskDelay( xDelayPeriod );\r
234                 if( !prvCheckOtherTasksAreStillRunning() )\r
235                 {\r
236                         /* An error has been found.  Shorten the delay period to make\r
237                         the LED flash faster. */\r
238                         xDelayPeriod = mainERROR_CHECK_PERIOD;\r
239                 }\r
240 \r
241                 vParTestToggleLED( mainCHECK_TASK_LED );\r
242         }\r
243 }\r
244 /*-----------------------------------------------------------*/\r
245 \r
246 static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )\r
247 {\r
248 static portBASE_TYPE xAllTestsPass = pdTRUE;\r
249 \r
250         /* Return pdFALSE if any demo application task set has encountered\r
251         an error. */\r
252 \r
253         if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
254         {\r
255                 xAllTestsPass = pdFALSE;\r
256         }\r
257 \r
258         if( xAreComTestTasksStillRunning() != pdTRUE )\r
259         {\r
260                 xAllTestsPass = pdFALSE;\r
261         }\r
262 \r
263         if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
264         {\r
265                 xAllTestsPass = pdFALSE;\r
266         }\r
267 \r
268         if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
269         {\r
270                 xAllTestsPass = pdFAIL;\r
271         }\r
272 \r
273         if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
274         {\r
275                 xAllTestsPass = ( long ) pdFAIL;\r
276         }\r
277 \r
278         if( xArePollingQueuesStillRunning() != pdTRUE )\r
279         {\r
280                 xAllTestsPass = ( long ) pdFAIL;\r
281         }\r
282 \r
283         /* Mutual exclusion on this variable is not necessary as we only read it. */\r
284         if( ulRegisterTestStatus != pdPASS )\r
285         {\r
286                 xAllTestsPass = pdFALSE;\r
287         }\r
288 \r
289         return xAllTestsPass;\r
290 }\r
291 /*-----------------------------------------------------------*/\r
292 \r
293 static void prvSetupHardware( void )\r
294 {\r
295         /* Ensure the interrupt controller is enabled in order that subsequent \r
296         code can successfully configure the peripherals. */\r
297         XIntc_mMasterEnable( XPAR_OPB_INTC_0_BASEADDR );\r
298 \r
299         /* Initialise the GPIO used for the LED's. */\r
300         vParTestInitialise();\r
301 }\r
302 /*-----------------------------------------------------------*/\r
303 \r
304 static void vRegisterTest( void *pvParameters )\r
305 {\r
306         for( ;; )\r
307         {\r
308                 /* Fill the registers with their register number plus the offset \r
309                 (added) value.  The added value is passed in as a parameter so\r
310                 is contained in r5. */\r
311                 asm volatile (  "addi r3, r5, 3         \n\t" \\r
312                                                 "addi r4, r5, 4         \n\t" \\r
313                                                 "addi r6, r5, 6         \n\t" \\r
314                                                 "addi r7, r5, 7         \n\t" \\r
315                                                 "addi r8, r5, 8         \n\t" \\r
316                                                 "addi r9, r5, 9         \n\t" \\r
317                                                 "addi r10, r5, 10       \n\t" \\r
318                                                 "addi r11, r5, 11       \n\t" \\r
319                                                 "addi r12, r5, 12       \n\t" \\r
320                                                 "addi r16, r5, 16       \n\t" \\r
321                                                 "addi r17, r5, 17       \n\t" \\r
322                                                 "addi r18, r5, 18       \n\t" \\r
323                                                 "addi r19, r5, 19       \n\t" \\r
324                                                 "addi r20, r5, 20       \n\t" \\r
325                                                 "addi r21, r5, 21       \n\t" \\r
326                                                 "addi r22, r5, 22       \n\t" \\r
327                                                 "addi r23, r5, 23       \n\t" \\r
328                                                 "addi r24, r5, 24       \n\t" \\r
329                                                 "addi r25, r5, 25       \n\t" \\r
330                                                 "addi r26, r5, 26       \n\t" \\r
331                                                 "addi r27, r5, 27       \n\t" \\r
332                                                 "addi r28, r5, 28       \n\t" \\r
333                                                 "addi r29, r5, 29       \n\t" \\r
334                                                 "addi r30, r5, 30       \n\t" \\r
335                                                 "addi r31, r5, 31       \n\t"\r
336                                         );\r
337 \r
338                 /* Now read back the register values to ensure they are as we expect. \r
339                 This task will get preempted frequently so other tasks are likely to\r
340                 have executed since the register values were written. */\r
341 \r
342                 /* r3 should contain r5 + 3.  Subtract 3 to leave r3 equal to r5. */\r
343                 asm volatile (  "addi r3, r3, -3 " );\r
344 \r
345                 /* Compare r3 and r5.  If they are not equal then either r3 or r5\r
346                 contains the wrong value and *pulStatusAddr is to pdFAIL. */\r
347                 asm volatile (  "cmp r3, r3, r5                         \n\t" \\r
348                                                 "beqi r3, 12                            \n\t" \\r
349                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
350                                                 "sw     r0, r0, r3                              \n\t" \r
351                                          );\r
352 \r
353                 /* Repeat for all the other registers. */\r
354                 asm volatile (  "addi r4, r4, -4                        \n\t" \\r
355                                                 "cmp r4, r4, r5                         \n\t" \\r
356                                                 "beqi r4, 12                            \n\t" \\r
357                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
358                                                 "sw     r0, r0, r3                              \n\t" \\r
359                                                 "addi r6, r6, -6                        \n\t" \\r
360                                                 "cmp r6, r6, r5                         \n\t" \\r
361                                                 "beqi r6, 12                            \n\t" \\r
362                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
363                                                 "sw     r0, r0, r3                              \n\t" \\r
364                                                 "addi r7, r7, -7                        \n\t" \\r
365                                                 "cmp r7, r7, r5                         \n\t" \\r
366                                                 "beqi r7, 12                            \n\t" \\r
367                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
368                                                 "sw     r0, r0, r3                              \n\t" \\r
369                                                 "addi r8, r8, -8                        \n\t" \\r
370                                                 "cmp r8, r8, r5                         \n\t" \\r
371                                                 "beqi r8, 12                            \n\t" \\r
372                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
373                                                 "sw     r0, r0, r3                              \n\t" \\r
374                                                 "addi r9, r9, -9                        \n\t" \\r
375                                                 "cmp r9, r9, r5                         \n\t" \\r
376                                                 "beqi r9, 12                            \n\t" \\r
377                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
378                                                 "sw     r0, r0, r3                              \n\t" \\r
379                                                 "addi r10, r10, -10                     \n\t" \\r
380                                                 "cmp r10, r10, r5                       \n\t" \\r
381                                                 "beqi r10, 12                           \n\t" \\r
382                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
383                                                 "sw     r0, r0, r3                              \n\t" \\r
384                                                 "addi r11, r11, -11                     \n\t" \\r
385                                                 "cmp r11, r11, r5                       \n\t" \\r
386                                                 "beqi r11, 12                           \n\t" \\r
387                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
388                                                 "sw     r0, r0, r3                              \n\t" \\r
389                                                 "addi r12, r12, -12                     \n\t" \\r
390                                                 "cmp r12, r12, r5                       \n\t" \\r
391                                                 "beqi r12, 12                           \n\t" \\r
392                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
393                                                 "sw     r0, r0, r3                              \n\t" \\r
394                                                 "sw     r0, r0, r3                              \n\t" \\r
395                                                 "addi r16, r16, -16                     \n\t" \\r
396                                                 "cmp r16, r16, r5                       \n\t" \\r
397                                                 "beqi r16, 12                           \n\t" \\r
398                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
399                                                 "sw     r0, r0, r3                              \n\t" \\r
400                                                 "addi r17, r17, -17                     \n\t" \\r
401                                                 "cmp r17, r17, r5                       \n\t" \\r
402                                                 "beqi r17, 12                           \n\t" \\r
403                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
404                                                 "sw     r0, r0, r3                              \n\t" \\r
405                                                 "addi r18, r18, -18                     \n\t" \\r
406                                                 "cmp r18, r18, r5                       \n\t" \\r
407                                                 "beqi r18, 12                           \n\t" \\r
408                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
409                                                 "sw     r0, r0, r3                              \n\t" \\r
410                                                 "addi r19, r19, -19                     \n\t" \\r
411                                                 "cmp r19, r19, r5                       \n\t" \\r
412                                                 "beqi r19, 12                           \n\t" \\r
413                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
414                                                 "sw     r0, r0, r3                              \n\t" \\r
415                                                 "addi r20, r20, -20                     \n\t" \\r
416                                                 "cmp r20, r20, r5                       \n\t" \\r
417                                                 "beqi r20, 12                           \n\t" \\r
418                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
419                                                 "sw     r0, r0, r3                              \n\t" \\r
420                                                 "addi r21, r21, -21                     \n\t" \\r
421                                                 "cmp r21, r21, r5                       \n\t" \\r
422                                                 "beqi r21, 12                           \n\t" \\r
423                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
424                                                 "sw     r0, r0, r3                              \n\t" \\r
425                                                 "addi r22, r22, -22                     \n\t" \\r
426                                                 "cmp r22, r22, r5                       \n\t" \\r
427                                                 "beqi r22, 12                           \n\t" \\r
428                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
429                                                 "sw     r0, r0, r3                              \n\t" \\r
430                                                 "addi r23, r23, -23                     \n\t" \\r
431                                                 "cmp r23, r23, r5                       \n\t" \\r
432                                                 "beqi r23, 12                           \n\t" \\r
433                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
434                                                 "sw     r0, r0, r3                              \n\t" \\r
435                                                 "addi r24, r24, -24                     \n\t" \\r
436                                                 "cmp r24, r24, r5                       \n\t" \\r
437                                                 "beqi r24, 12                           \n\t" \\r
438                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
439                                                 "sw     r0, r0, r3                              \n\t" \\r
440                                                 "addi r25, r25, -25                     \n\t" \\r
441                                                 "cmp r25, r25, r5                       \n\t" \\r
442                                                 "beqi r25, 12                           \n\t" \\r
443                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
444                                                 "sw     r0, r0, r3                              \n\t" \\r
445                                                 "addi r26, r26, -26                     \n\t" \\r
446                                                 "cmp r26, r26, r5                       \n\t" \\r
447                                                 "beqi r26, 12                           \n\t" \\r
448                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
449                                                 "sw     r0, r0, r3                              \n\t" \\r
450                                                 "addi r27, r27, -27                     \n\t" \\r
451                                                 "cmp r27, r27, r5                       \n\t" \\r
452                                                 "beqi r27, 12                           \n\t" \\r
453                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
454                                                 "sw     r0, r0, r3                              \n\t" \\r
455                                                 "addi r28, r28, -28                     \n\t" \\r
456                                                 "cmp r28, r28, r5                       \n\t" \\r
457                                                 "beqi r28, 12                           \n\t" \\r
458                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
459                                                 "sw     r0, r0, r3                              \n\t" \\r
460                                                 "addi r29, r29, -29                     \n\t" \\r
461                                                 "cmp r29, r29, r5                       \n\t" \\r
462                                                 "beqi r29, 12                           \n\t" \\r
463                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
464                                                 "sw     r0, r0, r3                              \n\t" \\r
465                                                 "addi r30, r30, -30                     \n\t" \\r
466                                                 "cmp r30, r30, r5                       \n\t" \\r
467                                                 "beqi r30, 12                           \n\t" \\r
468                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
469                                                 "sw     r0, r0, r3                              \n\t" \\r
470                                                 "addi r31, r31, -31                     \n\t" \\r
471                                                 "cmp r31, r31, r5                       \n\t" \\r
472                                                 "beqi r31, 12                           \n\t" \\r
473                                                 "lwi r3, r0, pulStatusAddr      \n\t" \\r
474                                                 "sw     r0, r0, r3                              \n\t"\r
475                                         );\r
476         }\r
477 }\r
478 \r
479 \r
480 \r