diff --git a/libraries/AP_HAL/GPIO.h b/libraries/AP_HAL/GPIO.h index c9f7caea79..8298aaac4f 100644 --- a/libraries/AP_HAL/GPIO.h +++ b/libraries/AP_HAL/GPIO.h @@ -55,6 +55,10 @@ public: virtual void toggle(uint8_t pin) = 0; virtual bool valid_pin(uint8_t pin) const { return true; } + // allow for save and restore of pin settings + virtual bool get_mode(uint8_t pin, uint32_t &mode) { return false; } + virtual void set_mode(uint8_t pin, uint32_t mode) {} + /* Alternative interface: */ virtual AP_HAL::DigitalSource* channel(uint16_t n) = 0;