Resolved zvecr suggested changes

This commit is contained in:
HorrorTroll 2023-04-27 14:24:18 +07:00
parent 8f45423a23
commit bbd75ec1c7
7 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
/* Copyright 2023 HorrorTroll <https://github.com/HorrorTroll>
*
* 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

View File

@ -1,4 +1,4 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
/* Copyright 2023 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
@ -16,8 +16,6 @@
#pragma once
#include "config_common.h"
// SPI configuration
#define SPI_DRIVER SPID1
#define SPI_SCK_PIN A5
@ -44,5 +42,3 @@
#define BACKLIGHT_PWM_DRIVER PWMD2
#define BACKLIGHT_PWM_CHANNEL 1
#endif
#define RGB_CI_PIN A2

View File

@ -1,4 +1,4 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
/* Copyright 2023 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
@ -21,6 +21,8 @@
#pragma once
#define HAL_USE_ADC TRUE
#define HAL_USE_PWM TRUE
#define HAL_USE_SPI TRUE

View File

@ -1,6 +1,7 @@
{
"keyboard_name": "Onekey STM32 Mini v2 STM32F103RC",
"processor": "STM32F103",
"bootloader": "stm32duino",
"board": "STM32_F103_STM32DUINO",
"matrix_pins": {
"cols": ["B0"],
@ -9,7 +10,11 @@
"backlight": {
"pin": "A0"
},
"rgblight": {
"ws2812": {
"pin": "A1"
},
"apa102": {
"data_pin": "A1",
"clock_pin": "A2"
}
}

View File

@ -1,4 +1,4 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
/* Copyright 2023 HorrorTroll <https://github.com/HorrorTroll>
*
* 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
@ -23,6 +23,9 @@
#include_next <mcuconf.h>
#undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE
#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE

View File

@ -1,11 +1,5 @@
# Bootloader selection
# Cannot use `BOOTLOADER = stm32duino` due to the need to override
# `MCU_LDSCRIPT`, therefore all parameters need to be specified here manually.
OPT_DEFS += -DBOOTLOADER_STM32DUINO
MCU_LDSCRIPT = STM32F103xC_stm32duino_bootloader
BOOTLOADER_TYPE = stm32duino
DFU_ARGS = -d 1EAF:0003 -a 2 -R
DFU_SUFFIX_ARGS = -v 1EAF -p 0003
MCU_LDSCRIPT = STM32F103xC_stm32duino
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE