Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Joerg_turbo_ede DISCO-F746NG_Monttory_Base DISCO-F746NG_Monttory_Base Loco_10_17_SD ... more
SD_DISCO_F746NG.cpp
00001 /* Copyright (c) 2010-2016 mbed.org, MIT License 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 00004 * and associated documentation files (the "Software"), to deal in the Software without 00005 * restriction, including without limitation the rights to use, copy, modify, merge, publish, 00006 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 00007 * Software is furnished to do so, subject to the following conditions: 00008 * 00009 * The above copyright notice and this permission notice shall be included in all copies or 00010 * substantial portions of the Software. 00011 * 00012 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 00013 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00014 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00015 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00016 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00017 */ 00018 00019 #include "SD_DISCO_F746NG.h" 00020 00021 // Constructor 00022 SD_DISCO_F746NG::SD_DISCO_F746NG() 00023 { 00024 BSP_SD_Init(); 00025 } 00026 00027 // Destructor 00028 SD_DISCO_F746NG::~SD_DISCO_F746NG() 00029 { 00030 BSP_SD_DeInit(); 00031 00032 } 00033 00034 //================================================================================================================= 00035 // Public methods 00036 //================================================================================================================= 00037 00038 uint8_t SD_DISCO_F746NG::Init(void) 00039 { 00040 return BSP_SD_Init(); 00041 } 00042 00043 uint8_t SD_DISCO_F746NG::DeInit(void) 00044 { 00045 return BSP_SD_DeInit(); 00046 } 00047 00048 uint8_t SD_DISCO_F746NG::ITConfig(void) 00049 { 00050 return BSP_SD_ITConfig(); 00051 } 00052 00053 uint8_t SD_DISCO_F746NG::IsDetected(void) 00054 { 00055 return BSP_SD_IsDetected(); 00056 } 00057 00058 uint8_t SD_DISCO_F746NG::ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout) 00059 { 00060 return BSP_SD_ReadBlocks(pData, ReadAddr, NumOfBlocks, Timeout); 00061 } 00062 00063 uint8_t SD_DISCO_F746NG::WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout) 00064 { 00065 return BSP_SD_WriteBlocks(pData, WriteAddr, NumOfBlocks, Timeout); 00066 } 00067 00068 uint8_t SD_DISCO_F746NG::ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks) 00069 { 00070 return BSP_SD_ReadBlocks_DMA(pData, ReadAddr, NumOfBlocks); 00071 } 00072 00073 uint8_t SD_DISCO_F746NG::WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks) 00074 { 00075 return BSP_SD_WriteBlocks_DMA(pData, WriteAddr, NumOfBlocks); 00076 } 00077 00078 uint8_t SD_DISCO_F746NG::Erase(uint64_t StartAddr, uint64_t EndAddr) 00079 { 00080 return BSP_SD_Erase(StartAddr, EndAddr); 00081 } 00082 00083 uint8_t SD_DISCO_F746NG::GetCardState(void) 00084 { 00085 return BSP_SD_GetCardState(); 00086 } 00087 00088 void SD_DISCO_F746NG::GetCardInfo(HAL_SD_CardInfoTypeDef *CardInfo) 00089 { 00090 BSP_SD_GetCardInfo(CardInfo); 00091 } 00092
Generated on Thu Jul 14 2022 02:37:09 by
1.7.2