Merge pull request #1414 from ProjectRevoTPP/rfu_NI_stopReceivingData
fix rfu_NI_stopReceivingData fakematching; i guess it aint over yet cowboy
This commit is contained in:
commit
8dd6af1db1
1 changed files with 5 additions and 6 deletions
|
@ -1550,21 +1550,20 @@ u16 rfu_changeSendTarget(u8 connType, u8 slotStatusIndex, u8 bmNewTgtSlot)
|
||||||
|
|
||||||
u16 rfu_NI_stopReceivingData(u8 slotStatusIndex)
|
u16 rfu_NI_stopReceivingData(u8 slotStatusIndex)
|
||||||
{
|
{
|
||||||
struct NIComm *NI_comm;
|
|
||||||
u16 imeBak;
|
u16 imeBak;
|
||||||
|
struct NIComm *NI_comm;
|
||||||
|
|
||||||
if (slotStatusIndex >= RFU_CHILD_MAX)
|
if (slotStatusIndex >= RFU_CHILD_MAX)
|
||||||
return ERR_SLOT_NO;
|
return ERR_SLOT_NO;
|
||||||
NI_comm = &gRfuSlotStatusNI[slotStatusIndex]->recv;
|
NI_comm = &gRfuSlotStatusNI[slotStatusIndex]->recv;
|
||||||
imeBak = REG_IME;
|
imeBak = REG_IME;
|
||||||
++imeBak; --imeBak; // fix imeBak, NI_comm register swap
|
|
||||||
REG_IME = 0;
|
REG_IME = 0;
|
||||||
if (gRfuSlotStatusNI[slotStatusIndex]->recv.state & SLOT_BUSY_FLAG)
|
if (NI_comm->state & SLOT_BUSY_FLAG)
|
||||||
{
|
{
|
||||||
if (gRfuSlotStatusNI[slotStatusIndex]->recv.state == SLOT_STATE_RECV_LAST)
|
if (NI_comm->state == SLOT_STATE_RECV_LAST)
|
||||||
gRfuSlotStatusNI[slotStatusIndex]->recv.state = SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN;
|
NI_comm->state = SLOT_STATE_RECV_SUCCESS_AND_SENDSIDE_UNKNOWN;
|
||||||
else
|
else
|
||||||
gRfuSlotStatusNI[slotStatusIndex]->recv.state = SLOT_STATE_RECV_FAILED;
|
NI_comm->state = SLOT_STATE_RECV_FAILED;
|
||||||
gRfuLinkStatus->recvSlotNIFlag &= ~(1 << slotStatusIndex);
|
gRfuLinkStatus->recvSlotNIFlag &= ~(1 << slotStatusIndex);
|
||||||
rfu_STC_releaseFrame(slotStatusIndex, 1, NI_comm);
|
rfu_STC_releaseFrame(slotStatusIndex, 1, NI_comm);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue