diff options
Diffstat (limited to 'keyboards/aeboards/ext65/rev2')
-rw-r--r-- | keyboards/aeboards/ext65/rev2/chconf.h | 31 | ||||
-rw-r--r-- | keyboards/aeboards/ext65/rev2/config.h | 80 | ||||
-rw-r--r-- | keyboards/aeboards/ext65/rev2/halconf.h | 33 | ||||
-rw-r--r-- | keyboards/aeboards/ext65/rev2/mcuconf.h | 36 | ||||
-rw-r--r-- | keyboards/aeboards/ext65/rev2/rev2.c | 48 | ||||
-rw-r--r-- | keyboards/aeboards/ext65/rev2/rev2.h | 41 | ||||
-rw-r--r-- | keyboards/aeboards/ext65/rev2/rules.mk | 23 |
7 files changed, 292 insertions, 0 deletions
diff --git a/keyboards/aeboards/ext65/rev2/chconf.h b/keyboards/aeboards/ext65/rev2/chconf.h new file mode 100644 index 000000000..5af0aad34 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/chconf.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* Copyright 2020 QMK | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * This file was auto-generated by: | ||
19 | * `qmk chibios-confmigrate -i keyboards/aeboards/ext65/rev2/chconf.h -r platforms/chibios/common/configs/chconf.h` | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | |||
24 | #define CH_CFG_ST_FREQUENCY 10000 | ||
25 | |||
26 | #define CH_CFG_OPTIMIZE_SPEED FALSE | ||
27 | |||
28 | #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | ||
29 | |||
30 | #include_next <chconf.h> | ||
31 | |||
diff --git a/keyboards/aeboards/ext65/rev2/config.h b/keyboards/aeboards/ext65/rev2/config.h new file mode 100644 index 000000000..498e345ad --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/config.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | Copyright 2015 Jun Wako <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #define VENDOR_ID 0x4145 // "AE" | ||
22 | #define PRODUCT_ID 0xA652 // AEboards EXT65 Rev2 | ||
23 | #define DEVICE_VER 0x0001 | ||
24 | #define MANUFACTURER AEBoards | ||
25 | #define PRODUCT AEBoards Ext65 Rev2 | ||
26 | |||
27 | /* key matrix size */ | ||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 10 | ||
30 | #define MATRIX_COLS 10 | ||
31 | |||
32 | /* key matrix pins */ | ||
33 | #define MATRIX_ROW_PINS { A10, A9, A8, B7, A2, A1, B12, B11, B10, B2 } | ||
34 | #define MATRIX_COL_PINS { B14, B6, A0, B1, B0, A7, A6, A5, A4, A3 } | ||
35 | |||
36 | #define DIODE_DIRECTION COL2ROW | ||
37 | |||
38 | /* Set 0 if debouncing isn't needed */ | ||
39 | #define DEBOUNCE 5 | ||
40 | |||
41 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
42 | #define LOCKING_SUPPORT_ENABLE | ||
43 | /* Locking resynchronize hack */ | ||
44 | #define LOCKING_RESYNC_ENABLE | ||
45 | |||
46 | //RGB Underglow WS2812 | ||
47 | #define RGBLIGHT_ANIMATIONS | ||
48 | #define RGBLED_NUM 24 | ||
49 | #define RGB_DI_PIN B15 | ||
50 | |||
51 | //SPI | ||
52 | #define WS2812_SPI SPID2 | ||
53 | #define WS2812_SPI_MOSI_PAL_MODE 0 | ||
54 | #define WS2812_SPI_SCK_PAL_MODE 0 | ||
55 | #define WS2812_SPI_SCK_PIN B13 | ||
56 | #define WS2812_EXTERNAL_PULLUP | ||
57 | |||
58 | // I2C OLED defines | ||
59 | #define I2C1_SCL_PIN B8 | ||
60 | #define I2C1_SDA_PIN B9 | ||
61 | |||
62 | #define I2C1_SCL_PAL_MODE 1 | ||
63 | #define I2C1_SDA_PAL_MODE 1 | ||
64 | |||
65 | #define I2C1_TIMINGR_SCLDEL 3U | ||
66 | #define I2C1_TIMINGR_SDADEL 1U | ||
67 | #define I2C1_TIMINGR_SCLH 3U | ||
68 | #define I2C1_TIMINGR_SCLL 9U | ||
69 | |||
70 | // LED defines | ||
71 | #define BACKLIGHT_PIN B5 | ||
72 | #define BACKLIGHT_PWM_DRIVER PWMD3 | ||
73 | #define BACKLIGHT_PWM_CHANNEL 2 | ||
74 | #define BACKLIGHT_PAL_MODE 1 | ||
75 | |||
76 | #define BACKLIGHT_LEVELS 6 | ||
77 | #define BACKLIGHT_BREATHING | ||
78 | #define BREATHING_PERIOD 6 | ||
79 | |||
80 | #define SLEEP_LED_GPT_DRIVER GPTD1 | ||
diff --git a/keyboards/aeboards/ext65/rev2/halconf.h b/keyboards/aeboards/ext65/rev2/halconf.h new file mode 100644 index 000000000..9fa1eca60 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/halconf.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* Copyright 2020 QMK | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * This file was auto-generated by: | ||
19 | * `qmk chibios-confmigrate -i keyboards/aeboards/ext65/rev2/halconf.h -r platforms/chibios/common/configs/halconf.h` | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | |||
24 | #define HAL_USE_I2C TRUE | ||
25 | |||
26 | #define HAL_USE_PWM TRUE | ||
27 | |||
28 | #define HAL_USE_SPI TRUE | ||
29 | |||
30 | #define HAL_USE_GPT TRUE | ||
31 | |||
32 | #include_next <halconf.h> | ||
33 | |||
diff --git a/keyboards/aeboards/ext65/rev2/mcuconf.h b/keyboards/aeboards/ext65/rev2/mcuconf.h new file mode 100644 index 000000000..43d53d4f2 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/mcuconf.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* Copyright 2020 QMK | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * This file was auto-generated by: | ||
19 | * `qmk chibios-confmigrate -i keyboards/aeboards/ext65/rev2/mcuconf.h -r platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h` | ||
20 | */ | ||
21 | |||
22 | #pragma once | ||
23 | |||
24 | #include_next <mcuconf.h> | ||
25 | |||
26 | #undef STM32_I2C_USE_I2C1 | ||
27 | #define STM32_I2C_USE_I2C1 TRUE | ||
28 | |||
29 | #undef STM32_PWM_USE_TIM3 | ||
30 | #define STM32_PWM_USE_TIM3 TRUE | ||
31 | |||
32 | #undef STM32_SPI_USE_SPI2 | ||
33 | #define STM32_SPI_USE_SPI2 TRUE | ||
34 | |||
35 | #undef STM32_GPT_USE_TIM1 | ||
36 | #define STM32_GPT_USE_TIM1 TRUE | ||
diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c new file mode 100644 index 000000000..f303a122e --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/rev2.c | |||
@@ -0,0 +1,48 @@ | |||
1 | #include "rev2.h" | ||
2 | |||
3 | // Tested and verified working on ext65rev2 | ||
4 | void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } | ||
5 | |||
6 | #ifdef OLED_ENABLE | ||
7 | void board_init(void) { | ||
8 | SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; | ||
9 | SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); | ||
10 | } | ||
11 | |||
12 | oled_rotation_t oled_init_kb(oled_rotation_t rotation) { | ||
13 | return OLED_ROTATION_90; // rotates the display 90 degrees | ||
14 | } | ||
15 | |||
16 | #else | ||
17 | |||
18 | void keyboard_pre_init_user(void) { | ||
19 | // Call the keyboard pre init code. | ||
20 | // Set our LED pins as output | ||
21 | setPinOutput(B4); | ||
22 | setPinOutput(B3); | ||
23 | setPinOutput(A15); | ||
24 | setPinOutput(A14); | ||
25 | } | ||
26 | |||
27 | bool led_update_kb(led_t led_state) { | ||
28 | bool res = led_update_user(led_state); | ||
29 | if(res) { | ||
30 | writePin(B4, led_state.num_lock); | ||
31 | writePin(B3, led_state.caps_lock); | ||
32 | writePin(A15, led_state.scroll_lock); | ||
33 | } | ||
34 | return res; | ||
35 | } | ||
36 | |||
37 | layer_state_t layer_state_set_kb(layer_state_t state) { | ||
38 | switch (get_highest_layer(state)) { | ||
39 | case 1: | ||
40 | writePinHigh(A14); | ||
41 | break; | ||
42 | default: // for any other layers, or the default layer | ||
43 | writePinLow(A14); | ||
44 | break; | ||
45 | } | ||
46 | return layer_state_set_user(state); | ||
47 | } | ||
48 | #endif | ||
diff --git a/keyboards/aeboards/ext65/rev2/rev2.h b/keyboards/aeboards/ext65/rev2/rev2.h new file mode 100644 index 000000000..a8efc48ac --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/rev2.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* Copyright 2020 Harrison Chan (Xelus) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include "ext65.h" | ||
20 | #include "quantum.h" | ||
21 | |||
22 | #define ____ KC_NO | ||
23 | |||
24 | #define LAYOUT_ext65( \ | ||
25 | K000, K100, K001, K101, K002, K102, K003, K103, K004, K104, K005, K105, K006, K106, K007, K107, K008, K108, K508, K009, \ | ||
26 | K200, K300, K201, K301, K202, K302, K203, K303, K204, K304, K205, K305, K206, K306, K207, K307, K208, K308, K209, \ | ||
27 | K400, K500, K401, K501, K402, K502, K403, K503, K404, K504, K405, K505, K406, K506, K407, K507, K408, K409, \ | ||
28 | K600, K700, K601, K701, K602, K702, K603, K703, K604, K704, K605, K705, K606, K706, K607, K708, K608, K709, \ | ||
29 | K800, K900, K801, K901, K802, K902, K803, K805, K906, K807, K908, K808, K909 \ | ||
30 | ) { \ | ||
31 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ | ||
32 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, ____ }, \ | ||
33 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209 }, \ | ||
34 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, ____ }, \ | ||
35 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409 }, \ | ||
36 | { K500, K501, K502, K503, K504, K505, K506, K507, K508, ____ }, \ | ||
37 | { K600, K601, K602, K603, K604, K605, K606, K607, K608, ____ }, \ | ||
38 | { K700, K701, K702, K703, K704, K705, K706, ____, K708, K709 }, \ | ||
39 | { K800, K801, K802, K803, ____, K805, ____, K807, K808, ____ }, \ | ||
40 | { K900, K901, K902, ____, ____, ____, K906, ____, K908, K909 } \ | ||
41 | } | ||
diff --git a/keyboards/aeboards/ext65/rev2/rules.mk b/keyboards/aeboards/ext65/rev2/rules.mk new file mode 100644 index 000000000..b2f713989 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/rules.mk | |||
@@ -0,0 +1,23 @@ | |||
1 | # MCU name | ||
2 | MCU = STM32F072 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = stm32-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = yes # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||
19 | SLEEP_LED_ENABLE = yes | ||
20 | WS2812_DRIVER = spi | ||
21 | |||
22 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
23 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||