AP_HAL: added valid_pin() GPIO API

This commit is contained in:
Andrew Tridgell 2021-07-20 14:19:20 +10:00
parent 8f9929c6c2
commit 4dcff3d900
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ public:
virtual uint8_t read(uint8_t pin) = 0;
virtual void write(uint8_t pin, uint8_t value) = 0;
virtual void toggle(uint8_t pin) = 0;
virtual bool valid_pin(uint8_t pin) const { return true; }
/* Alternative interface: */
virtual AP_HAL::DigitalSource* channel(uint16_t n) = 0;