Class to drive a M24LR64 EEPROM with the STM32746G_DISCOVERY board. This EEPROM can be found on the additional ANT7-M24LR-A daughter board.

Dependents:   DISCO-F746NG_Monttory_Base DISCO-F746NG_Monttory_Base

Deprecated lib

Committer:
bcostm
Date:
Tue Jan 05 09:02:48 2016 +0000
Revision:
0:71d257cea6b2
First version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:71d257cea6b2 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
bcostm 0:71d257cea6b2 2 *
bcostm 0:71d257cea6b2 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
bcostm 0:71d257cea6b2 4 * and associated documentation files (the "Software"), to deal in the Software without
bcostm 0:71d257cea6b2 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
bcostm 0:71d257cea6b2 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
bcostm 0:71d257cea6b2 7 * Software is furnished to do so, subject to the following conditions:
bcostm 0:71d257cea6b2 8 *
bcostm 0:71d257cea6b2 9 * The above copyright notice and this permission notice shall be included in all copies or
bcostm 0:71d257cea6b2 10 * substantial portions of the Software.
bcostm 0:71d257cea6b2 11 *
bcostm 0:71d257cea6b2 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
bcostm 0:71d257cea6b2 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
bcostm 0:71d257cea6b2 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
bcostm 0:71d257cea6b2 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
bcostm 0:71d257cea6b2 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
bcostm 0:71d257cea6b2 17 */
bcostm 0:71d257cea6b2 18
bcostm 0:71d257cea6b2 19 #include "EEPROM_DISCO_F746NG.h"
bcostm 0:71d257cea6b2 20
bcostm 0:71d257cea6b2 21 // Constructor
bcostm 0:71d257cea6b2 22 EEPROM_DISCO_F746NG::EEPROM_DISCO_F746NG()
bcostm 0:71d257cea6b2 23 {
bcostm 0:71d257cea6b2 24 BSP_EEPROM_Init();
bcostm 0:71d257cea6b2 25 }
bcostm 0:71d257cea6b2 26
bcostm 0:71d257cea6b2 27 // Destructor
bcostm 0:71d257cea6b2 28 EEPROM_DISCO_F746NG::~EEPROM_DISCO_F746NG()
bcostm 0:71d257cea6b2 29 {
bcostm 0:71d257cea6b2 30 BSP_EEPROM_DeInit();
bcostm 0:71d257cea6b2 31 }
bcostm 0:71d257cea6b2 32
bcostm 0:71d257cea6b2 33 //=================================================================================================================
bcostm 0:71d257cea6b2 34 // Public methods
bcostm 0:71d257cea6b2 35 //=================================================================================================================
bcostm 0:71d257cea6b2 36
bcostm 0:71d257cea6b2 37 uint32_t EEPROM_DISCO_F746NG::Init(void)
bcostm 0:71d257cea6b2 38 {
bcostm 0:71d257cea6b2 39 return BSP_EEPROM_Init();
bcostm 0:71d257cea6b2 40 }
bcostm 0:71d257cea6b2 41
bcostm 0:71d257cea6b2 42 uint8_t EEPROM_DISCO_F746NG::DeInit(void)
bcostm 0:71d257cea6b2 43 {
bcostm 0:71d257cea6b2 44 return BSP_EEPROM_DeInit();
bcostm 0:71d257cea6b2 45 }
bcostm 0:71d257cea6b2 46
bcostm 0:71d257cea6b2 47 uint32_t EEPROM_DISCO_F746NG::ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead)
bcostm 0:71d257cea6b2 48 {
bcostm 0:71d257cea6b2 49 return BSP_EEPROM_ReadBuffer(pBuffer, ReadAddr, NumByteToRead);
bcostm 0:71d257cea6b2 50 }
bcostm 0:71d257cea6b2 51
bcostm 0:71d257cea6b2 52 uint32_t EEPROM_DISCO_F746NG::WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite)
bcostm 0:71d257cea6b2 53 {
bcostm 0:71d257cea6b2 54 return BSP_EEPROM_WritePage(pBuffer, WriteAddr, NumByteToWrite);
bcostm 0:71d257cea6b2 55 }
bcostm 0:71d257cea6b2 56
bcostm 0:71d257cea6b2 57 uint32_t EEPROM_DISCO_F746NG::WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)
bcostm 0:71d257cea6b2 58 {
bcostm 0:71d257cea6b2 59 return BSP_EEPROM_WriteBuffer(pBuffer, WriteAddr, NumByteToWrite);
bcostm 0:71d257cea6b2 60 }
bcostm 0:71d257cea6b2 61
bcostm 0:71d257cea6b2 62 uint32_t EEPROM_DISCO_F746NG::WaitEepromStandbyState(void)
bcostm 0:71d257cea6b2 63 {
bcostm 0:71d257cea6b2 64 return BSP_EEPROM_WaitEepromStandbyState();
bcostm 0:71d257cea6b2 65 }