1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

A tiny bit simpler pios.c, FreeRTOS is working and flashing an LED. Fat stuff needs a timer, Freertos is a nice way to supply that so a task is created and running. Need to rework the fat stuff so it is FreeRTOS friendly.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@111 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
dankers 2009-12-23 10:34:26 +00:00 committed by dankers
parent 08fc0ac743
commit 8cb7ce6a86

View File

@ -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
*/