EEPROM for SX1272
Dependencies: X_NUCLEO_IKS01A1 driver_mbed_TH02 LoRaWAN-lib-v1_0_1 SX1272Lib mbed
Fork of Canada-SX1272-LoRaWAN-Bootcamp by
app/eeprom.h@8:bca4f3d51eaa, 2018-01-24 (annotated)
- Committer:
- terence304
- Date:
- Wed Jan 24 18:22:00 2018 +0000
- Revision:
- 8:bca4f3d51eaa
- Child:
- 9:4c8f32a4044d
add eeprom read and write funcions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
terence304 | 8:bca4f3d51eaa | 1 | #ifndef EEPROM_H |
terence304 | 8:bca4f3d51eaa | 2 | #define EEPROM_H |
terence304 | 8:bca4f3d51eaa | 3 | |
terence304 | 8:bca4f3d51eaa | 4 | #include "stm32l1xx_hal_flash.h" |
terence304 | 8:bca4f3d51eaa | 5 | |
terence304 | 8:bca4f3d51eaa | 6 | /*! |
terence304 | 8:bca4f3d51eaa | 7 | * \brief Initialises the contents of EepromData |
terence304 | 8:bca4f3d51eaa | 8 | */ |
terence304 | 8:bca4f3d51eaa | 9 | void EepromInit( void ); |
terence304 | 8:bca4f3d51eaa | 10 | |
terence304 | 8:bca4f3d51eaa | 11 | /*! |
terence304 | 8:bca4f3d51eaa | 12 | * \brief Read Eeprom from emulated EEPROM (in fact in Flash " higher address). |
terence304 | 8:bca4f3d51eaa | 13 | * |
terence304 | 8:bca4f3d51eaa | 14 | * \param [in] addr address of data (EEPROM offset not to be include) |
terence304 | 8:bca4f3d51eaa | 15 | * \param [in] buffer buffer to use for copy |
terence304 | 8:bca4f3d51eaa | 16 | * \param [in] size size of data to copy |
terence304 | 8:bca4f3d51eaa | 17 | * |
terence304 | 8:bca4f3d51eaa | 18 | * \retval status Status of operation (SUCCESS, ..) |
terence304 | 8:bca4f3d51eaa | 19 | */ |
terence304 | 8:bca4f3d51eaa | 20 | uint8_t EepromMcuReadBuffer( uint16_t addr, uint8_t *buffer, uint16_t size ); |
terence304 | 8:bca4f3d51eaa | 21 | |
terence304 | 8:bca4f3d51eaa | 22 | /*! |
terence304 | 8:bca4f3d51eaa | 23 | * \brief Write Eeprom from emulated EEPROM (in fact in Flash " higher address). |
terence304 | 8:bca4f3d51eaa | 24 | * |
terence304 | 8:bca4f3d51eaa | 25 | * \param [in] addr address of data (EEPROM offset not to be include) |
terence304 | 8:bca4f3d51eaa | 26 | * \param [in] buffer buffer to use for copy |
terence304 | 8:bca4f3d51eaa | 27 | * \param [in] size size of data to copy |
terence304 | 8:bca4f3d51eaa | 28 | * |
terence304 | 8:bca4f3d51eaa | 29 | * \retval status Status of operation (SUCCESS, ..) |
terence304 | 8:bca4f3d51eaa | 30 | */ |
terence304 | 8:bca4f3d51eaa | 31 | uint8_t EepromMcuWriteBuffer( uint16_t addr, uint8_t *buffer, uint16_t size ); |
terence304 | 8:bca4f3d51eaa | 32 | |
terence304 | 8:bca4f3d51eaa | 33 | #endif //EEPROM_H |