diff --git a/flight/PiOS/pios.c b/flight/PiOS/pios.c index 2f2214aaf..2a4a28437 100644 --- a/flight/PiOS/pios.c +++ b/flight/PiOS/pios.c @@ -42,6 +42,7 @@ void vApplicationIdleHook(void); /* Function Prototypes */ void TestTask( void *pvParameters ); +void DiskTask( void *pvParameters ); /** * Main function @@ -53,6 +54,9 @@ int main() enables the LEDs. */ PIOS_SYS_Init(); + xTaskCreate( TestTask, ( signed portCHAR * ) "Test", configMINIMAL_STACK_SIZE , NULL, 2, NULL ); + xTaskCreate( DiskTask, ( signed portCHAR * ) "Disk", configMINIMAL_STACK_SIZE , NULL, 4, NULL ); + /* Enables the SDCard */ // PIOS_SDCARD_Init(); @@ -69,8 +73,6 @@ int main() /* Initialise OpenPilot application */ // OpenPilotInit(); - xTaskCreate( TestTask, ( signed portCHAR * ) "Test", 128 , NULL, 2, NULL ); - /* Start the FreeRTOS scheduler */ vTaskStartScheduler(); @@ -91,6 +93,18 @@ const portTickType xDelay = 500 / portTICK_RATE_MS; } +void DiskTask( void *pvParameters ) +{ +const portTickType xDelay = 10 / portTICK_RATE_MS; + + while(1) + { + disk_timerproc(); + vTaskDelay(xDelay); + } +} + + /** * Idle hook function */