mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-04-24 23:47:51 -05:00
Removing unneeded allocations in LinkUniversal
This commit is contained in:
parent
2241324e59
commit
3da2aa3d19
|
|
@ -62,7 +62,7 @@
|
|||
#define LINK_CABLE_SET_LOW(REG, BIT) REG &= ~(1 << BIT)
|
||||
#define LINK_CABLE_BARRIER asm volatile("" ::: "memory")
|
||||
|
||||
static volatile char LINK_CABLE_VERSION[] = "LinkCable/v5.0.0";
|
||||
static volatile char LINK_CABLE_VERSION[] = "LinkCable/v5.0.1";
|
||||
|
||||
void LINK_CABLE_ISR_VBLANK();
|
||||
void LINK_CABLE_ISR_SERIAL();
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
return error(FAILURE_DURING_HANDSHAKE);
|
||||
|
||||
static volatile char LINK_CABLE_MULTIBOOT_VERSION[] =
|
||||
"LinkCableMultiboot/v5.0.0";
|
||||
"LinkCableMultiboot/v5.0.1";
|
||||
|
||||
const u8 LINK_CABLE_MULTIBOOT_CLIENT_IDS[] = {0b0010, 0b0100, 0b1000};
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#define LINK_GPIO_SET_HIGH(REG, BIT) REG |= 1 << BIT
|
||||
#define LINK_GPIO_SET_LOW(REG, BIT) REG &= ~(1 << BIT)
|
||||
|
||||
static volatile char LINK_GPIO_VERSION[] = "LinkGPIO/v5.0.0";
|
||||
static volatile char LINK_GPIO_VERSION[] = "LinkGPIO/v5.0.1";
|
||||
|
||||
const u8 LINK_GPIO_DATA_BITS[] = {2, 3, 1, 0};
|
||||
const u8 LINK_GPIO_DIRECTION_BITS[] = {6, 7, 5, 4};
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#define LINK_SPI_SET_HIGH(REG, BIT) REG |= 1 << BIT
|
||||
#define LINK_SPI_SET_LOW(REG, BIT) REG &= ~(1 << BIT)
|
||||
|
||||
static volatile char LINK_SPI_VERSION[] = "LinkSPI/v5.0.0";
|
||||
static volatile char LINK_SPI_VERSION[] = "LinkSPI/v5.0.1";
|
||||
|
||||
class LinkSPI {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
#define LINK_UNIVERSAL_SERVE_WAIT_FRAMES 60
|
||||
#define LINK_UNIVERSAL_SERVE_WAIT_FRAMES_RANDOM 30
|
||||
|
||||
static volatile char LINK_UNIVERSAL_VERSION[] = "LinkUniversal/v5.0.0";
|
||||
static volatile char LINK_UNIVERSAL_VERSION[] = "LinkUniversal/v5.0.1";
|
||||
|
||||
void LINK_UNIVERSAL_ISR_VBLANK();
|
||||
void LINK_UNIVERSAL_ISR_SERIAL();
|
||||
|
|
@ -260,6 +260,7 @@ class LinkUniversal {
|
|||
};
|
||||
|
||||
std::queue<u16> incomingMessages[LINK_UNIVERSAL_MAX_PLAYERS];
|
||||
std::vector<LinkWireless::Message> tmpMessages;
|
||||
LinkCable* linkCable;
|
||||
LinkWireless* linkWireless;
|
||||
Config config;
|
||||
|
|
@ -279,10 +280,10 @@ class LinkUniversal {
|
|||
}
|
||||
|
||||
void receiveWirelessMessages() {
|
||||
std::vector<LinkWireless::Message> messages;
|
||||
linkWireless->receive(messages);
|
||||
tmpMessages.clear();
|
||||
linkWireless->receive(tmpMessages);
|
||||
|
||||
for (auto& message : messages)
|
||||
for (auto& message : tmpMessages)
|
||||
push(incomingMessages[message.playerId], message.data);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
if (!reset()) \
|
||||
return false;
|
||||
|
||||
static volatile char LINK_WIRELESS_VERSION[] = "LinkWireless/v5.0.0";
|
||||
static volatile char LINK_WIRELESS_VERSION[] = "LinkWireless/v5.0.1";
|
||||
|
||||
void LINK_WIRELESS_ISR_VBLANK();
|
||||
void LINK_WIRELESS_ISR_SERIAL();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user