• 大小: 250KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-19
  • 语言: 其他
  • 标签: 振南电子  

资源简介

振南电子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个文件信息

评论

共有 条评论