Browse Source

AP_HAL_Empty: Add support for using SPI devices of the same type.

master
mirkix 10 years ago committed by Andrew Tridgell
parent
commit
07d50b5fbb
  1. 2
      libraries/AP_HAL_Empty/SPIDriver.cpp
  2. 2
      libraries/AP_HAL_Empty/SPIDriver.h

2
libraries/AP_HAL_Empty/SPIDriver.cpp

@ -41,7 +41,7 @@ EmptySPIDeviceManager::EmptySPIDeviceManager() @@ -41,7 +41,7 @@ EmptySPIDeviceManager::EmptySPIDeviceManager()
void EmptySPIDeviceManager::init(void *)
{}
AP_HAL::SPIDeviceDriver* EmptySPIDeviceManager::device(enum AP_HAL::SPIDevice)
AP_HAL::SPIDeviceDriver* EmptySPIDeviceManager::device(enum AP_HAL::SPIDevice, uint8_t index)
{
return &_device;
}

2
libraries/AP_HAL_Empty/SPIDriver.h

@ -24,7 +24,7 @@ class Empty::EmptySPIDeviceManager : public AP_HAL::SPIDeviceManager { @@ -24,7 +24,7 @@ class Empty::EmptySPIDeviceManager : public AP_HAL::SPIDeviceManager {
public:
EmptySPIDeviceManager();
void init(void *);
AP_HAL::SPIDeviceDriver* device(enum AP_HAL::SPIDevice);
AP_HAL::SPIDeviceDriver* device(enum AP_HAL::SPIDevice, uint8_t index);
private:
EmptySPIDeviceDriver _device;
};

Loading…
Cancel
Save