aboutsummaryrefslogtreecommitdiff
path: root/platforms/chibios/eeprom_stm32.h
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-11-19 18:41:02 +0000
committerGitHub <noreply@github.com>2021-11-19 10:41:02 -0800
commit2728603fe6d73e805a539d337fd01051c46ca806 (patch)
tree5c83ffc7efa112da870bd5d8502a9d91d4792f35 /platforms/chibios/eeprom_stm32.h
parent43b9e23bae12916d5161f03700c9bfe46737324b (diff)
downloadqmk_firmware-2728603fe6d73e805a539d337fd01051c46ca806.tar.gz
qmk_firmware-2728603fe6d73e805a539d337fd01051c46ca806.zip
Move tmk_core/common/<plat> (#13918)
Diffstat (limited to 'platforms/chibios/eeprom_stm32.h')
-rw-r--r--platforms/chibios/eeprom_stm32.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/platforms/chibios/eeprom_stm32.h b/platforms/chibios/eeprom_stm32.h
new file mode 100644
index 000000000..8fcfb556b
--- /dev/null
+++ b/platforms/chibios/eeprom_stm32.h
@@ -0,0 +1,33 @@
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
24#pragma once
25
26uint16_t EEPROM_Init(void);
27void EEPROM_Erase(void);
28uint8_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte);
29uint8_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord);
30uint8_t EEPROM_ReadDataByte(uint16_t Address);
31uint16_t EEPROM_ReadDataWord(uint16_t Address);
32
33void print_eeprom(void);