From 0d5458a7ad4fa8a36692711160d558b0522bc66a Mon Sep 17 00:00:00 2001
From: mechlovin <57231893+mechlovin@users.noreply.github.com>
Date: Wed, 21 Apr 2021 00:47:58 +0700
Subject: [PATCH] [Keyboard] add adelais rev4 (#12443)
---
keyboards/mechlovin/adelais/rgb_led/readme.md | 16 +++++++++
.../mechlovin/adelais/standard_led/config.h | 17 +++++++++
.../mechlovin/adelais/standard_led/halconf.h | 27 ++++++++++++++
.../mechlovin/adelais/standard_led/mcuconf.h | 36 +++++++++++++++++++
.../mechlovin/adelais/standard_led/readme.md | 16 +++++++++
.../adelais/standard_led/rev4/config.h | 25 +++++++++++++
.../adelais/standard_led/rev4/readme.md | 16 +++++++++
.../adelais/standard_led/rev4/rules.mk | 1 +
.../mechlovin/adelais/standard_led/rules.mk | 1 +
9 files changed, 155 insertions(+)
create mode 100644 keyboards/mechlovin/adelais/rgb_led/readme.md
create mode 100644 keyboards/mechlovin/adelais/standard_led/halconf.h
create mode 100644 keyboards/mechlovin/adelais/standard_led/mcuconf.h
create mode 100644 keyboards/mechlovin/adelais/standard_led/readme.md
create mode 100644 keyboards/mechlovin/adelais/standard_led/rev4/config.h
create mode 100644 keyboards/mechlovin/adelais/standard_led/rev4/readme.md
create mode 100644 keyboards/mechlovin/adelais/standard_led/rev4/rules.mk
diff --git a/keyboards/mechlovin/adelais/rgb_led/readme.md b/keyboards/mechlovin/adelais/rgb_led/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..f58ca7aa29e376f3ffc35f6b108712c056c91b93
--- /dev/null
+++ b/keyboards/mechlovin/adelais/rgb_led/readme.md
@@ -0,0 +1,16 @@
+# Adelais En Ciel
+
+
+
+Compatible with TGR Alice and all clone variants.
+`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered, rev.2 and rev.3 support a rotary encoder.
+
+* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)
+* Hardware Supported: Adelais En Ciel
+* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-en-ciel-alice-compatible-rgb-pcb?variant=33937050828939)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mechlovin/adelais/rgb_led:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/mechlovin/adelais/standard_led/config.h b/keyboards/mechlovin/adelais/standard_led/config.h
index 064cf3d2c5304229133d8cbe1af1ad7b5e1fb335..4580e56d5a29423f57d4651e2a9cf730fc7c8012 100644
--- a/keyboards/mechlovin/adelais/standard_led/config.h
+++ b/keyboards/mechlovin/adelais/standard_led/config.h
@@ -1,3 +1,20 @@
+/*
+Copyright 2020 Team Mechlovin'
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
#pragma once
#define PRODUCT Adelais
diff --git a/keyboards/mechlovin/adelais/standard_led/halconf.h b/keyboards/mechlovin/adelais/standard_led/halconf.h
new file mode 100644
index 0000000000000000000000000000000000000000..01d02f71c3c1b2cb5e7e1df3d033d2f07643be8c
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/halconf.h
@@ -0,0 +1,27 @@
+/* Copyright 2020 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+
+#pragma once
+
+#define HAL_USE_I2C TRUE
+
+#define PAL_USE_CALLBACKS FALSE
+
+#define PAL_USE_WAIT FALSE
+
+#include_next
+
diff --git a/keyboards/mechlovin/adelais/standard_led/mcuconf.h b/keyboards/mechlovin/adelais/standard_led/mcuconf.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7ecee0204852e3ef00742f394366aa82bb8f963
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/mcuconf.h
@@ -0,0 +1,36 @@
+/* Copyright 2020 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+
+#pragma once
+
+#include_next
+
+#undef STM32_GPT_USE_TIM15
+#define STM32_GPT_USE_TIM15 FALSE
+
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 FALSE
+
+#undef STM32_SPI_USE_SPI1
+#define STM32_SPI_USE_SPI1 TRUE
+
+#undef STM32_SPI_USE_SPI2
+#define STM32_SPI_USE_SPI2 FALSE
+
diff --git a/keyboards/mechlovin/adelais/standard_led/readme.md b/keyboards/mechlovin/adelais/standard_led/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..a7c76beb496007ad8a09931f59daf3d77b5f81da
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/readme.md
@@ -0,0 +1,16 @@
+# Adelais
+
+
+
+Compatible with TGR Alice and all clone variants.
+`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 & rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint.
+
+* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)
+* Hardware Supported: Adelais
+* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mechlovin/adelais/standard_led:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/config.h b/keyboards/mechlovin/adelais/standard_led/rev4/config.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca793f1fec3b692e829b31f685c80267f040466c
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev4/config.h
@@ -0,0 +1,25 @@
+/*
+Copyright 2021 Mechlovin' Studio
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+#pragma once
+
+#define PRODUCT_ID 0xAD03
+
+#define ENCODERS_PAD_A { A6, A4, B7 }
+#define ENCODERS_PAD_B { A5, A3, B6 }
+#define ENCODER_RESOLUTION 4
+
+#define TAP_CODE_DELAY 10
\ No newline at end of file
diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/readme.md b/keyboards/mechlovin/adelais/standard_led/rev4/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..333efbacdb4a72ec7c6b011914bcbd1a16bee5e2
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev4/readme.md
@@ -0,0 +1,16 @@
+# Adelais rev.4
+
+
+
+Compatible with TGR Alice and all clone variants.
+`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint.
+
+* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)
+* Hardware Supported: Adelais
+* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mechlovin/adelais/standard_led:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/rules.mk b/keyboards/mechlovin/adelais/standard_led/rev4/rules.mk
new file mode 100644
index 0000000000000000000000000000000000000000..5af1ba85367f71f8d6dcca68a018f75c9fde5d22
--- /dev/null
+++ b/keyboards/mechlovin/adelais/standard_led/rev4/rules.mk
@@ -0,0 +1 @@
+ENCODER_ENABLE = yes
diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk
index a66d19314a6451b7786d2c18ee995ea9b38a93a4..b4523dbf37e3bf8df75bbc8fdd763b9b4b1830e2 100644
--- a/keyboards/mechlovin/adelais/standard_led/rules.mk
+++ b/keyboards/mechlovin/adelais/standard_led/rules.mk
@@ -1,2 +1,3 @@
RGBLIGHT_ENABLE = yes
+WS2812_DRIVER = spi
DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2
\ No newline at end of file