Skip to content
Permalink
Browse files

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
  • Loading branch information...
awkannan authored and mechmerlin committed Feb 13, 2019
1 parent 824aa06 commit 6b4549da8ceed736c85195f3bd16ded40131a29c
Showing with 5,630 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 drivers/qwiic/micro_oled.c
  3. +111 −0 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c
  4. +922 −0 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h
  5. +5 −0 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk
  6. +703 −0 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg
  7. +7 −0 keyboards/cannonkeys/satisfaction75/bootloader_defs.h
  8. +524 −0 keyboards/cannonkeys/satisfaction75/chconf.h
  9. +107 −0 keyboards/cannonkeys/satisfaction75/config.h
  10. +354 −0 keyboards/cannonkeys/satisfaction75/halconf.h
  11. +116 −0 keyboards/cannonkeys/satisfaction75/i2c_master.c
  12. +37 −0 keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c
  13. +49 −0 keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c
  14. +5 −0 keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk
  15. +240 −0 keyboards/cannonkeys/satisfaction75/led.c
  16. +5 −0 keyboards/cannonkeys/satisfaction75/led_custom.h
  17. +176 −0 keyboards/cannonkeys/satisfaction75/mcuconf.h
  18. +12 −0 keyboards/cannonkeys/satisfaction75/readme.md
  19. +57 −0 keyboards/cannonkeys/satisfaction75/rules.mk
  20. +382 −0 keyboards/cannonkeys/satisfaction75/satisfaction75.c
  21. +118 −0 keyboards/cannonkeys/satisfaction75/satisfaction75.h
  22. +174 −0 keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
  23. +269 −0 keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
  24. +7 −0 keyboards/handwired/ck4x4/bootloader_defs.h
  25. +524 −0 keyboards/handwired/ck4x4/chconf.h
  26. +1 −0 keyboards/handwired/ck4x4/ck4x4.c
  27. +15 −0 keyboards/handwired/ck4x4/ck4x4.h
  28. +70 −0 keyboards/handwired/ck4x4/config.h
  29. +353 −0 keyboards/handwired/ck4x4/halconf.h
  30. +29 −0 keyboards/handwired/ck4x4/keymaps/default/keymap.c
  31. +171 −0 keyboards/handwired/ck4x4/mcuconf.h
  32. +3 −0 keyboards/handwired/ck4x4/readme.md
  33. +49 −0 keyboards/handwired/ck4x4/rules.mk
  34. +19 −0 keyboards/zeal60/zeal60_keycodes.h
  35. +5 −0 tmk_core/common.mk
  36. +4 −2 tmk_core/common/chibios/eeprom_stm32.h
  37. +4 −1 tmk_core/common/chibios/flash_stm32.c
@@ -1,3 +1,4 @@
.history/
.dep
*.o
*.bin
@@ -28,6 +28,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "micro_oled.h"
#include <print.h>
#include <stdlib.h>
#include "util/font5x7.h"
#include "util/font8x16.h"
@@ -309,12 +310,11 @@ static uint8_t micro_oled_screen_buffer[] = {
#else
//catchall for custom screen szies
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0};
#endif
#endif



void micro_oled_init(void) {

i2c_init();
i2c_start(I2C_ADDRESS_SA0_1);

@@ -0,0 +1,111 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

/*
* This file has been automatically generated using ChibiStudio board
* generator plugin. Do not edit manually.
*/

#include "hal.h"

#if HAL_USE_PAL || defined(__DOXYGEN__)
/**
* @brief PAL setup.
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
const PALConfig pal_default_config = {
#if STM32_HAS_GPIOA
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
#endif
#if STM32_HAS_GPIOB
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
#endif
#if STM32_HAS_GPIOC
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
#endif
#if STM32_HAS_GPIOD
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
#endif
#if STM32_HAS_GPIOE
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
#endif
#if STM32_HAS_GPIOF
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
#endif
#if STM32_HAS_GPIOG
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
#endif
#if STM32_HAS_GPIOH
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
#endif
#if STM32_HAS_GPIOI
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
#endif
};
#endif

void enter_bootloader_mode_if_requested(void);

/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
stm32_clock_init();
}

#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
*/
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {

(void)mmcp;
/* TODO: Fill the implementation.*/
return true;
}

/**
* @brief MMC_SPI card write protection detection.
*/
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {

(void)mmcp;
/* TODO: Fill the implementation.*/
return false;
}
#endif

/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
}
Oops, something went wrong.

0 comments on commit 6b4549d

Please sign in to comment.
You can’t perform that action at this time.