资源简介
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 视频会议系统 演示程序
相关资源
- 共享STM32F103CBT6嵌入式以太网WEB服务器
- STM32F103驱动ILI9341DS18B20RTCADCIRED
- STM32F103RB最小系统原理图+PCB
- STM32F103C8舵机控制程序,原创支持12舵
- 基于STM32F103的循迹避障智能小车.zip
- 模拟电磁曲射炮STM32代码.zip
- 基于STM32F103的数据采集系统设计
- STM32f103多串口程序 32单片机程序 亲测
- 基于STM32F103+ADS1292的心率实时显示串口
- 实验1:PCM5102播放SD卡音乐STM32F103ZET
- STM32F103RB最小系统PCB工程_RV2(2012.12
- STM32F103C8T6核心板 + ENC28J60
- lora 节点 通信源码 实测没问题 SX12
- STM32F103 烟雾浓度检测
- STM32F103VCT6原版数据手册.pdf-EasyDatash
- STM32F103ZET6_FreeModbus移植
- STM32F103 MCP2515
- 英飞凌磁传感器 TLE5012b STM32F103 SPI 源
- stm32f103+nrf24l01 收发程序按键选择模式
- stm32f103c8t6 驱动ili9341 2.8寸TFT LCD液晶显
- 条形码二维码扫描识别模块GM65程序之
- STM32F103实战项目
- STM32五子棋游戏
- stm32f103c8串口中断不定长接收基于cu
- stm32f103+dht11温湿度传感器例程
- 基于STM32F103的USB键盘程序代码
- STM32f103循迹小车控制程序源码
- STM32F103基于keil写的简易示波器
- 基于stm32F103c8t6和GPS模块做的小玩意儿
- 中景园电子0.96OLED显示屏_STM32_F103C8系
评论
共有 条评论