##// END OF EJS Templates
Removed error on fat32 library, seems now to be able navigate among sectors in...
Removed error on fat32 library, seems now to be able navigate among sectors in both directions. Improved SDLCD drawing performances by almost 1000x.

File last commit:

r64:b702edc52366 dev_alexis
r68:104125d87b89 dev_alexis
Show More
sdcard-sdio.c
121 lines | 3.0 KiB | text/x-c | CLexer
/*------------------------------------------------------------------------------
-- This file is a part of the libuc, microcontroler library
-- Copyright (C) 2012, Alexis Jeandet
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------
-- Author : Alexis Jeandet
-- Mail : alexis.jeandet@member.fsf.org
-------------------------------------------------------------------------------*/
#include <i2c.h>
#include <stm32f4xx_usart.h>
#include <stm32f4xx_rcc.h>
#include <stm32f4xx_gpio.h>
#include <stm32f4xx_sdio.h>
#include <gpio.h>
#include <core.h>
#include <sdcard.h>
#include <sdcard-sdio.h>
void sdcardsdiomake(sdcardDev* sdcard,UHANDLE phy,void (*rcvr_mmc) (UHANDLE,char *,uint32_t ),void (*xmit_mmc) (UHANDLE,const char *,uint32_t ),void (*setspeed) (UHANDLE phy,uint32_t speed),uint32_t (*getspeed) (UHANDLE phy))
{
sdcard->phy = phy;
sdcard->rcvr_mmc = rcvr_mmc;
sdcard->xmit_mmc = xmit_mmc;
sdcard->setspeed = setspeed;
sdcard->getspeed = getspeed;
}
void sdcardsdiomakeblkdev(blkdevice* dev,sdcardDev* sdcard, blkdevselect_t select,blkdevpower_t power,blkdevdetect_t detect,blkdevwriteprotected_t writeprotected)
{
dev->phy=sdcard;
dev->select=select;
dev->power = power;
dev->detect = detect;
dev->writeprotected = writeprotected;
/*dev->write = sdcarddisk_write;
dev->read = sdcarddisk_read;
dev->ioctl = sdcarddisk_ioctl;
dev->initialize = sdcarddisk_initialize;
dev->status = sdcarddisk_status;*/
}
int sdcardselect (blkdeviceptr _this)
{
}
void sdcarddeselect (blkdeviceptr _this)
{
}
int sdcardwait_ready (sdcardDev* sdcard)
{
}
int sdcardxmit_datablock (sdcardDev* sdcard,const char *buff,char token)
{
}
int sdcardrcvr_datablock (sdcardDev* sdcard,char *buff,uint32_t btr)
{
}
char sdcardsend_cmd (blkdeviceptr _this,char cmd,uint32_t arg)
{
}
DSTATUS sdcarddisk_status (blkdeviceptr _this)
{
return RES_OK;
}
DSTATUS sdcarddisk_initialize (blkdeviceptr _this)
{
return RES_OK;
}
DRESULT sdcarddisk_read (blkdeviceptr _this,char *buff,uint32_t sector,char count)
{
return RES_OK;
}
DRESULT sdcarddisk_write (blkdeviceptr _this,const char *buff,uint32_t sector,char count)
{
}
DRESULT sdcarddisk_ioctl (blkdeviceptr _this,char ctrl,void *buff)
{
return RES_OK;
}