mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-10-02 05:47:11 -05:00
FIX: Now baud rate is always set
This commit is contained in:
@@ -53,17 +53,13 @@ class LinkConnection {
|
||||
};
|
||||
struct LinkState _linkState;
|
||||
|
||||
LinkConnection() {
|
||||
explicit LinkConnection(BaudRate baudRate = BAUD_RATE_0) {
|
||||
REG_RCNT = 0;
|
||||
REG_SIOCNT = (u8)baudRate;
|
||||
this->setBitHigh(LINK_BIT_MULTIPLAYER);
|
||||
this->setBitHigh(LINK_BIT_IRQ);
|
||||
}
|
||||
|
||||
LinkConnection(BaudRate baudRate) : LinkConnection() {
|
||||
this->baudRate = baudRate;
|
||||
}
|
||||
|
||||
LinkState tick(u16 data) {
|
||||
REG_SIOMLT_SEND = data;
|
||||
|
||||
@@ -87,7 +83,6 @@ class LinkConnection {
|
||||
}
|
||||
|
||||
private:
|
||||
BaudRate baudRate = BaudRate::BAUD_RATE_0;
|
||||
bool isWaiting = false;
|
||||
|
||||
bool isBitHigh(u8 bit) { return (REG_SIOCNT & (1 << bit)) != 0; }
|
||||
|
||||
Reference in New Issue
Block a user