9e44362179
Unfortunately, the crippled versions of “Bluepill” boards with STM32F103C6xx chips instead of STM32F103C8xx are now sold all over the place, sometimes advertised in a confusing way to make the difference not noticeable until too late. Add minimal support for these MCUs in the common “Bluepill with stm32duino” configuration, so that it could be possible to make something useful from those boards (although fitting QMK into the available 24 KiB of flash may be rather hard). (In fact, I'm not sure whether the “STM32” part of the chip name is actually correct for those boards of uncertain origin, so the onekey board name is `bluepill_f103c6`; another reason for that name is to match the existing `blackpill_f401` and `blackpill_f411`.) The EEPROM emulation support is not included on purpose, because enabling it without having a working firmware size check would be irresponsible with such flash size (the chance that someone would build a firmware where the EEPROM backing store ends up overlapping some firmware code is really high). Other than that, enabling the EEPROM emulation code is mostly trivial (the `wear_leveling` driver with the `embedded_flash` backing store even works without any custom configuration, although its code is significantly larger than the `vendor` driver, which may also be important for such flash size).
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/* Copyright 2019
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "config_common.h"
|
|
|
|
#define PRODUCT Onekey Bluepill STM32F103C6
|
|
|
|
#define MATRIX_COL_PINS { B0 }
|
|
#define MATRIX_ROW_PINS { A7 }
|
|
#define UNUSED_PINS
|
|
|
|
#define BACKLIGHT_PIN A0
|
|
#define BACKLIGHT_PWM_DRIVER PWMD2
|
|
#define BACKLIGHT_PWM_CHANNEL 1
|
|
|
|
#define RGB_DI_PIN A1
|
|
|
|
#define ADC_PIN A0
|
|
|
|
// This code does not fit into the really small flash of STM32F103x6 together
|
|
// with CONSOLE_ENABLE=yes, and the debugging console is probably more
|
|
// important for the "okeney" testing firmware. In a real firmware you may be
|
|
// able to use these features if you keep the debugging console disabled.
|
|
#define NO_ACTION_LAYER
|
|
#define NO_ACTION_TAPPING
|