SDRAM class for DISCO_F746NG

Dependents:   ARMmbedFMsinth DISCO-F746NG_AUDIO_demo3 DISCO-F746NG_Monttory_Base DISCO-F746NG_Monttory_Base ... more

Deprecated lib

Committer:
adustm
Date:
Mon Mar 21 12:16:24 2016 +0000
Revision:
0:370f402a2219
SDRAM class for DISCO_F746NG

Who changed what in which revision?

UserRevisionLine numberNew contents of line
adustm 0:370f402a2219 1 /* Copyright (c) 2010-2016 mbed.org, MIT License
adustm 0:370f402a2219 2 *
adustm 0:370f402a2219 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
adustm 0:370f402a2219 4 * and associated documentation files (the "Software"), to deal in the Software without
adustm 0:370f402a2219 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
adustm 0:370f402a2219 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
adustm 0:370f402a2219 7 * Software is furnished to do so, subject to the following conditions:
adustm 0:370f402a2219 8 *
adustm 0:370f402a2219 9 * The above copyright notice and this permission notice shall be included in all copies or
adustm 0:370f402a2219 10 * substantial portions of the Software.
adustm 0:370f402a2219 11 *
adustm 0:370f402a2219 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
adustm 0:370f402a2219 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
adustm 0:370f402a2219 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
adustm 0:370f402a2219 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
adustm 0:370f402a2219 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
adustm 0:370f402a2219 17 */
adustm 0:370f402a2219 18
adustm 0:370f402a2219 19 #include "SDRAM_DISCO_F746NG.h"
adustm 0:370f402a2219 20
adustm 0:370f402a2219 21 // Constructor
adustm 0:370f402a2219 22 SDRAM_DISCO_F746NG::SDRAM_DISCO_F746NG()
adustm 0:370f402a2219 23 {
adustm 0:370f402a2219 24 BSP_SDRAM_Init();
adustm 0:370f402a2219 25 }
adustm 0:370f402a2219 26
adustm 0:370f402a2219 27 // Destructor
adustm 0:370f402a2219 28 SDRAM_DISCO_F746NG::~SDRAM_DISCO_F746NG()
adustm 0:370f402a2219 29 {
adustm 0:370f402a2219 30 BSP_SDRAM_DeInit();
adustm 0:370f402a2219 31
adustm 0:370f402a2219 32 }
adustm 0:370f402a2219 33
adustm 0:370f402a2219 34 //=================================================================================================================
adustm 0:370f402a2219 35 // Public methods
adustm 0:370f402a2219 36 //=================================================================================================================
adustm 0:370f402a2219 37
adustm 0:370f402a2219 38
adustm 0:370f402a2219 39 uint8_t SDRAM_DISCO_F746NG::Init(void)
adustm 0:370f402a2219 40 {
adustm 0:370f402a2219 41 return BSP_SDRAM_Init();
adustm 0:370f402a2219 42 }
adustm 0:370f402a2219 43
adustm 0:370f402a2219 44 uint8_t SDRAM_DISCO_F746NG::DeInit(void)
adustm 0:370f402a2219 45 {
adustm 0:370f402a2219 46 return BSP_SDRAM_DeInit();
adustm 0:370f402a2219 47 }
adustm 0:370f402a2219 48
adustm 0:370f402a2219 49 void SDRAM_DISCO_F746NG::Initialization_sequence(uint32_t RefreshCount)
adustm 0:370f402a2219 50 {
adustm 0:370f402a2219 51 BSP_SDRAM_Initialization_sequence(RefreshCount);
adustm 0:370f402a2219 52 }
adustm 0:370f402a2219 53
adustm 0:370f402a2219 54 uint8_t SDRAM_DISCO_F746NG::ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
adustm 0:370f402a2219 55 {
adustm 0:370f402a2219 56 return BSP_SDRAM_ReadData(uwStartAddress, pData, uwDataSize);
adustm 0:370f402a2219 57 }
adustm 0:370f402a2219 58
adustm 0:370f402a2219 59 uint8_t SDRAM_DISCO_F746NG::ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
adustm 0:370f402a2219 60 {
adustm 0:370f402a2219 61 return BSP_SDRAM_ReadData_DMA(uwStartAddress, pData, uwDataSize);
adustm 0:370f402a2219 62 }
adustm 0:370f402a2219 63
adustm 0:370f402a2219 64 uint8_t SDRAM_DISCO_F746NG::WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
adustm 0:370f402a2219 65 {
adustm 0:370f402a2219 66 return BSP_SDRAM_WriteData(uwStartAddress, pData, uwDataSize);
adustm 0:370f402a2219 67 }
adustm 0:370f402a2219 68
adustm 0:370f402a2219 69 uint8_t SDRAM_DISCO_F746NG::WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
adustm 0:370f402a2219 70 {
adustm 0:370f402a2219 71 return BSP_SDRAM_WriteData_DMA(uwStartAddress, pData, uwDataSize);
adustm 0:370f402a2219 72 }
adustm 0:370f402a2219 73
adustm 0:370f402a2219 74 uint8_t SDRAM_DISCO_F746NG::Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd)
adustm 0:370f402a2219 75 {
adustm 0:370f402a2219 76 return BSP_SDRAM_Sendcmd(SdramCmd);
adustm 0:370f402a2219 77 }