diff options
| author | Joel Challis <git@zvecr.com> | 2021-11-19 18:41:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-19 10:41:02 -0800 |
| commit | 2728603fe6d73e805a539d337fd01051c46ca806 (patch) | |
| tree | 5c83ffc7efa112da870bd5d8502a9d91d4792f35 /platforms/eeprom.h | |
| parent | 43b9e23bae12916d5161f03700c9bfe46737324b (diff) | |
| download | qmk_firmware-2728603fe6d73e805a539d337fd01051c46ca806.tar.gz qmk_firmware-2728603fe6d73e805a539d337fd01051c46ca806.zip | |
Move tmk_core/common/<plat> (#13918)
Diffstat (limited to 'platforms/eeprom.h')
| -rw-r--r-- | platforms/eeprom.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/platforms/eeprom.h b/platforms/eeprom.h new file mode 100644 index 000000000..f5b3f0ad5 --- /dev/null +++ b/platforms/eeprom.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #if defined(__AVR__) && !defined(EEPROM_DRIVER) | ||
| 4 | # include <avr/eeprom.h> | ||
| 5 | #else | ||
| 6 | # include <stdint.h> | ||
| 7 | # include <stdlib.h> | ||
| 8 | |||
| 9 | uint8_t eeprom_read_byte(const uint8_t *__p); | ||
| 10 | uint16_t eeprom_read_word(const uint16_t *__p); | ||
| 11 | uint32_t eeprom_read_dword(const uint32_t *__p); | ||
| 12 | void eeprom_read_block(void *__dst, const void *__src, size_t __n); | ||
| 13 | void eeprom_write_byte(uint8_t *__p, uint8_t __value); | ||
| 14 | void eeprom_write_word(uint16_t *__p, uint16_t __value); | ||
| 15 | void eeprom_write_dword(uint32_t *__p, uint32_t __value); | ||
| 16 | void eeprom_write_block(const void *__src, void *__dst, size_t __n); | ||
| 17 | void eeprom_update_byte(uint8_t *__p, uint8_t __value); | ||
| 18 | void eeprom_update_word(uint16_t *__p, uint16_t __value); | ||
| 19 | void eeprom_update_dword(uint32_t *__p, uint32_t __value); | ||
| 20 | void eeprom_update_block(const void *__src, void *__dst, size_t __n); | ||
| 21 | #endif | ||
