You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.5 KiB

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