mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL_Linux: add Robsense PhenixPro Devkit Board support
This commit is contained in:
parent
895b5f34b8
commit
0e1ce2a7fd
@ -158,6 +158,8 @@ static RCInput_SoloLink rcinDriver;
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2 || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_EDGE
|
||||
static RCInput_Navio2 rcinDriver;
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
static RCInput_SBUS rcinDriver;
|
||||
#else
|
||||
static RCInput rcinDriver;
|
||||
#endif
|
||||
@ -210,6 +212,8 @@ static RCOutput_Sysfs rcoutDriver(0, 0, 14);
|
||||
static ap::RCOutput_Tap rcoutDriver;
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_EDGE
|
||||
static RCOutput_Sysfs rcoutDriver(0, 0, 15);
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
static RCOutput_Sysfs rcoutDriver(0, 0, 8);
|
||||
#else
|
||||
static Empty::RCOutput rcoutDriver;
|
||||
#endif
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_AERO || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
#include "RCInput_SBUS.h"
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -18,7 +18,8 @@
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_AERO || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ || \
|
||||
CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
|
||||
#include "RCInput.h"
|
||||
|
||||
@ -38,6 +39,8 @@ private:
|
||||
const char *device_path = "/dev/uart-sbus";
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ
|
||||
const char *device_path = "/dev/ttyS2";
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
const char *device_path = "/dev/ttyPS0";
|
||||
#else
|
||||
const char *device_path = nullptr;
|
||||
#endif
|
||||
|
@ -45,6 +45,8 @@ void RCOutput_Sysfs::init()
|
||||
for (uint8_t i = 0; i < _channel_count; i++) {
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
|
||||
_pwm_channels[i] = new PWM_Sysfs_Bebop(_channel_base+i);
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
_pwm_channels[i] = new PWM_Sysfs(_chip+i, 0);
|
||||
#else
|
||||
_pwm_channels[i] = new PWM_Sysfs(_chip, _channel_base+i);
|
||||
#endif
|
||||
|
@ -129,6 +129,13 @@ SPIDesc SPIDeviceManager::_device[] = {
|
||||
SPIDesc("mpu60x0ext", 0, 2, SPI_MODE_0, 8, SPI_CS_KERNEL, 1*MHZ, 11*MHZ),
|
||||
SPIDesc("ms5611", 0, 0, SPI_MODE_0, 8, SPI_CS_KERNEL, 10*MHZ,10*MHZ),
|
||||
};
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
SPIDesc SPIDeviceManager::_device[] = {
|
||||
SPIDesc("rst_g", 0, 0, SPI_MODE_3, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ),
|
||||
SPIDesc("lis3mdl", 0, 1, SPI_MODE_3, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ),
|
||||
SPIDesc("rst_a", 0, 2, SPI_MODE_3, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ),
|
||||
SPIDesc("ms5611", 0, 3, SPI_MODE_3, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ),
|
||||
};
|
||||
#else
|
||||
// empty device table
|
||||
SPIDesc SPIDeviceManager::_device[] = {
|
||||
|
@ -22,6 +22,8 @@ using namespace Linux;
|
||||
// card for ArduCopter and ArduPlane
|
||||
#if APM_BUILD_TYPE(APM_BUILD_Replay)
|
||||
#define STORAGE_DIR "."
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RST_ZYNQ
|
||||
#define STORAGE_DIR "/mnt/APM"
|
||||
#else
|
||||
#define STORAGE_DIR HAL_BOARD_STORAGE_DIRECTORY
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user