Ardupilot2/libraries/AP_HAL_SMACCM/AP_HAL_SMACCM_Main.cpp
James Bielman 7827a4a54a ArduCopter: Add AP_HAL_SMACCM support.
- Added default configuration to "config.h".
- Added main function to run under FreeRTOS with HWF4.
2013-01-09 11:19:51 -08:00

30 lines
499 B
C++

#include <AP_HAL_SMACCM.h>
#include <AP_HAL_SMACCM_Main.h>
#include <FreeRTOS.h>
#include <task.h>
static xTaskHandle g_main_task;
// These must be defined in the main ".pde" file.
extern const AP_HAL::HAL& hal;
extern void setup();
extern void loop();
static void main_task(void *arg)
{
hal.init(0, NULL);
setup();
for (;;)
loop();
}
void SMACCM::hal_main()
{
xTaskCreate(main_task, (signed char *)"main", 1024, NULL, 0, &g_main_task);
vTaskStartScheduler();
for (;;)
;
}