你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

Primer2 的SD文件例程

[复制链接]
废鱼 发布时间:2010-3-22 16:29
 这个工程主要是简单的显示SD卡的文件目录。4 w% l. _* K% z  ]+ i- V
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.
1 }2 v5 q1 t) rThis 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.
7 |( E! r& \. d2 z4 H/ p8 ]9 ^- bIncluded in this project an application to convert BMP, JPG, etc files to PRM with the functionality to scale the image to a desired resolution.! B0 j5 E& T( I- C, L
 Current layout of PRM image file:9 B2 z7 `! O3 G
 8byte header:
) m" O. B* ?* j9 ~+ u$ F- byte 0: height  L  S7 l* ^$ D9 Q$ E, M8 l5 h4 s! r
- byte 1: width( b0 t7 r& W2 S# O$ S' h6 g
- 6 bytes for future use3 ^- H( \% x4 X$ A" \& F9 A( n
- pixel data (2 bytes per pixel)( X7 }' M; R' c$ {6 _. t
 FS interface functions:" m, \7 {3 C' I! @# \; `, K5 J4 C: [
u32 FS_Mount(enum STORAGE_device device);
9 q5 F& M$ V/ H- b% M3 a3 q; ^u32 FS_Unmount(enum STORAGE_device device);& z7 o) O; l' _4 \8 g
u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo);- X4 K1 W3 T0 h8 M! v* j9 C
u32 FS_ReadFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);# A0 ]; X) O) F! w' L* U7 b- }
u32 FS_WriteFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);
! b7 i2 @/ V/ E$ L# c* z+ du32 FS_Close(PFILEINFO fileinfo);* L: r( c: @! t1 @  K
void FS_Seek(PFILEINFO fileinfo, u32 offset);+ j2 i  n! H* C( y
u32 FS_Delete(PVOLINFO volinfo, u8 *path);  n7 P# Z. `/ M2 v; \/ `
u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);) w4 X3 o$ K: C; N$ S
u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo);0 b2 k; e* @" H- W- \
u32 FS_GetVolumeInfo(u8 unit,  u32 startsector, PVOLINFO volinfo);
; ]0 Q' N# ]6 h/ M7 w 
" k7 G; ^" B7 @ 
4 S& h6 L3 N7 w: w7 t7 B+ BThis is a snapshot of my current work in progress with partially integrated jpg decompressor* M4 x8 x5 q  S, _" w6 g! z
% ~7 a* M8 x. Q
 
收藏 评论0 发布时间:2010-3-22 16:29

举报

0个回答

所属标签

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版