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

Primer2 的SD文件例程

[复制链接]
废鱼 发布时间:2010-3-22 16:29
 这个工程主要是简单的显示SD卡的文件目录。
" c6 w0 N  \4 K5 Z: t0 q% EThis 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.
: x6 `8 t' @2 y2 J( ZIncluded in this project an application to convert BMP, JPG, etc files to PRM with the functionality to scale the image to a desired resolution.
/ _$ q/ @* H- U& i 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
# |. @* ~( K( g! k" o- byte 1: width( I5 Z0 W1 R$ T+ A( _
- 6 bytes for future use
6 b% D5 z$ w( W% ~! [! _- pixel data (2 bytes per pixel)
; V7 E" T, E/ [' i, V% P FS interface functions:" g( {& H1 B, ^5 r6 @. a
u32 FS_Mount(enum STORAGE_device device);
+ L! `& {# O) b0 bu32 FS_Unmount(enum STORAGE_device device);) O7 D/ F2 E) ~2 |
u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo);
, U2 R4 L  M( c+ m* Iu32 FS_ReadFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);
& B$ `& Q" A. @9 \7 C# B5 [7 Iu32 FS_WriteFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);
; n: [; t  |) u9 t1 @( Ku32 FS_Close(PFILEINFO fileinfo);6 a5 u0 Y' d5 J8 J) t
void FS_Seek(PFILEINFO fileinfo, u32 offset);
) ]: a8 a, L! l  b4 w5 z& i2 R; N0 Du32 FS_Delete(PVOLINFO volinfo, u8 *path);8 R4 y0 q  p( o) [6 P7 \  v
u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);
, G' H, T5 J* bu32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo);
" N( K+ U6 q9 B5 K& u, Ou32 FS_GetVolumeInfo(u8 unit,  u32 startsector, PVOLINFO volinfo);% `, S; H2 \. r2 `- M: y/ \
 
7 W: k6 f1 }7 c& v- o9 l 
/ A8 v3 N/ J3 F# \3 J! YThis is a snapshot of my current work in progress with partially integrated jpg decompressor! a* F0 L( V) |+ J& ~! o4 k

+ b. e$ y) p# }( I+ J8 r4 _* ~* m 
收藏 评论0 发布时间:2010-3-22 16:29

举报

0个回答

所属标签

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
人形机器人运动控制、感知与智能配电
半导体创新技术与应用方向
EE架构与软件定义汽车
12V/48V 汽车智能配电(SPD)
区域控制单元(ZCU)与分区架构
关注我们
st-img 微信公众号
st-img 手机版