diff options
| author | yiancar <yiangosyiangou@cytanet.com.cy> | 2018-08-29 23:14:49 +0300 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2018-08-29 16:14:49 -0400 |
| commit | 621ce29a53e9e94e085fbd86c0b7134e9df4bfe5 (patch) | |
| tree | 82c7d8258c4169284f7572500f9b292c7ee4634d /tmk_core/protocol/chibios/main.c | |
| parent | 30680c6eb396a2bb06928afd69edae9908ac84fb (diff) | |
| download | qmk_firmware-621ce29a53e9e94e085fbd86c0b7134e9df4bfe5.tar.gz qmk_firmware-621ce29a53e9e94e085fbd86c0b7134e9df4bfe5.zip | |
STM32 EEPROM Emulation (#3741)
* STM32 EEPROM Emulation
- Added EEPROM emulation libaries from libmaple and Arduino_STM32. https://github.com/rogerclarkmelbourne/Arduino_STM32 and https://github.com/leaflabs/libmaple.
- Renamed teensy EEPROM library and added conditional selection of library.
- Remapped EEPROM memory map for 16 byte blocks (as is with STM32f3xx MCUs).
- Added EEPROM initialization in main.c of Chibios.
- Added EEPROM format to clear the emulated pages when EEPROM is marked as invalid.
* Fixed ifdef
Diffstat (limited to 'tmk_core/protocol/chibios/main.c')
| -rw-r--r-- | tmk_core/protocol/chibios/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index f2abc438d..568c1edb2 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c | |||
| @@ -44,6 +44,9 @@ | |||
| 44 | #ifdef MIDI_ENABLE | 44 | #ifdef MIDI_ENABLE |
| 45 | #include "qmk_midi.h" | 45 | #include "qmk_midi.h" |
| 46 | #endif | 46 | #endif |
| 47 | #ifdef STM32F303xC | ||
| 48 | #include "eeprom_stm32.h" | ||
| 49 | #endif | ||
| 47 | #include "suspend.h" | 50 | #include "suspend.h" |
| 48 | #include "wait.h" | 51 | #include "wait.h" |
| 49 | 52 | ||
| @@ -109,6 +112,10 @@ int main(void) { | |||
| 109 | halInit(); | 112 | halInit(); |
| 110 | chSysInit(); | 113 | chSysInit(); |
| 111 | 114 | ||
| 115 | #ifdef STM32F303xC | ||
| 116 | EEPROM_init(); | ||
| 117 | #endif | ||
| 118 | |||
| 112 | // TESTING | 119 | // TESTING |
| 113 | // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); | 120 | // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); |
| 114 | 121 | ||
