debug(fat32): read 包装打印 br 实际值,确认 c.Set 是否写入(types 内 total_read=64 但 read_len<64)
This commit is contained in:
1 parent
51c7475031
commit
c0685fe6bd
1 file changed
+4
@@ -107,6 +107,10 @@ def close(fp: types.fileobj | t.CPtr) -> types.FRESULT:
|
||||
def read(fp: types.fileobj | t.CPtr, buff: t.CVoid | t.CPtr, btr: t.CUInt32T) -> t.CUInt32T:
|
||||
br: t.CUInt32T = 0
|
||||
fp.read(buff, btr, c.Addr(br))
|
||||
# [RD2-DIAG] 确认 br 是否被 c.Set 写入(types 内 total_read=64 但外部可能收不到)
|
||||
_rd2: t.CArray[t.CChar, 96]
|
||||
viperlib.snprintf(c.Addr(_rd2), 96, "[fat32.vp] read br=%lu\n", br)
|
||||
serial.puts(c.Addr(_rd2))
|
||||
return br
|
||||
|
||||
def write(fp: types.fileobj | t.CPtr, buff: t.CConst | t.CVoid | t.CPtr, btw: t.CUInt32T) -> t.CUInt32T:
|
||||
|
||||
Reference in new issue
Block a user