资源简介
STM32F103,SD卡写文件txt,csv等例程
代码片段和文件信息
/*-----------------------------------------------------------------------*/
/* Low level disk I/O module skeleton for FatFs (C)ChaN 2007 */
/*-----------------------------------------------------------------------*/
/* This is a stub disk I/O module that acts as front end of the existing */
/* disk I/O modules and attach it to FatFs module with common interface. */
/*-----------------------------------------------------------------------*/
#include “diskio.h“
/*-----------------------------------------------------------------------*/
/* Correspondence between physical drive number and physical drive. */
/* Note that Tiny-FatFs supports only single drive and always */
/* accesses drive number 0. */
#define ATA 0
#define MMC 1
#define USB 2
/*-----------------------------------------------------------------------*/
/* Inidialize a Drive */
DSTATUS disk_initialize (
BYTE drv /* Physical drive nmuber (0..) */
)
{
DSTATUS stat;
int result;
switch (drv) {
case ATA :
result = ATA_disk_initialize();
// translate the reslut code here
return stat;
case MMC :
result = MMC_disk_initialize();
// translate the reslut code here
return stat;
case USB :
result = USB_disk_initialize();
// translate the reslut code here
return stat;
}
return STA_NOINIT;
}
/*-----------------------------------------------------------------------*/
/* Return Disk Status */
DSTATUS disk_status (
BYTE drv /* Physical drive nmuber (0..) */
)
{
DSTATUS stat;
int result;
switch (drv) {
case ATA :
result = ATA_disk_status();
// translate the reslut code here
return stat;
case MMC :
result = MMC_disk_status();
// translate the reslut code here
return stat;
case USB :
result = USB_disk_status();
// translate the reslut code here
return stat;
}
return STA_NOINIT;
}
/*-----------------------------------------------------------------------*/
/* Read Sector(s) */
DRESULT disk_read (
BYTE drv /* Physical drive nmuber (0..) */
BYTE *buff /* Data buffer to store read data */
DWORD sector /* Sector address (LBA) */
BYTE count /* Number of sectors to read (1..255) */
)
{
DRESULT res;
int result;
switch (drv) {
case ATA :
result = ATA_disk_read(buff sector count);
// translate the reslut code here
return res;
case MMC :
result = MMC_disk_read(buff sector count);
// translate the reslut code here
return res;
case USB :
result = USB_disk_read(buff sector count);
// translate the reslut code here
return res;
}
return RES_PARERR;
}
/*-----------------------------------------------------------------------*/
/* Write Sect
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 17273 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
文件 26297 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html
文件 15766 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15503 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 15692 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
文件 12376 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13656 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
文件 12849 2012-03-27 16:24 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
文件 14073 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
文件 15955 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
文件 13072 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s
文件 13160 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd.s
文件 12482 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd_vl.s
文件 9814 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld.s
文件 10562 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld_vl.s
文件 10269 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md.s
文件 11058 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md_vl.s
文件 13261 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_xl.s
文件 16626 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s
文件 16229 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd.s
文件 15675 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd_vl.s
文件 12650 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld.s
文件 12950 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld_vl.s
文件 12912 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_md.s
文件 13601 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_md_vl.s
文件 16628 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_xl.s
文件 12604 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_cl.s
文件 12592 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd.s
文件 12239 2011-03-19 12:13 STM32的SD卡FATFS\STM32的SD卡FATFS\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd_vl.s
............此处省略769个文件信息
评论
共有 条评论