diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-10-19 12:09:19 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-10-19 12:09:19 +0300 |
commit | 02c935062002ea863c3bb8c697b0a340eaf9f8ef (patch) | |
tree | ab816960040c2eca6c088b7c9aafb27a22be1c04 /src/DuetM | |
parent | 52155fe59efa861b3c5b86efed03e77ee133d701 (diff) |
Interim commit towards 3.0beta11
Diffstat (limited to 'src/DuetM')
-rw-r--r-- | src/DuetM/Pins_DuetM.cpp | 27 | ||||
-rw-r--r-- | src/DuetM/Pins_DuetM.h | 1 |
2 files changed, 0 insertions, 28 deletions
diff --git a/src/DuetM/Pins_DuetM.cpp b/src/DuetM/Pins_DuetM.cpp index d4b8895b..6f0034e2 100644 --- a/src/DuetM/Pins_DuetM.cpp +++ b/src/DuetM/Pins_DuetM.cpp @@ -59,31 +59,4 @@ bool LookupPinName(const char*pn, LogicalPin& lpin, bool& hardwareInverted) return false; } -// Return true if the pin can be used for the specified function -bool PinEntry::CanDo(PinAccess access) const -{ - switch (access) - { - case PinAccess::read: - case PinAccess::readWithPullup: - return ((uint8_t)cap & (uint8_t)PinCapability::read) != 0; - - case PinAccess::readAnalog: - return ((uint8_t)cap & (uint8_t)PinCapability::ain) != 0; - - case PinAccess::write0: - case PinAccess::write1: - return ((uint8_t)cap & (uint8_t)PinCapability::write) != 0; - - case PinAccess::pwm: - return ((uint8_t)cap & (uint8_t)PinCapability::pwm) != 0; - - case PinAccess::servo: - return pin < 200 && ((uint8_t)cap & (uint8_t)PinCapability::pwm) != 0; - - default: - return false; - } -} - // End diff --git a/src/DuetM/Pins_DuetM.h b/src/DuetM/Pins_DuetM.h index ad0e58bc..fe7e0e21 100644 --- a/src/DuetM/Pins_DuetM.h +++ b/src/DuetM/Pins_DuetM.h @@ -191,7 +191,6 @@ constexpr inline PinCapability operator|(PinCapability a, PinCapability b) // This can be varied to suit the hardware. It is a struct not a class so that it can be direct initialised in read-only memory. struct PinEntry { - bool CanDo(PinAccess access) const; Pin GetPin() const { return pin; } PinCapability GetCapability() const { return cap; } const char* GetNames() const { return names; } |