资源简介
振南电子znFAT文件系统,读写SD卡程序代码
4、程序说明:此程序将在SD卡的根目录下创建znmcu.txt这个文本文件并向其中写入一些数据,最终将文件关闭

代码片段和文件信息
#include “myfun.h“
#include “string.h“
/*******************************************************
+------------------------------------+
|振南电子 原创程序模块 公共函数部分 |
+------------------------------------+
此源码版权属 振南 全权享有,如欲引用,敬请署名并告知
严禁随意用于商业目的,违者必究,后果自负
振南电子
->产品网站 http://www.znmcu.cn/
->产品论坛 http://bbs.znmcu.cn/
->产品网店 http://shop.znmcu.cn/
->产品咨询 QQ:987582714 MSN:yzn07@126.com
WW:yzn07
********************************************************/
/******************************************************************
- 功能描述:延时函数
- 隶属模块:公开函数模块
- 函数属性:外部,用户可调用
- 参数说明:time:time值决定了延时的时间长短
- 返回说明:无
- 注:.....
******************************************************************/
void delay(unsigned int time)
{
while(time--);
}
/******************************************************************
- 功能描述:将一个32位的变量dat转为字符串,比如把1234转为“1234“
- 隶属模块:公开函数模块
- 函数属性:外部,用户可调用
- 参数说明:dat:带转的long型的变量
str:指向字符数组的指针,转换后的字节串放在其中
- 返回说明:无
******************************************************************/
void u32tostr(unsigned long datchar *str)
{
char temp[20];
unsigned char i=0j=0;
i=0;
while(dat)
{
temp[i]=dat%10+0x30;
i++;
dat/=10;
}
j=i;
for(i=0;i {
str[i]=temp[j-i-1];
}
if(!i) {str[i++]=‘0‘;}
str[i]=0;
}
/******************************************************************
- 功能描述:将一个字符串转为32位的变量,比如“1234“转为1234
- 隶属模块:公开函数模块
- 函数属性:外部,用户可调用
- 参数说明:str:指向待转换的字符串
- 返回说明:转换后的数值
******************************************************************/
unsigned long strtou32(char *str)
{
unsigned long temp=0;
unsigned long fact=1;
unsigned char len=strlen(str);
unsigned char i;
for(i=len;i>0;i--)
{
temp+=((str[i-1]-0x30)*fact);
fact*=10;
}
return temp;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 450 2009-02-01 07:48 SD卡上的znFAT 实例4\znfat sd 4\cf.LST
文件 5608 2009-01-31 00:53 SD卡上的znFAT 实例4\znfat sd 4\ch375.LST
文件 17499 2009-01-31 00:53 SD卡上的znFAT 实例4\znfat sd 4\ch375.OBJ
文件 129198 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test
文件 64879 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test.hex
文件 107 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test.lnp
文件 88286 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test.M51
文件 2489 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test.Opt
文件 240 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test.ORC
文件 741 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\fat test.plg
文件 2248 2009-01-01 05:09 SD卡上的znFAT 实例4\znfat sd 4\fat test.Uv2
....... 2491 2009-01-01 05:09 SD卡上的znFAT 实例4\znfat sd 4\fat test_Opt.Bak
....... 2282 2009-08-31 23:22 SD卡上的znFAT 实例4\znfat sd 4\fat test_Uv2.Bak
文件 2986 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\iic.LST
文件 3495 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\iic.OBJ
文件 2248 2009-02-01 08:22 SD卡上的znFAT 实例4\znfat sd 4\myfun.c
文件 856 2009-09-15 17:53 SD卡上的znFAT 实例4\znfat sd 4\myfun.h
文件 4325 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\myfun.LST
文件 5146 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\myfun.OBJ
文件 406 2009-06-12 18:52 SD卡上的znFAT 实例4\znfat sd 4\mytype.h
文件 5945 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\pcf8563.LST
文件 11597 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\pcf8563.OBJ
文件 2130 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\RWBYTE.asm
文件 9814 2009-09-14 11:54 SD卡上的znFAT 实例4\znfat sd 4\sd.c
文件 1672 2009-09-16 11:56 SD卡上的znFAT 实例4\znfat sd 4\sd.h
文件 16896 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\sd.LST
文件 16224 2009-12-19 12:23 SD卡上的znFAT 实例4\znfat sd 4\sd.OBJ
文件 17797 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\STC_NEW_8051.H
文件 5091 2009-07-09 01:28 SD卡上的znFAT 实例4\znfat sd 4\uart.c
文件 459 2009-06-12 02:04 SD卡上的znFAT 实例4\znfat sd 4\uart.h
............此处省略17个文件信息
- 上一篇:STM32的红外遥控程序,亲测能用
- 下一篇:linux网络编程课程设计
相关资源
- 用Beckhoff(倍福)PLC读写巴鲁夫RFID
- 2017款解码软件v1.0.0.6
- VC 获得文件属性 获取文件的创建时
- STM32基于rt_thread操作系统的SDHC卡文件
- 读者写者问题(读者优先,写者优先
- 德卡D3读卡器测试程序驱动文件
- JM阅读笔记(学习H264)
- 51模拟SPI读写SD卡(包括Fat和Fat32文件
- ply格式文件的读写程序
- 125KHz 100cm ID 读卡电路
- 51单片机读取温度数据存储到SD卡中并
- MP3文件ID3v2ID3v2APEv2标签读取
- 28335写的用spi读取传感器数据并用CA
- MFC读三维模型obj文件
- 读取串口数据并画实时曲线的VC 程序
- MSP430f149读sd FAT txt
- 德卡D8读写器关于读写感应卡的一些代
- php 操作INI文件,读取,设置,ini文件
- 一个读取地震数据seg2或dat格式的程序
- 用PIC16F877实现EEPROM读写程序
- C读DXF源程序及AutoCAD中的DXF参考文件
- DICOM图像读取以及窗宽,窗位调整
- usb调试程序 对USB设备进行数据的读写
- 对大文件的读写的两个类C#
- TMS320F2812_FLASH读写实例
- DICOM文件读取程序
- stm32 用SPI 方式读写 SDHC
- Source Insight 3.5 配置文件
- bmp文件读出为txt文件 txt文件写入为
- Ajax定时读取数据库(源代码发布)
评论
共有 条评论