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

This commit is contained in:
mirkix 2015-09-14 20:47:07 +02:00 committed by Andrew Tridgell
parent f48bdc281f
commit 07d50b5fbb
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ EmptySPIDeviceManager::EmptySPIDeviceManager()
void EmptySPIDeviceManager::init(void *) 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; return &_device;
} }

View File

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