
这个工程主要是简单的显示SD卡的文件目录。$ O7 m- J+ z2 V# q# p: `/ a/ J This project implements a simple file explorer that displays the directory structure on the SD card.The included CircleOs binary include a SDIO driver and a Fat12/16/32 implementation based on DosFS. This a demo project to show usage of the SD card.4 O4 F: N; B# y( e, T" d6 b This project is aimed to be a demo project about how to use the CircleOS filesystem. It can display PRM (converted BMP, JPG, etc) images with a sample viewer." k. m( v/ Q) O: {8 I" t3 ~5 r% z- s Included in this project an application to convert BMP, JPG, etc files to PRM with the functionality to scale the image to a desired resolution.9 A6 O% P" r1 b( h% Y) y Current layout of PRM image file: t- s) l# N! G! }. g* ?7 O8 _) e$ q 8byte header:4 I- Q1 V9 V# e& I$ q - byte 0: height2 l3 a Z" M3 d" W3 H% u2 u2 h - byte 1: width& p- y) u4 `2 q' i \7 k - 6 bytes for future use - pixel data (2 bytes per pixel) FS interface functions:& E( v; E& ]0 h+ O- y u32 FS_Mount(enum STORAGE_device device); u32 FS_Unmount(enum STORAGE_device device); u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo);1 ?& Y8 o+ t% E1 l4 ]& e9 y u32 FS_ReadFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len); u32 FS_WriteFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len); u32 FS_Close(PFILEINFO fileinfo); void FS_Seek(PFILEINFO fileinfo, u32 offset);* r% F+ V& o+ b0 v1 X u32 FS_Delete(PVOLINFO volinfo, u8 *path); u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);& ~, i2 E( ^9 T" B6 l! A+ w [ u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo); u32 FS_GetVolumeInfo(u8 unit, u32 startsector, PVOLINFO volinfo);2 D: _- Q5 [" |) U; y n' { This is a snapshot of my current work in progress with partially integrated jpg decompressor+ F/ s8 d/ V. j0 U, T3 s |