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

Primer2 的SD文件例程

[复制链接]
废鱼 发布时间:2010-3-22 16:29
 这个工程主要是简单的显示SD卡的文件目录。" ]+ D  {* j* K* }) N6 w! L7 C( D
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.
# o- e1 Q8 S' {0 E% NThis 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.
) k$ z) Z6 [) v4 w) b9 y# m' rIncluded in this project an application to convert BMP, JPG, etc files to PRM with the functionality to scale the image to a desired resolution.
; x) t" O! D% Q8 c5 g Current layout of PRM image file:) Y: F  U% V! u+ i% r' E% w
 8byte header:
0 G' T3 u6 n8 O& p: T: ^- byte 0: height) ^' \% m( M5 I+ _/ P6 h# w
- byte 1: width0 W. q$ d' o2 ~( q) }* @0 Z2 W. p
- 6 bytes for future use
" {6 x: c5 @6 _9 y2 O6 E- pixel data (2 bytes per pixel)0 x" w2 N8 |/ I- i+ i, m2 L
 FS interface functions:( j. c% f9 D# i- E# y2 u' {
u32 FS_Mount(enum STORAGE_device device);! g: b" H' z( T7 c& \- U% W+ f
u32 FS_Unmount(enum STORAGE_device device);+ t9 U' ]7 m# A( s4 Y
u32 FS_OpenFile(PVOLINFO volinfo, u8 *path, u8 mode, PFILEINFO fileinfo);  @5 w3 S. A# A( Z* J5 g' y
u32 FS_ReadFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);
  p9 T( K2 j- w& g; [# @u32 FS_WriteFile(PFILEINFO fileinfo,  u8 *buffer, u32 *successcount, u32 len);! w4 G2 b* v0 G8 s4 J$ |
u32 FS_Close(PFILEINFO fileinfo);* R2 j. I% I+ Y. g. w' W& w
void FS_Seek(PFILEINFO fileinfo, u32 offset);% @& ?+ n1 L6 B; A8 P( g1 I$ `
u32 FS_Delete(PVOLINFO volinfo, u8 *path);
* Y* F# I4 m: C/ {6 ~; qu32 FS_GetNextEntry(PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent);4 Q2 g0 o1 j5 u* B# z0 y% y
u32 FS_OpenDirectory(PVOLINFO volinfo,u8 *dirname, PDIRINFO dirinfo);
" s5 C7 [/ I" p# Su32 FS_GetVolumeInfo(u8 unit,  u32 startsector, PVOLINFO volinfo);4 r! E+ K; T5 e; j+ F7 N) ]  Q0 S
 
/ v) g+ Y7 S) Y. B. e0 l 
% Y' a$ |& N' B; j) l* JThis is a snapshot of my current work in progress with partially integrated jpg decompressor1 k3 _8 G$ v7 |# |
4 B+ _' z3 u1 W1 U
 
收藏 评论0 发布时间:2010-3-22 16:29

举报

0个回答

所属标签

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