ardupilot/libraries/AP_HAL_PX4/AP_HAL_PX4_Main.h
2012-12-30 20:02:45 +11:00

19 lines
394 B
C

#ifndef __AP_HAL_PX4_MAIN_H__
#define __AP_HAL_PX4_MAIN_H__
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#define AP_HAL_MAIN() \
extern "C" __EXPORT int SKETCH_MAIN(int argc, char * const argv[]); \
int SKETCH_MAIN(int argc, char * const argv[]) { \
hal.init(argc, argv); \
setup(); \
for(;;) { \
loop(); \
} \
return OK; \
}
#endif
#endif // __AP_HAL_PX4_MAIN_H__