diff options
19 files changed, 1697 insertions, 0 deletions
diff --git a/keyboards/ducky/one2mini/1861st/1861st.h b/keyboards/ducky/one2mini/1861st/1861st.h new file mode 100644 index 000000000..2f6f7eee7 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/1861st.h | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | /* Copyright 2019 /u/KeepItUnder | ||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | /* This a shortcut to help you visually see your layout. | ||
| 21 | * | ||
| 22 | * The first section contains all of the arguments representing the physical | ||
| 23 | * layout of the board and position of the keys. | ||
| 24 | * | ||
| 25 | * The second converts the arguments into a two-dimensional array which | ||
| 26 | * represents the switch matrix. | ||
| 27 | */ | ||
| 28 | #define LAYOUT_all( \ | ||
| 29 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 30 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 31 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 32 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ | ||
| 33 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 34 | ) { \ | ||
| 35 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \ | ||
| 36 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ | ||
| 37 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ | ||
| 38 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, KC_NO }, \ | ||
| 39 | { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d } \ | ||
| 40 | } | ||
| 41 | |||
| 42 | #define LAYOUT_ansi( \ | ||
| 43 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 44 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 45 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 46 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ | ||
| 47 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 48 | ) { \ | ||
| 49 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \ | ||
| 50 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ | ||
| 51 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ | ||
| 52 | { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, KC_NO }, \ | ||
| 53 | { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d } \ | ||
| 54 | } | ||
| 55 | |||
| 56 | #define LAYOUT_iso( \ | ||
| 57 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 58 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ | ||
| 59 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 60 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ | ||
| 61 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 62 | ) { \ | ||
| 63 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, }, \ | ||
| 64 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, KC_NO, }, \ | ||
| 65 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO, }, \ | ||
| 66 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, KC_NO, }, \ | ||
| 67 | { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d } \ | ||
| 68 | } | ||
diff --git a/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.c b/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.c new file mode 100644 index 000000000..a10223603 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.c | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS Driver element - Copyright (C) 2019 /u/KeepItUnder | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "hal.h" | ||
| 18 | |||
| 19 | #if HAL_USE_PAL || defined(__DOXYGEN__) | ||
| 20 | /** | ||
| 21 | * @brief PAL setup. | ||
| 22 | * @details Digital I/O ports static configuration as defined in @p board.h. | ||
| 23 | * This variable is used by the HAL when initializing the PAL driver. | ||
| 24 | */ | ||
| 25 | const PALConfig pal_default_config = { | ||
| 26 | # if NUC123_HAS_GPIOA | ||
| 27 | {VAL_GPIOA_PMD, VAL_GPIOA_OFFD, VAL_GPIOA_DMASK, VAL_GPIOA_DBEN, VAL_GPIOA_IMD, VAL_GPIOA_IEN, VAL_GPIOA_ISRC, VAL_GPIOA_DOUT}, | ||
| 28 | # endif | ||
| 29 | # if NUC123_HAS_GPIOB | ||
| 30 | {VAL_GPIOB_PMD, VAL_GPIOB_OFFD, VAL_GPIOB_DMASK, VAL_GPIOB_DBEN, VAL_GPIOB_IMD, VAL_GPIOB_IEN, VAL_GPIOB_ISRC, VAL_GPIOB_DOUT}, | ||
| 31 | # endif | ||
| 32 | # if NUC123_HAS_GPIOC | ||
| 33 | {VAL_GPIOC_PMD, VAL_GPIOC_OFFD, VAL_GPIOC_DMASK, VAL_GPIOC_DBEN, VAL_GPIOC_IMD, VAL_GPIOC_IEN, VAL_GPIOC_ISRC, VAL_GPIOC_DOUT}, | ||
| 34 | # endif | ||
| 35 | # if NUC123_HAS_GPIOD | ||
| 36 | {VAL_GPIOD_PMD, VAL_GPIOD_OFFD, VAL_GPIOD_DMASK, VAL_GPIOD_DBEN, VAL_GPIOD_IMD, VAL_GPIOD_IEN, VAL_GPIOD_ISRC, VAL_GPIOD_DOUT}, | ||
| 37 | # endif | ||
| 38 | # if NUC123_HAS_GPIOF | ||
| 39 | {VAL_GPIOF_PMD, VAL_GPIOF_OFFD, VAL_GPIOF_DMASK, VAL_GPIOF_DBEN, VAL_GPIOF_IMD, VAL_GPIOF_IEN, VAL_GPIOF_ISRC, VAL_GPIOF_DOUT}, | ||
| 40 | # endif | ||
| 41 | }; | ||
| 42 | #endif | ||
| 43 | |||
| 44 | /** | ||
| 45 | * @brief Early initialization code. | ||
| 46 | * @details This initialization must be performed just after stack setup | ||
| 47 | * and before any other initialization. | ||
| 48 | */ | ||
| 49 | void __early_init(void) { | ||
| 50 | NUC123_clock_init(); | ||
| 51 | } | ||
| 52 | |||
| 53 | /** | ||
| 54 | * @brief Board-specific initialization code. | ||
| 55 | * @todo Add your board-specific code, if any. | ||
| 56 | */ | ||
| 57 | void boardInit(void) {} | ||
diff --git a/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.h b/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.h new file mode 100644 index 000000000..c43b2ce42 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.h | |||
| @@ -0,0 +1,961 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS Driver element - Copyright (C) 2019 /u/KeepItUnder | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef BOARD_H | ||
| 18 | #define BOARD_H | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Setup for Generic NUC123 board. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * Board identifier. | ||
| 26 | */ | ||
| 27 | #define BOARD_NUC123SD4AN0 | ||
| 28 | #define BOARD_NAME "Nuvoton NUC123SD4AN0 MCU" | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Board oscillators-related settings. | ||
| 32 | * NOTE: LSE not fitted. | ||
| 33 | * NOTE: HSE is fitted. | ||
| 34 | */ | ||
| 35 | #if !defined(NUC123_LSECLK) | ||
| 36 | #define NUC123_LSECLK 0U | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #define NUC123_LSEDRV (3U << 3U) | ||
| 40 | |||
| 41 | #if !defined(NUC123_HSECLK) | ||
| 42 | #define NUC123_HSECLK 12000000U | ||
| 43 | #endif | ||
| 44 | |||
| 45 | //#define NUC123_HSE_BYPASS | ||
| 46 | |||
| 47 | /* | ||
| 48 | * MCU type as defined in the NUC123 header. | ||
| 49 | */ | ||
| 50 | #define NUC123SD4AN0 | ||
| 51 | |||
| 52 | /* | ||
| 53 | * GPIO Multi Function Pin USB Setup | ||
| 54 | * Requires Some GPIO pins to be disabled/set to USB | ||
| 55 | */ | ||
| 56 | |||
| 57 | /* | ||
| 58 | * IO pins assignments. | ||
| 59 | */ | ||
| 60 | #define GPIOA_PIN0 0U | ||
| 61 | #define GPIOA_PIN1 1U | ||
| 62 | #define GPIOA_PIN2 2U | ||
| 63 | #define GPIOA_PIN3 3U | ||
| 64 | #define GPIOA_PIN4 4U | ||
| 65 | #define GPIOA_PIN5 5U | ||
| 66 | #define GPIOA_PIN6 6U | ||
| 67 | #define GPIOA_PIN7 7U | ||
| 68 | #define GPIOA_PIN8 8U | ||
| 69 | #define GPIOA_PIN9 9U | ||
| 70 | #define GPIOA_SPI1_MISO0 10U | ||
| 71 | #define GPIOA_SPI1_CLK 11U | ||
| 72 | #define GPIOA_PWM0 12U | ||
| 73 | #define GPIOA_PWM1 13U | ||
| 74 | #define GPIOA_PWM2 14U | ||
| 75 | #define GPIOA_PWM3 15U | ||
| 76 | |||
| 77 | #define GPIOB_UART0_RXD 0U | ||
| 78 | #define GPIOB_UART0_TXD 1U | ||
| 79 | #define GPIOB_UART0_RTS 2U | ||
| 80 | #define GPIOB_UART0_CTS 3U | ||
| 81 | #define GPIOB_UART1_RXD 4U | ||
| 82 | #define GPIOB_UART1_TXD 5U | ||
| 83 | #define GPIOB_UART1_RTS 6U | ||
| 84 | #define GPIOB_UART1_CTS 7U | ||
| 85 | #define GPIOB_TM0 8U | ||
| 86 | #define GPIOB_TM1 9U | ||
| 87 | #define GPIOB_TM2 10U | ||
| 88 | #define GPIOB_PIN11 11U | ||
| 89 | #define GPIOB_CLK0 12U | ||
| 90 | #define GPIOB_PIN13 13U | ||
| 91 | #define GPIOB_INT0 14U | ||
| 92 | #define GPIOB_INT1 15U | ||
| 93 | |||
| 94 | #define GPIOC_PIN0 0U | ||
| 95 | #define GPIOC_PIN1 1U | ||
| 96 | #define GPIOC_PIN2 2U | ||
| 97 | #define GPIOC_PIN3 3U | ||
| 98 | #define GPIOC_PIN4 4U | ||
| 99 | #define GPIOC_PIN5 5U | ||
| 100 | #define GPIOC_PIN6 6U | ||
| 101 | #define GPIOC_PIN7 7U | ||
| 102 | #define GPIOC_PIN8 8U | ||
| 103 | #define GPIOC_PIN9 9U | ||
| 104 | #define GPIOC_PIN10 10U | ||
| 105 | #define GPIOC_PIN11 11U | ||
| 106 | #define GPIOC_PIN12 12U | ||
| 107 | #define GPIOC_PIN13 13U | ||
| 108 | #define GPIOC_PIN14 14U | ||
| 109 | #define GPIOC_PIN15 15U | ||
| 110 | |||
| 111 | #define GPIOD_ADC0 0U | ||
| 112 | #define GPIOD_ADC1 1U | ||
| 113 | #define GPIOD_ADC2 2U | ||
| 114 | #define GPIOD_ADC3 3U | ||
| 115 | #define GPIOD_ADC4 4U | ||
| 116 | #define GPIOD_ADC5 5U | ||
| 117 | #define GPIOD_PIN6 6U | ||
| 118 | #define GPIOD_PIN7 7U | ||
| 119 | #define GPIOD_PIN8 8U | ||
| 120 | #define GPIOD_PIN9 9U | ||
| 121 | #define GPIOD_PIN10 10U | ||
| 122 | #define GPIOD_PIN11 11U | ||
| 123 | #define GPIOD_PIN12 12U | ||
| 124 | #define GPIOD_PIN13 13U | ||
| 125 | #define GPIOD_PIN14 14U | ||
| 126 | #define GPIOD_PIN15 15U | ||
| 127 | |||
| 128 | #define GPIOE_PIN0 0U | ||
| 129 | #define GPIOE_PIN1 1U | ||
| 130 | #define GPIOE_PIN2 2U | ||
| 131 | #define GPIOE_PIN3 3U | ||
| 132 | #define GPIOE_PIN4 4U | ||
| 133 | #define GPIOE_PIN5 5U | ||
| 134 | #define GPIOE_PIN6 6U | ||
| 135 | #define GPIOE_PIN7 7U | ||
| 136 | #define GPIOE_PIN8 8U | ||
| 137 | #define GPIOE_PIN9 9U | ||
| 138 | #define GPIOE_PIN10 10U | ||
| 139 | #define GPIOE_PIN11 11U | ||
| 140 | #define GPIOE_PIN12 12U | ||
| 141 | #define GPIOE_PIN13 13U | ||
| 142 | #define GPIOE_PIN14 14U | ||
| 143 | #define GPIOE_PIN15 15U | ||
| 144 | |||
| 145 | #define GPIOF_OSC_OUT 0U | ||
| 146 | #define GPIOF_OSC_IN 1U | ||
| 147 | #define GPIOF_I2C0_SDA 2U | ||
| 148 | #define GPIOF_I2C0_SCL 3U | ||
| 149 | #define GPIOF_PIN4 4U | ||
| 150 | #define GPIOF_PIN5 5U | ||
| 151 | #define GPIOF_PIN6 6U | ||
| 152 | #define GPIOF_PIN7 7U | ||
| 153 | #define GPIOF_PIN8 8U | ||
| 154 | #define GPIOF_PIN9 9U | ||
| 155 | #define GPIOF_PIN10 10U | ||
| 156 | #define GPIOF_PIN11 11U | ||
| 157 | #define GPIOF_PIN12 12U | ||
| 158 | #define GPIOF_PIN13 13U | ||
| 159 | #define GPIOF_PIN14 14U | ||
| 160 | #define GPIOF_PIN15 15U | ||
| 161 | |||
| 162 | /* | ||
| 163 | * IO lines assignments. | ||
| 164 | */ | ||
| 165 | #define LINE_USB_DM PAL_LINE(GPIOA, 11U) | ||
| 166 | #define LINE_USB_DP PAL_LINE(GPIOA, 12U) | ||
| 167 | #define LINE_SWDIO PAL_LINE(GPIOA, 13U) | ||
| 168 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
| 169 | |||
| 170 | // #define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) | ||
| 171 | // #define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) | ||
| 172 | // #define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) | ||
| 173 | |||
| 174 | #define LINE_OSC_IN PAL_LINE(GPIOF, 0U) | ||
| 175 | #define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) | ||
| 176 | |||
| 177 | /* | ||
| 178 | * I/O ports initial setup, this configuration is established soon after reset | ||
| 179 | * in the initialization code. | ||
| 180 | * Please refer to the NUC123 Reference Manual for details. | ||
| 181 | */ | ||
| 182 | #define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) | ||
| 183 | #define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) | ||
| 184 | #define PIN_MODE_OPENDRAIN(n) (2U << ((n) * 2U)) | ||
| 185 | #define PIN_MODE_QUASI(n) (3U << ((n) * 2U)) | ||
| 186 | #define PIN_DIGITAL_EN(n) (0U << (n)) | ||
| 187 | #define PIN_DIGITAL_DIS(n) (1U << (n)) | ||
| 188 | #define PIN_DMASK_DIS(n) (0U << (n)) | ||
| 189 | #define PIN_DMASK_EN(n) (1U << (n)) | ||
| 190 | #define PIN_DBNCE_DIS(n) (0U << (n)) | ||
| 191 | #define PIN_DBNCE_EN(n) (1U << (n)) | ||
| 192 | #define PIN_IMD_EDGE(n) (0U << (n)) | ||
| 193 | #define PIN_IMD_LVL(n) (1U << (n)) | ||
| 194 | #define PIN_IEN_FELL_DIS(n) (0U << (n)) | ||
| 195 | #define PIN_IEN_FELL_EN(n) (1U << (n)) | ||
| 196 | #define PIN_IEN_REHL_DIS(n) ((0U << (n)) << 16) | ||
| 197 | #define PIN_IEN_REHL_EN(n) ((1U << (n)) << 16) | ||
| 198 | #define PIN_ISRC_EN(n) (1U << (n)) | ||
| 199 | #define PIN_ISRC_DIS(n) (0U << (n)) | ||
| 200 | #define PIN_ISRC_CLR(n) (1U << (n)) | ||
| 201 | #define PIN_DATA_LOW(n) (0U << (n)) | ||
| 202 | #define PIN_DATA_HIGH(n) (1U << (n)) | ||
| 203 | |||
| 204 | /* | ||
| 205 | * GPIOA setup: | ||
| 206 | * | ||
| 207 | * PA0 - PIN0 (input pullup). | ||
| 208 | * PA1 - PIN1 (input pullup). | ||
| 209 | * PA2 - PIN2 (input pullup). | ||
| 210 | * PA3 - PIN3 (input pullup). | ||
| 211 | * PA4 - PIN4 (input pullup). | ||
| 212 | * PA5 - PIN5 (input pullup). | ||
| 213 | * PA6 - PIN6 (input pullup). | ||
| 214 | * PA7 - PIN7 (input pullup). | ||
| 215 | * PA8 - PIN8 (input pullup). | ||
| 216 | * PA9 - PIN9 (input pullup). | ||
| 217 | * PA10 - SPI1_MISO0 (input pullup). | ||
| 218 | * PA11 - SPI1_CLK (input floating). | ||
| 219 | * PA12 - PWM0 (input floating). | ||
| 220 | * PA13 - PWM1 (input pullup). | ||
| 221 | * PA14 - PWM2 (input pullup). | ||
| 222 | * PA15 - PWM3 (input pullup). | ||
| 223 | */ | ||
| 224 | |||
| 225 | #define VAL_GPIOA_PMD (PIN_MODE_INPUT(GPIOA_PIN0) | \ | ||
| 226 | PIN_MODE_INPUT(GPIOA_PIN1) | \ | ||
| 227 | PIN_MODE_INPUT(GPIOA_PIN2) | \ | ||
| 228 | PIN_MODE_INPUT(GPIOA_PIN3) | \ | ||
| 229 | PIN_MODE_INPUT(GPIOA_PIN4) | \ | ||
| 230 | PIN_MODE_INPUT(GPIOA_PIN5) | \ | ||
| 231 | PIN_MODE_INPUT(GPIOA_PIN6) | \ | ||
| 232 | PIN_MODE_INPUT(GPIOA_PIN7) | \ | ||
| 233 | PIN_MODE_INPUT(GPIOA_PIN8) | \ | ||
| 234 | PIN_MODE_INPUT(GPIOA_PIN9) | \ | ||
| 235 | PIN_MODE_INPUT(GPIOA_SPI1_MISO0) | \ | ||
| 236 | PIN_MODE_INPUT(GPIOA_SPI1_CLK) | \ | ||
| 237 | PIN_MODE_INPUT(GPIOA_PWM0) | \ | ||
| 238 | PIN_MODE_INPUT(GPIOA_PWM1) | \ | ||
| 239 | PIN_MODE_INPUT(GPIOA_PWM2) | \ | ||
| 240 | PIN_MODE_INPUT(GPIOA_PWM3)) | ||
| 241 | #define VAL_GPIOA_OFFD (PIN_DIGITAL_EN(GPIOA_PIN0) | \ | ||
| 242 | PIN_DIGITAL_EN(GPIOA_PIN1) | \ | ||
| 243 | PIN_DIGITAL_EN(GPIOA_PIN2) | \ | ||
| 244 | PIN_DIGITAL_EN(GPIOA_PIN3) | \ | ||
| 245 | PIN_DIGITAL_EN(GPIOA_PIN4) | \ | ||
| 246 | PIN_DIGITAL_EN(GPIOA_PIN5) | \ | ||
| 247 | PIN_DIGITAL_EN(GPIOA_PIN6) | \ | ||
| 248 | PIN_DIGITAL_EN(GPIOA_PIN7) | \ | ||
| 249 | PIN_DIGITAL_EN(GPIOA_PIN8) | \ | ||
| 250 | PIN_DIGITAL_EN(GPIOA_PIN9) | \ | ||
| 251 | PIN_DIGITAL_EN(GPIOA_SPI1_MISO0) | \ | ||
| 252 | PIN_DIGITAL_EN(GPIOA_SPI1_CLK) | \ | ||
| 253 | PIN_DIGITAL_EN(GPIOA_PWM0) | \ | ||
| 254 | PIN_DIGITAL_EN(GPIOA_PWM1) | \ | ||
| 255 | PIN_DIGITAL_EN(GPIOA_PWM2) | \ | ||
| 256 | PIN_DIGITAL_EN(GPIOA_PWM3)) | ||
| 257 | #define VAL_GPIOA_DMASK (PIN_DMASK_EN(GPIOA_PIN0) | \ | ||
| 258 | PIN_DMASK_EN(GPIOA_PIN1) | \ | ||
| 259 | PIN_DMASK_EN(GPIOA_PIN2) | \ | ||
| 260 | PIN_DMASK_EN(GPIOA_PIN3) | \ | ||
| 261 | PIN_DMASK_EN(GPIOA_PIN4) | \ | ||
| 262 | PIN_DMASK_EN(GPIOA_PIN5) | \ | ||
| 263 | PIN_DMASK_EN(GPIOA_PIN6) | \ | ||
| 264 | PIN_DMASK_EN(GPIOA_PIN7) | \ | ||
| 265 | PIN_DMASK_EN(GPIOA_PIN8) | \ | ||
| 266 | PIN_DMASK_EN(GPIOA_PIN9) | \ | ||
| 267 | PIN_DMASK_EN(GPIOA_SPI1_MISO0) | \ | ||
| 268 | PIN_DMASK_EN(GPIOA_SPI1_CLK) | \ | ||
| 269 | PIN_DMASK_EN(GPIOA_PWM0) | \ | ||
| 270 | PIN_DMASK_EN(GPIOA_PWM1) | \ | ||
| 271 | PIN_DMASK_EN(GPIOA_PWM2) | \ | ||
| 272 | PIN_DMASK_EN(GPIOA_PWM3)) | ||
| 273 | #define VAL_GPIOA_DBEN (PIN_DBNCE_EN(GPIOA_PIN0) | \ | ||
| 274 | PIN_DBNCE_EN(GPIOA_PIN1) | \ | ||
| 275 | PIN_DBNCE_EN(GPIOA_PIN2) | \ | ||
| 276 | PIN_DBNCE_EN(GPIOA_PIN3) | \ | ||
| 277 | PIN_DBNCE_EN(GPIOA_PIN4) | \ | ||
| 278 | PIN_DBNCE_EN(GPIOA_PIN5) | \ | ||
| 279 | PIN_DBNCE_EN(GPIOA_PIN6) | \ | ||
| 280 | PIN_DBNCE_EN(GPIOA_PIN7) | \ | ||
| 281 | PIN_DBNCE_EN(GPIOA_PIN8) | \ | ||
| 282 | PIN_DBNCE_EN(GPIOA_PIN9) | \ | ||
| 283 | PIN_DBNCE_EN(GPIOA_SPI1_MISO0) | \ | ||
| 284 | PIN_DBNCE_EN(GPIOA_SPI1_CLK) | \ | ||
| 285 | PIN_DBNCE_EN(GPIOA_PWM0) | \ | ||
| 286 | PIN_DBNCE_EN(GPIOA_PWM1) | \ | ||
| 287 | PIN_DBNCE_EN(GPIOA_PWM2) | \ | ||
| 288 | PIN_DBNCE_EN(GPIOA_PWM3)) | ||
| 289 | #define VAL_GPIOA_IMD (PIN_IMD_EDGE(GPIOA_PIN0) | \ | ||
| 290 | PIN_IMD_EDGE(GPIOA_PIN1) | \ | ||
| 291 | PIN_IMD_EDGE(GPIOA_PIN2) | \ | ||
| 292 | PIN_IMD_EDGE(GPIOA_PIN3) | \ | ||
| 293 | PIN_IMD_EDGE(GPIOA_PIN4) | \ | ||
| 294 | PIN_IMD_EDGE(GPIOA_PIN5) | \ | ||
| 295 | PIN_IMD_EDGE(GPIOA_PIN6) | \ | ||
| 296 | PIN_IMD_EDGE(GPIOA_PIN7) | \ | ||
| 297 | PIN_IMD_EDGE(GPIOA_PIN8) | \ | ||
| 298 | PIN_IMD_EDGE(GPIOA_PIN9) | \ | ||
| 299 | PIN_IMD_EDGE(GPIOA_SPI1_MISO0) | \ | ||
| 300 | PIN_IMD_EDGE(GPIOA_SPI1_CLK) | \ | ||
| 301 | PIN_IMD_EDGE(GPIOA_PWM0) | \ | ||
| 302 | PIN_IMD_EDGE(GPIOA_PWM1) | \ | ||
| 303 | PIN_IMD_EDGE(GPIOA_PWM2) | \ | ||
| 304 | PIN_IMD_EDGE(GPIOA_PWM3)) | ||
| 305 | #define VAL_GPIOA_IEN (PIN_IEN_FELL_DIS(GPIOA_PIN0) | \ | ||
| 306 | PIN_IEN_FELL_DIS(GPIOA_PIN1) | \ | ||
| 307 | PIN_IEN_FELL_DIS(GPIOA_PIN2) | \ | ||
| 308 | PIN_IEN_FELL_DIS(GPIOA_PIN3) | \ | ||
| 309 | PIN_IEN_FELL_DIS(GPIOA_PIN4) | \ | ||
| 310 | PIN_IEN_FELL_DIS(GPIOA_PIN5) | \ | ||
| 311 | PIN_IEN_FELL_DIS(GPIOA_PIN6) | \ | ||
| 312 | PIN_IEN_FELL_DIS(GPIOA_PIN7) | \ | ||
| 313 | PIN_IEN_FELL_DIS(GPIOA_PIN8) | \ | ||
| 314 | PIN_IEN_FELL_DIS(GPIOA_PIN9) | \ | ||
| 315 | PIN_IEN_FELL_DIS(GPIOA_SPI1_MISO0) | \ | ||
| 316 | PIN_IEN_FELL_DIS(GPIOA_SPI1_CLK) | \ | ||
| 317 | PIN_IEN_FELL_DIS(GPIOA_PWM0) | \ | ||
| 318 | PIN_IEN_FELL_DIS(GPIOA_PWM1) | \ | ||
| 319 | PIN_IEN_FELL_DIS(GPIOA_PWM2) | \ | ||
| 320 | PIN_IEN_FELL_DIS(GPIOA_PWM3)) | ||
| 321 | #define VAL_GPIOA_ISRC (PIN_ISRC_DIS(GPIOA_PIN0) | \ | ||
| 322 | PIN_ISRC_DIS(GPIOA_PIN1) | \ | ||
| 323 | PIN_ISRC_DIS(GPIOA_PIN2) | \ | ||
| 324 | PIN_ISRC_DIS(GPIOA_PIN3) | \ | ||
| 325 | PIN_ISRC_DIS(GPIOA_PIN4) | \ | ||
| 326 | PIN_ISRC_DIS(GPIOA_PIN5) | \ | ||
| 327 | PIN_ISRC_DIS(GPIOA_PIN6) | \ | ||
| 328 | PIN_ISRC_DIS(GPIOA_PIN7) | \ | ||
| 329 | PIN_ISRC_DIS(GPIOA_PIN8) | \ | ||
| 330 | PIN_ISRC_DIS(GPIOA_PIN9) | \ | ||
| 331 | PIN_ISRC_DIS(GPIOA_SPI1_MISO0) | \ | ||
| 332 | PIN_ISRC_DIS(GPIOA_SPI1_CLK) | \ | ||
| 333 | PIN_ISRC_DIS(GPIOA_PWM0) | \ | ||
| 334 | PIN_ISRC_DIS(GPIOA_PWM1) | \ | ||
| 335 | PIN_ISRC_DIS(GPIOA_PWM2) | \ | ||
| 336 | PIN_ISRC_DIS(GPIOA_PWM3)) | ||
| 337 | #define VAL_GPIOA_DOUT (PIN_DATA_LOW(GPIOA_PIN0) | \ | ||
| 338 | PIN_DATA_LOW(GPIOA_PIN1) | \ | ||
| 339 | PIN_DATA_LOW(GPIOA_PIN2) | \ | ||
| 340 | PIN_DATA_LOW(GPIOA_PIN3) | \ | ||
| 341 | PIN_DATA_LOW(GPIOA_PIN4) | \ | ||
| 342 | PIN_DATA_LOW(GPIOA_PIN5) | \ | ||
| 343 | PIN_DATA_LOW(GPIOA_PIN6) | \ | ||
| 344 | PIN_DATA_LOW(GPIOA_PIN7) | \ | ||
| 345 | PIN_DATA_LOW(GPIOA_PIN8) | \ | ||
| 346 | PIN_DATA_LOW(GPIOA_PIN9) | \ | ||
| 347 | PIN_DATA_LOW(GPIOA_SPI1_MISO0) | \ | ||
| 348 | PIN_DATA_LOW(GPIOA_SPI1_CLK) | \ | ||
| 349 | PIN_DATA_LOW(GPIOA_PWM0) | \ | ||
| 350 | PIN_DATA_LOW(GPIOA_PWM1) | \ | ||
| 351 | PIN_DATA_LOW(GPIOA_PWM2) | \ | ||
| 352 | PIN_DATA_LOW(GPIOA_PWM3)) | ||
| 353 | |||
| 354 | /* | ||
| 355 | * GPIOB setup: | ||
| 356 | * | ||
| 357 | * PB0 - UART0_RXD (input pullup). | ||
| 358 | * PB1 - UART0_TXD (output). | ||
| 359 | * PB2 - UART0_RTS (output). | ||
| 360 | * PB3 - UART0_CTS (output). | ||
| 361 | * PB4 - UART1_RXD (output). | ||
| 362 | * PB5 - UART1_TXD (output). | ||
| 363 | * PB6 - UART1_RTS (output). | ||
| 364 | * PB7 - UART1_CTS (output). | ||
| 365 | * PB8 - TM0 (input pullup). | ||
| 366 | * PB9 - TM1 (input pullup). | ||
| 367 | * PB10 - TM2 (input pullup). | ||
| 368 | * PB11 - PIN11 (input pullup). | ||
| 369 | * PB12 - CLK0 (output). | ||
| 370 | * PB13 - PIN13 (output). | ||
| 371 | * PB14 - INT0 (debug output). | ||
| 372 | * PB15 - INT1 (input pullup). | ||
| 373 | */ | ||
| 374 | #define VAL_GPIOB_PMD (PIN_MODE_INPUT(GPIOB_UART0_RXD) | \ | ||
| 375 | PIN_MODE_OUTPUT(GPIOB_UART0_TXD) | \ | ||
| 376 | PIN_MODE_OUTPUT(GPIOB_UART0_RTS) | \ | ||
| 377 | PIN_MODE_OUTPUT(GPIOB_UART0_CTS) | \ | ||
| 378 | PIN_MODE_OUTPUT(GPIOB_UART1_RXD) | \ | ||
| 379 | PIN_MODE_OUTPUT(GPIOB_UART1_TXD) | \ | ||
| 380 | PIN_MODE_OUTPUT(GPIOB_UART1_RTS) | \ | ||
| 381 | PIN_MODE_OUTPUT(GPIOB_UART1_CTS) | \ | ||
| 382 | PIN_MODE_INPUT(GPIOB_TM0) | \ | ||
| 383 | PIN_MODE_INPUT(GPIOB_TM1) | \ | ||
| 384 | PIN_MODE_INPUT(GPIOB_TM2) | \ | ||
| 385 | PIN_MODE_INPUT(GPIOB_PIN11) | \ | ||
| 386 | PIN_MODE_OUTPUT(GPIOB_CLK0) | \ | ||
| 387 | PIN_MODE_OUTPUT(GPIOB_PIN13) | \ | ||
| 388 | PIN_MODE_OUTPUT(GPIOB_INT0) | \ | ||
| 389 | PIN_MODE_INPUT(GPIOB_INT1)) | ||
| 390 | #define VAL_GPIOB_OFFD (PIN_DIGITAL_EN(GPIOB_UART0_RXD) | \ | ||
| 391 | PIN_DIGITAL_DIS(GPIOB_UART0_TXD) | \ | ||
| 392 | PIN_DIGITAL_DIS(GPIOB_UART0_RTS) | \ | ||
| 393 | PIN_DIGITAL_DIS(GPIOB_UART0_CTS) | \ | ||
| 394 | PIN_DIGITAL_DIS(GPIOB_UART1_RXD) | \ | ||
| 395 | PIN_DIGITAL_DIS(GPIOB_UART1_TXD) | \ | ||
| 396 | PIN_DIGITAL_DIS(GPIOB_UART1_RTS) | \ | ||
| 397 | PIN_DIGITAL_DIS(GPIOB_UART1_CTS) | \ | ||
| 398 | PIN_DIGITAL_DIS(GPIOB_TM0) | \ | ||
| 399 | PIN_DIGITAL_EN(GPIOB_TM1) | \ | ||
| 400 | PIN_DIGITAL_EN(GPIOB_TM2) | \ | ||
| 401 | PIN_DIGITAL_EN(GPIOB_PIN11) | \ | ||
| 402 | PIN_DIGITAL_DIS(GPIOB_CLK0) | \ | ||
| 403 | PIN_DIGITAL_DIS(GPIOB_PIN13) | \ | ||
| 404 | PIN_DIGITAL_DIS(GPIOB_INT0) | \ | ||
| 405 | PIN_DIGITAL_EN(GPIOB_INT1)) | ||
| 406 | #define VAL_GPIOB_DMASK (PIN_DMASK_EN(GPIOB_UART0_RXD) | \ | ||
| 407 | PIN_DMASK_DIS(GPIOB_UART0_TXD) | \ | ||
| 408 | PIN_DMASK_DIS(GPIOB_UART0_RTS) | \ | ||
| 409 | PIN_DMASK_DIS(GPIOB_UART0_CTS) | \ | ||
| 410 | PIN_DMASK_DIS(GPIOB_UART1_RXD) | \ | ||
| 411 | PIN_DMASK_DIS(GPIOB_UART1_TXD) | \ | ||
| 412 | PIN_DMASK_DIS(GPIOB_UART1_RTS) | \ | ||
| 413 | PIN_DMASK_DIS(GPIOB_UART1_CTS) | \ | ||
| 414 | PIN_DMASK_EN(GPIOB_TM0) | \ | ||
| 415 | PIN_DMASK_EN(GPIOB_TM1) | \ | ||
| 416 | PIN_DMASK_EN(GPIOB_TM2) | \ | ||
| 417 | PIN_DMASK_EN(GPIOB_PIN11) | \ | ||
| 418 | PIN_DMASK_DIS(GPIOB_CLK0) | \ | ||
| 419 | PIN_DMASK_DIS(GPIOB_PIN13) | \ | ||
| 420 | PIN_DMASK_DIS(GPIOB_INT0) | \ | ||
| 421 | PIN_DMASK_EN(GPIOB_INT1)) | ||
| 422 | #define VAL_GPIOB_DBEN (PIN_DBNCE_EN(GPIOB_UART0_RXD) | \ | ||
| 423 | PIN_DBNCE_DIS(GPIOB_UART0_TXD) | \ | ||
| 424 | PIN_DBNCE_DIS(GPIOB_UART0_RTS) | \ | ||
| 425 | PIN_DBNCE_DIS(GPIOB_UART0_CTS) | \ | ||
| 426 | PIN_DBNCE_DIS(GPIOB_UART1_RXD) | \ | ||
| 427 | PIN_DBNCE_DIS(GPIOB_UART1_TXD) | \ | ||
| 428 | PIN_DBNCE_DIS(GPIOB_UART1_RTS) | \ | ||
| 429 | PIN_DBNCE_DIS(GPIOB_UART1_CTS) | \ | ||
| 430 | PIN_DBNCE_EN(GPIOB_TM0) | \ | ||
| 431 | PIN_DBNCE_EN(GPIOB_TM1) | \ | ||
| 432 | PIN_DBNCE_EN(GPIOB_TM2) | \ | ||
| 433 | PIN_DBNCE_EN(GPIOB_PIN11) | \ | ||
| 434 | PIN_DBNCE_DIS(GPIOB_CLK0) | \ | ||
| 435 | PIN_DBNCE_DIS(GPIOB_PIN13) | \ | ||
| 436 | PIN_DBNCE_DIS(GPIOB_INT0) | \ | ||
| 437 | PIN_DBNCE_EN(GPIOB_INT1)) | ||
| 438 | #define VAL_GPIOB_IMD (PIN_IMD_EDGE(GPIOB_UART0_RXD) | \ | ||
| 439 | PIN_IMD_EDGE(GPIOB_UART0_TXD) | \ | ||
| 440 | PIN_IMD_EDGE(GPIOB_UART0_RTS) | \ | ||
| 441 | PIN_IMD_EDGE(GPIOB_UART0_CTS) | \ | ||
| 442 | PIN_IMD_EDGE(GPIOB_UART1_RXD) | \ | ||
| 443 | PIN_IMD_EDGE(GPIOB_UART1_TXD) | \ | ||
| 444 | PIN_IMD_EDGE(GPIOB_UART1_RTS) | \ | ||
| 445 | PIN_IMD_EDGE(GPIOB_UART1_CTS) | \ | ||
| 446 | PIN_IMD_EDGE(GPIOB_TM0) | \ | ||
| 447 | PIN_IMD_EDGE(GPIOB_TM1) | \ | ||
| 448 | PIN_IMD_EDGE(GPIOB_TM2) | \ | ||
| 449 | PIN_IMD_EDGE(GPIOB_PIN11) | \ | ||
| 450 | PIN_IMD_EDGE(GPIOB_CLK0) | \ | ||
| 451 | PIN_IMD_EDGE(GPIOB_PIN13) | \ | ||
| 452 | PIN_IMD_EDGE(GPIOB_INT0) | \ | ||
| 453 | PIN_IMD_EDGE(GPIOB_INT1)) | ||
| 454 | #define VAL_GPIOB_IEN (PIN_IEN_FELL_DIS(GPIOB_UART0_RXD) | \ | ||
| 455 | PIN_IEN_FELL_DIS(GPIOB_UART0_TXD) | \ | ||
| 456 | PIN_IEN_FELL_DIS(GPIOB_UART0_RTS) | \ | ||
| 457 | PIN_IEN_FELL_DIS(GPIOB_UART0_CTS) | \ | ||
| 458 | PIN_IEN_FELL_DIS(GPIOB_UART1_RXD) | \ | ||
| 459 | PIN_IEN_FELL_DIS(GPIOB_UART1_TXD) | \ | ||
| 460 | PIN_IEN_FELL_DIS(GPIOB_UART1_RTS) | \ | ||
| 461 | PIN_IEN_FELL_DIS(GPIOB_UART1_CTS) | \ | ||
| 462 | PIN_IEN_FELL_DIS(GPIOB_TM0) | \ | ||
| 463 | PIN_IEN_FELL_DIS(GPIOB_TM1) | \ | ||
| 464 | PIN_IEN_FELL_DIS(GPIOB_TM2) | \ | ||
| 465 | PIN_IEN_FELL_DIS(GPIOB_PIN11) | \ | ||
| 466 | PIN_IEN_FELL_DIS(GPIOB_CLK0) | \ | ||
| 467 | PIN_IEN_FELL_DIS(GPIOB_PIN13) | \ | ||
| 468 | PIN_IEN_FELL_DIS(GPIOB_INT0) | \ | ||
| 469 | PIN_IEN_FELL_DIS(GPIOB_INT1)) | ||
| 470 | #define VAL_GPIOB_ISRC (PIN_ISRC_DIS(GPIOB_UART0_RXD) | \ | ||
| 471 | PIN_ISRC_DIS(GPIOB_UART0_TXD) | \ | ||
| 472 | PIN_ISRC_DIS(GPIOB_UART0_RTS) | \ | ||
| 473 | PIN_ISRC_DIS(GPIOB_UART0_CTS) | \ | ||
| 474 | PIN_ISRC_DIS(GPIOB_UART1_RXD) | \ | ||
| 475 | PIN_ISRC_DIS(GPIOB_UART1_TXD) | \ | ||
| 476 | PIN_ISRC_DIS(GPIOB_UART1_RTS) | \ | ||
| 477 | PIN_ISRC_DIS(GPIOB_UART1_CTS) | \ | ||
| 478 | PIN_ISRC_DIS(GPIOB_TM0) | \ | ||
| 479 | PIN_ISRC_DIS(GPIOB_TM1) | \ | ||
| 480 | PIN_ISRC_DIS(GPIOB_TM2) | \ | ||
| 481 | PIN_ISRC_DIS(GPIOB_PIN11) | \ | ||
| 482 | PIN_ISRC_DIS(GPIOB_CLK0) | \ | ||
| 483 | PIN_ISRC_DIS(GPIOB_PIN13) | \ | ||
| 484 | PIN_ISRC_DIS(GPIOB_INT0) | \ | ||
| 485 | PIN_ISRC_DIS(GPIOB_INT1)) | ||
| 486 | #define VAL_GPIOB_DOUT (PIN_DATA_LOW(GPIOB_UART0_RXD) | \ | ||
| 487 | PIN_DATA_LOW(GPIOB_UART0_TXD) | \ | ||
| 488 | PIN_DATA_LOW(GPIOB_UART0_RTS) | \ | ||
| 489 | PIN_DATA_LOW(GPIOB_UART0_CTS) | \ | ||
| 490 | PIN_DATA_LOW(GPIOB_UART1_RXD) | \ | ||
| 491 | PIN_DATA_LOW(GPIOB_UART1_TXD) | \ | ||
| 492 | PIN_DATA_LOW(GPIOB_UART1_RTS) | \ | ||
| 493 | PIN_DATA_LOW(GPIOB_UART1_CTS) | \ | ||
| 494 | PIN_DATA_LOW(GPIOB_TM0) | \ | ||
| 495 | PIN_DATA_LOW(GPIOB_TM1) | \ | ||
| 496 | PIN_DATA_LOW(GPIOB_TM2) | \ | ||
| 497 | PIN_DATA_LOW(GPIOB_PIN11) | \ | ||
| 498 | PIN_DATA_LOW(GPIOB_CLK0) | \ | ||
| 499 | PIN_DATA_LOW(GPIOB_PIN13) | \ | ||
| 500 | PIN_DATA_LOW(GPIOB_INT0) | \ | ||
| 501 | PIN_DATA_LOW(GPIOB_INT1)) | ||
| 502 | |||
| 503 | /* | ||
| 504 | * GPIOC setup: | ||
| 505 | * | ||
| 506 | * PC0 - PIN0 (input pullup). | ||
| 507 | * PC1 - PIN1 (input pullup). | ||
| 508 | * PC2 - PIN2 (input pullup). | ||
| 509 | * PC3 - PIN3 (input pullup). | ||
| 510 | * PC4 - PIN4 (output). | ||
| 511 | * PC5 - PIN5 (output). | ||
| 512 | * PC6 - PIN6 (input pullup). | ||
| 513 | * PC7 - PIN7 (input pullup). | ||
| 514 | * PC8 - PIN8 (input pullup). | ||
| 515 | * PC9 - PIN9 (input pullup). | ||
| 516 | * PC10 - PIN10 (input pullup). | ||
| 517 | * PC11 - PIN11 (input pullup). | ||
| 518 | * PC12 - PIN12 (input pullup). | ||
| 519 | * PC13 - PIN13 (input pullup). | ||
| 520 | * PC14 - PIN14 (input pullup). | ||
| 521 | * PC15 - PIN15 (input pullup). | ||
| 522 | */ | ||
| 523 | #define VAL_GPIOC_PMD (PIN_MODE_INPUT(GPIOC_PIN0) | \ | ||
| 524 | PIN_MODE_INPUT(GPIOC_PIN1) | \ | ||
| 525 | PIN_MODE_INPUT(GPIOC_PIN2) | \ | ||
| 526 | PIN_MODE_INPUT(GPIOC_PIN3) | \ | ||
| 527 | PIN_MODE_OUTPUT(GPIOC_PIN4) | \ | ||
| 528 | PIN_MODE_OUTPUT(GPIOC_PIN5) | \ | ||
| 529 | PIN_MODE_INPUT(GPIOC_PIN6) | \ | ||
| 530 | PIN_MODE_INPUT(GPIOC_PIN7) | \ | ||
| 531 | PIN_MODE_INPUT(GPIOC_PIN8) | \ | ||
| 532 | PIN_MODE_INPUT(GPIOC_PIN9) | \ | ||
| 533 | PIN_MODE_INPUT(GPIOC_PIN10) | \ | ||
| 534 | PIN_MODE_INPUT(GPIOC_PIN11) | \ | ||
| 535 | PIN_MODE_INPUT(GPIOC_PIN12) | \ | ||
| 536 | PIN_MODE_INPUT(GPIOC_PIN13) | \ | ||
| 537 | PIN_MODE_INPUT(GPIOC_PIN14) | \ | ||
| 538 | PIN_MODE_INPUT(GPIOC_PIN15)) | ||
| 539 | #define VAL_GPIOC_OFFD (PIN_DIGITAL_EN(GPIOC_PIN0) | \ | ||
| 540 | PIN_DIGITAL_EN(GPIOC_PIN1) | \ | ||
| 541 | PIN_DIGITAL_EN(GPIOC_PIN2) | \ | ||
| 542 | PIN_DIGITAL_EN(GPIOC_PIN3) | \ | ||
| 543 | PIN_DIGITAL_DIS(GPIOC_PIN4) | \ | ||
| 544 | PIN_DIGITAL_DIS(GPIOC_PIN5) | \ | ||
| 545 | PIN_DIGITAL_EN(GPIOC_PIN6) | \ | ||
| 546 | PIN_DIGITAL_EN(GPIOC_PIN7) | \ | ||
| 547 | PIN_DIGITAL_EN(GPIOC_PIN8) | \ | ||
| 548 | PIN_DIGITAL_EN(GPIOC_PIN9) | \ | ||
| 549 | PIN_DIGITAL_EN(GPIOC_PIN10) | \ | ||
| 550 | PIN_DIGITAL_EN(GPIOC_PIN11) | \ | ||
| 551 | PIN_DIGITAL_EN(GPIOC_PIN12) | \ | ||
| 552 | PIN_DIGITAL_EN(GPIOC_PIN13) | \ | ||
| 553 | PIN_DIGITAL_EN(GPIOC_PIN14) | \ | ||
| 554 | PIN_DIGITAL_EN(GPIOC_PIN15)) | ||
| 555 | #define VAL_GPIOC_DMASK (PIN_DMASK_EN(GPIOC_PIN0) | \ | ||
| 556 | PIN_DMASK_EN(GPIOC_PIN1) | \ | ||
| 557 | PIN_DMASK_EN(GPIOC_PIN2) | \ | ||
| 558 | PIN_DMASK_EN(GPIOC_PIN3) | \ | ||
| 559 | PIN_DMASK_DIS(GPIOC_PIN4) | \ | ||
| 560 | PIN_DMASK_DIS(GPIOC_PIN5) | \ | ||
| 561 | PIN_DMASK_EN(GPIOC_PIN6) | \ | ||
| 562 | PIN_DMASK_EN(GPIOC_PIN7) | \ | ||
| 563 | PIN_DMASK_EN(GPIOC_PIN8) | \ | ||
| 564 | PIN_DMASK_EN(GPIOC_PIN9) | \ | ||
| 565 | PIN_DMASK_EN(GPIOC_PIN10) | \ | ||
| 566 | PIN_DMASK_EN(GPIOC_PIN11) | \ | ||
| 567 | PIN_DMASK_EN(GPIOC_PIN12) | \ | ||
| 568 | PIN_DMASK_EN(GPIOC_PIN13) | \ | ||
| 569 | PIN_DMASK_EN(GPIOC_PIN14) | \ | ||
| 570 | PIN_DMASK_EN(GPIOC_PIN15)) | ||
| 571 | #define VAL_GPIOC_DBEN (PIN_DBNCE_EN(GPIOC_PIN0) | \ | ||
| 572 | PIN_DBNCE_EN(GPIOC_PIN1) | \ | ||
| 573 | PIN_DBNCE_EN(GPIOC_PIN2) | \ | ||
| 574 | PIN_DBNCE_EN(GPIOC_PIN3) | \ | ||
| 575 | PIN_DBNCE_DIS(GPIOC_PIN4) | \ | ||
| 576 | PIN_DBNCE_DIS(GPIOC_PIN5) | \ | ||
| 577 | PIN_DBNCE_EN(GPIOC_PIN6) | \ | ||
| 578 | PIN_DBNCE_EN(GPIOC_PIN7) | \ | ||
| 579 | PIN_DBNCE_EN(GPIOC_PIN8) | \ | ||
| 580 | PIN_DBNCE_EN(GPIOC_PIN9) | \ | ||
| 581 | PIN_DBNCE_EN(GPIOC_PIN10) | \ | ||
| 582 | PIN_DBNCE_EN(GPIOC_PIN11) | \ | ||
| 583 | PIN_DBNCE_EN(GPIOC_PIN12) | \ | ||
| 584 | PIN_DBNCE_EN(GPIOC_PIN13) | \ | ||
| 585 | PIN_DBNCE_EN(GPIOC_PIN14) | \ | ||
| 586 | PIN_DBNCE_EN(GPIOC_PIN15)) | ||
| 587 | #define VAL_GPIOC_IMD (PIN_IMD_EDGE(GPIOC_PIN0) | \ | ||
| 588 | PIN_IMD_EDGE(GPIOC_PIN1) | \ | ||
| 589 | PIN_IMD_EDGE(GPIOC_PIN2) | \ | ||
| 590 | PIN_IMD_EDGE(GPIOC_PIN3) | \ | ||
| 591 | PIN_IMD_EDGE(GPIOC_PIN4) | \ | ||
| 592 | PIN_IMD_EDGE(GPIOC_PIN5) | \ | ||
| 593 | PIN_IMD_EDGE(GPIOC_PIN6) | \ | ||
| 594 | PIN_IMD_EDGE(GPIOC_PIN7) | \ | ||
| 595 | PIN_IMD_EDGE(GPIOC_PIN8) | \ | ||
| 596 | PIN_IMD_EDGE(GPIOC_PIN9) | \ | ||
| 597 | PIN_IMD_EDGE(GPIOC_PIN10) | \ | ||
| 598 | PIN_IMD_EDGE(GPIOC_PIN11) | \ | ||
| 599 | PIN_IMD_EDGE(GPIOC_PIN12) | \ | ||
| 600 | PIN_IMD_EDGE(GPIOC_PIN13) | \ | ||
| 601 | PIN_IMD_EDGE(GPIOC_PIN14) | \ | ||
| 602 | PIN_IMD_EDGE(GPIOC_PIN15)) | ||
| 603 | #define VAL_GPIOC_IEN (PIN_IEN_FELL_DIS(GPIOC_PIN0) | \ | ||
| 604 | PIN_IEN_FELL_DIS(GPIOC_PIN1) | \ | ||
| 605 | PIN_IEN_FELL_DIS(GPIOC_PIN2) | \ | ||
| 606 | PIN_IEN_FELL_DIS(GPIOC_PIN3) | \ | ||
| 607 | PIN_IEN_FELL_DIS(GPIOC_PIN4) | \ | ||
| 608 | PIN_IEN_FELL_DIS(GPIOC_PIN5) | \ | ||
| 609 | PIN_IEN_FELL_DIS(GPIOC_PIN6) | \ | ||
| 610 | PIN_IEN_FELL_DIS(GPIOC_PIN7) | \ | ||
| 611 | PIN_IEN_FELL_DIS(GPIOC_PIN8) | \ | ||
| 612 | PIN_IEN_FELL_DIS(GPIOC_PIN9) | \ | ||
| 613 | PIN_IEN_FELL_DIS(GPIOC_PIN10) | \ | ||
| 614 | PIN_IEN_FELL_DIS(GPIOC_PIN11) | \ | ||
| 615 | PIN_IEN_FELL_DIS(GPIOC_PIN12) | \ | ||
| 616 | PIN_IEN_FELL_DIS(GPIOC_PIN13) | \ | ||
| 617 | PIN_IEN_FELL_DIS(GPIOC_PIN14) | \ | ||
| 618 | PIN_IEN_FELL_DIS(GPIOC_PIN15)) | ||
| 619 | #define VAL_GPIOC_ISRC (PIN_ISRC_DIS(GPIOC_PIN0) | \ | ||
| 620 | PIN_ISRC_DIS(GPIOC_PIN1) | \ | ||
| 621 | PIN_ISRC_DIS(GPIOC_PIN2) | \ | ||
| 622 | PIN_ISRC_DIS(GPIOC_PIN3) | \ | ||
| 623 | PIN_ISRC_DIS(GPIOC_PIN4) | \ | ||
| 624 | PIN_ISRC_DIS(GPIOC_PIN5) | \ | ||
| 625 | PIN_ISRC_DIS(GPIOC_PIN6) | \ | ||
| 626 | PIN_ISRC_DIS(GPIOC_PIN7) | \ | ||
| 627 | PIN_ISRC_DIS(GPIOC_PIN8) | \ | ||
| 628 | PIN_ISRC_DIS(GPIOC_PIN9) | \ | ||
| 629 | PIN_ISRC_DIS(GPIOC_PIN10) | \ | ||
| 630 | PIN_ISRC_DIS(GPIOC_PIN11) | \ | ||
| 631 | PIN_ISRC_DIS(GPIOC_PIN12) | \ | ||
| 632 | PIN_ISRC_DIS(GPIOC_PIN13) | \ | ||
| 633 | PIN_ISRC_DIS(GPIOC_PIN14) | \ | ||
| 634 | PIN_ISRC_DIS(GPIOC_PIN15)) | ||
| 635 | #define VAL_GPIOC_DOUT (PIN_DATA_LOW(GPIOC_PIN0) | \ | ||
| 636 | PIN_DATA_LOW(GPIOC_PIN1) | \ | ||
| 637 | PIN_DATA_LOW(GPIOC_PIN2) | \ | ||
| 638 | PIN_DATA_LOW(GPIOC_PIN3) | \ | ||
| 639 | PIN_DATA_LOW(GPIOC_PIN4) | \ | ||
| 640 | PIN_DATA_LOW(GPIOC_PIN5) | \ | ||
| 641 | PIN_DATA_LOW(GPIOC_PIN6) | \ | ||
| 642 | PIN_DATA_LOW(GPIOC_PIN7) | \ | ||
| 643 | PIN_DATA_LOW(GPIOC_PIN8) | \ | ||
| 644 | PIN_DATA_LOW(GPIOC_PIN9) | \ | ||
| 645 | PIN_DATA_LOW(GPIOC_PIN10) | \ | ||
| 646 | PIN_DATA_LOW(GPIOC_PIN11) | \ | ||
| 647 | PIN_DATA_LOW(GPIOC_PIN12) | \ | ||
| 648 | PIN_DATA_LOW(GPIOC_PIN13) | \ | ||
| 649 | PIN_DATA_LOW(GPIOC_PIN14) | \ | ||
| 650 | PIN_DATA_LOW(GPIOC_PIN15)) | ||
| 651 | |||
| 652 | /* | ||
| 653 | * GPIOD setup: | ||
| 654 | * | ||
| 655 | * PD0 - ADC0 (input pullup). | ||
| 656 | * PD1 - ADC1 (input pullup). | ||
| 657 | * PD2 - ADC2 (input pullup). | ||
| 658 | * PD3 - ADC3 (output). | ||
| 659 | * PD4 - ADC4 (output). | ||
| 660 | * PD5 - ADC5 (output). | ||
| 661 | * PD6 - PIN6 (input pullup). | ||
| 662 | * PD7 - PIN7 (input pullup). | ||
| 663 | * PD8 - PIN8 (input pullup). | ||
| 664 | * PD9 - PIN9 (output). | ||
| 665 | * PD10 - PIN10 (debug output). | ||
| 666 | * PD11 - PIN11 (output). | ||
| 667 | * PD12 - PIN12 (input pullup). | ||
| 668 | * PD13 - PIN13 (input pullup). | ||
| 669 | * PD14 - PIN14 (input pullup). | ||
| 670 | * PD15 - PIN15 (input pullup). | ||
| 671 | */ | ||
| 672 | #define VAL_GPIOD_PMD (PIN_MODE_INPUT(GPIOD_ADC0) | \ | ||
| 673 | PIN_MODE_INPUT(GPIOD_ADC1) | \ | ||
| 674 | PIN_MODE_INPUT(GPIOD_ADC2) | \ | ||
| 675 | PIN_MODE_OUTPUT(GPIOD_ADC3) | \ | ||
| 676 | PIN_MODE_OUTPUT(GPIOD_ADC4) | \ | ||
| 677 | PIN_MODE_OUTPUT(GPIOD_ADC5) | \ | ||
| 678 | PIN_MODE_INPUT(GPIOD_PIN6) | \ | ||
| 679 | PIN_MODE_INPUT(GPIOD_PIN7) | \ | ||
| 680 | PIN_MODE_INPUT(GPIOD_PIN8) | \ | ||
| 681 | PIN_MODE_OUTPUT(GPIOD_PIN9) | \ | ||
| 682 | PIN_MODE_OUTPUT(GPIOD_PIN10) | \ | ||
| 683 | PIN_MODE_OUTPUT(GPIOD_PIN11) | \ | ||
| 684 | PIN_MODE_INPUT(GPIOD_PIN12) | \ | ||
| 685 | PIN_MODE_INPUT(GPIOD_PIN13) | \ | ||
| 686 | PIN_MODE_INPUT(GPIOD_PIN14) | \ | ||
| 687 | PIN_MODE_INPUT(GPIOD_PIN15)) | ||
| 688 | #define VAL_GPIOD_OFFD (PIN_DIGITAL_EN(GPIOD_ADC0) | \ | ||
| 689 | PIN_DIGITAL_EN(GPIOD_ADC1) | \ | ||
| 690 | PIN_DIGITAL_EN(GPIOD_ADC2) | \ | ||
| 691 | PIN_DIGITAL_DIS(GPIOD_ADC3) | \ | ||
| 692 | PIN_DIGITAL_DIS(GPIOD_ADC4) | \ | ||
| 693 | PIN_DIGITAL_DIS(GPIOD_ADC5) | \ | ||
| 694 | PIN_DIGITAL_EN(GPIOD_PIN6) | \ | ||
| 695 | PIN_DIGITAL_EN(GPIOD_PIN7) | \ | ||
| 696 | PIN_DIGITAL_EN(GPIOD_PIN8) | \ | ||
| 697 | PIN_DIGITAL_DIS(GPIOD_PIN9) | \ | ||
| 698 | PIN_DIGITAL_DIS(GPIOD_PIN10) | \ | ||
| 699 | PIN_DIGITAL_DIS(GPIOD_PIN11) | \ | ||
| 700 | PIN_DIGITAL_EN(GPIOD_PIN12) | \ | ||
| 701 | PIN_DIGITAL_EN(GPIOD_PIN13) | \ | ||
| 702 | PIN_DIGITAL_EN(GPIOD_PIN14) | \ | ||
| 703 | PIN_DIGITAL_EN(GPIOD_PIN15)) | ||
| 704 | #define VAL_GPIOD_DMASK (PIN_DMASK_EN(GPIOD_ADC0) | \ | ||
| 705 | PIN_DMASK_EN(GPIOD_ADC1) | \ | ||
| 706 | PIN_DMASK_EN(GPIOD_ADC2) | \ | ||
| 707 | PIN_DMASK_DIS(GPIOD_ADC3) | \ | ||
| 708 | PIN_DMASK_DIS(GPIOD_ADC4) | \ | ||
| 709 | PIN_DMASK_DIS(GPIOD_ADC5) | \ | ||
| 710 | PIN_DMASK_EN(GPIOD_PIN6) | \ | ||
| 711 | PIN_DMASK_EN(GPIOD_PIN7) | \ | ||
| 712 | PIN_DMASK_EN(GPIOD_PIN8) | \ | ||
| 713 | PIN_DMASK_DIS(GPIOD_PIN9) | \ | ||
| 714 | PIN_DMASK_DIS(GPIOD_PIN10) | \ | ||
| 715 | PIN_DMASK_DIS(GPIOD_PIN11) | \ | ||
| 716 | PIN_DMASK_EN(GPIOD_PIN12) | \ | ||
| 717 | PIN_DMASK_EN(GPIOD_PIN13) | \ | ||
| 718 | PIN_DMASK_EN(GPIOD_PIN14) | \ | ||
| 719 | PIN_DMASK_EN(GPIOD_PIN15)) | ||
| 720 | #define VAL_GPIOD_DBEN (PIN_DBNCE_EN(GPIOD_ADC0) | \ | ||
| 721 | PIN_DBNCE_EN(GPIOD_ADC1) | \ | ||
| 722 | PIN_DBNCE_EN(GPIOD_ADC2) | \ | ||
| 723 | PIN_DBNCE_DIS(GPIOD_ADC3) | \ | ||
| 724 | PIN_DBNCE_DIS(GPIOD_ADC4) | \ | ||
| 725 | PIN_DBNCE_DIS(GPIOD_ADC5) | \ | ||
| 726 | PIN_DBNCE_EN(GPIOD_PIN6) | \ | ||
| 727 | PIN_DBNCE_EN(GPIOD_PIN7) | \ | ||
| 728 | PIN_DBNCE_EN(GPIOD_PIN8) | \ | ||
| 729 | PIN_DBNCE_DIS(GPIOD_PIN9) | \ | ||
| 730 | PIN_DBNCE_DIS(GPIOD_PIN10) | \ | ||
| 731 | PIN_DBNCE_DIS(GPIOD_PIN11) | \ | ||
| 732 | PIN_DBNCE_EN(GPIOD_PIN12) | \ | ||
| 733 | PIN_DBNCE_EN(GPIOD_PIN13) | \ | ||
| 734 | PIN_DBNCE_EN(GPIOD_PIN14) | \ | ||
| 735 | PIN_DBNCE_EN(GPIOD_PIN15)) | ||
| 736 | #define VAL_GPIOD_IMD (PIN_IMD_EDGE(GPIOD_ADC0) | \ | ||
| 737 | PIN_IMD_EDGE(GPIOD_ADC1) | \ | ||
| 738 | PIN_IMD_EDGE(GPIOD_ADC2) | \ | ||
| 739 | PIN_IMD_EDGE(GPIOD_ADC3) | \ | ||
| 740 | PIN_IMD_EDGE(GPIOD_ADC4) | \ | ||
| 741 | PIN_IMD_EDGE(GPIOD_ADC5) | \ | ||
| 742 | PIN_IMD_EDGE(GPIOD_PIN6) | \ | ||
| 743 | PIN_IMD_EDGE(GPIOD_PIN7) | \ | ||
| 744 | PIN_IMD_EDGE(GPIOD_PIN8) | \ | ||
| 745 | PIN_IMD_EDGE(GPIOD_PIN9) | \ | ||
| 746 | PIN_IMD_EDGE(GPIOD_PIN10) | \ | ||
| 747 | PIN_IMD_EDGE(GPIOD_PIN11) | \ | ||
| 748 | PIN_IMD_EDGE(GPIOD_PIN12) | \ | ||
| 749 | PIN_IMD_EDGE(GPIOD_PIN13) | \ | ||
| 750 | PIN_IMD_EDGE(GPIOD_PIN14) | \ | ||
| 751 | PIN_IMD_EDGE(GPIOD_PIN15)) | ||
| 752 | #define VAL_GPIOD_IEN (PIN_IEN_FELL_DIS(GPIOD_ADC0) | \ | ||
| 753 | PIN_IEN_FELL_DIS(GPIOD_ADC1) | \ | ||
| 754 | PIN_IEN_FELL_DIS(GPIOD_ADC2) | \ | ||
| 755 | PIN_IEN_FELL_DIS(GPIOD_ADC3) | \ | ||
| 756 | PIN_IEN_FELL_DIS(GPIOD_ADC4) | \ | ||
| 757 | PIN_IEN_FELL_DIS(GPIOD_ADC5) | \ | ||
| 758 | PIN_IEN_FELL_DIS(GPIOD_PIN6) | \ | ||
| 759 | PIN_IEN_FELL_DIS(GPIOD_PIN7) | \ | ||
| 760 | PIN_IEN_FELL_DIS(GPIOD_PIN8) | \ | ||
| 761 | PIN_IEN_FELL_DIS(GPIOD_PIN9) | \ | ||
| 762 | PIN_IEN_FELL_DIS(GPIOD_PIN10) | \ | ||
| 763 | PIN_IEN_FELL_DIS(GPIOD_PIN11) | \ | ||
| 764 | PIN_IEN_FELL_DIS(GPIOD_PIN12) | \ | ||
| 765 | PIN_IEN_FELL_DIS(GPIOD_PIN13) | \ | ||
| 766 | PIN_IEN_FELL_DIS(GPIOD_PIN14) | \ | ||
| 767 | PIN_IEN_FELL_DIS(GPIOD_PIN15)) | ||
| 768 | #define VAL_GPIOD_ISRC (PIN_ISRC_DIS(GPIOD_ADC0) | \ | ||
| 769 | PIN_ISRC_DIS(GPIOD_ADC1) | \ | ||
| 770 | PIN_ISRC_DIS(GPIOD_ADC2) | \ | ||
| 771 | PIN_ISRC_DIS(GPIOD_ADC3) | \ | ||
| 772 | PIN_ISRC_DIS(GPIOD_ADC4) | \ | ||
| 773 | PIN_ISRC_DIS(GPIOD_ADC5) | \ | ||
| 774 | PIN_ISRC_DIS(GPIOD_PIN6) | \ | ||
| 775 | PIN_ISRC_DIS(GPIOD_PIN7) | \ | ||
| 776 | PIN_ISRC_DIS(GPIOD_PIN8) | \ | ||
| 777 | PIN_ISRC_DIS(GPIOD_PIN9) | \ | ||
| 778 | PIN_ISRC_DIS(GPIOD_PIN10) | \ | ||
| 779 | PIN_ISRC_DIS(GPIOD_PIN11) | \ | ||
| 780 | PIN_ISRC_DIS(GPIOD_PIN12) | \ | ||
| 781 | PIN_ISRC_DIS(GPIOD_PIN13) | \ | ||
| 782 | PIN_ISRC_DIS(GPIOD_PIN14) | \ | ||
| 783 | PIN_ISRC_DIS(GPIOD_PIN15)) | ||
| 784 | #define VAL_GPIOD_DOUT (PIN_DATA_LOW(GPIOD_ADC0) | \ | ||
| 785 | PIN_DATA_LOW(GPIOD_ADC1) | \ | ||
| 786 | PIN_DATA_LOW(GPIOD_ADC2) | \ | ||
| 787 | PIN_DATA_LOW(GPIOD_ADC3) | \ | ||
| 788 | PIN_DATA_LOW(GPIOD_ADC4) | \ | ||
| 789 | PIN_DATA_LOW(GPIOD_ADC5) | \ | ||
| 790 | PIN_DATA_LOW(GPIOD_PIN6) | \ | ||
| 791 | PIN_DATA_LOW(GPIOD_PIN7) | \ | ||
| 792 | PIN_DATA_LOW(GPIOD_PIN8) | \ | ||
| 793 | PIN_DATA_LOW(GPIOD_PIN9) | \ | ||
| 794 | PIN_DATA_LOW(GPIOD_PIN10) | \ | ||
| 795 | PIN_DATA_LOW(GPIOD_PIN11) | \ | ||
| 796 | PIN_DATA_LOW(GPIOD_PIN12) | \ | ||
| 797 | PIN_DATA_LOW(GPIOD_PIN13) | \ | ||
| 798 | PIN_DATA_LOW(GPIOD_PIN14) | \ | ||
| 799 | PIN_DATA_LOW(GPIOD_PIN15)) | ||
| 800 | |||
| 801 | /* | ||
| 802 | * GPIOF setup: | ||
| 803 | * | ||
| 804 | * PF0 - OSC_IN (input floating). | ||
| 805 | * PF1 - OSC_OUT (input floating). | ||
| 806 | * PF2 - I2C0_SDA (input pullup). | ||
| 807 | * PF3 - I2C0_SCL (input pullup). | ||
| 808 | * PF4 - PIN4 (input pullup). | ||
| 809 | * PF5 - PIN5 (input pullup). | ||
| 810 | * PF6 - PIN6 (input pullup). | ||
| 811 | * PF7 - PIN7 (input pullup). | ||
| 812 | * PF8 - PIN8 (input pullup). | ||
| 813 | * PF9 - PIN9 (input pullup). | ||
| 814 | * PF10 - PIN10 (input pullup). | ||
| 815 | * PF11 - PIN11 (input pullup). | ||
| 816 | * PF12 - PIN12 (input pullup). | ||
| 817 | * PF13 - PIN13 (input pullup). | ||
| 818 | * PF14 - PIN14 (input pullup). | ||
| 819 | * PF15 - PIN15 (input pullup). | ||
| 820 | */ | ||
| 821 | #define VAL_GPIOF_PMD (PIN_MODE_QUASI(GPIOF_OSC_IN) | \ | ||
| 822 | PIN_MODE_QUASI(GPIOF_OSC_OUT) | \ | ||
| 823 | PIN_MODE_INPUT(GPIOF_I2C0_SDA) | \ | ||
| 824 | PIN_MODE_INPUT(GPIOF_I2C0_SCL) | \ | ||
| 825 | PIN_MODE_INPUT(GPIOF_PIN4) | \ | ||
| 826 | PIN_MODE_INPUT(GPIOF_PIN5) | \ | ||
| 827 | PIN_MODE_INPUT(GPIOF_PIN6) | \ | ||
| 828 | PIN_MODE_INPUT(GPIOF_PIN7) | \ | ||
| 829 | PIN_MODE_INPUT(GPIOF_PIN8) | \ | ||
| 830 | PIN_MODE_INPUT(GPIOF_PIN9) | \ | ||
| 831 | PIN_MODE_INPUT(GPIOF_PIN10) | \ | ||
| 832 | PIN_MODE_INPUT(GPIOF_PIN11) | \ | ||
| 833 | PIN_MODE_INPUT(GPIOF_PIN12) | \ | ||
| 834 | PIN_MODE_INPUT(GPIOF_PIN13) | \ | ||
| 835 | PIN_MODE_INPUT(GPIOF_PIN14) | \ | ||
| 836 | PIN_MODE_INPUT(GPIOF_PIN15)) | ||
| 837 | #define VAL_GPIOF_OFFD (PIN_DIGITAL_DIS(GPIOF_OSC_IN) | \ | ||
| 838 | PIN_DIGITAL_DIS(GPIOF_OSC_OUT) | \ | ||
| 839 | PIN_DIGITAL_EN(GPIOF_I2C0_SDA) | \ | ||
| 840 | PIN_DIGITAL_EN(GPIOF_I2C0_SCL) | \ | ||
| 841 | PIN_DIGITAL_EN(GPIOF_PIN4) | \ | ||
| 842 | PIN_DIGITAL_EN(GPIOF_PIN5) | \ | ||
| 843 | PIN_DIGITAL_EN(GPIOF_PIN6) | \ | ||
| 844 | PIN_DIGITAL_EN(GPIOF_PIN7) | \ | ||
| 845 | PIN_DIGITAL_EN(GPIOF_PIN8) | \ | ||
| 846 | PIN_DIGITAL_EN(GPIOF_PIN9) | \ | ||
| 847 | PIN_DIGITAL_EN(GPIOF_PIN10) | \ | ||
| 848 | PIN_DIGITAL_EN(GPIOF_PIN11) | \ | ||
| 849 | PIN_DIGITAL_EN(GPIOF_PIN12) | \ | ||
| 850 | PIN_DIGITAL_EN(GPIOF_PIN13) | \ | ||
| 851 | PIN_DIGITAL_EN(GPIOF_PIN14) | \ | ||
| 852 | PIN_DIGITAL_EN(GPIOF_PIN15)) | ||
| 853 | #define VAL_GPIOF_DMASK (PIN_DMASK_DIS(GPIOF_OSC_IN) | \ | ||
| 854 | PIN_DMASK_DIS(GPIOF_OSC_OUT) | \ | ||
| 855 | PIN_DMASK_EN(GPIOF_I2C0_SDA) | \ | ||
| 856 | PIN_DMASK_EN(GPIOF_I2C0_SCL) | \ | ||
| 857 | PIN_DMASK_EN(GPIOF_PIN4) | \ | ||
| 858 | PIN_DMASK_EN(GPIOF_PIN5) | \ | ||
| 859 | PIN_DMASK_EN(GPIOF_PIN6) | \ | ||
| 860 | PIN_DMASK_EN(GPIOF_PIN7) | \ | ||
| 861 | PIN_DMASK_EN(GPIOF_PIN8) | \ | ||
| 862 | PIN_DMASK_EN(GPIOF_PIN9) | \ | ||
| 863 | PIN_DMASK_EN(GPIOF_PIN10) | \ | ||
| 864 | PIN_DMASK_EN(GPIOF_PIN11) | \ | ||
| 865 | PIN_DMASK_EN(GPIOF_PIN12) | \ | ||
| 866 | PIN_DMASK_EN(GPIOF_PIN13) | \ | ||
| 867 | PIN_DMASK_EN(GPIOF_PIN14) | \ | ||
| 868 | PIN_DMASK_EN(GPIOF_PIN15)) | ||
| 869 | #define VAL_GPIOF_DBEN (PIN_DBNCE_DIS(GPIOF_OSC_IN) | \ | ||
| 870 | PIN_DBNCE_DIS(GPIOF_OSC_OUT) | \ | ||
| 871 | PIN_DBNCE_EN(GPIOF_I2C0_SDA) | \ | ||
| 872 | PIN_DBNCE_EN(GPIOF_I2C0_SCL) | \ | ||
| 873 | PIN_DBNCE_EN(GPIOF_PIN4) | \ | ||
| 874 | PIN_DBNCE_EN(GPIOF_PIN5) | \ | ||
| 875 | PIN_DBNCE_EN(GPIOF_PIN6) | \ | ||
| 876 | PIN_DBNCE_EN(GPIOF_PIN7) | \ | ||
| 877 | PIN_DBNCE_EN(GPIOF_PIN8) | \ | ||
| 878 | PIN_DBNCE_EN(GPIOF_PIN9) | \ | ||
| 879 | PIN_DBNCE_EN(GPIOF_PIN10) | \ | ||
| 880 | PIN_DBNCE_EN(GPIOF_PIN11) | \ | ||
| 881 | PIN_DBNCE_EN(GPIOF_PIN12) | \ | ||
| 882 | PIN_DBNCE_EN(GPIOF_PIN13) | \ | ||
| 883 | PIN_DBNCE_EN(GPIOF_PIN14) | \ | ||
| 884 | PIN_DBNCE_EN(GPIOF_PIN15)) | ||
| 885 | #define VAL_GPIOF_IMD (PIN_IMD_LVL(GPIOF_OSC_IN) | \ | ||
| 886 | PIN_IMD_LVL(GPIOF_OSC_OUT) | \ | ||
| 887 | PIN_IMD_EDGE(GPIOF_I2C0_SDA) | \ | ||
| 888 | PIN_IMD_EDGE(GPIOF_I2C0_SCL) | \ | ||
| 889 | PIN_IMD_EDGE(GPIOF_PIN4) | \ | ||
| 890 | PIN_IMD_EDGE(GPIOF_PIN5) | \ | ||
| 891 | PIN_IMD_EDGE(GPIOF_PIN6) | \ | ||
| 892 | PIN_IMD_EDGE(GPIOF_PIN7) | \ | ||
| 893 | PIN_IMD_EDGE(GPIOF_PIN8) | \ | ||
| 894 | PIN_IMD_EDGE(GPIOF_PIN9) | \ | ||
| 895 | PIN_IMD_EDGE(GPIOF_PIN10) | \ | ||
| 896 | PIN_IMD_EDGE(GPIOF_PIN11) | \ | ||
| 897 | PIN_IMD_EDGE(GPIOF_PIN12) | \ | ||
| 898 | PIN_IMD_EDGE(GPIOF_PIN13) | \ | ||
| 899 | PIN_IMD_EDGE(GPIOF_PIN14) | \ | ||
| 900 | PIN_IMD_EDGE(GPIOF_PIN15)) | ||
| 901 | #define VAL_GPIOF_IEN (PIN_IEN_FELL_DIS(GPIOF_OSC_IN) | \ | ||
| 902 | PIN_IEN_FELL_DIS(GPIOF_OSC_OUT) | \ | ||
| 903 | PIN_IEN_FELL_DIS(GPIOF_I2C0_SDA) | \ | ||
| 904 | PIN_IEN_FELL_DIS(GPIOF_I2C0_SCL) | \ | ||
| 905 | PIN_IEN_FELL_DIS(GPIOF_PIN4) | \ | ||
| 906 | PIN_IEN_FELL_DIS(GPIOF_PIN5) | \ | ||
| 907 | PIN_IEN_FELL_DIS(GPIOF_PIN6) | \ | ||
| 908 | PIN_IEN_FELL_DIS(GPIOF_PIN7) | \ | ||
| 909 | PIN_IEN_FELL_DIS(GPIOF_PIN8) | \ | ||
| 910 | PIN_IEN_FELL_DIS(GPIOF_PIN9) | \ | ||
| 911 | PIN_IEN_FELL_DIS(GPIOF_PIN10) | \ | ||
| 912 | PIN_IEN_FELL_DIS(GPIOF_PIN11) | \ | ||
| 913 | PIN_IEN_FELL_DIS(GPIOF_PIN12) | \ | ||
| 914 | PIN_IEN_FELL_DIS(GPIOF_PIN13) | \ | ||
| 915 | PIN_IEN_FELL_DIS(GPIOF_PIN14) | \ | ||
| 916 | PIN_IEN_FELL_DIS(GPIOF_PIN15)) | ||
| 917 | #define VAL_GPIOF_ISRC (PIN_ISRC_DIS(GPIOF_OSC_IN) | \ | ||
| 918 | PIN_ISRC_DIS(GPIOF_OSC_OUT) | \ | ||
| 919 | PIN_ISRC_DIS(GPIOF_I2C0_SDA) | \ | ||
| 920 | PIN_ISRC_DIS(GPIOF_I2C0_SCL) | \ | ||
| 921 | PIN_ISRC_DIS(GPIOF_PIN4) | \ | ||
| 922 | PIN_ISRC_DIS(GPIOF_PIN5) | \ | ||
| 923 | PIN_ISRC_DIS(GPIOF_PIN6) | \ | ||
| 924 | PIN_ISRC_DIS(GPIOF_PIN7) | \ | ||
| 925 | PIN_ISRC_DIS(GPIOF_PIN8) | \ | ||
| 926 | PIN_ISRC_DIS(GPIOF_PIN9) | \ | ||
| 927 | PIN_ISRC_DIS(GPIOF_PIN10) | \ | ||
| 928 | PIN_ISRC_DIS(GPIOF_PIN11) | \ | ||
| 929 | PIN_ISRC_DIS(GPIOF_PIN12) | \ | ||
| 930 | PIN_ISRC_DIS(GPIOF_PIN13) | \ | ||
| 931 | PIN_ISRC_DIS(GPIOF_PIN14) | \ | ||
| 932 | PIN_ISRC_DIS(GPIOF_PIN15)) | ||
| 933 | #define VAL_GPIOF_DOUT (PIN_DATA_LOW(GPIOF_OSC_IN) | \ | ||
| 934 | PIN_DATA_LOW(GPIOF_OSC_OUT) | \ | ||
| 935 | PIN_DATA_LOW(GPIOF_I2C0_SDA) | \ | ||
| 936 | PIN_DATA_LOW(GPIOF_I2C0_SCL) | \ | ||
| 937 | PIN_DATA_LOW(GPIOF_PIN4) | \ | ||
| 938 | PIN_DATA_LOW(GPIOF_PIN5) | \ | ||
| 939 | PIN_DATA_LOW(GPIOF_PIN6) | \ | ||
| 940 | PIN_DATA_LOW(GPIOF_PIN7) | \ | ||
| 941 | PIN_DATA_LOW(GPIOF_PIN8) | \ | ||
| 942 | PIN_DATA_LOW(GPIOF_PIN9) | \ | ||
| 943 | PIN_DATA_LOW(GPIOF_PIN10) | \ | ||
| 944 | PIN_DATA_LOW(GPIOF_PIN11) | \ | ||
| 945 | PIN_DATA_LOW(GPIOF_PIN12) | \ | ||
| 946 | PIN_DATA_LOW(GPIOF_PIN13) | \ | ||
| 947 | PIN_DATA_LOW(GPIOF_PIN14) | \ | ||
| 948 | PIN_DATA_LOW(GPIOF_PIN15)) | ||
| 949 | |||
| 950 | |||
| 951 | #if !defined(_FROM_ASM_) | ||
| 952 | #ifdef __cplusplus | ||
| 953 | extern "C" { | ||
| 954 | #endif | ||
| 955 | void boardInit(void); | ||
| 956 | #ifdef __cplusplus | ||
| 957 | } | ||
| 958 | #endif | ||
| 959 | #endif /* _FROM_ASM_ */ | ||
| 960 | |||
| 961 | #endif /* BOARD_H */ | ||
diff --git a/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.mk b/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.mk new file mode 100644 index 000000000..dd9917fc6 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/boards/NUC123SD4AN0/board.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/NUC123SD4AN0/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/NUC123SD4AN0 | ||
diff --git a/keyboards/ducky/one2mini/1861st/chconf.h b/keyboards/ducky/one2mini/1861st/chconf.h new file mode 100644 index 000000000..617be40dd --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/chconf.h | |||
| @@ -0,0 +1,23 @@ | |||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #define CH_CFG_ST_FREQUENCY 10000 | ||
| 20 | #define CH_CFG_ST_TIMEDELTA 0 | ||
| 21 | #define CH_CFG_USE_WAITEXIT TRUE | ||
| 22 | |||
| 23 | #include_next <chconf.h> | ||
diff --git a/keyboards/ducky/one2mini/1861st/config.h b/keyboards/ducky/one2mini/1861st/config.h new file mode 100644 index 000000000..3f5676280 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/config.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 /u/KeepItUnder | ||
| 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 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x0416 | ||
| 24 | #define PRODUCT_ID 0x0123 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER Ducky | ||
| 27 | #define PRODUCT One2mini | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 5 | ||
| 31 | #define MATRIX_COLS 15 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Keyboard Matrix Assignments | ||
| 35 | * | ||
| 36 | * Change this to how you wired your keyboard | ||
| 37 | * COLS: AVR pins used for columns, left to right | ||
| 38 | * ROWS: AVR pins used for rows, top to bottom | ||
| 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | #define MATRIX_ROW_PINS { D11, B4, B5, B6, B7 } | ||
| 44 | #define MATRIX_COL_PINS { B10, B9, C13, C12, C11, C10, C9, C8, A15, A14, A13, D0, D1, D2, B8 } | ||
| 45 | #define DIP_SWITCH_MATRIX_GRID { {0,14}, {1,14}, {2,14}, {3,14} } | ||
| 46 | #define UNUSED_PINS | ||
| 47 | |||
| 48 | /* COL2ROW, ROW2COL*/ | ||
| 49 | #define DIODE_DIRECTION COL2ROW | ||
| 50 | |||
| 51 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 52 | #define DEBOUNCE 5 | ||
| 53 | |||
| 54 | #define FORCE_NKRO | ||
| 55 | |||
| 56 | #define GPIO_INPUT_PIN_DELAY (NUC123_HCLK / 6 / 1000000L) | ||
diff --git a/keyboards/ducky/one2mini/1861st/info.json b/keyboards/ducky/one2mini/1861st/info.json new file mode 100644 index 000000000..f0abe81ed --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/info.json | |||
| @@ -0,0 +1,208 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Ducky One 2 Mini", | ||
| 3 | "width": 14, | ||
| 4 | "height": 5, | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT_all": { | ||
| 7 | "layout": [ | ||
| 8 | { "x": 0, "y": 0, "w": 1, "label": "ESC" }, | ||
| 9 | { "x": 1, "y": 0, "w": 1, "label": "1" }, | ||
| 10 | { "x": 2, "y": 0, "w": 1, "label": "2" }, | ||
| 11 | { "x": 3, "y": 0, "w": 1, "label": "3" }, | ||
| 12 | { "x": 4, "y": 0, "w": 1, "label": "4" }, | ||
| 13 | { "x": 5, "y": 0, "w": 1, "label": "5" }, | ||
| 14 | { "x": 6, "y": 0, "w": 1, "label": "6" }, | ||
| 15 | { "x": 7, "y": 0, "w": 1, "label": "7" }, | ||
| 16 | { "x": 8, "y": 0, "w": 1, "label": "8" }, | ||
| 17 | { "x": 9, "y": 0, "w": 1, "label": "9" }, | ||
| 18 | { "x": 10, "y": 0, "w": 1, "label": "0" }, | ||
| 19 | { "x": 11, "y": 0, "w": 1, "label": "DASH" }, | ||
| 20 | { "x": 12, "y": 0, "w": 1, "label": "EQUALSIGN" }, | ||
| 21 | { "x": 13, "y": 0, "w": 2, "label": "BACKSPACE" }, | ||
| 22 | { "x": 0, "y": 1, "w": 1.5, "label": "TAB" }, | ||
| 23 | { "x": 1.5, "y": 1, "w": 1, "label": "Q" }, | ||
| 24 | { "x": 2.5, "y": 1, "w": 1, "label": "W" }, | ||
| 25 | { "x": 3.5, "y": 1, "w": 1, "label": "E" }, | ||
| 26 | { "x": 4.5, "y": 1, "w": 1, "label": "R" }, | ||
| 27 | { "x": 5.5, "y": 1, "w": 1, "label": "T" }, | ||
| 28 | { "x": 6.5, "y": 1, "w": 1, "label": "Y" }, | ||
| 29 | { "x": 7.5, "y": 1, "w": 1, "label": "U" }, | ||
| 30 | { "x": 8.5, "y": 1, "w": 1, "label": "I" }, | ||
| 31 | { "x": 9.5, "y": 1, "w": 1, "label": "O" }, | ||
| 32 | { "x": 10.5, "y": 1, "w": 1, "label": "P" }, | ||
| 33 | { "x": 11.5, "y": 1, "w": 1, "label": "LBRACKET" }, | ||
| 34 | { "x": 12.5, "y": 1, "w": 1, "label": "RBRACKET" }, | ||
| 35 | { "x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH" }, | ||
| 36 | { "x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK" }, | ||
| 37 | { "x": 1.75, "y": 2, "w": 1, "label": "A" }, | ||
| 38 | { "x": 2.75, "y": 2, "w": 1, "label": "S" }, | ||
| 39 | { "x": 3.75, "y": 2, "w": 1, "label": "D" }, | ||
| 40 | { "x": 4.75, "y": 2, "w": 1, "label": "F" }, | ||
| 41 | { "x": 5.75, "y": 2, "w": 1, "label": "G" }, | ||
| 42 | { "x": 6.75, "y": 2, "w": 1, "label": "H" }, | ||
| 43 | { "x": 7.75, "y": 2, "w": 1, "label": "J" }, | ||
| 44 | { "x": 8.75, "y": 2, "w": 1, "label": "K" }, | ||
| 45 | { "x": 9.75, "y": 2, "w": 1, "label": "L" }, | ||
| 46 | { "x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON" }, | ||
| 47 | { "x": 11.75, "y": 2, "w": 1, "label": "QUOTE" }, | ||
| 48 | { "x": 12.75, "y": 2, "w": 1, "label": "ISOHASH" }, | ||
| 49 | { "x": 13.75, "y": 2, "w": 1.25, "label": "ENTER" }, | ||
| 50 | { "x": 0, "y": 3, "w": 1.25, "label": "LSHIFT" }, | ||
| 51 | { "x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH" }, | ||
| 52 | { "x": 2.25, "y": 3, "w": 1, "label": "Z" }, | ||
| 53 | { "x": 3.25, "y": 3, "w": 1, "label": "X" }, | ||
| 54 | { "x": 4.25, "y": 3, "w": 1, "label": "C" }, | ||
| 55 | { "x": 5.25, "y": 3, "w": 1, "label": "V" }, | ||
| 56 | { "x": 6.25, "y": 3, "w": 1, "label": "B" }, | ||
| 57 | { "x": 7.25, "y": 3, "w": 1, "label": "N" }, | ||
| 58 | { "x": 8.25, "y": 3, "w": 1, "label": "M" }, | ||
| 59 | { "x": 9.25, "y": 3, "w": 1, "label": "COMMA" }, | ||
| 60 | { "x": 10.25, "y": 3, "w": 1, "label": "PERIOD" }, | ||
| 61 | { "x": 11.25, "y": 3, "w": 1, "label": "SLASH" }, | ||
| 62 | { "x": 12.25, "y": 3, "w": 2.25, "label": "RSHIFT" }, | ||
| 63 | { "x": 0, "y": 4, "w": 1.25, "label": "LCTRL" }, | ||
| 64 | { "x": 1.25, "y": 4, "w": 1.25, "label": "LCMD" }, | ||
| 65 | { "x": 2.5, "y": 4, "w": 1.25, "label": "LALT" }, | ||
| 66 | { "x": 3.75, "y": 4, "w": 6.25, "label": "SPACE" }, | ||
| 67 | { "x": 10, "y": 4, "w": 1.25, "label": "RALT" }, | ||
| 68 | { "x": 11.25, "y": 4, "w": 1.25, "label": "RCMD" }, | ||
| 69 | { "x": 12.5, "y": 4, "w": 1.25, "label": "FN" }, | ||
| 70 | { "x": 13.75, "y": 4, "w": 1.25, "label": "RCTRL" } | ||
| 71 | ] | ||
| 72 | }, | ||
| 73 | |||
| 74 | "LAYOUT_ansi": { | ||
| 75 | "layout": [ | ||
| 76 | { "x": 0, "y": 0, "w": 1, "label": "ESC" }, | ||
| 77 | { "x": 1, "y": 0, "w": 1, "label": "1" }, | ||
| 78 | { "x": 2, "y": 0, "w": 1, "label": "2" }, | ||
| 79 | { "x": 3, "y": 0, "w": 1, "label": "3" }, | ||
| 80 | { "x": 4, "y": 0, "w": 1, "label": "4" }, | ||
| 81 | { "x": 5, "y": 0, "w": 1, "label": "5" }, | ||
| 82 | { "x": 6, "y": 0, "w": 1, "label": "6" }, | ||
| 83 | { "x": 7, "y": 0, "w": 1, "label": "7" }, | ||
| 84 | { "x": 8, "y": 0, "w": 1, "label": "8" }, | ||
| 85 | { "x": 9, "y": 0, "w": 1, "label": "9" }, | ||
| 86 | { "x": 10, "y": 0, "w": 1, "label": "0" }, | ||
| 87 | { "x": 11, "y": 0, "w": 1, "label": "DASH" }, | ||
| 88 | { "x": 12, "y": 0, "w": 1, "label": "EQUALSIGN" }, | ||
| 89 | { "x": 13, "y": 0, "w": 2, "label": "BACKSPACE" }, | ||
| 90 | { "x": 0, "y": 1, "w": 1.5, "label": "TAB" }, | ||
| 91 | { "x": 1.5, "y": 1, "w": 1, "label": "Q" }, | ||
| 92 | { "x": 2.5, "y": 1, "w": 1, "label": "W" }, | ||
| 93 | { "x": 3.5, "y": 1, "w": 1, "label": "E" }, | ||
| 94 | { "x": 4.5, "y": 1, "w": 1, "label": "R" }, | ||
| 95 | { "x": 5.5, "y": 1, "w": 1, "label": "T" }, | ||
| 96 | { "x": 6.5, "y": 1, "w": 1, "label": "Y" }, | ||
| 97 | { "x": 7.5, "y": 1, "w": 1, "label": "U" }, | ||
| 98 | { "x": 8.5, "y": 1, "w": 1, "label": "I" }, | ||
| 99 | { "x": 9.5, "y": 1, "w": 1, "label": "O" }, | ||
| 100 | { "x": 10.5, "y": 1, "w": 1, "label": "P" }, | ||
| 101 | { "x": 11.5, "y": 1, "w": 1, "label": "LBRACKET" }, | ||
| 102 | { "x": 12.5, "y": 1, "w": 1, "label": "RBRACKET" }, | ||
| 103 | { "x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH" }, | ||
| 104 | { "x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK" }, | ||
| 105 | { "x": 1.75, "y": 2, "w": 1, "label": "A" }, | ||
| 106 | { "x": 2.75, "y": 2, "w": 1, "label": "S" }, | ||
| 107 | { "x": 3.75, "y": 2, "w": 1, "label": "D" }, | ||
| 108 | { "x": 4.75, "y": 2, "w": 1, "label": "F" }, | ||
| 109 | { "x": 5.75, "y": 2, "w": 1, "label": "G" }, | ||
| 110 | { "x": 6.75, "y": 2, "w": 1, "label": "H" }, | ||
| 111 | { "x": 7.75, "y": 2, "w": 1, "label": "J" }, | ||
| 112 | { "x": 8.75, "y": 2, "w": 1, "label": "K" }, | ||
| 113 | { "x": 9.75, "y": 2, "w": 1, "label": "L" }, | ||
| 114 | { "x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON" }, | ||
| 115 | { "x": 11.75, "y": 2, "w": 1, "label": "QUOTE" }, | ||
| 116 | { "x": 12.75, "y": 2, "w": 1, "label": "ISOHASH" }, | ||
| 117 | { "x": 12.75, "y": 2, "w": 2.25, "label": "ENTER" }, | ||
| 118 | { "x": 0, "y": 3, "w": 2.25, "label": "LSHIFT" }, | ||
| 119 | { "x": 2.25, "y": 3, "w": 1, "label": "Z" }, | ||
| 120 | { "x": 3.25, "y": 3, "w": 1, "label": "X" }, | ||
| 121 | { "x": 4.25, "y": 3, "w": 1, "label": "C" }, | ||
| 122 | { "x": 5.25, "y": 3, "w": 1, "label": "V" }, | ||
| 123 | { "x": 6.25, "y": 3, "w": 1, "label": "B" }, | ||
| 124 | { "x": 7.25, "y": 3, "w": 1, "label": "N" }, | ||
| 125 | { "x": 8.25, "y": 3, "w": 1, "label": "M" }, | ||
| 126 | { "x": 9.25, "y": 3, "w": 1, "label": "COMMA" }, | ||
| 127 | { "x": 10.25, "y": 3, "w": 1, "label": "PERIOD" }, | ||
| 128 | { "x": 11.25, "y": 3, "w": 1, "label": "SLASH" }, | ||
| 129 | { "x": 12.25, "y": 3, "w": 2.75, "label": "RSHIFT" }, | ||
| 130 | { "x": 0, "y": 4, "w": 1.25, "label": "LCTRL" }, | ||
| 131 | { "x": 1.25, "y": 4, "w": 1.25, "label": "LCMD" }, | ||
| 132 | { "x": 2.5, "y": 4, "w": 1.25, "label": "LALT" }, | ||
| 133 | { "x": 3.75, "y": 4, "w": 6.25, "label": "SPACE" }, | ||
| 134 | { "x": 10, "y": 4, "w": 1.25, "label": "RALT" }, | ||
| 135 | { "x": 11.25, "y": 4, "w": 1.25, "label": "RCMD" }, | ||
| 136 | { "x": 12.5, "y": 4, "w": 1.25, "label": "FN" }, | ||
| 137 | { "x": 13.75, "y": 4, "w": 1.25, "label": "RCTRL" } | ||
| 138 | ] | ||
| 139 | }, | ||
| 140 | |||
| 141 | "LAYOUT_iso": { | ||
| 142 | "layout": [ | ||
| 143 | { "x": 0, "y": 0, "w": 1, "label": "ESC" }, | ||
| 144 | { "x": 1, "y": 0, "w": 1, "label": "1" }, | ||
| 145 | { "x": 2, "y": 0, "w": 1, "label": "2" }, | ||
| 146 | { "x": 3, "y": 0, "w": 1, "label": "3" }, | ||
| 147 | { "x": 4, "y": 0, "w": 1, "label": "4" }, | ||
| 148 | { "x": 5, "y": 0, "w": 1, "label": "5" }, | ||
| 149 | { "x": 6, "y": 0, "w": 1, "label": "6" }, | ||
| 150 | { "x": 7, "y": 0, "w": 1, "label": "7" }, | ||
| 151 | { "x": 8, "y": 0, "w": 1, "label": "8" }, | ||
| 152 | { "x": 9, "y": 0, "w": 1, "label": "9" }, | ||
| 153 | { "x": 10, "y": 0, "w": 1, "label": "0" }, | ||
| 154 | { "x": 11, "y": 0, "w": 1, "label": "DASH" }, | ||
| 155 | { "x": 12, "y": 0, "w": 1, "label": "EQUALSIGN" }, | ||
| 156 | { "x": 13, "y": 0, "w": 2, "label": "BACKSPACE" }, | ||
| 157 | { "x": 0, "y": 1, "w": 1.5, "label": "TAB" }, | ||
| 158 | { "x": 1.5, "y": 1, "w": 1, "label": "Q" }, | ||
| 159 | { "x": 2.5, "y": 1, "w": 1, "label": "W" }, | ||
| 160 | { "x": 3.5, "y": 1, "w": 1, "label": "E" }, | ||
| 161 | { "x": 4.5, "y": 1, "w": 1, "label": "R" }, | ||
| 162 | { "x": 5.5, "y": 1, "w": 1, "label": "T" }, | ||
| 163 | { "x": 6.5, "y": 1, "w": 1, "label": "Y" }, | ||
| 164 | { "x": 7.5, "y": 1, "w": 1, "label": "U" }, | ||
| 165 | { "x": 8.5, "y": 1, "w": 1, "label": "I" }, | ||
| 166 | { "x": 9.5, "y": 1, "w": 1, "label": "O" }, | ||
| 167 | { "x": 10.5, "y": 1, "w": 1, "label": "P" }, | ||
| 168 | { "x": 11.5, "y": 1, "w": 1, "label": "LBRACKET" }, | ||
| 169 | { "x": 12.5, "y": 1, "w": 1, "label": "RBRACKET" }, | ||
| 170 | { "x": 13.75, "y": 1, "w": 1.25, "h": 2, "label": "ENTER" }, | ||
| 171 | { "x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK" }, | ||
| 172 | { "x": 1.75, "y": 2, "w": 1, "label": "A" }, | ||
| 173 | { "x": 2.75, "y": 2, "w": 1, "label": "S" }, | ||
| 174 | { "x": 3.75, "y": 2, "w": 1, "label": "D" }, | ||
| 175 | { "x": 4.75, "y": 2, "w": 1, "label": "F" }, | ||
| 176 | { "x": 5.75, "y": 2, "w": 1, "label": "G" }, | ||
| 177 | { "x": 6.75, "y": 2, "w": 1, "label": "H" }, | ||
| 178 | { "x": 7.75, "y": 2, "w": 1, "label": "J" }, | ||
| 179 | { "x": 8.75, "y": 2, "w": 1, "label": "K" }, | ||
| 180 | { "x": 9.75, "y": 2, "w": 1, "label": "L" }, | ||
| 181 | { "x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON" }, | ||
| 182 | { "x": 11.75, "y": 2, "w": 1, "label": "QUOTE" }, | ||
| 183 | { "x": 12.75, "y": 2, "w": 1, "label": "ISOHASH" }, | ||
| 184 | { "x": 0, "y": 3, "w": 1.25, "label": "LSHIFT" }, | ||
| 185 | { "x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH" }, | ||
| 186 | { "x": 2.25, "y": 3, "w": 1, "label": "Z" }, | ||
| 187 | { "x": 3.25, "y": 3, "w": 1, "label": "X" }, | ||
| 188 | { "x": 4.25, "y": 3, "w": 1, "label": "C" }, | ||
| 189 | { "x": 5.25, "y": 3, "w": 1, "label": "V" }, | ||
| 190 | { "x": 6.25, "y": 3, "w": 1, "label": "B" }, | ||
| 191 | { "x": 7.25, "y": 3, "w": 1, "label": "N" }, | ||
| 192 | { "x": 8.25, "y": 3, "w": 1, "label": "M" }, | ||
| 193 | { "x": 9.25, "y": 3, "w": 1, "label": "COMMA" }, | ||
| 194 | { "x": 10.25, "y": 3, "w": 1, "label": "PERIOD" }, | ||
| 195 | { "x": 11.25, "y": 3, "w": 1, "label": "SLASH" }, | ||
| 196 | { "x": 12.25, "y": 3, "w": 2.75, "label": "RSHIFT" }, | ||
| 197 | { "x": 0, "y": 4, "w": 1.25, "label": "LCTRL" }, | ||
| 198 | { "x": 1.25, "y": 4, "w": 1.25, "label": "LCMD" }, | ||
| 199 | { "x": 2.5, "y": 4, "w": 1.25, "label": "LALT" }, | ||
| 200 | { "x": 3.75, "y": 4, "w": 6.25, "label": "SPACE" }, | ||
| 201 | { "x": 10, "y": 4, "w": 1.25, "label": "RALT" }, | ||
| 202 | { "x": 11.25, "y": 4, "w": 1.25, "label": "RCMD" }, | ||
| 203 | { "x": 12.5, "y": 4, "w": 1.25, "label": "FN" }, | ||
| 204 | { "x": 13.75, "y": 4, "w": 1.25, "label": "RCTRL" } | ||
| 205 | ] | ||
| 206 | } | ||
| 207 | } | ||
| 208 | } | ||
diff --git a/keyboards/ducky/one2mini/1861st/mcuconf.h b/keyboards/ducky/one2mini/1861st/mcuconf.h new file mode 100644 index 000000000..12e9d2a82 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/mcuconf.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2020 Alex Lewontin | ||
| 3 | |||
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | you may not use this file except in compliance with the License. | ||
| 6 | You may obtain a copy of the License at | ||
| 7 | |||
| 8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | |||
| 10 | Unless required by applicable law or agreed to in writing, software | ||
| 11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | See the License for the specific language governing permissions and | ||
| 14 | limitations under the License. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _MCUCONF_H_ | ||
| 18 | #define _MCUCONF_H_ | ||
| 19 | |||
| 20 | /* | ||
| 21 | * Board setting | ||
| 22 | * The following settings override the default settings present in | ||
| 23 | * the various device driver implementation headers. | ||
| 24 | * Note that the settings for each driver only have effect if the whole | ||
| 25 | * driver is enabled in halconf.h. | ||
| 26 | * | ||
| 27 | * IRQ priorities: | ||
| 28 | * 3...0 Lowest...Highest. | ||
| 29 | * | ||
| 30 | * DMA priorities: | ||
| 31 | * 5...0 Lowest...Highest. | ||
| 32 | */ | ||
| 33 | |||
| 34 | /* | ||
| 35 | * HAL driver system settings. | ||
| 36 | */ | ||
| 37 | #define NUC123_HSE_ENABLED TRUE | ||
| 38 | #define NUC123_PLL_ENABLED TRUE | ||
| 39 | #define NUC123_PLLSRC NUC123_PLLSRC_HSE | ||
| 40 | #define NUC123_HCLKSRC NUC123_HCLKSRC_PLL | ||
| 41 | #define NUC123_HCLKDIV 2 | ||
| 42 | #define NUC123_PLL_NF 144 | ||
| 43 | #define NUC123_USB_USE_USB0 TRUE | ||
| 44 | #define NUC123_USB_USE_USB1 TRUE | ||
| 45 | |||
| 46 | #define NUC123_SERIAL_USE_UART0 TRUE | ||
| 47 | #define NUC123_SERIAL_CLKSRC NUC123_SERIAL_CLKSRC_HSI | ||
| 48 | |||
| 49 | #define NUC123_MCUCONF | ||
| 50 | |||
| 51 | #endif /* _MCUCONF_H_ */ | ||
diff --git a/keyboards/ducky/one2mini/1861st/readme.md b/keyboards/ducky/one2mini/1861st/readme.md new file mode 100644 index 000000000..bf6b3974a --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/readme.md | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # one2mini | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 60% keyboard featuring per-key RGB LEDs. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Reza Jelveh](https://github.com/fishman) | ||
| 8 | * Hardware Supported: Ducky One 2 Mini RGB / NUC123SD4AN0 / MBI5042GP | ||
| 9 | * Hardware Availability: [Ducky Channel](http://www.duckychannel.com.tw/page-en/One_2_Mini_RGB/) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make ducky/one2mini:default | ||
| 14 | |||
| 15 | 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). | ||
| 16 | |||
| 17 | RGB LEDs are currently disabled until the driver is merged. | ||
| 18 | |||
| 19 | This firmware was tested on the duckyon2mini 1861ST version. To enter the 1861ST bootloader to flash you can boot the keyboard while holding D+L. | ||
| 20 | |||
| 21 | There are then two ways to flash the keyboard: | ||
| 22 | |||
| 23 | pip install --user nuvoton-isp | ||
| 24 | nuvoisp -f ducky_one2mini_default.bin | ||
| 25 | |||
| 26 | Alternatively you can use elfmimi's [nu-isp-cli](https://lib.rs/crates/nu-isp-cli) which is more complete than nuvoisp and allows flashing .hex files as well. | ||
| 27 | |||
| 28 | cargo install nu-isp-cli | ||
| 29 | nu-isp-cli flash ducky_one2mini_default.bin | ||
diff --git a/keyboards/ducky/one2mini/1861st/rules.mk b/keyboards/ducky/one2mini/1861st/rules.mk new file mode 100644 index 000000000..401d38d66 --- /dev/null +++ b/keyboards/ducky/one2mini/1861st/rules.mk | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | MCU_FAMILY = NUMICRO | ||
| 2 | MCU_SERIES = NUC123 | ||
| 3 | |||
| 4 | # linker script to use | ||
| 5 | MCU_LDSCRIPT = NUC123xD4xx0 | ||
| 6 | |||
| 7 | # startup code to use | ||
| 8 | MCU_STARTUP = NUC123 | ||
| 9 | BOARD = NUC123SD4AN0 | ||
| 10 | |||
| 11 | # NUC123 series is Cortex M0 | ||
| 12 | MCU = cortex-m0 | ||
| 13 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 14 | ARMV = 6 | ||
| 15 | |||
| 16 | # Build Options | ||
| 17 | # change yes to no to disable | ||
| 18 | # | ||
| 19 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 20 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 21 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 22 | CONSOLE_ENABLE = no # Console for debug | ||
| 23 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 26 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 27 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 28 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 29 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 31 | AUDIO_ENABLE = no # Audio output | ||
| 32 | DIP_SWITCH_ENABLE = yes | ||
| 33 | |||
| 34 | # Enter lower-power sleep mode when on the ChibiOS idle thread | ||
| 35 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | ||
diff --git a/keyboards/ducky/one2mini/keymaps/ansi/keymap.c b/keyboards/ducky/one2mini/keymaps/ansi/keymap.c new file mode 100644 index 000000000..c6d597f72 --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/ansi/keymap.c | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* Copyright 2019 /u/KeepItUnder | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // LAYERS | ||
| 19 | enum Layer { | ||
| 20 | _QWERTY = 0, // Standard QWERTY layer | ||
| 21 | _FUNCTION, // Function key layer | ||
| 22 | _COLOUR // RGB key layer | ||
| 23 | }; | ||
| 24 | #define _QW _QWERTY | ||
| 25 | #define _FN _FUNCTION | ||
| 26 | #define _CLR _COLOUR | ||
| 27 | |||
| 28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 29 | |||
| 30 | [_QWERTY] = LAYOUT_ansi( | ||
| 31 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 32 | KC_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, | ||
| 33 | 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_NUBS, | ||
| 34 | 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_ENT, | ||
| 35 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 36 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL | ||
| 37 | ), | ||
| 38 | |||
| 39 | [_FUNCTION] = LAYOUT_ansi( | ||
| 40 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 41 | KC_GRV, 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, | ||
| 42 | _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_INS, _______, KC_UP, KC_PAUS, KC_PGUP, KC_HOME, KC_PSCR, _______, | ||
| 43 | _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_SLCK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, _______, KC_ENT, | ||
| 44 | _______, _______, KC_APP, _______, _______, _______, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, | ||
| 45 | _______, KC_APP, MO(_CLR), _______, _______, KC_APP, _______, _______ | ||
| 46 | ), | ||
| 47 | |||
| 48 | [_COLOUR] = LAYOUT_ansi( | ||
| 49 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 50 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 51 | _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 52 | _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 53 | _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, | ||
| 54 | _______, _______, _______, RGB_TOG, _______, _______, _______, _______ | ||
| 55 | ), | ||
| 56 | }; | ||
diff --git a/keyboards/ducky/one2mini/keymaps/ansi/readme.md b/keyboards/ducky/one2mini/keymaps/ansi/readme.md new file mode 100644 index 000000000..e4eb351ae --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/ansi/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default ANSI keymap for one2mini \ No newline at end of file | |||
diff --git a/keyboards/ducky/one2mini/keymaps/default/config.h b/keyboards/ducky/one2mini/keymaps/default/config.h new file mode 100644 index 000000000..b052c604f --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/default/config.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* Copyright 2019 /u/KeepItUnder | ||
| 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 | // place overrides here | ||
| 20 | #define GRAVE_ESC_GUI_OVERRIDE | ||
| 21 | #define MK_3_SPEED | ||
| 22 | #define MK_C_OFFSET_UNMOD 400 /* Cursor offset per movement (unmodified) */ | ||
| 23 | #define MK_C_INTERVAL_UNMOD 5 /* Time between cursor movements (unmodified) */ | ||
| 24 | #define MK_W_OFFSET_UNMOD 100 /* Scroll steps per scroll action (unmodified) */ | ||
| 25 | #define MK_W_INTERVAL_UNMOD 10 /* Time between scroll steps (unmodified) */ | ||
diff --git a/keyboards/ducky/one2mini/keymaps/default/keymap.c b/keyboards/ducky/one2mini/keymaps/default/keymap.c new file mode 100644 index 000000000..573353a76 --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/default/keymap.c | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* Copyright 2019 /u/KeepItUnder | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // LAYERS | ||
| 19 | enum Layer { | ||
| 20 | _QWERTY = 0, // Standard QWERTY layer | ||
| 21 | _FUNCTION, // Function key layer | ||
| 22 | _COLOUR // RGB key layer | ||
| 23 | }; | ||
| 24 | #define _QW _QWERTY | ||
| 25 | #define _FN _FUNCTION | ||
| 26 | #define _CLR _COLOUR | ||
| 27 | |||
| 28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 29 | |||
| 30 | [_QWERTY] = LAYOUT_all( | ||
| 31 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 32 | KC_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, | ||
| 33 | 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, | ||
| 34 | 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_ENT, | ||
| 35 | 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, | ||
| 36 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL | ||
| 37 | ), | ||
| 38 | |||
| 39 | [_FUNCTION] = LAYOUT_all( | ||
| 40 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 41 | KC_GRV, 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, | ||
| 42 | _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_INS, _______, KC_UP, KC_PAUS, KC_PGUP, KC_HOME, KC_PSCR, _______, | ||
| 43 | _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_SLCK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, _______, KC_ENT, | ||
| 44 | _______, _______, _______, KC_APP, _______, _______, _______, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, | ||
| 45 | _______, _______, MO(_CLR), KC_MPLY, _______, KC_APP, _______, _______ | ||
| 46 | ), | ||
| 47 | |||
| 48 | [_COLOUR] = LAYOUT_all( | ||
| 49 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 50 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 51 | _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 52 | _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 53 | _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, | ||
| 54 | _______, _______, _______, RGB_TOG, _______, _______, _______, _______ | ||
| 55 | ), | ||
| 56 | }; | ||
diff --git a/keyboards/ducky/one2mini/keymaps/default/readme.md b/keyboards/ducky/one2mini/keymaps/default/readme.md new file mode 100644 index 000000000..c83b30eef --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for one2mini (ISO & ANSI combined) \ No newline at end of file | |||
diff --git a/keyboards/ducky/one2mini/keymaps/iso/keymap.c b/keyboards/ducky/one2mini/keymaps/iso/keymap.c new file mode 100644 index 000000000..758f45931 --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/iso/keymap.c | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* Copyright 2019 /u/KeepItUnder | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // LAYERS | ||
| 19 | enum Layer { | ||
| 20 | _QWERTY = 0, // Standard QWERTY layer | ||
| 21 | _FUNCTION, // Function key layer | ||
| 22 | _COLOUR // RGB key layer | ||
| 23 | }; | ||
| 24 | #define _QW _QWERTY | ||
| 25 | #define _FN _FUNCTION | ||
| 26 | #define _CLR _COLOUR | ||
| 27 | |||
| 28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 29 | |||
| 30 | [_QWERTY] = LAYOUT_iso( | ||
| 31 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 32 | KC_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, | ||
| 33 | 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, | ||
| 34 | 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_ENT, | ||
| 35 | 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, | ||
| 36 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL | ||
| 37 | ), | ||
| 38 | |||
| 39 | [_FUNCTION] = LAYOUT_iso( | ||
| 40 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 41 | KC_GRV, 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, | ||
| 42 | _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, KC_INS, _______, KC_UP, KC_PAUS, KC_PGUP, KC_HOME, KC_PSCR, | ||
| 43 | _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, KC_SLCK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, _______, KC_ENT, | ||
| 44 | _______, _______, _______, KC_APP, _______, _______, _______, KC_CALC, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, | ||
| 45 | _______, KC_APP, MO(_CLR), _______, _______, KC_APP, _______, _______ | ||
| 46 | ), | ||
| 47 | |||
| 48 | [_COLOUR] = LAYOUT_iso( | ||
| 49 | // 2 3 4 5 6 7 8 9 10 11 12 13 14 | ||
| 50 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 51 | _______, _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, | ||
| 52 | _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 53 | _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, | ||
| 54 | _______, _______, _______, RGB_TOG, _______, _______, _______, _______ | ||
| 55 | ), | ||
| 56 | }; | ||
diff --git a/keyboards/ducky/one2mini/keymaps/iso/readme.md b/keyboards/ducky/one2mini/keymaps/iso/readme.md new file mode 100644 index 000000000..218e0dff0 --- /dev/null +++ b/keyboards/ducky/one2mini/keymaps/iso/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default ISO keymap for one2mini \ No newline at end of file | |||
diff --git a/keyboards/ducky/one2mini/readme.md b/keyboards/ducky/one2mini/readme.md new file mode 100644 index 000000000..d03cb5d7b --- /dev/null +++ b/keyboards/ducky/one2mini/readme.md | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # one2mini | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 60% keyboard featuring per-key RGB LEDs. | ||
| 6 | |||
| 7 | See child directories for compatible boards. | ||
diff --git a/keyboards/ducky/one2mini/rules.mk b/keyboards/ducky/one2mini/rules.mk new file mode 100644 index 000000000..628be832e --- /dev/null +++ b/keyboards/ducky/one2mini/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| DEFAULT_FOLDER = ducky/one2mini/1861st | |||
