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

Primer2 的SD文件例程

[复制链接]
废鱼 发布时间:2010-3-22 16:29
 这个工程主要是简单的显示SD卡的文件目录。
1 r7 r! D. Z% zThis 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.
4 l- Q+ C: A( \: D. l. n( p! O5 GThis 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 Q6 f  [6 U4 R# Q5 i4 L' L
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.8 Y" f  x8 I  f" X; u" a
 Current layout of PRM image file:
" h' Q, u9 y% L: O7 c! R 8byte header:4 ~* r) t$ {7 v7 T* N% b1 E
- byte 0: height
0 Q" J9 b: ?/ f- K% j1 ~6 C& {0 v- byte 1: width
, D, q9 h* j% ~* k- 6 bytes for future use
! x" M+ i" b$ P- V" r) G' ^/ U4 E( B- pixel data (2 bytes per pixel)8 m# M, c# z0 @$ d
 FS interface functions:
' D7 l: B# ~9 L. Z7 j7 Q) P+ i* bu32 FS_Mount(enum STORAGE_device device);
/ {9 `1 h9 d5 |4 f2 N0 b4 Mu32 FS_Unmount(enum STORAGE_device device);
7 }5 e4 Q- U& {( G+ bu32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo);8 g, |6 a4 {  r% g
u32 FS_ReadFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);2 T8 }9 |' B; u* l& q! D
u32 FS_WriteFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);
: K6 H" a+ B! G) Tu32 FS_Close(PFILEINFO fileinfo);; E( p$ E8 A5 u' |6 ]
void FS_Seek(PFILEINFO fileinfo, u32 offset);
: Q0 Y  G7 d0 `2 S: C9 z9 ju32 FS_Delete(PVOLINFO volinfo, u8 *path);2 \( k- g! i& f4 _2 A, |7 w
u32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);8 ^7 j6 F9 l5 O9 B  ]# a: R
u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo);
1 M6 ?6 I' Z1 o- \3 Ou32 FS_GetVolumeInfo(u8 unit,  u32 startsector, PVOLINFO volinfo);
, E: W' y. w0 m# }  t7 E$ `0 y # ^. d9 w) |( s$ A! X
 " r! {4 x: ~' \, B" Z9 z# b
This is a snapshot of my current work in progress with partially integrated jpg decompressor
7 [) t0 j5 E& j3 R' a9 C" h& \* x- U$ X
 
赞 收藏 评论0 发布时间:2010-3-22 16:29

举报

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