资源简介
CPU采用STM32F103单片机,用户可以非常方便地移植软件到ST的Cortex单片机上;单片机采用SPI总线和间接总线与W5100接口,用户可任选一种方式;

代码片段和文件信息
/*-----------------------------------------------------------------------*/
/* 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“
#include “ff.h“
#include “sdcard.h“
#include “RTC_Time.h“
/*-----------------------------------------------------------------------*/
/* Correspondence between physical drive number and physical drive. */
#define ATA 1
#define MMC 0
#define USB 2
/*-----------------------------------------------------------------------*/
/* Inidialize a Drive */
DSTATUS disk_initialize (
BYTE drv /* Physical drive nmuber (0..) */
)
{
DSTATUS stat;
SD_Error Status = SD_OK;
SD_CardInfo CardInfo;
switch (drv) {
case ATA :
//result = ATA_disk_initialize();
// translate the reslut code here
stat=RES_OK;
return stat;
case MMC :
Status = SD_Init();
Status = SD_GetCardInfo(&CardInfo);
Status = SD_SelectDeselect((u32) (CardInfo.RCA << 16));
Status = SD_EnableWideBusOperation(SDIO_BusWide_1b);
Status = SD_SetDeviceMode(SD_DMA_MODE);
if (Status == SD_OK) stat=RES_OK;
return stat;
case USB :
//result = USB_disk_initialize();
// translate the reslut code here
stat=RES_OK;
return stat;
}
return STA_NOINIT;
}
/*-----------------------------------------------------------------------*/
/* Return Disk Status */
DSTATUS disk_status (
BYTE drv /* Physical drive nmuber (0..) */
)
{
DSTATUS stat;
switch (drv) {
case ATA :
//result = ATA_disk_status();
// translate the reslut code here
stat=RES_OK;
return stat;
case MMC :
//result = MMC_disk_status();
// translate the reslut code here
stat=RES_OK;
return stat;
case USB :
//result = USB_disk_status();
// translate the reslut code here
stat=RES_OK;
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;
SD_Error Status = SD_OK;
BYTE i;
switch (drv) {
case ATA :
//result = ATA_disk_read(buff sector count);
// translate the reslut code here
res=RES_OK;
return res;
case MMC :
//result = MMC_disk_read(buff sector count);
// translate the reslu
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4429 2009-04-14 00:34 web-http-STM32-W5100\FATFS\00readme.txt
文件 7934 2010-04-18 15:24 web-http-STM32-W5100\FATFS\diskio.c
文件 7876 2009-06-06 18:03 web-http-STM32-W5100\FATFS\diskio.c.bak
文件 1845 2009-05-31 20:29 web-http-STM32-W5100\FATFS\diskio.h
文件 1839 2009-05-31 20:28 web-http-STM32-W5100\FATFS\diskio.h.bak
文件 5471 2009-04-14 00:10 web-http-STM32-W5100\FATFS\doc\00index_e.html
文件 5437 2009-04-14 00:10 web-http-STM32-W5100\FATFS\doc\00index_j.html
文件 2637 2009-03-28 22:21 web-http-STM32-W5100\FATFS\doc\css_e.css
文件 3000 2009-03-28 22:22 web-http-STM32-W5100\FATFS\doc\css_j.css
文件 13980 2009-04-14 00:13 web-http-STM32-W5100\FATFS\doc\en\appnote.html
文件 2959 2009-03-28 16:32 web-http-STM32-W5100\FATFS\doc\en\chmod.html
文件 2118 2009-03-28 16:32 web-http-STM32-W5100\FATFS\doc\en\close.html
文件 1518 2008-12-13 15:49 web-http-STM32-W5100\FATFS\doc\en\dinit.html
文件 2689 2009-04-13 20:31 web-http-STM32-W5100\FATFS\doc\en\dioctl.html
文件 1858 2009-03-29 14:23 web-http-STM32-W5100\FATFS\doc\en\dread.html
文件 1599 2008-10-20 00:02 web-http-STM32-W5100\FATFS\doc\en\dstat.html
文件 1985 2009-03-29 14:23 web-http-STM32-W5100\FATFS\doc\en\dwrite.html
文件 1363 2007-12-22 16:06 web-http-STM32-W5100\FATFS\doc\en\fattime.html
文件 3114 2009-04-01 00:18 web-http-STM32-W5100\FATFS\doc\en\filename.html
文件 4917 2009-03-29 14:26 web-http-STM32-W5100\FATFS\doc\en\forward.html
文件 3233 2009-04-10 23:36 web-http-STM32-W5100\FATFS\doc\en\getfree.html
文件 2185 2009-04-03 20:22 web-http-STM32-W5100\FATFS\doc\en\gets.html
文件 3713 2009-03-29 17:04 web-http-STM32-W5100\FATFS\doc\en\lseek.html
文件 2429 2009-03-28 16:33 web-http-STM32-W5100\FATFS\doc\en\mkdir.html
文件 3405 2009-03-29 22:57 web-http-STM32-W5100\FATFS\doc\en\mkfs.html
文件 2012 2009-02-28 15:03 web-http-STM32-W5100\FATFS\doc\en\mount.html
文件 2005 2006-12-13 00:15 web-http-STM32-W5100\FATFS\doc\en\mountdrv.html
文件 5675 2009-03-28 16:30 web-http-STM32-W5100\FATFS\doc\en\open.html
文件 2458 2009-03-28 16:30 web-http-STM32-W5100\FATFS\doc\en\opendir.html
文件 2407 2009-04-03 20:16 web-http-STM32-W5100\FATFS\doc\en\printf.html
............此处省略414个文件信息
- 上一篇:微机原理第五版
- 下一篇:VC 视频会议系统 演示程序
相关资源
- STM32F103RC+ADC+DMA多通道采样LCD显示
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- STM32F103 串口程序(完整版)
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32F103 CC2500完整驱动(模拟SPI)
- SX1280.rar
- STM32F103C8T6+NRF24l01无线通信
- stm32f103.SchDoc
- STM32F103 USART+DMA
- 基于STM32F103C8单片机的晶联讯电子JL
- STM32F103实现OV7670摄像头显示
- STM32F103VCT6TR - High-density performance lin
- stm32f103 虚拟U盘,调试成功的
- 基于stm32F103vct6的SD卡FATFS文件系统移植
- STM32F103启动文件HD;MD
- 基于STM32F103的实时时钟程序,采用D
- STM32F103系列PWM输出应用之纸短情长音
- STM32F103移植FreeModbus实现modbus主机.zi
- 基于STM32F103C8T6的循迹避障小车完成
- 基于STM32+TM1638芯片的共阳极数码管驱
- stm32f103AES加密 cbc模式
- 中国移动 M5310 模组资料 DEMO 例程- S
- STM32F103移植rt-thread
- PCA9685驱动STM32F103
评论
共有 条评论