diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-01-03 16:42:58 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-01-03 16:42:58 +0300 |
commit | c0d70be1c4eb552239a51dbdc4f57979646e8ae9 (patch) | |
tree | 1933970f167e43452ec1005a3007e28a373e9eae /src | |
parent | 1700e65ffb2d6f47b558d573fb6bb9b737fd7246 (diff) |
Minor changes for eCv
Diffstat (limited to 'src')
-rw-r--r-- | src/DuetNG/DueXn.h | 4 | ||||
-rw-r--r-- | src/DuetNG/Pins_DuetNG.h | 2 | ||||
-rw-r--r-- | src/ObjectModel/ObjectModel.h | 4 | ||||
-rw-r--r-- | src/Platform/MessageType.h | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/DuetNG/DueXn.h b/src/DuetNG/DueXn.h index 4965d7f6..96c4fa43 100644 --- a/src/DuetNG/DueXn.h +++ b/src/DuetNG/DueXn.h @@ -15,9 +15,9 @@ enum class ExpansionBoardType : uint8_t none, DueX0, DueX2, - DueX2_v0_11 = DueX2 + 1, + DueX2_v0_11 = (uint8_t)DueX2 + 1, DueX5, - DueX5_v0_11 = DueX5 + 1 + DueX5_v0_11 = (uint8_t)DueX5 + 1 }; namespace DuetExpansion diff --git a/src/DuetNG/Pins_DuetNG.h b/src/DuetNG/Pins_DuetNG.h index a7c097da..b62b4b5e 100644 --- a/src/DuetNG/Pins_DuetNG.h +++ b/src/DuetNG/Pins_DuetNG.h @@ -464,7 +464,7 @@ constexpr GpioPinFunction USARTSPISckPeriphMode = GpioPinFunction::C; // SD Card constexpr Pin HsmciClockPin = PortAPin(29); constexpr Pin HsmciOtherPins[] = { PortAPin(28), PortAPin(30), PortAPin(31), PortAPin(26), PortAPin(27) }; -constexpr auto HsmciPinsFunction = GpioPinFunction::C; +constexpr GpioPinFunction HsmciPinsFunction = GpioPinFunction::C; /* * TWI Interfaces diff --git a/src/ObjectModel/ObjectModel.h b/src/ObjectModel/ObjectModel.h index b756ecb0..7dad7944 100644 --- a/src/ObjectModel/ObjectModel.h +++ b/src/ObjectModel/ObjectModel.h @@ -120,7 +120,7 @@ struct ExpressionValue explicit constexpr ExpressionValue(const char *_ecv_array s) noexcept : type((uint32_t)TypeCode::CString), param(0), sVal(s) { } explicit constexpr ExpressionValue(const ObjectModelArrayDescriptor *omad) noexcept : type((uint32_t)TypeCode::Array), param(0), omadVal(omad) { } explicit constexpr ExpressionValue(IPAddress ip) noexcept : type((uint32_t)TypeCode::IPAddress_tc), param(0), uVal(ip.GetV4LittleEndian()) { } - explicit constexpr ExpressionValue(nullptr_t dummy) noexcept : type((uint32_t)TypeCode::None), param(0), uVal(0) { } + explicit constexpr ExpressionValue(std::nullptr_t dummy) noexcept : type((uint32_t)TypeCode::None), param(0), uVal(0) { } explicit ExpressionValue(DateTime t) noexcept : type((t.tim == 0) ? (uint32_t)TypeCode::None : (uint32_t)TypeCode::DateTime_tc) { Set56BitValue(t.tim); } explicit ExpressionValue(DriverId id) noexcept @@ -175,7 +175,7 @@ struct ExpressionValue } void Set(StringHandle sh) noexcept { Release(); type = (uint32_t)TypeCode::HeapString; shVal = sh; } - void Set(nullptr_t dummy) noexcept { Release(); type = (uint32_t)TypeCode::None; } + void Set(std::nullptr_t dummy) noexcept { Release(); type = (uint32_t)TypeCode::None; } // Store a 56-bit value void Set56BitValue(uint64_t v) { Release(); param = (uint32_t)(v >> 32) & 0x00FFFFFFu; uVal = (uint32_t)v; } diff --git a/src/Platform/MessageType.h b/src/Platform/MessageType.h index 4da31ab6..2c4c4b76 100644 --- a/src/Platform/MessageType.h +++ b/src/Platform/MessageType.h @@ -66,7 +66,7 @@ inline constexpr MessageType AddLogDebug(MessageType mt) noexcept { // Debug level has no flags set such that any non-flagged message automatically // is part of this log level - force it by removing the existing flags - return (MessageType)(mt & ~(LogMessageLowBit | LogMessageHighBit)); + return (MessageType)((uint32_t)mt & ~((uint32_t)LogMessageLowBit | (uint32_t)LogMessageHighBit)); } inline constexpr MessageType AddLogWarn(MessageType mt) noexcept @@ -74,7 +74,7 @@ inline constexpr MessageType AddLogWarn(MessageType mt) noexcept // Since increasing log levels have lower numbers we need to delete // any existing log flags first - otherwise this could lead to MessageLogLevel // rising to 3 which is equivalent to OFF - return (MessageType)(AddLogDebug(mt) | LogWarn); + return (MessageType)((uint32_t)AddLogDebug(mt) | (uint32_t)LogWarn); } inline constexpr MessageType AddLogInfo(MessageType mt) noexcept @@ -82,22 +82,22 @@ inline constexpr MessageType AddLogInfo(MessageType mt) noexcept // Since increasing log levels have lower numbers we need to delete // any existing log flags first - otherwise this could lead to MessageLogLevel // rising to 3 which is equivalent to OFF - return (MessageType)(AddLogDebug(mt) | LogInfo); + return (MessageType)((uint32_t)AddLogDebug(mt) | (uint32_t)LogInfo); } inline constexpr MessageType RemoveLogging(MessageType mt) noexcept { - return (MessageType)(mt | LogOff); + return (MessageType)((uint32_t)mt | (uint32_t)LogOff); } inline constexpr MessageType AddError(MessageType mt) noexcept { - return AddLogWarn((MessageType)(mt | ErrorMessageFlag)); + return AddLogWarn((MessageType)((uint32_t)mt | (uint32_t)ErrorMessageFlag)); } inline constexpr MessageType AddWarning(MessageType mt) noexcept { - return AddLogWarn((MessageType)(mt | WarningMessageFlag)); + return AddLogWarn((MessageType)((uint32_t)mt | (uint32_t)WarningMessageFlag)); } #endif /* MESSAGETYPE_H_ */ |