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