Compare commits

...

22 Commits

Author SHA1 Message Date
QMK Bot
d5d168c081 Merge remote-tracking branch 'origin/develop' into xap 2023-01-19 01:06:47 +00:00
QMK Bot
3723c0e3d5 Merge remote-tracking branch 'origin/master' into develop 2023-01-19 01:06:08 +00:00
Nick Brassel
327f7ee9a7
Fixup ChibiOS header inclusion search ordering. (#19623)
* Add STM32F446-Nucleo onekey. 

* Fixup onekey build for F446, all keymaps.

* Fixup board inclusion search ordering.
2023-01-19 01:05:29 +00:00
QMK Bot
be9c13dcf9 Merge remote-tracking branch 'origin/develop' into xap 2023-01-19 00:27:37 +00:00
Joel Challis
0b25528b6b
Fix 'No LAYOUTs defined' check (#19537) 2023-01-19 00:27:11 +00:00
Joel Challis
0ce3f6bcfe
De-duplicate platform detection (#19603) 2023-01-19 00:27:00 +00:00
QMK Bot
355ad8f80a Merge remote-tracking branch 'origin/develop' into xap 2023-01-19 00:24:47 +00:00
Joel Challis
a1f253cbef
qmk compile/qmk flash - Validate keymap argument (#19530) 2023-01-19 00:24:13 +00:00
QMK Bot
f89fd80d22 Merge remote-tracking branch 'origin/develop' into xap 2023-01-19 00:14:48 +00:00
Nick Brassel
baecc69da5
Add support for current/voltage measurement on Ghoul. (#19630) 2023-01-19 11:13:39 +11:00
QMK Bot
a54f64cd16 Merge remote-tracking branch 'origin/develop' into xap 2023-01-18 23:56:51 +00:00
Nick Brassel
4723f308ad
Remove CLI commands: multibuild, cformat, fileformat, pyformat. (#19629) 2023-01-19 10:56:15 +11:00
QMK Bot
214ae5df35 Merge remote-tracking branch 'origin/develop' into xap 2023-01-18 23:45:24 +00:00
Joel Challis
88ec588ae7
Remove make all-<platform> build targets (#19496) 2023-01-19 10:44:41 +11:00
QMK Bot
2361b72d80 Merge remote-tracking branch 'origin/develop' into xap 2023-01-18 23:31:33 +00:00
Sergey Vlasov
272281f1a0
Add analog support for RP2040 (#19453)
Co-authored-by: Ryan <fauxpark@gmail.com>
2023-01-19 10:30:58 +11:00
QMK Bot
dab390ea43 Merge remote-tracking branch 'origin/develop' into xap 2023-01-18 23:17:19 +00:00
Joel Challis
12f1a30d16
Add alias support for converters (#19563) 2023-01-18 23:16:33 +00:00
QMK Bot
9992b05947 Merge remote-tracking branch 'origin/develop' into xap 2023-01-18 22:37:33 +00:00
QMK Bot
364a910b92 Merge remote-tracking branch 'origin/master' into develop 2023-01-18 22:37:06 +00:00
Joel Challis
82a94ea1bd
Add f303 to tinyuf2 bootloader support (#19620) 2023-01-18 22:36:58 +00:00
Nick Brassel
17c9388af5
Allow for wildcard filtering in qmk mass-compile (#19625) 2023-01-18 22:36:32 +00:00
136 changed files with 419 additions and 346 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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/

View File

@ -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"},

View File

@ -257,6 +257,9 @@
"c_macro": {
"type": "boolean"
},
"json_layout": {
"type": "boolean"
},
"layout": {
"type": "array",
"items": {

View File

@ -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

View File

@ -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.

View File

@ -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: |

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -19,4 +19,4 @@
#define HAL_USE_SPI TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -20,4 +20,4 @@
#define HAL_USE_SPI TRUE
#define HAL_USE_I2C TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -18,4 +18,4 @@
#define HAL_USE_I2C TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -20,4 +20,4 @@
#define HAL_USE_I2C TRUE
#define HAL_USE_SPI TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -19,4 +19,4 @@
#define HAL_USE_I2C TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -19,4 +19,4 @@
#define HAL_USE_I2C TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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] = {

View 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

View 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 }

View 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>

View 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"
}
}

View 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

View 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`.

View File

@ -0,0 +1 @@
SRC += analog.c

View File

@ -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

View File

@ -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

View File

@ -5,5 +5,6 @@
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
#define HAL_USE_ADC TRUE
#include_next <halconf.h>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -18,4 +18,4 @@
#define HAL_USE_I2C TRUE
#include_next "halconf.h"
#include_next <halconf.h>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -14,4 +14,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include_next "chconf.h"
#include_next <chconf.h>

View File

@ -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

View File

@ -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

View File

@ -16,7 +16,7 @@
#pragma once
#include_next "mcuconf.h"
#include_next <mcuconf.h>
// for i2c expander, and ISSI
#undef STM32_I2C_USE_I2C1

View File

@ -16,7 +16,7 @@
#pragma once
#include_next "mcuconf.h"
#include_next <mcuconf.h>
// for i2c expander, and ISSI
#undef STM32_I2C_USE_I2C1

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -19,4 +19,4 @@
#define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h"
#include_next <chconf.h>

View File

@ -19,4 +19,4 @@
#define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h"
#include_next <chconf.h>

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -1,2 +1 @@
WS2812_DRIVER = pwm
SRC += analog.c

View File

@ -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

View File

@ -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>

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -16,7 +16,7 @@
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -16,7 +16,7 @@
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -16,7 +16,7 @@
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -15,7 +15,7 @@
*/
#pragma once
#include_next "board.h"
#include_next <board.h>
#undef STM32_HSECLK
#define STM32_HSECLK 16000000

View File

@ -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

View File

@ -35,13 +35,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',
@ -76,11 +74,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',
'qmk.cli.xap',

View File

@ -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