Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/DuetM
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2019-12-10 18:03:11 +0300
committerDavid Crocker <dcrocker@eschertech.com>2019-12-10 18:03:11 +0300
commitb7daa1866c654eefe9d1427fd5d2c68b476d7cd7 (patch)
treec9ca30e6f07acd55061236c820469e794111fb14 /src/DuetM
parentd4342a41d2972c20892c793f2ce015e6eafc70ed (diff)
Added more noexcept specifiers
Diffstat (limited to 'src/DuetM')
-rw-r--r--src/DuetM/Pins_DuetM.cpp2
-rw-r--r--src/DuetM/Pins_DuetM.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/DuetM/Pins_DuetM.cpp b/src/DuetM/Pins_DuetM.cpp
index 6f0034e2..07461c6e 100644
--- a/src/DuetM/Pins_DuetM.cpp
+++ b/src/DuetM/Pins_DuetM.cpp
@@ -11,7 +11,7 @@
// Function to look up a pin name pass back the corresponding index into the pin table
// On this platform, the mapping from pin names to pins is fixed, so this is a simple lookup
-bool LookupPinName(const char*pn, LogicalPin& lpin, bool& hardwareInverted)
+bool LookupPinName(const char*pn, LogicalPin& lpin, bool& hardwareInverted) noexcept
{
if (StringEqualsIgnoreCase(pn, NoPinName))
{
diff --git a/src/DuetM/Pins_DuetM.h b/src/DuetM/Pins_DuetM.h
index 8215914e..232c3c81 100644
--- a/src/DuetM/Pins_DuetM.h
+++ b/src/DuetM/Pins_DuetM.h
@@ -200,7 +200,7 @@ enum class PinCapability: uint8_t
ainrwpwm = 1|2|4|8
};
-constexpr inline PinCapability operator|(PinCapability a, PinCapability b)
+constexpr inline PinCapability operator|(PinCapability a, PinCapability b) noexcept
{
return (PinCapability)((uint8_t)a | (uint8_t)b);
}
@@ -209,9 +209,9 @@ 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
{
- Pin GetPin() const { return pin; }
- PinCapability GetCapability() const { return cap; }
- const char* GetNames() const { return names; }
+ Pin GetPin() const noexcept { return pin; }
+ PinCapability GetCapability() const noexcept { return cap; }
+ const char* GetNames() const noexcept { return names; }
Pin pin;
PinCapability cap;
@@ -265,7 +265,7 @@ constexpr PinEntry PinTable[] =
constexpr unsigned int NumNamedPins = ARRAY_SIZE(PinTable);
// Function to look up a pin name pass back the corresponding index into the pin table
-bool LookupPinName(const char *pn, LogicalPin& lpin, bool& hardwareInverted);
+bool LookupPinName(const char *pn, LogicalPin& lpin, bool& hardwareInverted) noexcept;
// Default pin allocations
constexpr const char *DefaultEndstopPinNames[] = { "xstop", "ystop", "zstop" };
@@ -298,7 +298,7 @@ namespace StepPins
// All our step pins are on port C, so the bitmap is just the map of step bits in port C.
// Calculate the step bit for a driver. This doesn't need to be fast. It must return 0 if the driver is remote.
- static inline uint32_t CalcDriverBitmap(size_t driver)
+ static inline uint32_t CalcDriverBitmap(size_t driver) noexcept
{
return (driver < NumDirectDrivers)
? g_APinDescription[STEP_PINS[driver]].ulPin
@@ -308,7 +308,7 @@ namespace StepPins
// Set the specified step pins high
// This needs to be as fast as possible, so we do a parallel write to the port(s).
// We rely on only those port bits that are step pins being set in the PIO_OWSR register of each port
- static inline void StepDriversHigh(uint32_t driverMap)
+ static inline void StepDriversHigh(uint32_t driverMap) noexcept
{
PIOC->PIO_ODSR = driverMap; // on Duet Maestro all step pins are on port C
}
@@ -316,7 +316,7 @@ namespace StepPins
// Set all step pins low
// This needs to be as fast as possible, so we do a parallel write to the port(s).
// We rely on only those port bits that are step pins being set in the PIO_OWSR register of each port
- static inline void StepDriversLow()
+ static inline void StepDriversLow() noexcept
{
PIOC->PIO_ODSR = 0; // on Duet Maestro all step pins are on port C
}