mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-04-25 16:23:41 -05:00
LinkCable: Preventing repeated packets by clearing send buffer after each serial interrupt
This commit is contained in:
parent
d97a104f34
commit
57a818d5d0
|
|
@ -331,6 +331,8 @@ class LinkCable {
|
|||
state.currentPlayerId =
|
||||
(Link::_REG_SIOCNT & (0b11 << BITS_PLAYER_ID)) >> BITS_PLAYER_ID;
|
||||
|
||||
Link::_REG_SIOMLT_SEND = LINK_CABLE_NO_DATA;
|
||||
|
||||
if (!isMaster())
|
||||
sendPendingData();
|
||||
|
||||
|
|
@ -432,6 +434,7 @@ class LinkCable {
|
|||
}
|
||||
|
||||
void stop() {
|
||||
Link::_REG_SIOMLT_SEND = LINK_CABLE_NO_DATA;
|
||||
stopTimer();
|
||||
setGeneralPurposeMode();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user