mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
AP_HAL_AVR_SITL: separate header for AP_HAL_MAIN and Private
This commit is contained in:
parent
07be511f5e
commit
63eb1dc85d
@ -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__
|
||||
|
||||
|
16
libraries/AP_HAL_AVR_SITL/AP_HAL_AVR_SITL_Main.h
Normal file
16
libraries/AP_HAL_AVR_SITL/AP_HAL_AVR_SITL_Main.h
Normal 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__
|
12
libraries/AP_HAL_AVR_SITL/AP_HAL_AVR_SITL_Private.h
Normal file
12
libraries/AP_HAL_AVR_SITL/AP_HAL_AVR_SITL_Private.h
Normal 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__
|
||||
|
Loading…
Reference in New Issue
Block a user