diff --git a/libraries/AP_HAL/Device.h b/libraries/AP_HAL/Device.h index cdc9c6c10a..67bce23c94 100644 --- a/libraries/AP_HAL/Device.h +++ b/libraries/AP_HAL/Device.h @@ -141,12 +141,6 @@ public: */ virtual bool unregister_callback(PeriodicHandle h) { return false; } - /* - * Temporary method to get the fd used by this device: it's here only for - * allowing to convert old drivers to this new interface - */ - virtual int get_fd() = 0; - /** * Some devices connected on the I2C or SPI bus require a bit to be set on * the register address in order to perform a read operation. This sets a diff --git a/libraries/AP_HAL/I2CDevice.h b/libraries/AP_HAL/I2CDevice.h index 0f5cc9e7df..bccc18ad4b 100644 --- a/libraries/AP_HAL/I2CDevice.h +++ b/libraries/AP_HAL/I2CDevice.h @@ -66,9 +66,6 @@ public: /* See Device::adjust_periodic_callback() */ virtual bool adjust_periodic_callback( Device::PeriodicHandle h, uint32_t period_usec) override = 0; - - /* See Device::get_fd() */ - virtual int get_fd() override = 0; }; class I2CDeviceManager { diff --git a/libraries/AP_HAL/SPIDevice.h b/libraries/AP_HAL/SPIDevice.h index 92350784ff..41f8f32c06 100644 --- a/libraries/AP_HAL/SPIDevice.h +++ b/libraries/AP_HAL/SPIDevice.h @@ -56,8 +56,6 @@ public: /* See Device::adjust_periodic_callback() */ virtual bool adjust_periodic_callback( PeriodicHandle h, uint32_t period_usec) override { return false; } - - virtual int get_fd() override = 0; }; class SPIDeviceManager { diff --git a/libraries/AP_HAL_Empty/I2CDevice.h b/libraries/AP_HAL_Empty/I2CDevice.h index bec7fb039d..58905b2f70 100644 --- a/libraries/AP_HAL_Empty/I2CDevice.h +++ b/libraries/AP_HAL_Empty/I2CDevice.h @@ -77,9 +77,6 @@ public: { return true; } - - /* See AP_HAL::Device::get_fd() */ - int get_fd() { return -1; } }; class I2CDeviceManager : public AP_HAL::I2CDeviceManager { diff --git a/libraries/AP_HAL_Empty/SPIDevice.h b/libraries/AP_HAL_Empty/SPIDevice.h index 3fc580d006..ee54108e3f 100644 --- a/libraries/AP_HAL_Empty/SPIDevice.h +++ b/libraries/AP_HAL_Empty/SPIDevice.h @@ -69,9 +69,6 @@ public: return nullptr; } - /* See AP_HAL::Device::get_fd() */ - int get_fd() override { return -1; } - private: Semaphore _semaphore; }; diff --git a/libraries/AP_HAL_Linux/I2CDevice.cpp b/libraries/AP_HAL_Linux/I2CDevice.cpp index e1acb34ca3..1c8535918e 100644 --- a/libraries/AP_HAL_Linux/I2CDevice.cpp +++ b/libraries/AP_HAL_Linux/I2CDevice.cpp @@ -237,11 +237,6 @@ AP_HAL::Semaphore *I2CDevice::get_semaphore() return &_bus.sem; } -int I2CDevice::get_fd() -{ - return _bus.fd; -} - AP_HAL::Device::PeriodicHandle I2CDevice::register_periodic_callback( uint32_t period_usec, AP_HAL::Device::PeriodicCb cb) { diff --git a/libraries/AP_HAL_Linux/I2CDevice.h b/libraries/AP_HAL_Linux/I2CDevice.h index 37a155cfc8..c5cfd0f923 100644 --- a/libraries/AP_HAL_Linux/I2CDevice.h +++ b/libraries/AP_HAL_Linux/I2CDevice.h @@ -76,9 +76,6 @@ public: bool adjust_periodic_callback( AP_HAL::Device::PeriodicHandle h, uint32_t period_usec) override; - /* See AP_HAL::Device::get_fd() */ - int get_fd() override; - protected: I2CBus &_bus; uint8_t _address; diff --git a/libraries/AP_HAL_Linux/SPIDevice.cpp b/libraries/AP_HAL_Linux/SPIDevice.cpp index 5a01a7d389..64f6ca342d 100644 --- a/libraries/AP_HAL_Linux/SPIDevice.cpp +++ b/libraries/AP_HAL_Linux/SPIDevice.cpp @@ -353,11 +353,6 @@ AP_HAL::Semaphore *SPIDevice::get_semaphore() return &_bus.sem; } -int SPIDevice::get_fd() -{ - return _bus.fd; -} - AP_HAL::Device::PeriodicHandle SPIDevice::register_periodic_callback( uint32_t period_usec, AP_HAL::Device::PeriodicCb cb) { diff --git a/libraries/AP_HAL_Linux/SPIDevice.h b/libraries/AP_HAL_Linux/SPIDevice.h index 9b1c6e6879..6a7b8ecdec 100644 --- a/libraries/AP_HAL_Linux/SPIDevice.h +++ b/libraries/AP_HAL_Linux/SPIDevice.h @@ -58,9 +58,6 @@ public: bool adjust_periodic_callback( AP_HAL::Device::PeriodicHandle h, uint32_t period_usec) override; - /* See AP_HAL::Device::get_fd() */ - int get_fd() override; - protected: SPIBus &_bus; SPIDesc &_desc; diff --git a/libraries/AP_HAL_PX4/I2CDevice.h b/libraries/AP_HAL_PX4/I2CDevice.h index d52d2e8bf6..2c4cf7d2a7 100644 --- a/libraries/AP_HAL_PX4/I2CDevice.h +++ b/libraries/AP_HAL_PX4/I2CDevice.h @@ -69,9 +69,6 @@ public: return false; } - // this makes no sense on PX4 - int get_fd() override { return -1; } - AP_HAL::Semaphore* get_semaphore() override { return &semaphore; } private: diff --git a/libraries/AP_HAL_VRBRAIN/I2CDevice.h b/libraries/AP_HAL_VRBRAIN/I2CDevice.h index 4a25820609..0aa64f8b27 100644 --- a/libraries/AP_HAL_VRBRAIN/I2CDevice.h +++ b/libraries/AP_HAL_VRBRAIN/I2CDevice.h @@ -69,9 +69,6 @@ public: return false; } - // this makes no sense on VRBRAIN - int get_fd() override { return -1; } - AP_HAL::Semaphore* get_semaphore() override { return &semaphore; } private: