
这个工程主要是简单的显示SD卡的文件目录。 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. 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.. @4 R2 L$ y; {1 z2 u+ D9 M 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. Current layout of PRM image file:; h4 R( e' p4 ]4 o 8byte header: - byte 0: height* ]! e% ?0 H2 H3 \ - byte 1: width! u9 m1 j) T- R1 e! b - 6 bytes for future use - pixel data (2 bytes per pixel) FS interface functions: u32 FS_Mount(enum STORAGE_device device); u32 FS_Unmount(enum STORAGE_device device);9 ? z$ d8 ~: C% p1 Q5 O6 q u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo); u32 FS_ReadFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);1 t) b# ~+ w+ Q$ R, `5 C. [* H' L u32 FS_WriteFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len); u32 FS_Close(PFILEINFO fileinfo); void FS_Seek(PFILEINFO fileinfo, u32 offset);- [0 s( r+ x; V1 _ u32 FS_Delete(PVOLINFO volinfo, u8 *path);( i4 s' i/ f: A u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);/ g' |) W1 d. B# s. o8 Q, h u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo); u32 FS_GetVolumeInfo(u8 unit, u32 startsector, PVOLINFO volinfo); ; m$ g' c1 [% R4 q * D% G$ |& W- z& } This is a snapshot of my current work in progress with partially integrated jpg decompressor |