|
这个工程主要是简单的显示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.; e" q: p4 T/ w& `+ C- `* 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.) n1 s# D' W. D4 F9 \ Current layout of PRM image file:& @( Y( W* I3 B3 j5 G9 }1 D V* a 8byte header:! v! v$ l3 j6 c0 ]7 w& d - byte 0: height - byte 1: width - 6 bytes for future use) f, N4 }& z y0 q& S" U( ^1 Y - pixel data (2 bytes per pixel)6 [; e0 S, S: q- w3 K* P FS interface functions: u32 FS_Mount(enum STORAGE_device device);6 z) ~! r8 x6 O$ `2 f( S+ Z" K u32 FS_Unmount(enum STORAGE_device device); u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo); u32 FS_ReadFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);1 B6 [8 E ]4 P3 K/ x' H u32 FS_WriteFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);% ^+ v j4 Y. ~; i* J u32 FS_Close(PFILEINFO fileinfo); void FS_Seek(PFILEINFO fileinfo, u32 offset);) [1 ` q* S2 K8 Y7 H) E/ d& A u32 FS_Delete(PVOLINFO volinfo, u8 *path); u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent); u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo); u32 FS_GetVolumeInfo(u8 unit, u32 startsector, PVOLINFO volinfo); 7 |( x+ k) h2 s$ P 0 j) @' k4 q* k. L0 s. G This is a snapshot of my current work in progress with partially integrated jpg decompressor . q+ I# a$ B, c7 z0 c |
微信公众号
手机版