diff options
| author | Andrew Kannan <andrew.kannan@klaviyo.com> | 2019-02-13 11:03:26 -0500 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-02-13 08:03:26 -0800 |
| commit | 6b4549da8ceed736c85195f3bd16ded40131a29c (patch) | |
| tree | 4b66446d6e223f9b49cd7890e2e6666128afe67b /tmk_core | |
| parent | 824aa06c3cecf518cfea9cddd97446c869757c02 (diff) | |
| download | qmk_firmware-6b4549da8ceed736c85195f3bd16ded40131a29c.tar.gz qmk_firmware-6b4549da8ceed736c85195f3bd16ded40131a29c.zip | |
Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (#5094)
* Add stm32f072 base ck4x4 to handwired
* add prints
* Save these tries
* Save changes again
* Working hadron oled
* OLEd working but ws2812b still iffy:
* save another try
* Encoder feature + OLED
* RTC code
* Implement clock setting mode
* Whitespace
* Encoder hooked up to working LED PWM code
* Add missing files
* eeprom changes
* Save changes
* Move i2c master
* Move satisfaction75 under cannonkeys
* Set proper default folder
* Revert some core changes
* Undo paved iris changes
* Reorganize code for maintainability and prep for new features
* Add starting code for clock OLED mode
* Clock set mode finished
* Add custom encoder modes
* Actually add VIA keymap
* Gate to only 072
* fix gate for only 072
* Update header guards and includes
* Update i2c selection strategy
* Update board.c to handle software reset to DFU
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common.mk | 5 | ||||
| -rwxr-xr-x | tmk_core/common/chibios/eeprom_stm32.h | 6 | ||||
| -rwxr-xr-x | tmk_core/common/chibios/flash_stm32.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 063115acb..94f3c2380 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk | |||
| @@ -41,6 +41,11 @@ ifeq ($(PLATFORM),CHIBIOS) | |||
| 41 | TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c | 41 | TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c |
| 42 | TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB | 42 | TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB |
| 43 | TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE | 43 | TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE |
| 44 | else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) | ||
| 45 | TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c | ||
| 46 | TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c | ||
| 47 | TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F072xB | ||
| 48 | TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE | ||
| 44 | else | 49 | else |
| 45 | TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c | 50 | TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c |
| 46 | endif | 51 | endif |
diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 892e417b7..083eb16ee 100755 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h | |||
| @@ -34,6 +34,8 @@ | |||
| 34 | #define MCU_STM32F303CC | 34 | #define MCU_STM32F303CC |
| 35 | #elif defined(EEPROM_EMU_STM32F103xB) | 35 | #elif defined(EEPROM_EMU_STM32F103xB) |
| 36 | #define MCU_STM32F103RB | 36 | #define MCU_STM32F103RB |
| 37 | #elif defined(EEPROM_EMU_STM32F072xB) | ||
| 38 | #define MCU_STM32F072CB | ||
| 37 | #else | 39 | #else |
| 38 | #error "not implemented." | 40 | #error "not implemented." |
| 39 | #endif | 41 | #endif |
| @@ -42,7 +44,7 @@ | |||
| 42 | #if defined (MCU_STM32F103RB) | 44 | #if defined (MCU_STM32F103RB) |
| 43 | #define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte | 45 | #define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte |
| 44 | #define FEE_DENSITY_PAGES 2 // How many pages are used | 46 | #define FEE_DENSITY_PAGES 2 // How many pages are used |
| 45 | #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) | 47 | #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) || defined(MCU_STM32F072CB) |
| 46 | #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte | 48 | #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte |
| 47 | #define FEE_DENSITY_PAGES 4 // How many pages are used | 49 | #define FEE_DENSITY_PAGES 4 // How many pages are used |
| 48 | #else | 50 | #else |
| @@ -51,7 +53,7 @@ | |||
| 51 | #endif | 53 | #endif |
| 52 | 54 | ||
| 53 | #ifndef EEPROM_START_ADDRESS | 55 | #ifndef EEPROM_START_ADDRESS |
| 54 | #if defined (MCU_STM32F103RB) | 56 | #if defined (MCU_STM32F103RB) || defined(MCU_STM32F072CB) |
| 55 | #define FEE_MCU_FLASH_SIZE 128 // Size in Kb | 57 | #define FEE_MCU_FLASH_SIZE 128 // Size in Kb |
| 56 | #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) | 58 | #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) |
| 57 | #define FEE_MCU_FLASH_SIZE 512 // Size in Kb | 59 | #define FEE_MCU_FLASH_SIZE 512 // Size in Kb |
diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 164654a15..832bf3908 100755 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c | |||
| @@ -22,6 +22,9 @@ | |||
| 22 | #elif defined(EEPROM_EMU_STM32F103xB) | 22 | #elif defined(EEPROM_EMU_STM32F103xB) |
| 23 | #define STM32F103xB | 23 | #define STM32F103xB |
| 24 | #include "stm32f1xx.h" | 24 | #include "stm32f1xx.h" |
| 25 | #elif defined(EEPROM_EMU_STM32F072xB) | ||
| 26 | #define STM32F072xB | ||
| 27 | #include "stm32f0xx.h" | ||
| 25 | #else | 28 | #else |
| 26 | #error "not implemented." | 29 | #error "not implemented." |
| 27 | #endif | 30 | #endif |
| @@ -193,7 +196,7 @@ void FLASH_Lock(void) | |||
| 193 | * This parameter can be any combination of the following values: | 196 | * This parameter can be any combination of the following values: |
| 194 | * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag | 197 | * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag |
| 195 | * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag | 198 | * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag |
| 196 | * @arg FLASH_FLAG_EOP: FLASH End of Programming flag | 199 | * @arg FLASH_FLAG_EOP: FLASH End of Programming flag |
| 197 | * @retval None | 200 | * @retval None |
| 198 | */ | 201 | */ |
| 199 | void FLASH_ClearFlag(uint32_t FLASH_FLAG) | 202 | void FLASH_ClearFlag(uint32_t FLASH_FLAG) |
