AP_HAL_FLYMAPLE: Add support for using SPI devices of the same type.
This commit is contained in:
parent
07d50b5fbb
commit
038ad31f81
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user