mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-10-01 21:36:53 -05:00
Formatting code
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -343,7 +343,7 @@ class Queue {
|
||||
|
||||
// Reset communication registers
|
||||
static inline void reset() {
|
||||
_REG_RCNT = (1 << 15);
|
||||
_REG_RCNT = 1 << 15;
|
||||
_REG_SIOCNT = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user