STM32091C_EVAL BSP User Manual: stm32091c_eval_sd.h File Reference

STM32091C EVAL BSP Drivers

stm32091c_eval_sd.h File Reference

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

#include "stm32091c_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_BLOCK_SIZE   0x200
 Block Size.
#define SD_PRESENT   ((uint8_t)0x01)
 SD detection on its memory slot.
#define SD_NOT_PRESENT   ((uint8_t)0x00)

Enumerations

enum  {
  BSP_SD_OK = 0x00, MSD_OK = 0x00, BSP_SD_ERROR = 0x01, MSD_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, uint16_t BlockSize, uint32_t NumberOfBlocks)
 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, uint16_t BlockSize, uint32_t NumberOfBlocks)
 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_GetStatus (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)
void SD_IO_WriteReadData (const uint8_t *DataIn, uint8_t *DataOut, uint16_t DataLength)
 Write a byte on the SD.
uint8_t SD_IO_WriteByte (uint8_t Data)
 Writes a byte on the SD.

Detailed Description

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

Author:
MCD Application Team
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 stm32091c_eval_sd.h.

Generated on Wed Jul 5 2017 09:21:50 for STM32091C_EVAL BSP User Manual by   doxygen 1.7.6.1