summaryrefslogtreecommitdiffstats
path: root/keyboards/tzarc/djinn/rev2/config.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-06-20 14:20:56 +1000
committerGitHub <noreply@github.com>2022-06-20 14:20:56 +1000
commitaa06893b58ac3ed88e796968d237f60f4c156875 (patch)
treead4b3a637b7bba88de772dd50150262d2992603e /keyboards/tzarc/djinn/rev2/config.h
parentad2e85361128a2252798a7bb4c1cbc0bcd58e8ab (diff)
Add Djinn. (#17382)
* Add Djinn. * Review comments. * Further cleanup.
Diffstat (limited to 'keyboards/tzarc/djinn/rev2/config.h')
-rw-r--r--keyboards/tzarc/djinn/rev2/config.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/keyboards/tzarc/djinn/rev2/config.h b/keyboards/tzarc/djinn/rev2/config.h
new file mode 100644
index 0000000000..52c909d442
--- /dev/null
+++ b/keyboards/tzarc/djinn/rev2/config.h
@@ -0,0 +1,47 @@
+// Copyright 2018-2022 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+// Limit the backlight brightness
+#ifndef BACKLIGHT_LIMIT_VAL
+# define BACKLIGHT_LIMIT_VAL 144
+#endif // BACKLIGHT_LIMIT_VAL
+
+// Split configuration
+#define SPLIT_HAND_PIN B9
+#define USB_VBUS_PIN B12
+#define SERIAL_USART_DRIVER SD3
+#define SERIAL_USART_PIN_SWAP
+#define SERIAL_USART_TX_PIN B10
+#define SERIAL_USART_TX_PAL_MODE 7
+#define SERIAL_USART_RX_PIN B11
+#define SERIAL_USART_RX_PAL_MODE 7
+#ifndef SERIAL_USART_SPEED
+# define SERIAL_USART_SPEED 1200000
+#endif // SERIAL_USART_SPEED
+#define SERIAL_USART_FULL_DUPLEX
+
+// RGB configuration
+#define RGBLED_NUM 86
+#define DRIVER_LED_TOTAL 86
+#define RGB_MATRIX_SPLIT \
+ { 43, 43 }
+#define RGB_POWER_ENABLE_PIN B0
+#define RGB_CURR_1500mA_OK_PIN C5
+#define RGB_CURR_3000mA_OK_PIN C4
+
+// EEPROM configuration
+#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN B5
+#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 8 // (160MHz/8) => 20MHz
+#define EXTERNAL_EEPROM_BYTE_COUNT 8192
+#define EXTERNAL_EEPROM_PAGE_SIZE 64 // it's FRAM, so it doesn't actually matter, this just sets the RAM buffer size
+
+// External flash config
+#define EXTERNAL_FLASH_SPI_MODE 3
+#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN A8
+#define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 4 // (160MHz/4) => 40MHz
+#define EXTERNAL_FLASH_SIZE (4 * 1024 * 1024) // 32Mb/4MB capacity
+
+// Fault indicators
+#define BOARD_POWER_FAULT_PIN C9
+#define RGB_POWER_FAULT_PIN C4