|
这个工程主要是简单的显示SD卡的文件目录。' U6 K8 x' \% U' i8 b& M$ g! b 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 H( |& E" h& V 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: 8byte header: - byte 0: height/ X0 L8 R7 A: n' K& R; U - byte 1: width - 6 bytes for future use/ T, z0 B$ @9 ^7 S, J3 [ - pixel data (2 bytes per pixel) 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);- u7 e; ]4 O9 a( a: C7 s4 H u32 FS_ReadFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len); u32 FS_WriteFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);5 j+ J3 B" {' R& B) O+ Y u32 FS_Close(PFILEINFO fileinfo); void FS_Seek(PFILEINFO fileinfo, u32 offset); u32 FS_Delete(PVOLINFO volinfo, u8 *path);- z* G3 U" f" O6 u6 q1 a4 B, M u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent); u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo);8 y* A7 p& q+ N/ ?, D% v, E u32 FS_GetVolumeInfo(u8 unit, u32 startsector, PVOLINFO volinfo); . ~% ~( ]0 T5 x2 O! C/ e% ^( n% {1 G This is a snapshot of my current work in progress with partially integrated jpg decompressor$ h6 g* e n- T |
微信公众号
手机版