|
这个工程主要是简单的显示SD卡的文件目录。2 ^: \* U0 g# T- R7 A 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.) Z9 ^9 E5 e# @6 a0 O 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& J* C2 a; m+ A! J0 [ 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.: K8 H0 q7 ]) E2 U; i Current layout of PRM image file:/ P/ z1 ?& [$ G- ?: M( Q" Y 8byte header:8 Y) q. X( I4 [+ c( z - byte 0: height4 y. {7 E1 p$ o/ a8 z& y8 k - byte 1: width" @7 v6 t1 N( i# \ u& W - 6 bytes for future use - pixel data (2 bytes per pixel) FS interface functions:' K8 A& L! U) U& ^* a, z4 h n 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);" q4 r9 Z* O2 |9 m2 D u32 FS_ReadFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);) |: k, j9 ^; ^' K% I1 q u32 FS_WriteFile(PFILEINFO fileinfo, u8 *buffer, u32 *successcount, u32 len);, J7 C) H( H* }! S6 ?, _( D; T u32 FS_Close(PFILEINFO fileinfo);5 H+ |: [6 X* U4 V5 R void FS_Seek(PFILEINFO fileinfo, u32 offset); 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 G1 b V) D# H 1 I/ J& H- _$ L9 {5 h" } This is a snapshot of my current work in progress with partially integrated jpg decompressor- d. g" j! a7 |& b& Y0 A" V * I* I/ b1 Y7 n4 S- s5 w. e1 } |
微信公众号
手机版