|
这个工程主要是简单的显示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.3 Q6 f [6 U4 R# Q5 i4 L' L 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.8 Y" f x8 I f" X; u" a Current layout of PRM image file: 8byte header:4 ~* r) t$ {7 v7 T* N% b1 E - byte 0: height - byte 1: width - 6 bytes for future use - pixel data (2 bytes per pixel)8 m# M, c# z0 @$ d FS interface functions: 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);8 g, |6 a4 { r% g u32 FS_ReadFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);2 T8 }9 |' B; u* l& q! D u32 FS_WriteFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len); u32 FS_Close(PFILEINFO fileinfo);; E( p$ E8 A5 u' |6 ] void FS_Seek(PFILEINFO fileinfo, u32 offset); u32 FS_Delete(PVOLINFO volinfo, u8 *path);2 \( k- g! i& f4 _2 A, |7 w u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);8 ^7 j6 F9 l5 O9 B ]# a: R u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo); u32 FS_GetVolumeInfo(u8 unit, u32 startsector, PVOLINFO volinfo); # ^. d9 w) |( s$ A! X " r! {4 x: ~' \, B" Z9 z# b This is a snapshot of my current work in progress with partially integrated jpg decompressor 9 C" h& \* x- U$ X |
微信公众号
手机版