EEPROM for SX1272

Dependencies:   X_NUCLEO_IKS01A1 driver_mbed_TH02 LoRaWAN-lib-v1_0_1 SX1272Lib mbed

Fork of Canada-SX1272-LoRaWAN-Bootcamp by Uttam Bhat

app/eeprom.h

Committer:
terence304
Date:
2018-01-24
Revision:
8:bca4f3d51eaa
Child:
9:4c8f32a4044d

File content as of revision 8:bca4f3d51eaa:

#ifndef EEPROM_H
#define EEPROM_H

#include "stm32l1xx_hal_flash.h"

/*!
 * \brief Initialises the contents of EepromData
 */
void EepromInit( void );

/*!
 * \brief Read Eeprom from emulated EEPROM (in fact in Flash " higher address).
 *
 * \param [in]  addr          address of data (EEPROM offset not to be include)
 * \param [in]  buffer        buffer to use for copy
 * \param [in]  size          size of data to copy
 *
 * \retval      status        Status of operation (SUCCESS, ..)
 */
uint8_t EepromMcuReadBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );

/*!
 * \brief Write Eeprom from emulated EEPROM (in fact in Flash " higher address).
 *
 * \param [in]  addr          address of data (EEPROM offset not to be include)
 * \param [in]  buffer        buffer to use for copy
 * \param [in]  size          size of data to copy
 *
 * \retval      status        Status of operation (SUCCESS, ..)
 */
uint8_t EepromMcuWriteBuffer( uint16_t addr, uint8_t *buffer, uint16_t size );

#endif //EEPROM_H