bugfix: correct assert condition.

This commit is contained in:
Gatsby Van
2024-01-24 10:55:15 +08:00
parent ab43cd0a9d
commit eeff672b55
+2 -1
View File
@@ -46,7 +46,8 @@ uint8_t GetReadable(PINGPONG ctrllor);
inline uint8_t GetWritable(PINGPONG ctrllor)
{
ASSERT(ctrllor.wBusy != BUFF_NONE);
// Allow only one write.
ASSERT(ctrllor.wBusy == BUFF_NONE);
if (ctrllor.rBusy == BUFF_NONE)
return ((ctrllor.latest == BUFF_B) ? BUFF_A : BUFF_B);
else