AP_HAL_AVR_SITL: separate header for AP_HAL_MAIN and Private

This commit is contained in:
Pat Hickey 2012-12-14 17:19:38 -08:00 committed by Andrew Tridgell
parent 07be511f5e
commit 63eb1dc85d
3 changed files with 31 additions and 12 deletions

View File

@ -2,19 +2,10 @@
#ifndef __AP_HAL_AVR_SITL_H__
#define __AP_HAL_AVR_SITL_H__
#include "AP_HAL_AVR_SITL_Namespace.h"
#include "HAL_AVR_SITL_Class.h"
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
#define AP_HAL_MAIN() extern "C" {\
int main (int argc, char * const argv[]) { \
hal.init(argc, argv); \
setup();\
for(;;) loop();\
return 0;\
}\
}
#endif
#include "HAL_AVR_SITL_Class.h"
#include "AP_HAL_AVR_SITL_Main.h"
#endif // __AP_HAL_AVR_SITL_H__

View File

@ -0,0 +1,16 @@
#ifndef __AP_HAL_AVR_SITL_MAIN_H__
#define __AP_HAL_AVR_SITL_MAIN_H__
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
#define AP_HAL_MAIN() extern "C" {\
int main (int argc, char * const argv[]) { \
hal.init(argc, argv); \
setup();\
for(;;) loop();\
return 0;\
}\
}
#endif
#endif // __AP_HAL_AVR_SITL_MAIN_H__

View File

@ -0,0 +1,12 @@
#ifndef __AP_HAL_AVR_SITL_PRIVATE_H__
#define __AP_HAL_AVR_SITL_PRIVATE_H__
#include "AP_HAL_AVR_SITL_Namespace.h"
#include "Scheduler.h"
#include "Storage.h"
#include "UARTDriver.h"
#include "SITL_State.h"
#endif // __AP_HAL_AVR_SITL_PRIVATE_H__