summaryrefslogtreecommitdiffstats
path: root/keyboards/tzarc/ghoul/rev1
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tzarc/ghoul/rev1')
-rw-r--r--keyboards/tzarc/ghoul/rev1/info.json49
-rw-r--r--keyboards/tzarc/ghoul/rev1/rp2040/config.h39
-rw-r--r--keyboards/tzarc/ghoul/rev1/rp2040/halconf.h8
-rw-r--r--keyboards/tzarc/ghoul/rev1/rp2040/info.json15
-rw-r--r--keyboards/tzarc/ghoul/rev1/rp2040/mcuconf.h13
-rw-r--r--keyboards/tzarc/ghoul/rev1/rp2040/rules.mk1
-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
12 files changed, 224 insertions, 0 deletions
diff --git a/keyboards/tzarc/ghoul/rev1/info.json b/keyboards/tzarc/ghoul/rev1/info.json
new file mode 100644
index 0000000000..7612fc1147
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/info.json
@@ -0,0 +1,49 @@
+{
+ "usb": {
+ "device_version": "1.0.0"
+ },
+ "rgb_matrix": {
+ "layout": [
+ { "flags": 4, "matrix": [2, 3], "x": 81, "y": 64 },
+ { "flags": 4, "matrix": [1, 7], "x": 61, "y": 64 },
+ { "flags": 4, "matrix": [1, 3], "x": 40, "y": 64 },
+ { "flags": 4, "matrix": [0, 7], "x": 20, "y": 64 },
+ { "flags": 4, "matrix": [0, 3], "x": 0, "y": 64 },
+ { "flags": 4, "matrix": [0, 2], "x": 0, "y": 42 },
+ { "flags": 4, "matrix": [0, 6], "x": 20, "y": 42 },
+ { "flags": 4, "matrix": [1, 2], "x": 40, "y": 42 },
+ { "flags": 4, "matrix": [1, 6], "x": 61, "y": 42 },
+ { "flags": 4, "matrix": [2, 2], "x": 81, "y": 42 },
+ { "flags": 4, "matrix": [2, 1], "x": 81, "y": 21 },
+ { "flags": 4, "matrix": [1, 5], "x": 61, "y": 21 },
+ { "flags": 4, "matrix": [1, 1], "x": 40, "y": 21 },
+ { "flags": 4, "matrix": [0, 5], "x": 20, "y": 21 },
+ { "flags": 4, "matrix": [0, 1], "x": 0, "y": 21 },
+ { "flags": 4, "matrix": [0, 0], "x": 0, "y": 0 },
+ { "flags": 4, "matrix": [0, 4], "x": 20, "y": 0 },
+ { "flags": 4, "matrix": [1, 0], "x": 40, "y": 0 },
+ { "flags": 4, "matrix": [1, 4], "x": 61, "y": 0 },
+ { "flags": 4, "matrix": [2, 0], "x": 81, "y": 0 },
+ { "flags": 4, "matrix": [2, 4], "x": 142, "y": 0 },
+ { "flags": 4, "matrix": [3, 0], "x": 162, "y": 0 },
+ { "flags": 4, "matrix": [3, 4], "x": 183, "y": 0 },
+ { "flags": 4, "matrix": [4, 0], "x": 203, "y": 0 },
+ { "flags": 4, "matrix": [4, 4], "x": 224, "y": 0 },
+ { "flags": 4, "matrix": [4, 5], "x": 224, "y": 21 },
+ { "flags": 4, "matrix": [4, 1], "x": 203, "y": 21 },
+ { "flags": 4, "matrix": [3, 5], "x": 183, "y": 21 },
+ { "flags": 4, "matrix": [3, 1], "x": 162, "y": 21 },
+ { "flags": 4, "matrix": [2, 5], "x": 142, "y": 21 },
+ { "flags": 4, "matrix": [2, 6], "x": 142, "y": 42 },
+ { "flags": 4, "matrix": [3, 2], "x": 162, "y": 42 },
+ { "flags": 4, "matrix": [3, 6], "x": 183, "y": 42 },
+ { "flags": 4, "matrix": [4, 2], "x": 203, "y": 42 },
+ { "flags": 4, "matrix": [4, 6], "x": 224, "y": 42 },
+ { "flags": 4, "matrix": [4, 7], "x": 224, "y": 64 },
+ { "flags": 4, "matrix": [4, 3], "x": 203, "y": 64 },
+ { "flags": 4, "matrix": [3, 7], "x": 183, "y": 64 },
+ { "flags": 4, "matrix": [3, 3], "x": 162, "y": 64 },
+ { "flags": 4, "matrix": [2, 7], "x": 142, "y": 64 }
+ ]
+ }
+}
diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/config.h b/keyboards/tzarc/ghoul/rev1/rp2040/config.h
new file mode 100644
index 0000000000..c428b26606
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/rp2040/config.h
@@ -0,0 +1,39 @@
+// 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 GP21
+#define SPI_MATRIX_DIVISOR 16
+
+// Encoder
+#define ENCODER_PUSHBUTTON_PIN GP7
+
+// SPI Configuration
+#define SPI_DRIVER SPID0
+#define SPI_SCK_PIN GP22
+#define SPI_MOSI_PIN GP23
+#define SPI_MISO_PIN GP20
+
+// EEPROM configuration
+#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 8
+#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN GP3
+#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 8
+#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN GP2
+
+// RGB configuration
+#define RGB_DI_PIN GP13
+#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_CURRENT_PIN GP26
+#define ADC_VOLTAGE_PIN GP27
+
+// Display Configuration
+#define OLED_CS_PIN GP16
+#define OLED_DC_PIN GP17
+#define OLED_RST_PIN GP18
diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/halconf.h b/keyboards/tzarc/ghoul/rev1/rp2040/halconf.h
new file mode 100644
index 0000000000..a22be02412
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/rp2040/halconf.h
@@ -0,0 +1,8 @@
+// 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
+
+#include_next <halconf.h>
diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/info.json b/keyboards/tzarc/ghoul/rev1/rp2040/info.json
new file mode 100644
index 0000000000..57b4cb772f
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/rp2040/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "Ghoul_RP2040",
+ "processor": "RP2040",
+ "bootloader": "rp2040",
+ "bootloader_instructions": "Hold the boot switch and tap the reset switch, or hold the top-left key when plugging in the board.",
+ "encoder": {
+ "rotary": [
+ {
+ "pin_a": "GP8",
+ "pin_b": "GP5",
+ "resolution": 2
+ }
+ ]
+ }
+}
diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/mcuconf.h b/keyboards/tzarc/ghoul/rev1/rp2040/mcuconf.h
new file mode 100644
index 0000000000..abd4e19f7c
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/rp2040/mcuconf.h
@@ -0,0 +1,13 @@
+// Copyright 2018-2022 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+#include_next <mcuconf.h>
+
+// Used for RGB
+//#undef RP_ADC_USE_ADC1
+//#define RP_ADC_USE_ADC1 TRUE
+
+// Used for EEPROM
+#undef RP_SPI_USE_SPI0
+#define RP_SPI_USE_SPI0 TRUE
diff --git a/keyboards/tzarc/ghoul/rev1/rp2040/rules.mk b/keyboards/tzarc/ghoul/rev1/rp2040/rules.mk
new file mode 100644
index 0000000000..997fce7e65
--- /dev/null
+++ b/keyboards/tzarc/ghoul/rev1/rp2040/rules.mk
@@ -0,0 +1 @@
+WS2812_DRIVER = vendor
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