bugfix: avoid NONE value after startup.
This commit is contained in:
@@ -56,7 +56,7 @@ inline uint8_t GetWritable(PINGPONG ctrllor)
|
||||
inline uint8_t GetReadable(PINGPONG ctrllor)
|
||||
{
|
||||
if (ctrllor.wBusy == BUFF_NONE || ctrllor.wBusy != ctrllor.latest)
|
||||
return ctrllor.latest;
|
||||
return ((ctrllor.latest == BUFF_NONE) ? BUFF_A : BUFF_B);
|
||||
else
|
||||
return ((ctrllor.wBusy == BUFF_B) ? BUFF_A : BUFF_B);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user