EU1KY AA
sd_diskio.c File Reference

SD Disk I/O driver. More...

#include <string.h>
#include "ff_gen_drv.h"

Macros

#define BLOCK_SIZE   512
 

Functions

DSTATUS SD_initialize (BYTE lun)
 Initializes a Drive. More...
 
DSTATUS SD_status (BYTE lun)
 Gets Disk Status. More...
 
DRESULT SD_read (BYTE lun, BYTE *buff, DWORD sector, UINT count)
 Reads Sector(s) More...
 

Variables

static volatile DSTATUS Stat = STA_NOINIT
 
const Diskio_drvTypeDef SD_Driver
 

Detailed Description

SD Disk I/O driver.

Author
MCD Application Team
Version
V1.3.0
Date
08-May-2015
Attention

© COPYRIGHT 2015 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Macro Definition Documentation

#define BLOCK_SIZE   512

Function Documentation

DSTATUS SD_initialize ( BYTE  lun)

Initializes a Drive.

Parameters
lun: not used
Return values
DSTATUSOperation status
DRESULT SD_read ( BYTE  lun,
BYTE buff,
DWORD  sector,
UINT  count 
)

Reads Sector(s)

Parameters
lun: not used
*buffData buffer to store read data
sectorSector address (LBA)
countNumber of sectors to read (1..128)
Return values
DRESULTOperation result
DSTATUS SD_status ( BYTE  lun)

Gets Disk Status.

Parameters
lun: not used
Return values
DSTATUSOperation status

Variable Documentation

const Diskio_drvTypeDef SD_Driver
Initial value:
=
{
}
DRESULT SD_read(BYTE, BYTE *, DWORD, UINT)
Reads Sector(s)
Definition: sd_diskio.c:111
DSTATUS SD_initialize(BYTE)
Initializes a Drive.
Definition: sd_diskio.c:73
DSTATUS SD_status(BYTE)
Gets Disk Status.
Definition: sd_diskio.c:91
volatile DSTATUS Stat = STA_NOINIT
static