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

Dependents:   DISCO-F469NI_EEPROM_demo IntegrationCAN_28jun IntegrationCAN_7jul IntegrationCAN_7julnovo ... more

Committer:
bcostm
Date:
Tue Jan 05 14:10:45 2016 +0000
Revision:
0:cd22055cbc4b
First version

Who changed what in which revision?

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