|
这个工程主要是简单的显示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.. y4 _, t% n4 `8 }& E8 J 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. 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:1 j6 x# r1 Y# l1 }; G( ^7 V% N 8byte header:7 E! d) b" T. U# @8 @ - byte 0: height - byte 1: width( I5 Z0 W1 R$ T+ A( _ - 6 bytes for future use - pixel data (2 bytes per pixel) FS interface functions:" g( {& H1 B, ^5 r6 @. a u32 FS_Mount(enum STORAGE_device device); u32 FS_Unmount(enum STORAGE_device device);) O7 D/ F2 E) ~2 | u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo); 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);6 a5 u0 Y' d5 J8 J) t void FS_Seek(PFILEINFO fileinfo, u32 offset); u32 FS_Delete(PVOLINFO volinfo, u8 *path);8 R4 y0 q p( o) [6 P7 \ v 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);% `, S; H2 \. r2 `- M: y/ \ This is a snapshot of my current work in progress with partially integrated jpg decompressor! a* F0 L( V) |+ J& ~! o4 k |
微信公众号
手机版