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

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

View File

@ -93,7 +93,7 @@ void FLYMAPLESPIDeviceManager::init(void *)
{
}
AP_HAL::SPIDeviceDriver* FLYMAPLESPIDeviceManager::device(enum AP_HAL::SPIDevice)
AP_HAL::SPIDeviceDriver* FLYMAPLESPIDeviceManager::device(enum AP_HAL::SPIDevice, uint8_t index)
{
_device.init(); // Defer this until GPIO pin 13 is set up else its a slave
return &_device;

View File

@ -43,7 +43,7 @@ class AP_HAL_FLYMAPLE_NS::FLYMAPLESPIDeviceManager : public AP_HAL::SPIDeviceMan
public:
FLYMAPLESPIDeviceManager();
void init(void *);
AP_HAL::SPIDeviceDriver* device(enum AP_HAL::SPIDevice);
AP_HAL::SPIDeviceDriver* device(enum AP_HAL::SPIDevice, uint8_t index);
private:
FLYMAPLESPIDeviceDriver _device;
};