2018-08-29 22:14:49 +02:00
|
|
|
/*
|
|
|
|
* This software is experimental and a work in progress.
|
|
|
|
* Under no circumstances should these files be used in relation to any critical system(s).
|
|
|
|
* Use of these files is at your own risk.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
|
|
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
2019-01-07 02:22:19 +01:00
|
|
|
* This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by
|
|
|
|
* Artur F.
|
2018-08-29 22:14:49 +02:00
|
|
|
*
|
|
|
|
* Modifications for QMK and STM32F303 by Yiancar
|
2019-01-07 02:22:19 +01:00
|
|
|
*
|
|
|
|
* This library assumes 8-bit data locations. To add a new MCU, please provide the flash
|
|
|
|
* page size and the total flash size in Kb. The number of available pages must be a multiple
|
|
|
|
* of 2. Only half of the pages account for the total EEPROM size.
|
|
|
|
* This library also assumes that the pages are not used by the firmware.
|
2018-08-29 22:14:49 +02:00
|
|
|
*/
|
|
|
|
|
2020-12-26 05:56:11 +01:00
|
|
|
#pragma once
|
2018-08-29 22:14:49 +02:00
|
|
|
|
2019-01-07 02:22:19 +01:00
|
|
|
uint16_t EEPROM_Init(void);
|
2019-08-30 20:19:03 +02:00
|
|
|
void EEPROM_Erase(void);
|
2021-08-24 00:15:34 +02:00
|
|
|
uint8_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte);
|
|
|
|
uint8_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord);
|
2019-08-30 20:19:03 +02:00
|
|
|
uint8_t EEPROM_ReadDataByte(uint16_t Address);
|
2021-08-24 00:15:34 +02:00
|
|
|
uint16_t EEPROM_ReadDataWord(uint16_t Address);
|
|
|
|
|
|
|
|
void print_eeprom(void);
|