Formatting code

This commit is contained in:
Rodrigo Alfonso
2025-01-16 20:10:09 -03:00
parent f0017e828b
commit c356afc8ae
6 changed files with 7 additions and 7 deletions

View File

@@ -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};

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -343,7 +343,7 @@ class Queue {
// Reset communication registers
static inline void reset() {
_REG_RCNT = (1 << 15);
_REG_RCNT = 1 << 15;
_REG_SIOCNT = 0;
}