Get read working a little bit more. Need to handle edge cases!

This commit is contained in:
Byron Lathi
2023-12-05 23:29:00 -08:00
parent 4c3c3fd731
commit 066bb0ee8c
5 changed files with 21 additions and 14 deletions

View File

@@ -9,14 +9,15 @@ char data [256];
int main(void) {
int8_t fd;
size_t i;
size_t nbytes;
fat32_init();
/* This is what is going to be part of open */
fd = fat32_file_open("VERYLA~1TXT");
cprintf("fd: %x\n", fd);
while (fat32_file_read(fd, data, 256)){
for (i = 0; i < 256; i++) {
while ((nbytes = fat32_file_read(fd, data, 256))){
for (i = 0; i < nbytes; i++) {
cprintf("%c", data[i]);
}
}