HAL_Linux: updates for ERLE board type

This commit is contained in:
Andrew Tridgell 2014-07-14 08:52:27 +10:00
parent ab7e96b9de
commit 74ee70d463
17 changed files with 25 additions and 18 deletions

View File

@ -18,6 +18,7 @@
#define HAL_BOARD_FLYMAPLE 6
#define HAL_BOARD_LINUX 7
#define HAL_BOARD_VRBRAIN 8
#define HAL_BOARD_ERLE 9
#define HAL_BOARD_EMPTY 99
@ -95,6 +96,12 @@
#define HAL_STORAGE_SIZE 4096
#define HAL_STORAGE_SIZE_AVAILABLE HAL_STORAGE_SIZE
#elif CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#define AP_HAL_BOARD_DRIVER AP_HAL_Linux
#define HAL_BOARD_NAME "Erle Linux"
#define HAL_CPU_CLASS HAL_CPU_CLASS_1000
#define HAL_OS_POSIX_IO 1
#elif CONFIG_HAL_BOARD == HAL_BOARD_EMPTY
#define AP_HAL_BOARD_DRIVER AP_HAL_Empty
#define HAL_BOARD_NAME "EMPTY"

View File

@ -27,7 +27,7 @@
* `void setup()` and `void loop()`, ala Arduino.
*/
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "HAL_Linux_Class.h"
#include "AP_HAL_Linux_Main.h"

View File

@ -3,7 +3,7 @@
#ifndef __AP_HAL_LINUX_MAIN_H__
#define __AP_HAL_LINUX_MAIN_H__
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#define AP_HAL_MAIN() extern "C" {\
int main (int argc, char * const argv[]) { \
hal.init(argc, argv); \
@ -14,6 +14,6 @@ int main (int argc, char * const argv[]) { \
return 0;\
}\
}
#endif // HAL_BOARD_LINUX
#endif // HAL_BOARD_LINUX || HAL_BOARD_ERLE
#endif // __AP_HAL_LINUX_MAIN_H__

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "AnalogIn.h"
using namespace Linux;

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "GPIO.h"

View File

@ -1,5 +1,5 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "HAL_Linux_Class.h"
#include "AP_HAL_Linux_Private.h"

View File

@ -1,7 +1,7 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "I2CDriver.h"
#include <sys/types.h>

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "RCInput.h"

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "RCOutput.h"

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "SPIDriver.h"
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "Scheduler.h"
#include "Storage.h"

View File

@ -4,7 +4,7 @@
#include <AP_HAL_Linux.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include <sys/time.h>
#include <pthread.h>

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "Semaphores.h"

View File

@ -4,7 +4,7 @@
#include <AP_HAL_Boards.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include <AP_HAL_Linux.h>
#include <pthread.h>

View File

@ -1,5 +1,5 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include <assert.h>
#include <sys/types.h>

View File

@ -1,6 +1,6 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include "UARTDriver.h"

View File

@ -1,5 +1,5 @@
#include <AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
@ -20,4 +20,4 @@ void LinuxUtil::commandline_arguments(uint8_t &argc, char * const *&argv)
argv = saved_argv;
}
#endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX || CONFIG_HAL_BOARD == HAL_BOARD_ERLE