1
0

brfs.c 525 B

123456789101112131415
  1. /**
  2. * User library for file system operations
  3. */
  4. #define MAX_DIR_ENTRIES 128 // Safe bound on max number of entries in a directory (128 -> full dir on block size of 512 words)
  5. #define MAX_PATH_LENGTH 127
  6. struct brfs_dir_entry
  7. {
  8. word filename[4]; // 4 chars per word
  9. word modify_date; // TBD when RTC added to FPGC
  10. word flags; // 32 flags, from right to left: directory, hidden
  11. word fat_idx; // idx of first FAT block
  12. word filesize; // file size in words, not bytes
  13. };