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
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/Duet3_V06
parentd4342a41d2972c20892c793f2ce015e6eafc70ed (diff)
Added more noexcept specifiers
Diffstat (limited to 'src/Duet3_V06')
-rw-r--r--src/Duet3_V06/Pins_Duet3_V06.cpp2
-rw-r--r--src/Duet3_V06/Pins_Duet3_V06.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/Duet3_V06/Pins_Duet3_V06.cpp b/src/Duet3_V06/Pins_Duet3_V06.cpp
index d7f5325b..a96f3508 100644
--- a/src/Duet3_V06/Pins_Duet3_V06.cpp
+++ b/src/Duet3_V06/Pins_Duet3_V06.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/Duet3_V06/Pins_Duet3_V06.h b/src/Duet3_V06/Pins_Duet3_V06.h
index 85305476..414d06a0 100644
--- a/src/Duet3_V06/Pins_Duet3_V06.h
+++ b/src/Duet3_V06/Pins_Duet3_V06.h
@@ -193,7 +193,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);
}
@@ -202,9 +202,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;
@@ -275,7 +275,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;
// Duet pin numbers for the Linux interface
constexpr Pin LinuxTfrReadyPin = PortEPin(2);
@@ -323,7 +323,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
@@ -333,7 +333,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 3 all step pins are on port C
}
@@ -341,7 +341,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 3 all step pins are on port C
}