From f33d299919ca83729da74d4ebcef48c66d9a007d Mon Sep 17 00:00:00 2001 From: David Crocker Date: Mon, 20 Apr 2020 15:39:53 +0100 Subject: Changes to PanelDue output code, add GpOut ports to OM Suppress empty responses to PanelDue Discard responses that PanelDue indicates that it isn't interested in Added state.gpOut array Renamed sensors.inputs to sensors.gpIn and return null array element for unconfigured inputs --- src/GPIO/GpInPort.cpp | 146 +++++++++++++++++++++++++++ src/GPIO/GpInPort.h | 51 ++++++++++ src/GPIO/GpOutPort.cpp | 171 +++++++++++++++++++++++++++++++ src/GPIO/GpOutPort.h | 47 +++++++++ src/GPIO/GpioPorts.cpp | 268 ------------------------------------------------- src/GPIO/GpioPorts.h | 76 -------------- 6 files changed, 415 insertions(+), 344 deletions(-) create mode 100644 src/GPIO/GpInPort.cpp create mode 100644 src/GPIO/GpInPort.h create mode 100644 src/GPIO/GpOutPort.cpp create mode 100644 src/GPIO/GpOutPort.h delete mode 100644 src/GPIO/GpioPorts.cpp delete mode 100644 src/GPIO/GpioPorts.h (limited to 'src/GPIO') diff --git a/src/GPIO/GpInPort.cpp b/src/GPIO/GpInPort.cpp new file mode 100644 index 00000000..57bd7b4a --- /dev/null +++ b/src/GPIO/GpInPort.cpp @@ -0,0 +1,146 @@ +/* + * GpInPort.cpp + * + * Created on: 11 Feb 2020 + * Author: David + */ + +#include "GpInPort.h" +#include +#include +#include + +#if SUPPORT_CAN_EXPANSION +# include +# include +#endif + +#if SUPPORT_OBJECT_MODEL + +// Object model table and functions +// Note: if using GCC version 7.3.1 20180622 and lambda functions are used in this table, you must compile this file with option -std=gnu++17. +// Otherwise the table will be allocated in RAM instead of flash, which wastes too much RAM. + +// Macro to build a standard lambda function that includes the necessary type conversions +#define OBJECT_MODEL_FUNC(...) OBJECT_MODEL_FUNC_BODY(GpInputPort, __VA_ARGS__) +#define OBJECT_MODEL_FUNC_IF(_condition,...) OBJECT_MODEL_FUNC_IF_BODY(GpInputPort, _condition,__VA_ARGS__) + +constexpr ObjectModelTableEntry GpInputPort::objectModelTable[] = +{ + // Within each group, these entries must be in alphabetical order + // Return 'value' as an integer, not a boolean, because we may allow analog inputs in future + { "value", OBJECT_MODEL_FUNC((int32_t)((self->GetState()) ? 1 : 0)), ObjectModelEntryFlags::live }, +}; + +constexpr uint8_t GpInputPort::objectModelTableDescriptor[] = { 1, 1 }; + +DEFINE_GET_OBJECT_MODEL_TABLE(GpInputPort) + +#endif + +bool GpInputPort::GetState() const noexcept +{ + // Temporary implementation until we use interrupts to track input pin state changes +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + return currentState; + } +#endif + return port.Read(); +} + +// Return true if the port is not configured +bool GpInputPort::IsUnused() const noexcept +{ + return +#if SUPPORT_CAN_EXPANSION + boardAddress == CanId::MasterAddress && +#endif + !port.IsValid(); +} + +GCodeResult GpInputPort::Configure(uint32_t gpinNumber, GCodeBuffer &gb, const StringRef &reply) +{ + if (gb.Seen('C')) + { + String pinName; + gb.GetReducedString(pinName.GetRef()); + + // Remove any existing assignment +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + const GCodeResult rslt = CanInterface::DeleteHandle(boardAddress, handle, reply); + if (rslt != GCodeResult::ok) + { + reply.cat('\n'); + const MessageType mtype = (rslt == GCodeResult::warning) ? AddWarning(gb.GetResponseMessageType()) : AddError(gb.GetResponseMessageType()); + reprap.GetPlatform().Message(mtype, reply.c_str()); + reply.Clear(); + } + boardAddress = CanId::MasterAddress; + } +#endif + port.Release(); + currentState = false; + + GCodeResult rslt; + +#if SUPPORT_CAN_EXPANSION + const CanAddress newBoard = IoPort::RemoveBoardAddress(pinName.GetRef()); + if (newBoard != CanId::MasterAddress) + { + handle.Set(RemoteInputHandle::typeGpIn, gpinNumber, 0); + rslt = CanInterface::CreateHandle(newBoard, handle, pinName.c_str(), 0, MinimumGpinReportInterval, currentState, reply); + if (rslt == GCodeResult::ok) + { + boardAddress = newBoard; + } + else + { + currentState = false; + } + } + else +#endif + { + if (port.AssignPort(pinName.c_str(), reply, PinUsedBy::gpin, PinAccess::read)) + { + currentState = port.Read(); + rslt = GCodeResult::ok; + } + else + { + rslt = GCodeResult::error; + } + } + + reprap.InputsUpdated(); + return rslt; + } + else + { + // Report the pin details +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + const GCodeResult rslt = CanInterface::GetHandlePinName(boardAddress, handle, currentState, reply); + if (rslt != GCodeResult::ok) + { + return rslt; + } + reply.Prepend("Pin "); + } + else +#endif + { + reply.copy("Pin "); + port.AppendPinName(reply); + } + reply.catf(", active: %s", (GetState()) ? "true" : "false"); + } + return GCodeResult::ok; +} + +// End diff --git a/src/GPIO/GpInPort.h b/src/GPIO/GpInPort.h new file mode 100644 index 00000000..7159ff36 --- /dev/null +++ b/src/GPIO/GpInPort.h @@ -0,0 +1,51 @@ +/* + * GpInPort.h + * + * Created on: 11 Feb 2020 + * Author: David + */ + +#ifndef SRC_GPIO_GPINPORT_H_ +#define SRC_GPIO_GPINPORT_H_ + +#include +#include +#include +#include + +#if SUPPORT_CAN_EXPANSION +# include +#endif + +class GpInputPort INHERIT_OBJECT_MODEL +{ +public: + GpInputPort() noexcept : +#if SUPPORT_CAN_EXPANSION + boardAddress (CanId::MasterAddress), +#endif + currentState(false) { } + GpInputPort(const GpInputPort&) = delete; + + bool GetState() const noexcept; + bool IsUnused() const noexcept; + +#if SUPPORT_CAN_EXPANSION + void SetState(CanAddress src, bool b) noexcept { if (src == boardAddress) { currentState = b; } } +#endif + + GCodeResult Configure(uint32_t gpinNumber, GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); + +protected: + DECLARE_OBJECT_MODEL + +private: + IoPort port; // will be initialised by PwmPort default constructor +#if SUPPORT_CAN_EXPANSION + RemoteInputHandle handle; + CanAddress boardAddress; +#endif + bool currentState; +}; + +#endif /* SRC_GPIO_GPINPORT_H_ */ diff --git a/src/GPIO/GpOutPort.cpp b/src/GPIO/GpOutPort.cpp new file mode 100644 index 00000000..51f32c78 --- /dev/null +++ b/src/GPIO/GpOutPort.cpp @@ -0,0 +1,171 @@ +/* + * GpOutPort.cpp + * + * Created on: 11 Feb 2020 + * Author: David + */ + +#include "GpOutPort.h" +#include +#include +#include + +#if SUPPORT_CAN_EXPANSION +# include +# include +#endif + +#if SUPPORT_OBJECT_MODEL + +// Object model table and functions +// Note: if using GCC version 7.3.1 20180622 and lambda functions are used in this table, you must compile this file with option -std=gnu++17. +// Otherwise the table will be allocated in RAM instead of flash, which wastes too much RAM. + +// Macro to build a standard lambda function that includes the necessary type conversions +#define OBJECT_MODEL_FUNC(...) OBJECT_MODEL_FUNC_BODY(GpOutputPort, __VA_ARGS__) +#define OBJECT_MODEL_FUNC_IF(_condition,...) OBJECT_MODEL_FUNC_IF_BODY(GpOutputPort, _condition,__VA_ARGS__) + +constexpr ObjectModelTableEntry GpOutputPort::objectModelTable[] = +{ + // Within each group, these entries must be in alphabetical order + { "pwm", OBJECT_MODEL_FUNC(self->lastPwm, 2), ObjectModelEntryFlags::live }, +}; + +constexpr uint8_t GpOutputPort::objectModelTableDescriptor[] = { 1, 1 }; + +DEFINE_GET_OBJECT_MODEL_TABLE(GpOutputPort) + +#endif + +// Return true if the port is not configured +bool GpOutputPort::IsUnused() const noexcept +{ + return +#if SUPPORT_CAN_EXPANSION + boardAddress == CanId::MasterAddress && +#endif + !port.IsValid(); +} + +GCodeResult GpOutputPort::Configure(uint32_t gpioNumber, bool isServo, GCodeBuffer &gb, const StringRef &reply) +{ + PwmFrequency freq = 0; + const bool seenFreq = gb.Seen('Q'); + if (seenFreq) + { + freq = gb.GetPwmFrequency(); + } + + if (gb.Seen('C')) + { + String pinName; + gb.GetReducedString(pinName.GetRef()); + + // Remove any existing assignment +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + CanMessageGenericConstructor cons(M950GpioParams); + cons.AddUParam('P', gpioNumber); + cons.AddStringParam('C', NoPinName); + if (cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply) != GCodeResult::ok) + { + reprap.GetPlatform().Message(WarningMessage, reply.c_str()); + reply.Clear(); + } + boardAddress = CanId::MasterAddress; + } +#endif + port.Release(); + + if (!seenFreq) + { + freq = (isServo) ? ServoRefreshFrequency : DefaultPinWritePwmFreq; + } + + GCodeResult rslt; + +#if SUPPORT_CAN_EXPANSION + boardAddress = IoPort::RemoveBoardAddress(pinName.GetRef()); + if (boardAddress != CanId::MasterAddress) + { + CanMessageGenericConstructor cons(M950GpioParams); + cons.AddUParam('P', gpioNumber); + cons.AddUParam('Q', freq); + cons.AddUParam('S', (isServo) ? 1 : 0); + cons.AddStringParam('C', pinName.c_str()); + rslt = cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply); + } + else +#endif + { + if (port.AssignPort(pinName.c_str(), reply, PinUsedBy::gpout, (isServo) ? PinAccess::servo : PinAccess::pwm)) + { + rslt = GCodeResult::ok; + port.SetFrequency(freq); + } + else + { + rslt = GCodeResult::error; + } + } + + reprap.StateUpdated(); + return rslt; + } + else if (seenFreq) + { +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + CanMessageGenericConstructor cons(M950GpioParams); + cons.AddUParam('P', gpioNumber); + cons.AddUParam('Q', freq); + reprap.StateUpdated(); + return cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply); + } +#endif + port.SetFrequency(freq); + reprap.StateUpdated(); + } + else + { +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + CanMessageGenericConstructor cons(M950GpioParams); + cons.AddUParam('P', gpioNumber); + return cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply); + } +#endif + reply.printf("GPIO/servo port %" PRIu32, gpioNumber); + port.AppendDetails(reply); + } + return GCodeResult::ok; +} + +GCodeResult GpOutputPort::WriteAnalog(uint32_t gpioPortNumber, bool isServo, float pwm, const GCodeBuffer& gb, const StringRef& reply) noexcept +{ + lastPwm = pwm; +#if SUPPORT_CAN_EXPANSION + if (boardAddress != CanId::MasterAddress) + { + return CanInterface::WriteGpio(boardAddress, gpioPortNumber, pwm, isServo, gb, reply); + } +#endif + port.WriteAnalog(pwm); + return GCodeResult::ok; +} + +#ifdef PCCB + +// Function used to assign default GPOUT devices +void GpOutputPort::Assign(const char *pinName) noexcept +{ + String<1> dummy; + port.AssignPort(pinName, dummy.GetRef(), PinUsedBy::gpout, PinAccess::pwm); +} + +#endif + +// End diff --git a/src/GPIO/GpOutPort.h b/src/GPIO/GpOutPort.h new file mode 100644 index 00000000..fbae879a --- /dev/null +++ b/src/GPIO/GpOutPort.h @@ -0,0 +1,47 @@ +/* + * GpOutPort.h + * + * Created on: 11 Feb 2020 + * Author: David + */ + +#ifndef SRC_GPIO_GPOUTPORT_H_ +#define SRC_GPIO_GPOUTPORT_H_ + +#include +#include +#include +#include + +class GpOutputPort INHERIT_OBJECT_MODEL +{ +public: + GpOutputPort() noexcept + : lastPwm(0.0) +#if SUPPORT_CAN_EXPANSION + , boardAddress(CanId::MasterAddress) +#endif + { } + + GpOutputPort(const GpOutputPort&) = delete; + + bool IsUnused() const noexcept; + GCodeResult WriteAnalog(uint32_t gpioPortNumber, bool isServo, float pwm, const GCodeBuffer& gb, const StringRef& reply) noexcept; + GCodeResult Configure(uint32_t gpioNumber, bool isServo, GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); + +#ifdef PCCB + void Assign(const char *pinName) noexcept; +#endif + +protected: + DECLARE_OBJECT_MODEL + +private: + PwmPort port; // will be initialised by PwmPort default constructor + float lastPwm; +#if SUPPORT_CAN_EXPANSION + CanAddress boardAddress; +#endif +}; + +#endif /* SRC_GPIO_GPOUTPORT_H_ */ diff --git a/src/GPIO/GpioPorts.cpp b/src/GPIO/GpioPorts.cpp deleted file mode 100644 index 20ffa971..00000000 --- a/src/GPIO/GpioPorts.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/* - * GpioPorts.cpp - * - * Created on: 11 Feb 2020 - * Author: David - */ - -#include "GpioPorts.h" -#include -#include -#include - -#if SUPPORT_CAN_EXPANSION -# include -# include -#endif - -#if SUPPORT_OBJECT_MODEL - -// Object model table and functions -// Note: if using GCC version 7.3.1 20180622 and lambda functions are used in this table, you must compile this file with option -std=gnu++17. -// Otherwise the table will be allocated in RAM instead of flash, which wastes too much RAM. - -// Macro to build a standard lambda function that includes the necessary type conversions -#define OBJECT_MODEL_FUNC(...) OBJECT_MODEL_FUNC_BODY(GpInputPort, __VA_ARGS__) -#define OBJECT_MODEL_FUNC_IF(_condition,...) OBJECT_MODEL_FUNC_IF_BODY(GpInputPort, _condition,__VA_ARGS__) - -constexpr ObjectModelTableEntry GpInputPort::objectModelTable[] = -{ - // Within each group, these entries must be in alphabetical order - // 0. sensors members - { "configured", OBJECT_MODEL_FUNC(!self->IsUnused()), ObjectModelEntryFlags::none }, - { "value", OBJECT_MODEL_FUNC_IF(!self->IsUnused(), self->GetState()), ObjectModelEntryFlags::live }, -}; - -constexpr uint8_t GpInputPort::objectModelTableDescriptor[] = { 1, 2 }; - -DEFINE_GET_OBJECT_MODEL_TABLE(GpInputPort) - -#endif - -bool GpInputPort::GetState() const noexcept -{ - // Temporary implementation until we use interrupts to track input pin state changes -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - return currentState; - } -#endif - return port.Read(); -} - -// Return true if the port is not configured -bool GpInputPort::IsUnused() const noexcept -{ - return -#if SUPPORT_CAN_EXPANSION - boardAddress == CanId::MasterAddress && -#endif - !port.IsValid(); -} - -GCodeResult GpInputPort::Configure(uint32_t gpinNumber, GCodeBuffer &gb, const StringRef &reply) -{ - if (gb.Seen('C')) - { - String pinName; - gb.GetReducedString(pinName.GetRef()); - - // Remove any existing assignment -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - const GCodeResult rslt = CanInterface::DeleteHandle(boardAddress, handle, reply); - if (rslt != GCodeResult::ok) - { - reply.cat('\n'); - const MessageType mtype = (rslt == GCodeResult::warning) ? AddWarning(gb.GetResponseMessageType()) : AddError(gb.GetResponseMessageType()); - reprap.GetPlatform().Message(mtype, reply.c_str()); - reply.Clear(); - } - boardAddress = CanId::MasterAddress; - } -#endif - port.Release(); - currentState = false; - - GCodeResult rslt; - -#if SUPPORT_CAN_EXPANSION - const CanAddress newBoard = IoPort::RemoveBoardAddress(pinName.GetRef()); - if (newBoard != CanId::MasterAddress) - { - handle.Set(RemoteInputHandle::typeGpIn, gpinNumber, 0); - rslt = CanInterface::CreateHandle(newBoard, handle, pinName.c_str(), 0, MinimumGpinReportInterval, currentState, reply); - if (rslt == GCodeResult::ok) - { - boardAddress = newBoard; - } - else - { - currentState = false; - } - } - else -#endif - { - if (port.AssignPort(pinName.c_str(), reply, PinUsedBy::gpin, PinAccess::read)) - { - currentState = port.Read(); - rslt = GCodeResult::ok; - } - else - { - rslt = GCodeResult::error; - } - } - - reprap.InputsUpdated(); - return rslt; - } - else - { - // Report the pin details -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - const GCodeResult rslt = CanInterface::GetHandlePinName(boardAddress, handle, currentState, reply); - if (rslt != GCodeResult::ok) - { - return rslt; - } - reply.Prepend("Pin "); - } - else -#endif - { - reply.copy("Pin "); - port.AppendPinName(reply); - } - reply.catf(", active: %s", (GetState()) ? "true" : "false"); - } - return GCodeResult::ok; -} - -GCodeResult GpOutputPort::Configure(uint32_t gpioNumber, bool isServo, GCodeBuffer &gb, const StringRef &reply) -{ - PwmFrequency freq = 0; - const bool seenFreq = gb.Seen('Q'); - if (seenFreq) - { - freq = gb.GetPwmFrequency(); - } - - if (gb.Seen('C')) - { - String pinName; - gb.GetReducedString(pinName.GetRef()); - - // Remove any existing assignment -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - CanMessageGenericConstructor cons(M950GpioParams); - cons.AddUParam('P', gpioNumber); - cons.AddStringParam('C', NoPinName); - if (cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply) != GCodeResult::ok) - { - reprap.GetPlatform().Message(WarningMessage, reply.c_str()); - reply.Clear(); - } - boardAddress = CanId::MasterAddress; - } -#endif - port.Release(); - - if (!seenFreq) - { - freq = (isServo) ? ServoRefreshFrequency : DefaultPinWritePwmFreq; - } - - GCodeResult rslt; - -#if SUPPORT_CAN_EXPANSION - boardAddress = IoPort::RemoveBoardAddress(pinName.GetRef()); - if (boardAddress != CanId::MasterAddress) - { - CanMessageGenericConstructor cons(M950GpioParams); - cons.AddUParam('P', gpioNumber); - cons.AddUParam('Q', freq); - cons.AddUParam('S', (isServo) ? 1 : 0); - cons.AddStringParam('C', pinName.c_str()); - rslt = cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply); - } - else -#endif - { - if (port.AssignPort(pinName.c_str(), reply, PinUsedBy::gpout, (isServo) ? PinAccess::servo : PinAccess::pwm)) - { - rslt = GCodeResult::ok; - port.SetFrequency(freq); - } - else - { - rslt = GCodeResult::error; - } - } - - // GPOut pins are not yet in the object model - // reprap.OutputsUpdated(); - return rslt; - } - else if (seenFreq) - { -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - CanMessageGenericConstructor cons(M950GpioParams); - cons.AddUParam('P', gpioNumber); - cons.AddUParam('Q', freq); - // reprap.OutputsUpdated(); - return cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply); - } -#endif - port.SetFrequency(freq); - // reprap.OutputsUpdated(); - } - else - { -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - CanMessageGenericConstructor cons(M950GpioParams); - cons.AddUParam('P', gpioNumber); - return cons.SendAndGetResponse(CanMessageType::m950Gpio, boardAddress, reply); - } -#endif - reply.printf("GPIO/servo port %" PRIu32, gpioNumber); - port.AppendDetails(reply); - } - return GCodeResult::ok; -} - -GCodeResult GpOutputPort::WriteAnalog(uint32_t gpioPortNumber, bool isServo, float pwm, const GCodeBuffer& gb, const StringRef& reply) const noexcept -{ -#if SUPPORT_CAN_EXPANSION - if (boardAddress != CanId::MasterAddress) - { - return CanInterface::WriteGpio(boardAddress, gpioPortNumber, pwm, isServo, gb, reply); - } -#endif - port.WriteAnalog(pwm); - return GCodeResult::ok; -} - -#ifdef PCCB - -// Function used to assign default GPOUT devices -void GpOutputPort::Assign(const char *pinName) noexcept -{ - String<1> dummy; - port.AssignPort(pinName, dummy.GetRef(), PinUsedBy::gpout, PinAccess::pwm); -} - -#endif - -// End diff --git a/src/GPIO/GpioPorts.h b/src/GPIO/GpioPorts.h deleted file mode 100644 index 30d5a074..00000000 --- a/src/GPIO/GpioPorts.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * GpioPorts.h - * - * Created on: 11 Feb 2020 - * Author: David - */ - -#ifndef SRC_GPIO_GPIOPORTS_H_ -#define SRC_GPIO_GPIOPORTS_H_ - -#include -#include -#include -#include - -#if SUPPORT_CAN_EXPANSION -# include -#endif - -class GpInputPort INHERIT_OBJECT_MODEL -{ -public: - GpInputPort() noexcept : -#if SUPPORT_CAN_EXPANSION - boardAddress (CanId::MasterAddress), -#endif - currentState(false) { } - GpInputPort(const GpInputPort&) = delete; - - bool GetState() const noexcept; - bool IsUnused() const noexcept; - -#if SUPPORT_CAN_EXPANSION - void SetState(CanAddress src, bool b) noexcept { if (src == boardAddress) { currentState = b; } } -#endif - - GCodeResult Configure(uint32_t gpinNumber, GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); - -protected: - DECLARE_OBJECT_MODEL - -private: - IoPort port; // will be initialised by PwmPort default constructor -#if SUPPORT_CAN_EXPANSION - RemoteInputHandle handle; - CanAddress boardAddress; -#endif - bool currentState; -}; - -class GpOutputPort -{ -public: - GpOutputPort() noexcept -#if SUPPORT_CAN_EXPANSION - : boardAddress(CanId::MasterAddress) -#endif - { } - - GpOutputPort(const GpOutputPort&) = delete; - - GCodeResult WriteAnalog(uint32_t gpioPortNumber, bool isServo, float pwm, const GCodeBuffer& gb, const StringRef& reply) const noexcept; - GCodeResult Configure(uint32_t gpioNumber, bool isServo, GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); - -#ifdef PCCB - void Assign(const char *pinName) noexcept; -#endif - -private: - PwmPort port; // will be initialised by PwmPort default constructor -#if SUPPORT_CAN_EXPANSION - CanAddress boardAddress; -#endif -}; - -#endif /* SRC_GPIO_GPIOPORTS_H_ */ -- cgit v1.2.3