1 /* Scheduler includes. */
7 #define mainTINY_STACK 256
8 void vTest(void *pvParameters
);
9 void vTest2(void *pvParameters
);
11 /*-----------------------------------------------------------*/
14 * Create all the demo tasks - then start the scheduler.
18 /* When re-starting a debug session (rather than cold booting) we want
19 to ensure the installed interrupt handlers do not execute until after the
20 scheduler has been started. */
21 portDISABLE_INTERRUPTS();
23 #if configUSE_PREEMPTION == 1
24 xTaskCreate( vTest
, "TST1", mainTINY_STACK
, ( void * ) 10, tskIDLE_PRIORITY
, NULL
);
25 xTaskCreate( vTest2
, "TST2", mainTINY_STACK
, ( void * ) 10, tskIDLE_PRIORITY
, NULL
);
28 /* Finally start the scheduler. */
29 vTaskStartScheduler();
31 /* Should not get here as the processor is now under control of the
37 void vTest(void *pvParameters
)
39 const portTickType xDelay
= 100 / portTICK_RATE_MS
;
45 CLEAR_BIT(SP3SK_GPIO
, bit
);
46 if(dir
== 0) { if(++bit
== 23) { dir
=1; } }
47 else { if(--bit
== 16) { dir
=0;} }
48 SET_BIT(SP3SK_GPIO
, bit
);
53 void vTest2(void *pvParameters
)
55 const portTickType xDelay
= 250 / portTICK_RATE_MS
;
57 char marcas
[] = "|/-\\";
61 uart1_printline("\r");
62 uart1_printline("Running...");
63 uart1_printchar(marcas
[pos
]);
64 if(++pos
== 4) pos
= 0;