mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-23 08:02:03 +00:00
Compare commits
13 Commits
dcd532830d
...
3723c0e3d5
Author | SHA1 | Date | |
---|---|---|---|
|
3723c0e3d5 | ||
|
327f7ee9a7 | ||
|
0b25528b6b | ||
|
0ce3f6bcfe | ||
|
a1f253cbef | ||
|
baecc69da5 | ||
|
4723f308ad | ||
|
88ec588ae7 | ||
|
272281f1a0 | ||
|
12f1a30d16 | ||
|
364a910b92 | ||
|
82a94ea1bd | ||
|
17c9388af5 |
15
Makefile
15
Makefile
@ -124,24 +124,11 @@ endef
|
||||
define PARSE_RULE
|
||||
RULE := $1
|
||||
COMMANDS :=
|
||||
REQUIRE_PLATFORM_KEY :=
|
||||
# If the rule starts with all, then continue the parsing from
|
||||
# PARSE_ALL_KEYBOARDS
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||
KEYBOARD_RULE=all
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-avr),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := avr
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-chibios),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := chibios
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-arm_atsam),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := arm_atsam
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
|
||||
$$(eval $$(call PARSE_TEST))
|
||||
# If the rule starts with the name of a known keyboard, then continue
|
||||
@ -271,7 +258,7 @@ define PARSE_KEYMAP
|
||||
# Format it in bold
|
||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||
# Specify the variables that we are passing forward to submake
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN)
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) QMK_BIN=$$(QMK_BIN)
|
||||
# And the first part of the make command
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f $(BUILDDEFS_PATH)/build_keyboard.mk $$(MAKE_TARGET)
|
||||
# The message to display
|
||||
|
@ -184,6 +184,12 @@ include $(BUILDDEFS_PATH)/converters.mk
|
||||
|
||||
include $(BUILDDEFS_PATH)/mcu_selection.mk
|
||||
|
||||
# PLATFORM_KEY should be detected in info.json via key 'processor' (or rules.mk 'MCU')
|
||||
ifeq ($(PLATFORM_KEY),)
|
||||
$(call CATASTROPHIC_ERROR,Platform not defined)
|
||||
endif
|
||||
PLATFORM=$(shell echo $(PLATFORM_KEY) | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
# Find all the C source files to be compiled in subfolders.
|
||||
KEYBOARD_SRC :=
|
||||
|
||||
@ -257,24 +263,6 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","")
|
||||
FOUND_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h
|
||||
endif
|
||||
|
||||
# Determine and set parameters based on the keyboard's processor family.
|
||||
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
|
||||
# not used for LUFA
|
||||
ifdef MCU_FAMILY
|
||||
PLATFORM=CHIBIOS
|
||||
PLATFORM_KEY=chibios
|
||||
FIRMWARE_FORMAT?=bin
|
||||
OPT_DEFS += -DMCU_$(MCU_FAMILY)
|
||||
else ifdef ARM_ATSAM
|
||||
PLATFORM=ARM_ATSAM
|
||||
PLATFORM_KEY=arm_atsam
|
||||
FIRMWARE_FORMAT=bin
|
||||
else
|
||||
PLATFORM=AVR
|
||||
PLATFORM_KEY=avr
|
||||
FIRMWARE_FORMAT?=hex
|
||||
endif
|
||||
|
||||
# Find all of the config.h files and add them to our CONFIG_H define.
|
||||
CONFIG_H :=
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/config.h)","")
|
||||
@ -433,13 +421,6 @@ SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
||||
SKIP_COMPILE := no
|
||||
ifneq ($(REQUIRE_PLATFORM_KEY),)
|
||||
ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY))
|
||||
SKIP_COMPILE := yes
|
||||
endif
|
||||
endif
|
||||
|
||||
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/bootloader.mk
|
||||
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
|
||||
-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk
|
||||
@ -479,12 +460,7 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
ifeq ($(SKIP_COMPILE),no)
|
||||
all: build check-size
|
||||
else
|
||||
all:
|
||||
echo "skipped" >&2
|
||||
endif
|
||||
|
||||
build: elf cpfirmware
|
||||
check-size: build
|
||||
|
@ -8,12 +8,18 @@ endif
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
ifneq ($(CONVERT_TO),)
|
||||
# stash so we can overwrite env provided vars if needed
|
||||
ACTIVE_CONVERTER=$(CONVERT_TO)
|
||||
|
||||
# glob to search each platfrorm and/or check for valid converter
|
||||
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
|
||||
ifeq ($(CONVERTER),)
|
||||
$(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
|
||||
endif
|
||||
|
||||
-include $(CONVERTER)/pre_converter.mk
|
||||
|
||||
PLATFORM_KEY = $(shell echo $(CONVERTER) | rev | cut -d "/" -f4 | rev)
|
||||
TARGET := $(TARGET)_$(CONVERT_TO)
|
||||
|
||||
# Configure any defaults
|
||||
@ -22,6 +28,9 @@ ifneq ($(CONVERT_TO),)
|
||||
OPT_DEFS += -DCONVERTER_ENABLED
|
||||
VPATH += $(CONVERTER)
|
||||
|
||||
# Configure for "alias" - worst case it produces an idential define
|
||||
OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(ACTIVE_CONVERTER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
# Finally run any converter specific logic
|
||||
include $(CONVERTER)/converter.mk
|
||||
endif
|
||||
|
@ -313,7 +313,11 @@ ifneq ($(findstring STM32F303, $(MCU)),)
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
|
||||
# or <keyboard_dir>/ld/
|
||||
MCU_LDSCRIPT ?= STM32F303xC
|
||||
ifeq ($(strip $(BOOTLOADER)), tinyuf2)
|
||||
MCU_LDSCRIPT ?= STM32F303xC_tinyuf2
|
||||
else
|
||||
MCU_LDSCRIPT ?= STM32F303xC
|
||||
endif
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
|
@ -38,6 +38,8 @@
|
||||
"PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"},
|
||||
"PS2_DRIVER": {"info_key": "ps2.driver"},
|
||||
|
||||
"PLATFORM_KEY": {"info_key": "platform_key", "to_json": false},
|
||||
|
||||
// Items we want flagged in lint
|
||||
"CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||
"CONVERT_TO_PROTON_C": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"},
|
||||
|
@ -257,6 +257,9 @@
|
||||
"c_macro": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"json_layout": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"layout": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -43,6 +43,8 @@ Then place this include at the top of your code:
|
||||
|
||||
### ARM
|
||||
|
||||
#### STM32
|
||||
|
||||
Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC.
|
||||
|
||||
Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
|
||||
@ -121,6 +123,21 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl
|
||||
|
||||
<sup>² Not all STM32F4xx devices have ADC2 and/or ADC3, therefore some configurations shown in this table may be unavailable; in particular, pins `F4`…`F10` cannot be used as ADC inputs on devices which do not have ADC3. Check the device datasheet to confirm which pin functions are supported.</sup>
|
||||
|
||||
#### RP2040
|
||||
|
||||
RP2040 has only a single ADC (`ADCD1` in ChibiOS); in the QMK API the index for that ADC is 0.
|
||||
|
||||
|Channel|Pin |
|
||||
|-------|-------------------|
|
||||
|0 |`GP26` |
|
||||
|1 |`GP27` |
|
||||
|2 |`GP28` |
|
||||
|3 |`GP29` |
|
||||
|4 |Temperature sensor*|
|
||||
|
||||
|
||||
<sup>* The temperature sensor is disabled by default and needs to be enabled by the RP2040-specific function: `adcRPEnableTS(&ADCD1)`. The ADC must be initialized before calling that function; an easy way to ensure that is to perform a dummy conversion.</sup>
|
||||
|
||||
## Functions
|
||||
|
||||
### AVR
|
||||
|
@ -324,7 +324,7 @@ Flashing sequence:
|
||||
|
||||
## tinyuf2
|
||||
|
||||
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F401/F411 blackpill.
|
||||
Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on F303/F401/F411.
|
||||
|
||||
The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level.
|
||||
|
||||
@ -365,7 +365,7 @@ CLI Flashing sequence:
|
||||
|
||||
## uf2boot
|
||||
|
||||
Keyboards may opt into supporting the uf2boot bootloader. This is currently only supported on the F103 bluepill.
|
||||
Keyboards may opt into supporting the uf2boot bootloader. This is currently only supported on F103.
|
||||
|
||||
The `rules.mk` setting for this bootloader is `uf2boot`, and can be specified at the keymap or user level.
|
||||
|
||||
|
@ -4,7 +4,7 @@ The following table shows the current driver status for peripherals on RP2040 MC
|
||||
|
||||
| System | Support |
|
||||
| ---------------------------------------------------------------- | ---------------------------------------------- |
|
||||
| [ADC driver](adc_driver.md) | Support planned (no ETA) |
|
||||
| [ADC driver](adc_driver.md) | :heavy_check_mark: |
|
||||
| [Audio](audio_driver.md#pwm-hardware) | :heavy_check_mark: |
|
||||
| [Backlight](feature_backlight.md) | :heavy_check_mark: |
|
||||
| [I2C driver](i2c_driver.md) | :heavy_check_mark: |
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
/* Set PLL M divider from 4 (F411 GENERIC default) to 8, because of 16 MHz crystal on board */
|
||||
#undef STM32_PLLM_VALUE
|
||||
#define STM32_PLLM_VALUE 8
|
||||
|
@ -24,4 +24,4 @@
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#if defined(KEYBOARD_bastardkb_charybdis_3x5_blackpill)
|
||||
# undef STM32_I2C_USE_I2C1
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI0
|
||||
#define RP_SPI_USE_SPI0 TRUE
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI0
|
||||
#define RP_SPI_USE_SPI0 TRUE
|
||||
|
@ -24,4 +24,4 @@
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI0
|
||||
#define RP_SPI_USE_SPI0 TRUE
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI0
|
||||
#define RP_SPI_USE_SPI0 TRUE
|
||||
|
@ -24,4 +24,4 @@
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#if defined(KEYBOARD_bastardkb_charybdis_4x6_blackpill)
|
||||
# undef STM32_PWM_USE_ADVANCED
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI0
|
||||
#define RP_SPI_USE_SPI0 TRUE
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI0
|
||||
#define RP_SPI_USE_SPI0 TRUE
|
||||
|
@ -19,4 +19,4 @@
|
||||
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI1
|
||||
#define RP_SPI_USE_SPI1 TRUE
|
||||
|
@ -20,4 +20,4 @@
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI1
|
||||
#define RP_SPI_USE_SPI1 TRUE
|
||||
|
@ -18,4 +18,4 @@
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C1 TRUE
|
||||
|
@ -20,4 +20,4 @@
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_SPI_USE_SPI1
|
||||
#define RP_SPI_USE_SPI1 TRUE
|
||||
|
@ -19,4 +19,4 @@
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#define RP_I2C_USE_I2C0 TRUE
|
@ -19,4 +19,4 @@
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C0
|
||||
#define RP_I2C_USE_I2C0 TRUE
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000U
|
||||
|
@ -18,4 +18,4 @@
|
||||
// so we need to change resolution and frequency to match.
|
||||
#define CH_CFG_ST_RESOLUTION 16
|
||||
#define CH_CFG_ST_FREQUENCY 10000
|
||||
#include_next "chconf.h"
|
||||
#include_next <chconf.h>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_SERIAL_USE_USART1
|
||||
#define STM32_SERIAL_USE_USART1 TRUE
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PWM_USE_TIM2
|
||||
#define STM32_PWM_USE_TIM2 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef WB32_ADC_USE_ADC1
|
||||
#define WB32_ADC_USE_ADC1 TRUE
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef WB32_ADC_USE_ADC1
|
||||
#define WB32_ADC_USE_ADC1 TRUE
|
||||
|
@ -1,3 +1,5 @@
|
||||
// Copyright 2020 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
9
keyboards/handwired/onekey/nucleo_f446re/board.h
Normal file
9
keyboards/handwired/onekey/nucleo_f446re/board.h
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 8000000U
|
||||
#define STM32_HSE_BYPASS
|
16
keyboards/handwired/onekey/nucleo_f446re/config.h
Normal file
16
keyboards/handwired/onekey/nucleo_f446re/config.h
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2021 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD4
|
||||
#define BACKLIGHT_PWM_CHANNEL 3
|
||||
#define BACKLIGHT_PAL_MODE 2
|
||||
|
||||
#define RGB_CI_PIN B13
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define SOLENOID_PINS { B12, B13, B14, B15 }
|
||||
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
|
10
keyboards/handwired/onekey/nucleo_f446re/halconf.h
Normal file
10
keyboards/handwired/onekey/nucleo_f446re/halconf.h
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright 2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_ADC TRUE
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
15
keyboards/handwired/onekey/nucleo_f446re/info.json
Normal file
15
keyboards/handwired/onekey/nucleo_f446re/info.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"keyboard_name": "Onekey Nucleo F446RE",
|
||||
"processor": "STM32F446",
|
||||
"bootloader": "stm32-dfu",
|
||||
"matrix_pins": {
|
||||
"cols": ["A2"],
|
||||
"rows": ["A1"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "B8"
|
||||
},
|
||||
"rgblight": {
|
||||
"pin": "A0"
|
||||
}
|
||||
}
|
23
keyboards/handwired/onekey/nucleo_f446re/mcuconf.h
Normal file
23
keyboards/handwired/onekey/nucleo_f446re/mcuconf.h
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PLLM_VALUE
|
||||
#define STM32_PLLM_VALUE 4
|
||||
|
||||
#undef STM32_PLLSAIM_VALUE
|
||||
#define STM32_PLLSAIM_VALUE 4
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
||||
#undef STM32_PWM_USE_TIM4
|
||||
#define STM32_PWM_USE_TIM4 TRUE
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
||||
#undef STM32_SPI_USE_SPI1
|
||||
#define STM32_SPI_USE_SPI1 TRUE
|
5
keyboards/handwired/onekey/nucleo_f446re/readme.md
Normal file
5
keyboards/handwired/onekey/nucleo_f446re/readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
# STM32 Nucleo-L432 onekey
|
||||
|
||||
To trigger keypress, short together pins *A1* and *A2*.
|
||||
|
||||
You'll also need to connect `VIN`, `GND`, USB `D+` to `PA12`/`D2`, and USB `D-` to `PA11`/`D10`.
|
1
keyboards/handwired/onekey/nucleo_f446re/rules.mk
Normal file
1
keyboards/handwired/onekey/nucleo_f446re/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
SRC += analog.c
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
@ -20,3 +20,5 @@
|
||||
#define AUDIO_PIN GP16
|
||||
#define AUDIO_PWM_DRIVER PWMD0
|
||||
#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A
|
||||
|
||||
#define ADC_PIN GP26
|
||||
|
@ -5,5 +5,6 @@
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
#define HAL_USE_ADC TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_PWM_USE_PWM0
|
||||
#define RP_PWM_USE_PWM0 TRUE
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -18,4 +18,4 @@
|
||||
|
||||
#define HAL_USE_I2C TRUE
|
||||
|
||||
#include_next "halconf.h"
|
||||
#include_next <halconf.h>
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef RP_I2C_USE_I2C1
|
||||
#define RP_I2C_USE_I2C1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
@ -14,4 +14,4 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "chconf.h"
|
||||
#include_next <chconf.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// Underglow uses TIM4, Backlight TIM1, so both are enabled here.
|
||||
#undef STM32_PWM_USE_TIM1
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// for i2c expander, and ISSI
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// for i2c expander, and ISSI
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
|
||||
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
|
||||
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
|
||||
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
|
||||
// on the Planck requires the use of TIM2 to run PWM -- rework which timers are
|
||||
|
@ -19,4 +19,4 @@
|
||||
#define CH_CFG_ST_RESOLUTION 16
|
||||
#define CH_CFG_ST_FREQUENCY 10000
|
||||
|
||||
#include_next "chconf.h"
|
||||
#include_next <chconf.h>
|
||||
|
@ -19,4 +19,4 @@
|
||||
#define CH_CFG_ST_RESOLUTION 16
|
||||
#define CH_CFG_ST_FREQUENCY 10000
|
||||
|
||||
#include_next "chconf.h"
|
||||
#include_next <chconf.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include_next "mcuconf.h"
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
/* Set PLL M divider from 4 (F411 GENERIC default) to 8, because of 16 MHz crystal on board */
|
||||
#undef STM32_PLLM_VALUE
|
||||
|
@ -28,8 +28,8 @@
|
||||
#define RGB_ENABLE_PIN GP6
|
||||
|
||||
// ADC Configuration
|
||||
#define ADC_RESOLUTION ? ? ? // ADC_CFGR1_RES_12BIT // TBD when RP2040 has analog support
|
||||
#define ADC_SATURATION ? ? ? // ((1 << 12) - 1) // TBD when RP2040 has analog support
|
||||
#define ADC_RESOLUTION 12
|
||||
#define ADC_SATURATION ((1 << 12) - 1)
|
||||
#define ADC_CURRENT_PIN GP26
|
||||
#define ADC_VOLTAGE_PIN GP27
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#pragma once
|
||||
|
||||
//#define HAL_USE_ADC TRUE
|
||||
#define HAL_USE_ADC TRUE
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
// Used for RGB
|
||||
//#undef RP_ADC_USE_ADC1
|
||||
//#define RP_ADC_USE_ADC1 TRUE
|
||||
#undef RP_ADC_USE_ADC1
|
||||
#define RP_ADC_USE_ADC1 TRUE
|
||||
|
||||
// Used for EEPROM
|
||||
#undef RP_SPI_USE_SPI0
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#ifdef BOARD_OTG_NOVBUSSENS
|
||||
# undef BOARD_OTG_NOVBUSSENS
|
||||
|
@ -1,2 +1 @@
|
||||
WS2812_DRIVER = pwm
|
||||
SRC += analog.c
|
||||
|
@ -5,3 +5,5 @@ QUANTUM_PAINTER_DRIVERS = ssd1351_spi
|
||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||
|
||||
DEFAULT_FOLDER = tzarc/ghoul/rev1/stm32
|
||||
|
||||
SRC += analog.c
|
||||
|
@ -18,4 +18,4 @@
|
||||
// so we need to change resolution and frequency to match.
|
||||
#define CH_CFG_ST_RESOLUTION 16
|
||||
#define CH_CFG_ST_FREQUENCY 10000
|
||||
#include_next "chconf.h"
|
||||
#include_next <chconf.h>
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include_next "board.h"
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 16000000
|
||||
|
@ -7,5 +7,5 @@
|
||||
#if __has_include("platforms/chibios/common/configs/chconf.h")
|
||||
# include_next "platforms/chibios/common/configs/chconf.h"
|
||||
#else
|
||||
# include_next "chconf.h"
|
||||
# include_next <chconf.h>
|
||||
#endif
|
||||
|
@ -34,13 +34,11 @@ subcommands = [
|
||||
'qmk.cli.bux',
|
||||
'qmk.cli.c2json',
|
||||
'qmk.cli.cd',
|
||||
'qmk.cli.cformat',
|
||||
'qmk.cli.chibios.confmigrate',
|
||||
'qmk.cli.clean',
|
||||
'qmk.cli.compile',
|
||||
'qmk.cli.docs',
|
||||
'qmk.cli.doctor',
|
||||
'qmk.cli.fileformat',
|
||||
'qmk.cli.flash',
|
||||
'qmk.cli.format.c',
|
||||
'qmk.cli.format.json',
|
||||
@ -75,11 +73,9 @@ subcommands = [
|
||||
'qmk.cli.list.layouts',
|
||||
'qmk.cli.mass_compile',
|
||||
'qmk.cli.migrate',
|
||||
'qmk.cli.multibuild',
|
||||
'qmk.cli.new.keyboard',
|
||||
'qmk.cli.new.keymap',
|
||||
'qmk.cli.painter',
|
||||
'qmk.cli.pyformat',
|
||||
'qmk.cli.pytest',
|
||||
'qmk.cli.via2json',
|
||||
]
|
||||
|
@ -1,28 +0,0 @@
|
||||
"""Point people to the new command name.
|
||||
"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from milc import cli
|
||||
|
||||
|
||||
@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Flag only, don't automatically format.")
|
||||
@cli.argument('-b', '--base-branch', default='origin/master', help='Branch to compare to diffs to.')
|
||||
@cli.argument('-a', '--all-files', arg_only=True, action='store_true', help='Format all core files.')
|
||||
@cli.argument('--core-only', arg_only=True, action='store_true', help='Format core files only.')
|
||||
@cli.argument('files', nargs='*', arg_only=True, help='Filename(s) to format.')
|
||||
@cli.subcommand('Pointer to the new command name: qmk format-c.', hidden=True)
|
||||
def cformat(cli):
|
||||
"""Pointer to the new command name: qmk format-c.
|
||||
"""
|
||||
cli.log.warning('"qmk cformat" has been renamed to "qmk format-c". Please use the new command in the future.')
|
||||
argv = [sys.executable, *sys.argv]
|
||||
argv[argv.index('cformat')] = 'format-c'
|
||||
script_path = Path(argv[1])
|
||||
script_path_exe = Path(f'{argv[1]}.exe')
|
||||
|
||||
if not script_path.exists() and script_path_exe.exists():
|
||||
# For reasons I don't understand ".exe" is stripped from the script name on windows.
|
||||
argv[1] = str(script_path_exe)
|
||||
|
||||
return cli.run(argv, capture_output=False).returncode
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user