mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-13 01:54:18 -03:00
AP_HAL: add get_device-ptr to HAL DeviceMananger API
This commit is contained in:
parent
222584fe13
commit
a6794d5ec0
@ -68,9 +68,9 @@ public:
|
||||
|
||||
class SPIDeviceManager {
|
||||
public:
|
||||
virtual OwnPtr<SPIDevice> get_device(const char *name)
|
||||
{
|
||||
return nullptr;
|
||||
virtual SPIDevice *get_device_ptr(const char *name) = 0;
|
||||
OwnPtr<SPIDevice> get_device(const char *name) {
|
||||
return AP_HAL::OwnPtr<AP_HAL::SPIDevice>(get_device_ptr(name));
|
||||
}
|
||||
|
||||
/* Return the number of SPI devices currently registered. */
|
||||
|
Loading…
Reference in New Issue
Block a user