Fix TRKReadUARTPoll var naming (#574)

This commit is contained in:
mrshigure 2025-03-15 10:11:33 -07:00 committed by GitHub
parent db57c1ef50
commit 5c40f5a849
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 9 deletions

View File

@ -139,29 +139,29 @@ UARTError WriteUART1(u8 arg0)
return 0;
}
s32 TRKReadUARTPoll(u8* arg0) {
UARTError var_r29;
UARTError TRKReadUARTPoll(u8* arg0)
{
UARTError readErr = 4;
s32 cnt;
var_r29 = 4;
if (gReadPos >= gReadCount) {
gReadPos = 0;
cnt = gReadCount = TRKPollUART();
if (cnt > 0) {
if (cnt > 0x110A) {
gReadCount = 0x110A;
if (cnt > BUFF_LEN) {
gReadCount = BUFF_LEN;
}
var_r29 = TRKReadUARTN(gReadBuf, gReadCount);
if (var_r29 != 0) {
readErr = TRKReadUARTN(gReadBuf, gReadCount);
if (readErr != 0) {
gReadCount = 0;
}
}
}
if (gReadPos < gReadCount) {
*arg0 = gReadBuf[gReadPos++];
var_r29 = 0;
readErr = 0;
}
return var_r29;
return readErr;
}
void ReserveEXI2Port(void) { gDBCommTable.open_func(); }