5dc92edf11946dca663c6723d8039e734126ccb0

Author
Cipulot <40441626+Cipulot@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

Addition of EC1-AT (#24645)

Diff

This diff is truncated to protect this page.

  1diff --git a/keyboards/cipulot/ec1_at/config.h b/keyboards/cipulot/ec1_at/config.h
  2new file mode 100644
  3index 0000000000000000000000000000000000000000..5e7af3fac570e35a62ab27b243f05674b3d9d635
  4--- /dev/null
  5+++ b/keyboards/cipulot/ec1_at/config.h
  6@@ -0,0 +1,61 @@
  7+/* Copyright 2024 Cipulot
  8+ *
  9+ * This program is free software: you can redistribute it and/or modify
 10+ * it under the terms of the GNU General Public License as published by
 11+ * the Free Software Foundation, either version 3 of the License, or
 12+ * (at your option) any later version.
 13+ *
 14+ * This program is distributed in the hope that it will be useful,
 15+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 17+ * GNU General Public License for more details.
 18+ *
 19+ * You should have received a copy of the GNU General Public License
 20+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 21+ */
 22+
 23+#pragma once
 24+
 25+#define MATRIX_ROWS 5
 26+#define MATRIX_COLS 21
 27+
 28+#define UNUSED_POSITIONS_LIST { {2, 16}, {4, 5}, {4, 7}, {4, 9}, {4, 12}, {4, 16} }
 29+
 30+#define MATRIX_ROW_PINS {A8, B15, B14, B12, B13}
 31+
 32+#define AMUX_COUNT 2
 33+#define AMUX_MAX_COLS_COUNT 16
 34+
 35+#define AMUX_EN_PINS {B5, A15}
 36+
 37+#define AMUX_SEL_PINS {B6, B7, B4, B3}
 38+
 39+#define AMUX_COL_CHANNELS_SIZES {16, 5}
 40+
 41+#define AMUX_0_COL_CHANNELS {5, 6, 7, 4, 3, 2, 1, 0, 8, 15, 14, 13, 12, 10, 9, 11}
 42+
 43+#define AMUX_1_COL_CHANNELS {4, 2, 1, 0, 3}
 44+
 45+#define AMUX_COL_CHANNELS AMUX_0_COL_CHANNELS, AMUX_1_COL_CHANNELS
 46+
 47+#define DISCHARGE_PIN A2
 48+#define ANALOG_PORT A3
 49+
 50+#define DEFAULT_ACTUATION_MODE 0
 51+#define DEFAULT_MODE_0_ACTUATION_LEVEL 550
 52+#define DEFAULT_MODE_0_RELEASE_LEVEL 500
 53+#define DEFAULT_MODE_1_INITIAL_DEADZONE_OFFSET DEFAULT_MODE_0_ACTUATION_LEVEL
 54+#define DEFAULT_MODE_1_ACTUATION_OFFSET 70
 55+#define DEFAULT_MODE_1_RELEASE_OFFSET 70
 56+#define DEFAULT_EXTREMUM 1023
 57+#define EXPECTED_NOISE_FLOOR 0
 58+#define NOISE_FLOOR_THRESHOLD 50
 59+#define BOTTOMING_CALIBRATION_THRESHOLD 50
 60+#define DEFAULT_NOISE_FLOOR_SAMPLING_COUNT 30
 61+#define DEFAULT_BOTTOMING_READING 1023
 62+#define DEFAULT_CALIBRATION_STARTER true
 63+
 64+#define DISCHARGE_TIME 10
 65+
 66+#define EECONFIG_KB_DATA_SIZE 219
 67+#define DYNAMIC_KEYMAP_MACRO_COUNT 30
 68diff --git a/keyboards/cipulot/ec1_at/halconf.h b/keyboards/cipulot/ec1_at/halconf.h
 69new file mode 100644
 70index 0000000000000000000000000000000000000000..6b63cb5af98e7ad5c5a50406f28aa4603ccd055b
 71--- /dev/null
 72+++ b/keyboards/cipulot/ec1_at/halconf.h
 73@@ -0,0 +1,21 @@
 74+/* Copyright 2024 Cipulot
 75+ *
 76+ * This program is free software: you can redistribute it and/or modify
 77+ * it under the terms of the GNU General Public License as published by
 78+ * the Free Software Foundation, either version 3 of the License, or
 79+ * (at your option) any later version.
 80+ *
 81+ * This program is distributed in the hope that it will be useful,
 82+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 83+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 84+ * GNU General Public License for more details.
 85+ *
 86+ * You should have received a copy of the GNU General Public License
 87+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 88+ */
 89+
 90+#pragma once
 91+
 92+#define HAL_USE_ADC TRUE
 93+
 94+#include_next <halconf.h>
 95diff --git a/keyboards/cipulot/ec1_at/keyboard.json b/keyboards/cipulot/ec1_at/keyboard.json
 96new file mode 100644
 97index 0000000000000000000000000000000000000000..9a7a0ae04e78fdddb172cde749e0b88b86403d45
 98--- /dev/null
 99+++ b/keyboards/cipulot/ec1_at/keyboard.json
100@@ -0,0 +1,142 @@
101+{
102+    "manufacturer": "Cipulot",
103+    "keyboard_name": "EC1-AT",
104+    "maintainer": "Cipulot",
105+    "bootloader": "stm32-dfu",
106+    "build": {
107+        "lto": true
108+    },
109+    "diode_direction": "COL2ROW",
110+    "eeprom": {
111+        "wear_leveling": {
112+            "backing_size": 16384
113+        }
114+    },
115+    "features": {
116+        "bootmagic": false,
117+        "console": true,
118+        "extrakey": true,
119+        "mousekey": true,
120+        "nkro": true
121+    },
122+    "processor": "STM32F411",
123+    "qmk": {
124+        "locking": {
125+            "enabled": true,
126+            "resync": true
127+        }
128+    },
129+    "usb": {
130+        "device_version": "0.0.1",
131+        "pid": "0x6BCE",
132+        "shared_endpoint": {
133+            "keyboard": true
134+        },
135+        "vid": "0x6369"
136+    },
137+    "layouts": {
138+        "LAYOUT": {
139+            "layout": [
140+                {"matrix": [0, 0], "x": 0, "y": 0},
141+                {"matrix": [0, 1], "x": 1, "y": 0},
142+                {"matrix": [0, 2], "x": 2.25, "y": 0},
143+                {"matrix": [0, 3], "x": 3.25, "y": 0},
144+                {"matrix": [0, 4], "x": 4.25, "y": 0},
145+                {"matrix": [0, 5], "x": 5.25, "y": 0},
146+                {"matrix": [0, 6], "x": 6.25, "y": 0},
147+                {"matrix": [0, 7], "x": 7.25, "y": 0},
148+                {"matrix": [0, 8], "x": 8.25, "y": 0},
149+                {"matrix": [0, 9], "x": 9.25, "y": 0},
150+                {"matrix": [0, 10], "x": 10.25, "y": 0},
151+                {"matrix": [0, 11], "x": 11.25, "y": 0},
152+                {"matrix": [0, 12], "x": 12.25, "y": 0},
153+                {"matrix": [0, 13], "x": 13.25, "y": 0},
154+                {"matrix": [0, 14], "x": 14.25, "y": 0},
155+                {"matrix": [0, 15], "x": 15.25, "y": 0},
156+                {"matrix": [0, 16], "x": 16.25, "y": 0},
157+                {"matrix": [0, 17], "x": 17.5, "y": 0},
158+                {"matrix": [0, 18], "x": 18.5, "y": 0},
159+                {"matrix": [0, 19], "x": 19.5, "y": 0},
160+                {"matrix": [0, 20], "x": 20.5, "y": 0},
161+                {"matrix": [1, 0], "x": 0, "y": 1},
162+                {"matrix": [1, 1], "x": 1, "y": 1},
163+                {"matrix": [1, 2], "x": 2.25, "y": 1, "w": 1.5},
164+                {"matrix": [1, 3], "x": 3.75, "y": 1},
165+                {"matrix": [1, 4], "x": 4.75, "y": 1},
166+                {"matrix": [1, 5], "x": 5.75, "y": 1},
167+                {"matrix": [1, 6], "x": 6.75, "y": 1},
168+                {"matrix": [1, 7], "x": 7.75, "y": 1},
169+                {"matrix": [1, 8], "x": 8.75, "y": 1},
170+                {"matrix": [1, 9], "x": 9.75, "y": 1},
171+                {"matrix": [1, 10], "x": 10.75, "y": 1},
172+                {"matrix": [1, 11], "x": 11.75, "y": 1},
173+                {"matrix": [1, 12], "x": 12.75, "y": 1},
174+                {"matrix": [1, 13], "x": 13.75, "y": 1},
175+                {"matrix": [1, 14], "x": 14.75, "y": 1},
176+                {"matrix": [1, 15], "x": 15.75, "y": 1, "w": 0.75},
177+                {"matrix": [1, 16], "x": 16.5, "y": 1, "w": 0.75},
178+                {"matrix": [1, 17], "x": 17.5, "y": 1},
179+                {"matrix": [1, 18], "x": 18.5, "y": 1},
180+                {"matrix": [1, 19], "x": 19.5, "y": 1},
181+                {"matrix": [1, 20], "x": 20.5, "y": 1},
182+                {"matrix": [2, 0], "x": 0, "y": 2},
183+                {"matrix": [2, 1], "x": 1, "y": 2},
184+                {"matrix": [2, 2], "x": 2.25, "y": 2, "w": 1.75},
185+                {"matrix": [2, 3], "x": 4, "y": 2},
186+                {"matrix": [2, 4], "x": 5, "y": 2},
187+                {"matrix": [2, 5], "x": 6, "y": 2},
188+                {"matrix": [2, 6], "x": 7, "y": 2},
189+                {"matrix": [2, 7], "x": 8, "y": 2},
190+                {"matrix": [2, 8], "x": 9, "y": 2},
191+                {"matrix": [2, 9], "x": 10, "y": 2},
192+                {"matrix": [2, 10], "x": 11, "y": 2},
193+                {"matrix": [2, 11], "x": 12, "y": 2},
194+                {"matrix": [2, 12], "x": 13, "y": 2},
195+                {"matrix": [2, 13], "x": 14, "y": 2},
196+                {"matrix": [2, 14], "x": 15, "y": 2},
197+                {"matrix": [2, 15], "x": 16, "y": 2, "w": 1.25},
198+                {"matrix": [2, 17], "x": 17.5, "y": 2},
199+                {"matrix": [2, 18], "x": 18.5, "y": 2},
200diff --git a/keyboards/cipulot/ec1_at/keymaps/default/keymap.c b/keyboards/cipulot/ec1_at/keymaps/default/keymap.c
201new file mode 100644
202index 0000000000000000000000000000000000000000..b0e5e3aac35d446e7809cc5b29ea4c1eb198a07a
203--- /dev/null
204+++ b/keyboards/cipulot/ec1_at/keymaps/default/keymap.c
205@@ -0,0 +1,42 @@
206+/* Copyright 2024 Cipulot
207+ *
208+ * This program is free software: you can redistribute it and/or modify
209+ * it under the terms of the GNU General Public License as published by
210+ * the Free Software Foundation, either version 3 of the License, or
211+ * (at your option) any later version.
212+ *
213+ * This program is distributed in the hope that it will be useful,
214+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
215+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
216+ * GNU General Public License for more details.
217+ *
218+ * You should have received a copy of the GNU General Public License
219+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
220+ */
221+
222+#include QMK_KEYBOARD_H
223+
224+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
225+    // clang-format off
226+    [0] = LAYOUT(
227+        _______,  _______,  QK_GESC,  KC_1,     KC_2,     KC_3,  KC_4,    KC_5,  KC_6,   KC_7,  KC_8,  KC_9,     KC_0,     KC_MINS,  KC_EQL,   KC_BSPC,   KC_BSPC,   KC_NUM,  KC_PSLS,  KC_PAST,  KC_PMNS,
228+        _______,  _______,  KC_TAB,   KC_Q,     KC_W,     KC_E,  KC_R,    KC_T,  KC_Y,   KC_U,  KC_I,  KC_O,     KC_P,     KC_LBRC,  KC_RBRC,  KC_BSLS,   KC_ENTER,  KC_P7,   KC_P8,    KC_P9,    KC_PMNS,
229+        _______,  _______,  KC_CAPS,  KC_A,     KC_S,     KC_D,  KC_F,    KC_G,  KC_H,   KC_J,  KC_K,  KC_L,     KC_SCLN,  KC_QUOT,  KC_NUHS,  KC_ENTER,             KC_P4,   KC_P5,    KC_P6,    KC_PPLS,
230+        _______,  _______,  KC_LSFT,  KC_NUBS,  KC_Z,     KC_X,  KC_C,    KC_V,  KC_B,   KC_N,  KC_M,  KC_COMM,  KC_DOT,   KC_SLSH,  KC_RSFT,  KC_RSFT,   MO(1),     KC_P1,   KC_P2,    KC_P3,    KC_PENT,
231+        _______,  _______,  KC_LCTL,  KC_LGUI,  KC_LALT,         KC_SPC,            KC_SPC,            KC_SPC,             KC_RALT,  KC_RALT,  MO(1),     KC_RCTL,   KC_P0,   KC_P0,    KC_PDOT,  KC_PENT),
232+
233+    [1] = LAYOUT(
234+        _______,  _______,  _______,  KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,    KC_F12,   _______,  KC_DEL,   _______,  _______,  _______,  _______,
235+        _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  KC_UP,     _______,  _______,  _______,  _______,  _______,  _______,  _______,
236+        _______,  _______,  _______,  KC_VOLD,  KC_VOLU,  KC_MUTE,  _______,  _______,  _______,  _______,  _______,  _______,  KC_LEFT,  KC_RIGHT,  _______,  _______,            _______,  _______,  _______,  _______,
237+        _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  KC_DOWN,   _______,  _______,  _______,  _______,  _______,  _______,  _______,
238+        _______,  _______,  _______,  _______,  _______,            _______,                 _______,                 _______,            _______,   _______,  MO(2),    _______,  _______,  _______,  _______,  _______),
239+
240+    [2] = LAYOUT(
241+        QK_BOOT,  NK_TOGG,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,
242+        _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,
243+        _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,            _______,  _______,  _______,  _______,
244+        _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______,
245+        _______,  _______,  _______,  _______,  _______,            _______,                 _______,                 _______,            _______,  _______,  _______,  _______,  _______,  _______,  _______,  _______)
246+    // clang-format on
247+};
248diff --git a/keyboards/cipulot/ec1_at/mcuconf.h b/keyboards/cipulot/ec1_at/mcuconf.h
249new file mode 100644
250index 0000000000000000000000000000000000000000..1679d3fbc04c2efcfaf1362ebf871d82d0be18c2
251--- /dev/null
252+++ b/keyboards/cipulot/ec1_at/mcuconf.h
253@@ -0,0 +1,22 @@
254+/* Copyright 2024 Cipulot
255+ *
256+ * This program is free software: you can redistribute it and/or modify
257+ * it under the terms of the GNU General Public License as published by
258+ * the Free Software Foundation, either version 3 of the License, or
259+ * (at your option) any later version.
260+ *
261+ * This program is distributed in the hope that it will be useful,
262+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
263+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
264+ * GNU General Public License for more details.
265+ *
266+ * You should have received a copy of the GNU General Public License
267+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
268+ */
269+
270+#pragma once
271+
272+#include_next <mcuconf.h>
273+
274+#undef STM32_ADC_USE_ADC1
275+#define STM32_ADC_USE_ADC1 TRUE
276diff --git a/keyboards/cipulot/ec1_at/post_rules.mk b/keyboards/cipulot/ec1_at/post_rules.mk
277new file mode 100644
278index 0000000000000000000000000000000000000000..5dba48cc5fd61a291a6f48fa4f9f916e96275ff4
279--- /dev/null
280+++ b/keyboards/cipulot/ec1_at/post_rules.mk
281@@ -0,0 +1 @@
282+include keyboards/cipulot/common/common_cipulot.mk
283diff --git a/keyboards/cipulot/ec1_at/readme.md b/keyboards/cipulot/ec1_at/readme.md
284new file mode 100644
285index 0000000000000000000000000000000000000000..8e2081dae74c469343983092b7698f316d6cb772
286--- /dev/null
287+++ b/keyboards/cipulot/ec1_at/readme.md
288@@ -0,0 +1,26 @@
289+# EC1-AT
290+
291+![EC1-AT](https://i.imgur.com/69OrQsh.png)
292+
293+EC version of the W1-AT keyboard.
294+
295+* Keyboard Maintainer: [cipulot](https://github.com/cipulot)
296+* Hardware Supported: EC1-AT
297+* Hardware Availability: TBD
298+
299+Make example for this keyboard (after setting up your build environment):
300+
301+    make cipulot/ec1_at:default
302+
303+Flashing example for this keyboard:
304+
305+    make cipulot/ec1_at:default:flash
306+
307diff --git a/keyboards/cipulot/ec1_at/rules.mk b/keyboards/cipulot/ec1_at/rules.mk
308new file mode 100644
309index 0000000000000000000000000000000000000000..1716098b3e1058b3eb6cc8788626bef269f9fc17
310--- /dev/null
311+++ b/keyboards/cipulot/ec1_at/rules.mk
312@@ -0,0 +1 @@
313+OPT = 3