mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_HAL: rename QSPIDevice to WSPIDevice
This commit is contained in:
parent
cc086ab8d4
commit
a73945c1b3
@ -33,9 +33,9 @@ namespace AP_HAL {
|
|||||||
class OpticalFlow;
|
class OpticalFlow;
|
||||||
class DSP;
|
class DSP;
|
||||||
|
|
||||||
class QSPIDevice;
|
class WSPIDevice;
|
||||||
class QSPIDeviceDriver;
|
class WSPIDeviceDriver;
|
||||||
class QSPIDeviceManager;
|
class WSPIDeviceManager;
|
||||||
|
|
||||||
class CANIface;
|
class CANIface;
|
||||||
class CANFrame;
|
class CANFrame;
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
BUS_TYPE_SITL = 4,
|
BUS_TYPE_SITL = 4,
|
||||||
BUS_TYPE_MSP = 5,
|
BUS_TYPE_MSP = 5,
|
||||||
BUS_TYPE_SERIAL = 6,
|
BUS_TYPE_SERIAL = 6,
|
||||||
BUS_TYPE_QSPI = 7,
|
BUS_TYPE_WSPI = 7,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Speed {
|
enum Speed {
|
||||||
|
@ -9,7 +9,7 @@ class AP_Param;
|
|||||||
#include "RCInput.h"
|
#include "RCInput.h"
|
||||||
#include "RCOutput.h"
|
#include "RCOutput.h"
|
||||||
#include "SPIDevice.h"
|
#include "SPIDevice.h"
|
||||||
#include "QSPIDevice.h"
|
#include "WSPIDevice.h"
|
||||||
#include "Storage.h"
|
#include "Storage.h"
|
||||||
#include "UARTDriver.h"
|
#include "UARTDriver.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@ -32,7 +32,7 @@ public:
|
|||||||
AP_HAL::UARTDriver* _uartJ, // extra5
|
AP_HAL::UARTDriver* _uartJ, // extra5
|
||||||
AP_HAL::I2CDeviceManager* _i2c_mgr,
|
AP_HAL::I2CDeviceManager* _i2c_mgr,
|
||||||
AP_HAL::SPIDeviceManager* _spi,
|
AP_HAL::SPIDeviceManager* _spi,
|
||||||
AP_HAL::QSPIDeviceManager* _qspi,
|
AP_HAL::WSPIDeviceManager* _wspi,
|
||||||
AP_HAL::AnalogIn* _analogin,
|
AP_HAL::AnalogIn* _analogin,
|
||||||
AP_HAL::Storage* _storage,
|
AP_HAL::Storage* _storage,
|
||||||
AP_HAL::UARTDriver* _console,
|
AP_HAL::UARTDriver* _console,
|
||||||
@ -65,7 +65,7 @@ public:
|
|||||||
uartJ(_uartJ),
|
uartJ(_uartJ),
|
||||||
i2c_mgr(_i2c_mgr),
|
i2c_mgr(_i2c_mgr),
|
||||||
spi(_spi),
|
spi(_spi),
|
||||||
qspi(_qspi),
|
wspi(_wspi),
|
||||||
analogin(_analogin),
|
analogin(_analogin),
|
||||||
storage(_storage),
|
storage(_storage),
|
||||||
console(_console),
|
console(_console),
|
||||||
@ -128,7 +128,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
AP_HAL::I2CDeviceManager* i2c_mgr;
|
AP_HAL::I2CDeviceManager* i2c_mgr;
|
||||||
AP_HAL::SPIDeviceManager* spi;
|
AP_HAL::SPIDeviceManager* spi;
|
||||||
AP_HAL::QSPIDeviceManager* qspi;
|
AP_HAL::WSPIDeviceManager* wspi;
|
||||||
AP_HAL::AnalogIn* analogin;
|
AP_HAL::AnalogIn* analogin;
|
||||||
AP_HAL::Storage* storage;
|
AP_HAL::Storage* storage;
|
||||||
AP_HAL::UARTDriver* console;
|
AP_HAL::UARTDriver* console;
|
||||||
|
@ -23,16 +23,16 @@
|
|||||||
#include "Device.h"
|
#include "Device.h"
|
||||||
#include "utility/OwnPtr.h"
|
#include "utility/OwnPtr.h"
|
||||||
|
|
||||||
#ifndef HAL_USE_QSPI_DEFAULT_CFG
|
#ifndef HAL_USE_WSPI_DEFAULT_CFG
|
||||||
#define HAL_USE_QSPI_DEFAULT_CFG 1
|
#define HAL_USE_WSPI_DEFAULT_CFG 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace AP_HAL
|
namespace AP_HAL
|
||||||
{
|
{
|
||||||
|
|
||||||
// Underlying HAL implementation can override these
|
// Underlying HAL implementation can override these
|
||||||
#if HAL_USE_QSPI_DEFAULT_CFG
|
#if HAL_USE_WSPI_DEFAULT_CFG
|
||||||
namespace QSPI
|
namespace WSPI
|
||||||
{
|
{
|
||||||
constexpr uint32_t CFG_CMD_MODE_MASK = (3LU << 8LU);
|
constexpr uint32_t CFG_CMD_MODE_MASK = (3LU << 8LU);
|
||||||
constexpr uint32_t CFG_CMD_MODE_NONE = (0LU << 8LU);
|
constexpr uint32_t CFG_CMD_MODE_NONE = (0LU << 8LU);
|
||||||
@ -80,13 +80,13 @@ constexpr uint32_t CFG_DATA_DDR = (1LU << 31LU);
|
|||||||
|
|
||||||
constexpr uint32_t CFG_SIOO = (1LU << 28LU);
|
constexpr uint32_t CFG_SIOO = (1LU << 28LU);
|
||||||
}
|
}
|
||||||
#endif //#if HAL_USE_QSPI_DEFAULT_CFG
|
#endif //#if HAL_USE_WSPI_DEFAULT_CFG
|
||||||
|
|
||||||
class QSPIDevice : public Device
|
class WSPIDevice : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QSPIDevice() : Device(BUS_TYPE_QSPI) { }
|
WSPIDevice() : Device(BUS_TYPE_WSPI) { }
|
||||||
|
|
||||||
/* See AP_HAL::Device::transfer() */
|
/* See AP_HAL::Device::transfer() */
|
||||||
virtual bool transfer(const uint8_t *send, uint32_t send_len,
|
virtual bool transfer(const uint8_t *send, uint32_t send_len,
|
||||||
@ -101,21 +101,21 @@ protected:
|
|||||||
uint32_t _trx_flags;
|
uint32_t _trx_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
class QSPIDeviceManager
|
class WSPIDeviceManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual OwnPtr<QSPIDevice> get_device(const char *name)
|
virtual OwnPtr<WSPIDevice> get_device(const char *name)
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the number of QSPI devices currently registered. */
|
/* Return the number of WSPI devices currently registered. */
|
||||||
virtual uint8_t get_count() const
|
virtual uint8_t get_count() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get qspi device name at @idx */
|
/* Get wspi device name at @idx */
|
||||||
virtual const char *get_device_name(uint8_t idx) const
|
virtual const char *get_device_name(uint8_t idx) const
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
Loading…
Reference in New Issue
Block a user