2012-12-14 21:19:38 -04:00
|
|
|
|
2015-05-04 03:15:12 -03:00
|
|
|
#ifndef __AP_HAL_SITL_MAIN_H__
|
|
|
|
#define __AP_HAL_SITL_MAIN_H__
|
2012-12-14 21:19:38 -04:00
|
|
|
|
2015-05-04 03:15:12 -03:00
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
2012-12-14 21:19:38 -04:00
|
|
|
#define AP_HAL_MAIN() extern "C" {\
|
|
|
|
int main (int argc, char * const argv[]) { \
|
2012-12-18 03:12:05 -04:00
|
|
|
hal.init(argc, argv); \
|
|
|
|
setup(); \
|
2013-01-10 18:37:22 -04:00
|
|
|
hal.scheduler->system_initialized(); \
|
2012-12-18 03:12:05 -04:00
|
|
|
for(;;) { \
|
|
|
|
loop(); \
|
|
|
|
} \
|
2012-12-14 21:19:38 -04:00
|
|
|
return 0;\
|
|
|
|
}\
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-05-04 03:15:12 -03:00
|
|
|
#endif // __AP_HAL_SITL_MAIN_H__
|