summaryrefslogtreecommitdiffstats
path: root/keyboards/tzarc/ghoul/rev1/stm32
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-10-02 20:24:56 +0000
committerQMK Bot <hello@qmk.fm>2022-10-02 20:24:56 +0000
commitbdffe9efe8c7182fd3de3e2027becc173f8b79c2 (patch)
treed8954d93900e2f4a379da7a83ed70d5fb2d01bb5 /keyboards/tzarc/ghoul/rev1/stm32
parent6f13a76530165bb1ad723ab0270c9eb908ca3a8c (diff)
parent9ecd6eb9b9ddf487ced76bf0b5114674cf61432b (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/tzarc/ghoul/rev1/stm32')
-rw-r--r--keyboards/tzarc/ghoul/rev1/stm32/board.h9
-rw-r--r--keyboards/tzarc/ghoul/rev1/stm32/config.h47
-rw-r--r--keyboards/tzarc/ghoul/rev1/stm32/halconf.h9
-rw-r--r--keyboards/tzarc/ghoul/rev1/stm32/info.json15
-rw-r--r--keyboards/tzarc/ghoul/rev1/stm32/mcuconf.h17
-rw-r--r--keyboards/tzarc/ghoul/rev1/stm32/rules.mk2
6 files changed, 99 insertions, 0 deletions
diff --git a/keyboards/tzarc/ghoul/rev1/stm32/board.h b/keyboards/tzarc/ghoul/rev1/stm32/board.h
new file mode 100644
index 0000000000..5379bd4a17
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/stm32/board.h
@@ -0,0 +1,9 @@
+// Copyright 2018-2022 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+#include_next "board.h"
+
+#ifdef BOARD_OTG_NOVBUSSENS
+# undef BOARD_OTG_NOVBUSSENS
+#endif
diff --git a/keyboards/tzarc/ghoul/rev1/stm32/config.h b/keyboards/tzarc/ghoul/rev1/stm32/config.h
new file mode 100644
index 0000000000..b9059f1837
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/stm32/config.h
@@ -0,0 +1,47 @@
+// Copyright 2018-2022 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+#include "config_common.h"
+
+// Matrix configuration
+#define SPI_MATRIX_CHIP_SELECT_PIN C4
+#define SPI_MATRIX_DIVISOR 32
+
+// Encoder
+#define ENCODER_PUSHBUTTON_PIN C1
+
+// SPI Configuration
+#define SPI_DRIVER SPID1
+#define SPI_SCK_PIN A5
+#define SPI_SCK_PAL_MODE 5
+#define SPI_MOSI_PIN A6
+#define SPI_MOSI_PAL_MODE 5
+#define SPI_MISO_PIN A7
+#define SPI_MISO_PAL_MODE 5
+
+// EEPROM/Flash configuration
+#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 16
+#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN B3
+#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 16
+#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN A4
+
+// RGB configuration
+#define RGB_DI_PIN C6
+#define WS2812_PWM_DRIVER PWMD3
+#define WS2812_PWM_CHANNEL 1
+#define WS2812_PWM_PAL_MODE 2
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM2
+#define WS2812_DMA_CHANNEL 5
+#define RGB_ENABLE_PIN C0
+
+// ADC Configuration
+#define ADC_RESOLUTION ADC_CFGR1_RES_12BIT
+#define ADC_SATURATION ((1 << 12) - 1)
+#define ADC_CURRENT_PIN C5 // ADC12_IN15
+#define ADC_VOLTAGE_PIN B0 // ADC12_IN8
+
+// Display Configuration
+#define OLED_CS_PIN D2
+#define OLED_DC_PIN A8
+#define OLED_RST_PIN A0
diff --git a/keyboards/tzarc/ghoul/rev1/stm32/halconf.h b/keyboards/tzarc/ghoul/rev1/stm32/halconf.h
new file mode 100644
index 0000000000..66d4d70a9d
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/stm32/halconf.h
@@ -0,0 +1,9 @@
+// Copyright 2018-2022 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+#define HAL_USE_ADC TRUE
+#define HAL_USE_SPI TRUE
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/tzarc/ghoul/rev1/stm32/info.json b/keyboards/tzarc/ghoul/rev1/stm32/info.json
new file mode 100644
index 0000000000..11dcde90c9
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/stm32/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "Ghoul_STM32",
+ "processor": "STM32F405",
+ "bootloader": "stm32-dfu",
+ "bootloader_instructions": "Press the 5 keys on the bottom row of the left side, or hold the boot switch and tap the reset switch, or hold the top-left key when plugging in the board.",
+ "encoder": {
+ "rotary": [
+ {
+ "pin_a": "B10",
+ "pin_b": "B1",
+ "resolution": 2
+ }
+ ]
+ }
+}
diff --git a/keyboards/tzarc/ghoul/rev1/stm32/mcuconf.h b/keyboards/tzarc/ghoul/rev1/stm32/mcuconf.h
new file mode 100644
index 0000000000..fe307993c7
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/stm32/mcuconf.h
@@ -0,0 +1,17 @@
+// Copyright 2018-2022 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+#include_next <mcuconf.h>
+
+// Used for RGB
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
+// Used for EEPROM
+#undef STM32_SPI_USE_SPI1
+#define STM32_SPI_USE_SPI1 TRUE
+
+// Used for RGB
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 TRUE
diff --git a/keyboards/tzarc/ghoul/rev1/stm32/rules.mk b/keyboards/tzarc/ghoul/rev1/stm32/rules.mk
new file mode 100644
index 0000000000..69d4b426e1
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/stm32/rules.mk
@@ -0,0 +1,2 @@
+WS2812_DRIVER = pwm
+SRC += analog.c