STM3210C_EVAL BSP User Manual: stm3210c_eval_sd.h File Reference

STM3210C_EVAL BSP

stm3210c_eval_sd.h File Reference

This file contains the common defines and functions prototypes for the stm3210c_eval_sd.c driver. More...

#include "stm3210c_eval.h"

Go to the source code of this file.

Data Structures

struct  struct_v1
struct  struct_v2
struct  SD_CSD
 Card Specific Data: CSD Register. More...
union  SD_CSD::csd_version
struct  SD_CID
 Card Identification Data: CID Register. More...
struct  SD_CardInfo
 SD Card information. More...

Defines

#define SD_PRESENT   ((uint8_t)0x01)
 SD detection on its memory slot.
#define SD_NOT_PRESENT   ((uint8_t)0x00)
#define SD_DATATIMEOUT   100000000U
#define BSP_SD_CardInfo   SD_CardInfo
 SD Card information structure.
#define SD_TRANSFER_OK   ((uint8_t)0x00)
 SD transfer state definition.
#define SD_TRANSFER_BUSY   ((uint8_t)0x01)

Enumerations

enum  { BSP_SD_OK = 0x00, MSD_OK = 0x00, BSP_SD_ERROR = 0x01, BSP_SD_TIMEOUT }
 SD status structure definition. More...

Functions

uint8_t BSP_SD_Init (void)
 Initializes the SD/SD communication.
uint8_t BSP_SD_IsDetected (void)
 Detects if SD card is correctly plugged in the memory slot or not.
uint8_t BSP_SD_ReadBlocks (uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout)
 Reads block(s) from a specified address in the SD card, in polling mode.
uint8_t BSP_SD_WriteBlocks (uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout)
 Writes block(s) to a specified address in the SD card, in polling mode.
uint8_t BSP_SD_Erase (uint32_t StartAddr, uint32_t EndAddr)
 Erases the specified memory area of the given SD card.
uint8_t BSP_SD_GetCardState (void)
 Returns the SD status.
uint8_t BSP_SD_GetCardInfo (SD_CardInfo *pCardInfo)
 Returns information about specific card.
void SD_IO_Init (void)
 Initializes the SD Card and put it into StandBy State (Ready for data transfer).
void SD_IO_CSState (uint8_t state)
 Set the SD_CS pin.
void SD_IO_WriteReadData (const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
 Write a byte on the SD.
void SD_IO_WriteData (const uint8_t *Data, uint16_t DataLength)
 Write a byte on the SD.
void SD_IO_ReadData (const uint8_t *Data, uint16_t DataLength)
 Read a byte from the SD.
uint8_t SD_IO_WriteByte (uint8_t Data)
 Writes a byte on the SD.
void HAL_Delay (__IO uint32_t Delay)

Detailed Description

This file contains the common defines and functions prototypes for the stm3210c_eval_sd.c driver.

Author:
MCD Application Team
Version:
V7.0.0
Date:
14-April-2017
Attention:

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm3210c_eval_sd.h.

Generated on Fri Apr 14 2017 13:00:47 for STM3210C_EVAL BSP User Manual by   doxygen 1.7.6.1