diff --git a/lib/LinkGPIO.hpp b/lib/LinkGPIO.hpp index e468763..54033b6 100644 --- a/lib/LinkGPIO.hpp +++ b/lib/LinkGPIO.hpp @@ -39,7 +39,7 @@ class LinkGPIO { using u16 = Link::u16; using u8 = Link::u8; - static constexpr int RCNT_GENERAL_PURPOSE = (1 << 15); + static constexpr int RCNT_GENERAL_PURPOSE = 1 << 15; static constexpr int SIOCNT_GENERAL_PURPOSE = 0; static constexpr int BIT_SI_INTERRUPT = 8; static constexpr u8 DATA_BITS[] = {2, 3, 1, 0}; diff --git a/lib/LinkRawCable.hpp b/lib/LinkRawCable.hpp index fb5caa7..178229f 100644 --- a/lib/LinkRawCable.hpp +++ b/lib/LinkRawCable.hpp @@ -263,7 +263,7 @@ class LinkRawCable { void setMultiPlayMode() { Link::_REG_RCNT = Link::_REG_RCNT & ~(1 << BIT_GENERAL_PURPOSE_HIGH); - Link::_REG_SIOCNT = (1 << BIT_MULTIPLAYER); + Link::_REG_SIOCNT = 1 << BIT_MULTIPLAYER; Link::_REG_SIOCNT |= baudRate; Link::_REG_SIOMLT_SEND = 0; } diff --git a/lib/LinkWireless.hpp b/lib/LinkWireless.hpp index 7fed0d6..856e651 100644 --- a/lib/LinkWireless.hpp +++ b/lib/LinkWireless.hpp @@ -164,8 +164,8 @@ class LinkWireless { #else static constexpr int PACKET_ID_BITS = 6; #endif - static constexpr int MAX_PACKET_IDS = (1 << PACKET_ID_BITS); - static constexpr int PACKET_ID_MASK = (MAX_PACKET_IDS - 1); + static constexpr int MAX_PACKET_IDS = 1 << PACKET_ID_BITS; + static constexpr int PACKET_ID_MASK = MAX_PACKET_IDS - 1; static constexpr int MSG_PING = 0xffff; static constexpr int BROADCAST_SEARCH_WAIT_FRAMES = 60; static constexpr int MAX_COMMAND_TRANSFER_LENGTH = 22; diff --git a/lib/LinkWirelessMultiboot.hpp b/lib/LinkWirelessMultiboot.hpp index 81f1c6a..0bc40d4 100644 --- a/lib/LinkWirelessMultiboot.hpp +++ b/lib/LinkWirelessMultiboot.hpp @@ -89,7 +89,7 @@ class LinkWirelessMultiboot { static constexpr int HEADER_SIZE = 0xC0; static constexpr int SETUP_TX = 1; - static constexpr int GAME_ID_MULTIBOOT_FLAG = (1 << 15); + static constexpr int GAME_ID_MULTIBOOT_FLAG = 1 << 15; static constexpr int FRAME_LINES = 228; static constexpr int MAX_INFLIGHT_PACKETS = 4; static constexpr int FINAL_CONFIRMS = 3; diff --git a/lib/LinkWirelessOpenSDK.hpp b/lib/LinkWirelessOpenSDK.hpp index 0ae04b5..dbd2de8 100644 --- a/lib/LinkWirelessOpenSDK.hpp +++ b/lib/LinkWirelessOpenSDK.hpp @@ -369,7 +369,7 @@ class LinkWirelessOpenSDK { u8 clientNumber) { ServerSDKHeader serverHeader; serverHeader.isACK = 1; - serverHeader.targetSlots = (1 << clientNumber); + serverHeader.targetSlots = 1 << clientNumber; serverHeader.payloadSize = 0; serverHeader.n = clientHeader.n; serverHeader.phase = clientHeader.phase; diff --git a/lib/_link_common.hpp b/lib/_link_common.hpp index 96f900e..dc26b08 100644 --- a/lib/_link_common.hpp +++ b/lib/_link_common.hpp @@ -343,7 +343,7 @@ class Queue { // Reset communication registers static inline void reset() { - _REG_RCNT = (1 << 15); + _REG_RCNT = 1 << 15; _REG_SIOCNT = 0; }