diff options
| author | t-miyajima <55669223+dvorak55@users.noreply.github.com> | 2020-08-08 03:27:20 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-07 11:27:20 -0700 |
| commit | 245797f6b998fb4f52df61e38151c80b05615740 (patch) | |
| tree | 2d0f7e18b4ce56837d774b810ab0fe7de9371120 /keyboards/chavdai40 | |
| parent | a260cbbea6a0e41931e2c4a50520215d4da93be7 (diff) | |
| download | qmk_firmware-245797f6b998fb4f52df61e38151c80b05615740.tar.gz qmk_firmware-245797f6b998fb4f52df61e38151c80b05615740.zip | |
[keyboard] Add chavdai40 keyboard (#9820)
* On branch add_chavdai40_keyboard
Changes to be committed:
new file: keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c
new file: keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h
new file: keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk
new file: keyboards/chavdai40/bootloader_defs.h
new file: keyboards/chavdai40/chavdai40.c
new file: keyboards/chavdai40/chavdai40.h
new file: keyboards/chavdai40/chconf.h
new file: keyboards/chavdai40/config.h
new file: keyboards/chavdai40/halconf.h
new file: keyboards/chavdai40/info.json
new file: keyboards/chavdai40/keymaps/42keys-dvorak/config.h
new file: keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c
new file: keyboards/chavdai40/keymaps/42keys-eucalyn/config.h
new file: keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c
new file: keyboards/chavdai40/keymaps/42keys-qwerty/config.h
new file: keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c
new file: keyboards/chavdai40/keymaps/44keys-dvorak/config.h
new file: keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c
new file: keyboards/chavdai40/keymaps/44keys-eucalyn/config.h
new file: keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c
new file: keyboards/chavdai40/keymaps/44keys-qwerty/config.h
new file: keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c
new file: keyboards/chavdai40/keymaps/default/config.h
new file: keyboards/chavdai40/keymaps/default/keymap.c
new file: keyboards/chavdai40/mcuconf.h
new file: keyboards/chavdai40/readme.md
new file: keyboards/chavdai40/rules.mk
* commit suggestions of zvecr and fauxpark, thanks
* commit suggestions of fauxpark, thanks
* commit suggestions of fauxpark, thanks
* commit suggestions of drashna, thanks
Diffstat (limited to 'keyboards/chavdai40')
27 files changed, 3228 insertions, 0 deletions
diff --git a/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c new file mode 100644 index 000000000..2bd2c5e21 --- /dev/null +++ b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c | |||
| @@ -0,0 +1,266 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | ||
| 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 | /* | ||
| 18 | * This file has been automatically generated using ChibiStudio board | ||
| 19 | * generator plugin. Do not edit manually. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include "hal.h" | ||
| 23 | #include "stm32_gpio.h" | ||
| 24 | |||
| 25 | /*===========================================================================*/ | ||
| 26 | /* Driver local definitions. */ | ||
| 27 | /*===========================================================================*/ | ||
| 28 | |||
| 29 | /*===========================================================================*/ | ||
| 30 | /* Driver exported variables. */ | ||
| 31 | /*===========================================================================*/ | ||
| 32 | |||
| 33 | /*===========================================================================*/ | ||
| 34 | /* Driver local variables and types. */ | ||
| 35 | /*===========================================================================*/ | ||
| 36 | |||
| 37 | /** | ||
| 38 | * @brief Type of STM32 GPIO port setup. | ||
| 39 | */ | ||
| 40 | typedef struct { | ||
| 41 | uint32_t moder; | ||
| 42 | uint32_t otyper; | ||
| 43 | uint32_t ospeedr; | ||
| 44 | uint32_t pupdr; | ||
| 45 | uint32_t odr; | ||
| 46 | uint32_t afrl; | ||
| 47 | uint32_t afrh; | ||
| 48 | } gpio_setup_t; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Type of STM32 GPIO initialization data. | ||
| 52 | */ | ||
| 53 | typedef struct { | ||
| 54 | #if STM32_HAS_GPIOA || defined(__DOXYGEN__) | ||
| 55 | gpio_setup_t PAData; | ||
| 56 | #endif | ||
| 57 | #if STM32_HAS_GPIOB || defined(__DOXYGEN__) | ||
| 58 | gpio_setup_t PBData; | ||
| 59 | #endif | ||
| 60 | #if STM32_HAS_GPIOC || defined(__DOXYGEN__) | ||
| 61 | gpio_setup_t PCData; | ||
| 62 | #endif | ||
| 63 | #if STM32_HAS_GPIOD || defined(__DOXYGEN__) | ||
| 64 | gpio_setup_t PDData; | ||
| 65 | #endif | ||
| 66 | #if STM32_HAS_GPIOE || defined(__DOXYGEN__) | ||
| 67 | gpio_setup_t PEData; | ||
| 68 | #endif | ||
| 69 | #if STM32_HAS_GPIOF || defined(__DOXYGEN__) | ||
| 70 | gpio_setup_t PFData; | ||
| 71 | #endif | ||
| 72 | #if STM32_HAS_GPIOG || defined(__DOXYGEN__) | ||
| 73 | gpio_setup_t PGData; | ||
| 74 | #endif | ||
| 75 | #if STM32_HAS_GPIOH || defined(__DOXYGEN__) | ||
| 76 | gpio_setup_t PHData; | ||
| 77 | #endif | ||
| 78 | #if STM32_HAS_GPIOI || defined(__DOXYGEN__) | ||
| 79 | gpio_setup_t PIData; | ||
| 80 | #endif | ||
| 81 | #if STM32_HAS_GPIOJ || defined(__DOXYGEN__) | ||
| 82 | gpio_setup_t PJData; | ||
| 83 | #endif | ||
| 84 | #if STM32_HAS_GPIOK || defined(__DOXYGEN__) | ||
| 85 | gpio_setup_t PKData; | ||
| 86 | #endif | ||
| 87 | } gpio_config_t; | ||
| 88 | |||
| 89 | /** | ||
| 90 | * @brief STM32 GPIO static initialization data. | ||
| 91 | */ | ||
| 92 | static const gpio_config_t gpio_default_config = { | ||
| 93 | #if STM32_HAS_GPIOA | ||
| 94 | {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, | ||
| 95 | VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, | ||
| 96 | #endif | ||
| 97 | #if STM32_HAS_GPIOB | ||
| 98 | {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, | ||
| 99 | VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, | ||
| 100 | #endif | ||
| 101 | #if STM32_HAS_GPIOC | ||
| 102 | {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, | ||
| 103 | VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, | ||
| 104 | #endif | ||
| 105 | #if STM32_HAS_GPIOD | ||
| 106 | {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, | ||
| 107 | VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, | ||
| 108 | #endif | ||
| 109 | #if STM32_HAS_GPIOE | ||
| 110 | {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, | ||
| 111 | VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, | ||
| 112 | #endif | ||
| 113 | #if STM32_HAS_GPIOF | ||
| 114 | {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, | ||
| 115 | VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, | ||
| 116 | #endif | ||
| 117 | #if STM32_HAS_GPIOG | ||
| 118 | {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, | ||
| 119 | VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, | ||
| 120 | #endif | ||
| 121 | #if STM32_HAS_GPIOH | ||
| 122 | {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, | ||
| 123 | VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, | ||
| 124 | #endif | ||
| 125 | #if STM32_HAS_GPIOI | ||
| 126 | {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, | ||
| 127 | VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, | ||
| 128 | #endif | ||
| 129 | #if STM32_HAS_GPIOJ | ||
| 130 | {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, | ||
| 131 | VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, | ||
| 132 | #endif | ||
| 133 | #if STM32_HAS_GPIOK | ||
| 134 | {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, | ||
| 135 | VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} | ||
| 136 | #endif | ||
| 137 | }; | ||
| 138 | |||
| 139 | /*===========================================================================*/ | ||
| 140 | /* Driver local functions. */ | ||
| 141 | /*===========================================================================*/ | ||
| 142 | |||
| 143 | static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { | ||
| 144 | |||
| 145 | gpiop->OTYPER = config->otyper; | ||
| 146 | gpiop->OSPEEDR = config->ospeedr; | ||
| 147 | gpiop->PUPDR = config->pupdr; | ||
| 148 | gpiop->ODR = config->odr; | ||
| 149 | gpiop->AFRL = config->afrl; | ||
| 150 | gpiop->AFRH = config->afrh; | ||
| 151 | gpiop->MODER = config->moder; | ||
| 152 | } | ||
| 153 | |||
| 154 | static void stm32_gpio_init(void) { | ||
| 155 | |||
| 156 | /* Enabling GPIO-related clocks, the mask comes from the | ||
| 157 | registry header file.*/ | ||
| 158 | rccResetAHB(STM32_GPIO_EN_MASK); | ||
| 159 | rccEnableAHB(STM32_GPIO_EN_MASK, true); | ||
| 160 | |||
| 161 | /* Initializing all the defined GPIO ports.*/ | ||
| 162 | #if STM32_HAS_GPIOA | ||
| 163 | gpio_init(GPIOA, &gpio_default_config.PAData); | ||
| 164 | #endif | ||
| 165 | #if STM32_HAS_GPIOB | ||
| 166 | gpio_init(GPIOB, &gpio_default_config.PBData); | ||
| 167 | #endif | ||
| 168 | #if STM32_HAS_GPIOC | ||
| 169 | gpio_init(GPIOC, &gpio_default_config.PCData); | ||
| 170 | #endif | ||
| 171 | #if STM32_HAS_GPIOD | ||
| 172 | gpio_init(GPIOD, &gpio_default_config.PDData); | ||
| 173 | #endif | ||
| 174 | #if STM32_HAS_GPIOE | ||
| 175 | gpio_init(GPIOE, &gpio_default_config.PEData); | ||
| 176 | #endif | ||
| 177 | #if STM32_HAS_GPIOF | ||
| 178 | gpio_init(GPIOF, &gpio_default_config.PFData); | ||
| 179 | #endif | ||
| 180 | #if STM32_HAS_GPIOG | ||
| 181 | gpio_init(GPIOG, &gpio_default_config.PGData); | ||
| 182 | #endif | ||
| 183 | #if STM32_HAS_GPIOH | ||
| 184 | gpio_init(GPIOH, &gpio_default_config.PHData); | ||
| 185 | #endif | ||
| 186 | #if STM32_HAS_GPIOI | ||
| 187 | gpio_init(GPIOI, &gpio_default_config.PIData); | ||
| 188 | #endif | ||
| 189 | #if STM32_HAS_GPIOJ | ||
| 190 | gpio_init(GPIOJ, &gpio_default_config.PJData); | ||
| 191 | #endif | ||
| 192 | #if STM32_HAS_GPIOK | ||
| 193 | gpio_init(GPIOK, &gpio_default_config.PKData); | ||
| 194 | #endif | ||
| 195 | } | ||
| 196 | |||
| 197 | /*===========================================================================*/ | ||
| 198 | /* Driver interrupt handlers. */ | ||
| 199 | /*===========================================================================*/ | ||
| 200 | |||
| 201 | /*===========================================================================*/ | ||
| 202 | /* Driver exported functions. */ | ||
| 203 | /*===========================================================================*/ | ||
| 204 | |||
| 205 | /** | ||
| 206 | * @brief Early initialization code. | ||
| 207 | * @details GPIO ports and system clocks are initialized before everything | ||
| 208 | * else. | ||
| 209 | */ | ||
| 210 | void __early_init(void) { | ||
| 211 | |||
| 212 | stm32_gpio_init(); | ||
| 213 | stm32_clock_init(); | ||
| 214 | } | ||
| 215 | |||
| 216 | #if HAL_USE_SDC || defined(__DOXYGEN__) | ||
| 217 | /** | ||
| 218 | * @brief SDC card detection. | ||
| 219 | */ | ||
| 220 | bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { | ||
| 221 | |||
| 222 | (void)sdcp; | ||
| 223 | /* CHTODO: Fill the implementation.*/ | ||
| 224 | return true; | ||
| 225 | } | ||
| 226 | |||
| 227 | /** | ||
| 228 | * @brief SDC card write protection detection. | ||
| 229 | */ | ||
| 230 | bool sdc_lld_is_write_protected(SDCDriver *sdcp) { | ||
| 231 | |||
| 232 | (void)sdcp; | ||
| 233 | /* CHTODO: Fill the implementation.*/ | ||
| 234 | return false; | ||
| 235 | } | ||
| 236 | #endif /* HAL_USE_SDC */ | ||
| 237 | |||
| 238 | #if HAL_USE_MMC_SPI || defined(__DOXYGEN__) | ||
| 239 | /** | ||
| 240 | * @brief MMC_SPI card detection. | ||
| 241 | */ | ||
| 242 | bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { | ||
| 243 | |||
| 244 | (void)mmcp; | ||
| 245 | /* CHTODO: Fill the implementation.*/ | ||
| 246 | return true; | ||
| 247 | } | ||
| 248 | |||
| 249 | /** | ||
| 250 | * @brief MMC_SPI card write protection detection. | ||
| 251 | */ | ||
| 252 | bool mmc_lld_is_write_protected(MMCDriver *mmcp) { | ||
| 253 | |||
| 254 | (void)mmcp; | ||
| 255 | /* CHTODO: Fill the implementation.*/ | ||
| 256 | return false; | ||
| 257 | } | ||
| 258 | #endif | ||
| 259 | |||
| 260 | /** | ||
| 261 | * @brief Board-specific initialization code. | ||
| 262 | * @note You can add your board-specific code here. | ||
| 263 | */ | ||
| 264 | void boardInit(void) { | ||
| 265 | |||
| 266 | } | ||
diff --git a/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h new file mode 100644 index 000000000..ea8a45029 --- /dev/null +++ b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h | |||
| @@ -0,0 +1,805 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | ||
| 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 | /* | ||
| 18 | * This file has been automatically generated using ChibiStudio board | ||
| 19 | * generator plugin. Do not edit manually. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef BOARD_H | ||
| 23 | #define BOARD_H | ||
| 24 | |||
| 25 | /*===========================================================================*/ | ||
| 26 | /* Driver constants. */ | ||
| 27 | /*===========================================================================*/ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Setup for ST STM32F0-Discovery board. | ||
| 31 | */ | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Board identifier. | ||
| 35 | */ | ||
| 36 | #define BOARD_GENERIC_STM32_F042X6 | ||
| 37 | #define BOARD_NAME "Chavdai40" | ||
| 38 | |||
| 39 | /* | ||
| 40 | * Board oscillators-related settings. | ||
| 41 | * NOTE: LSE not fitted. | ||
| 42 | * NOTE: HSE not fitted. | ||
| 43 | */ | ||
| 44 | #if !defined(STM32_LSECLK) | ||
| 45 | #define STM32_LSECLK 0U | ||
| 46 | #endif | ||
| 47 | |||
| 48 | #define STM32_LSEDRV (3U << 3U) | ||
| 49 | |||
| 50 | #if !defined(STM32_HSECLK) | ||
| 51 | #define STM32_HSECLK 0U | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #define STM32_HSE_BYPASS | ||
| 55 | |||
| 56 | /* | ||
| 57 | * MCU type as defined in the ST header. | ||
| 58 | */ | ||
| 59 | #define STM32F042x6 | ||
| 60 | |||
| 61 | /* | ||
| 62 | * IO pins assignments. | ||
| 63 | */ | ||
| 64 | #define GPIOA_BUTTON 0U | ||
| 65 | #define GPIOA_PIN1 1U | ||
| 66 | #define GPIOA_PIN2 2U | ||
| 67 | #define GPIOA_PIN3 3U | ||
| 68 | #define GPIOA_PIN4 4U | ||
| 69 | #define GPIOA_PIN5 5U | ||
| 70 | #define GPIOA_PIN6 6U | ||
| 71 | #define GPIOA_PIN7 7U | ||
| 72 | #define GPIOA_PIN8 8U | ||
| 73 | #define GPIOA_PIN9 9U | ||
| 74 | #define GPIOA_PIN10 10U | ||
| 75 | #define GPIOA_PIN11 11U | ||
| 76 | #define GPIOA_PIN12 12U | ||
| 77 | #define GPIOA_SWDAT 13U | ||
| 78 | #define GPIOA_SWCLK 14U | ||
| 79 | #define GPIOA_PIN15 15U | ||
| 80 | |||
| 81 | #define GPIOB_PIN0 0U | ||
| 82 | #define GPIOB_PIN1 1U | ||
| 83 | #define GPIOB_PIN2 2U | ||
| 84 | #define GPIOB_PIN3 3U | ||
| 85 | #define GPIOB_PIN4 4U | ||
| 86 | #define GPIOB_PIN5 5U | ||
| 87 | #define GPIOB_PIN6 6U | ||
| 88 | #define GPIOB_PIN7 7U | ||
| 89 | #define GPIOB_PIN8 8U | ||
| 90 | #define GPIOB_PIN9 9U | ||
| 91 | #define GPIOB_PIN10 10U | ||
| 92 | #define GPIOB_PIN11 11U | ||
| 93 | #define GPIOB_PIN12 12U | ||
| 94 | #define GPIOB_PIN13 13U | ||
| 95 | #define GPIOB_PIN14 14U | ||
| 96 | #define GPIOB_PIN15 15U | ||
| 97 | |||
| 98 | #define GPIOC_PIN0 0U | ||
| 99 | #define GPIOC_PIN1 1U | ||
| 100 | #define GPIOC_PIN2 2U | ||
| 101 | #define GPIOC_PIN3 3U | ||
| 102 | #define GPIOC_PIN4 4U | ||
| 103 | #define GPIOC_PIN5 5U | ||
| 104 | #define GPIOC_PIN6 6U | ||
| 105 | #define GPIOC_PIN7 7U | ||
| 106 | #define GPIOC_LED4 8U | ||
| 107 | #define GPIOC_LED3 9U | ||
| 108 | #define GPIOC_PIN10 10U | ||
| 109 | #define GPIOC_PIN11 11U | ||
| 110 | #define GPIOC_PIN12 12U | ||
| 111 | #define GPIOC_PIN13 13U | ||
| 112 | #define GPIOC_OSC32_IN 14U | ||
| 113 | #define GPIOC_OSC32_OUT 15U | ||
| 114 | |||
| 115 | #define GPIOD_PIN0 0U | ||
| 116 | #define GPIOD_PIN1 1U | ||
| 117 | #define GPIOD_PIN2 2U | ||
| 118 | #define GPIOD_PIN3 3U | ||
| 119 | #define GPIOD_PIN4 4U | ||
| 120 | #define GPIOD_PIN5 5U | ||
| 121 | #define GPIOD_PIN6 6U | ||
| 122 | #define GPIOD_PIN7 7U | ||
| 123 | #define GPIOD_PIN8 8U | ||
| 124 | #define GPIOD_PIN9 9U | ||
| 125 | #define GPIOD_PIN10 10U | ||
| 126 | #define GPIOD_PIN11 11U | ||
| 127 | #define GPIOD_PIN12 12U | ||
| 128 | #define GPIOD_PIN13 13U | ||
| 129 | #define GPIOD_PIN14 14U | ||
| 130 | #define GPIOD_PIN15 15U | ||
| 131 | |||
| 132 | // #define GPIOF_OSC_IN 0U | ||
| 133 | // #define GPIOF_OSC_OUT 1U | ||
| 134 | #define GPIOF_I2C1_SDA 0U | ||
| 135 | #define GPIOF_I2C1_SCL 1U | ||
| 136 | #define GPIOF_PIN2 2U | ||
| 137 | #define GPIOF_PIN3 3U | ||
| 138 | #define GPIOF_PIN4 4U | ||
| 139 | #define GPIOF_PIN5 5U | ||
| 140 | #define GPIOF_PIN6 6U | ||
| 141 | #define GPIOF_PIN7 7U | ||
| 142 | #define GPIOF_PIN8 8U | ||
| 143 | #define GPIOF_PIN9 9U | ||
| 144 | #define GPIOF_PIN10 10U | ||
| 145 | #define GPIOF_PIN11 11U | ||
| 146 | #define GPIOF_PIN12 12U | ||
| 147 | #define GPIOF_PIN13 13U | ||
| 148 | #define GPIOF_PIN14 14U | ||
| 149 | #define GPIOF_PIN15 15U | ||
| 150 | |||
| 151 | /* | ||
| 152 | * IO lines assignments. | ||
| 153 | */ | ||
| 154 | #define LINE_BUTTON PAL_LINE(GPIOA, 0U) | ||
| 155 | #define LINE_SWDAT PAL_LINE(GPIOA, 13U) | ||
| 156 | #define LINE_SWCLK PAL_LINE(GPIOA, 14U) | ||
| 157 | #define LINE_LED4 PAL_LINE(GPIOC, 8U) | ||
| 158 | #define LINE_LED3 PAL_LINE(GPIOC, 9U) | ||
| 159 | #define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) | ||
| 160 | #define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) | ||
| 161 | //#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) | ||
| 162 | //#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) | ||
| 163 | #define LINE_I2C1_SDA PAL_LINE(GPIOF, 0U) | ||
| 164 | #define LINE_I2C1_SCL PAL_LINE(GPIOF, 1U) | ||
| 165 | |||
| 166 | /*===========================================================================*/ | ||
| 167 | /* Driver pre-compile time settings. */ | ||
| 168 | /*===========================================================================*/ | ||
| 169 | |||
| 170 | /*===========================================================================*/ | ||
| 171 | /* Derived constants and error checks. */ | ||
| 172 | /*===========================================================================*/ | ||
| 173 | |||
| 174 | /*===========================================================================*/ | ||
| 175 | /* Driver data structures and types. */ | ||
| 176 | /*===========================================================================*/ | ||
| 177 | |||
| 178 | /*===========================================================================*/ | ||
| 179 | /* Driver macros. */ | ||
| 180 | /*===========================================================================*/ | ||
| 181 | |||
| 182 | /* | ||
| 183 | * I/O ports initial setup, this configuration is established soon after reset | ||
| 184 | * in the initialization code. | ||
| 185 | * Please refer to the STM32 Reference Manual for details. | ||
| 186 | */ | ||
| 187 | #define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) | ||
| 188 | #define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) | ||
| 189 | #define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) | ||
| 190 | #define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) | ||
| 191 | #define PIN_ODR_LOW(n) (0U << (n)) | ||
| 192 | #define PIN_ODR_HIGH(n) (1U << (n)) | ||
| 193 | #define PIN_OTYPE_PUSHPULL(n) (0U << (n)) | ||
| 194 | #define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) | ||
| 195 | #define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) | ||
| 196 | #define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) | ||
| 197 | #define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) | ||
| 198 | #define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) | ||
| 199 | #define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) | ||
| 200 | #define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) | ||
| 201 | #define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) | ||
| 202 | #define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) | ||
| 203 | |||
| 204 | /* | ||
| 205 | * GPIOA setup: | ||
| 206 | * | ||
| 207 | * PA0 - BUTTON (input floating). | ||
| 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 - PIN10 (input pullup). | ||
| 218 | * PA11 - PIN11 (input pullup). | ||
| 219 | * PA12 - PIN12 (input pullup). | ||
| 220 | * PA13 - SWDAT (alternate 0). | ||
| 221 | * PA14 - SWCLK (alternate 0). | ||
| 222 | * PA15 - PIN15 (input pullup). | ||
| 223 | */ | ||
| 224 | #define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ | ||
| 225 | PIN_MODE_INPUT(GPIOA_PIN1) | \ | ||
| 226 | PIN_MODE_INPUT(GPIOA_PIN2) | \ | ||
| 227 | PIN_MODE_INPUT(GPIOA_PIN3) | \ | ||
| 228 | PIN_MODE_INPUT(GPIOA_PIN4) | \ | ||
| 229 | PIN_MODE_INPUT(GPIOA_PIN5) | \ | ||
| 230 | PIN_MODE_INPUT(GPIOA_PIN6) | \ | ||
| 231 | PIN_MODE_INPUT(GPIOA_PIN7) | \ | ||
| 232 | PIN_MODE_INPUT(GPIOA_PIN8) | \ | ||
| 233 | PIN_MODE_INPUT(GPIOA_PIN9) | \ | ||
| 234 | PIN_MODE_INPUT(GPIOA_PIN10) | \ | ||
| 235 | PIN_MODE_INPUT(GPIOA_PIN11) | \ | ||
| 236 | PIN_MODE_INPUT(GPIOA_PIN12) | \ | ||
| 237 | PIN_MODE_ALTERNATE(GPIOA_SWDAT) | \ | ||
| 238 | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ | ||
| 239 | PIN_MODE_INPUT(GPIOA_PIN15)) | ||
| 240 | #define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ | ||
| 241 | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ | ||
| 242 | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ | ||
| 243 | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ | ||
| 244 | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ | ||
| 245 | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ | ||
| 246 | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ | ||
| 247 | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ | ||
| 248 | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ | ||
| 249 | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ | ||
| 250 | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ | ||
| 251 | PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \ | ||
| 252 | PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ | ||
| 253 | PIN_OTYPE_PUSHPULL(GPIOA_SWDAT) | \ | ||
| 254 | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ | ||
| 255 | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) | ||
| 256 | #define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ | ||
| 257 | PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ | ||
| 258 | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ | ||
| 259 | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ | ||
| 260 | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ | ||
| 261 | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ | ||
| 262 | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ | ||
| 263 | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ | ||
| 264 | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ | ||
| 265 | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ | ||
| 266 | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ | ||
| 267 | PIN_OSPEED_VERYLOW(GPIOA_PIN11) | \ | ||
| 268 | PIN_OSPEED_VERYLOW(GPIOA_PIN12) | \ | ||
| 269 | PIN_OSPEED_HIGH(GPIOA_SWDAT) | \ | ||
| 270 | PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ | ||
| 271 | PIN_OSPEED_HIGH(GPIOA_PIN15)) | ||
| 272 | #define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ | ||
| 273 | PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ | ||
| 274 | PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ | ||
| 275 | PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ | ||
| 276 | PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ | ||
| 277 | PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ | ||
| 278 | PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ | ||
| 279 | PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ | ||
| 280 | PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ | ||
| 281 | PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ | ||
| 282 | PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ | ||
| 283 | PIN_PUPDR_PULLUP(GPIOA_PIN11) | \ | ||
| 284 | PIN_PUPDR_PULLUP(GPIOA_PIN12) | \ | ||
| 285 | PIN_PUPDR_PULLUP(GPIOA_SWDAT) | \ | ||
| 286 | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ | ||
| 287 | PIN_PUPDR_PULLUP(GPIOA_PIN15)) | ||
| 288 | #define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ | ||
| 289 | PIN_ODR_HIGH(GPIOA_PIN1) | \ | ||
| 290 | PIN_ODR_HIGH(GPIOA_PIN2) | \ | ||
| 291 | PIN_ODR_HIGH(GPIOA_PIN3) | \ | ||
| 292 | PIN_ODR_HIGH(GPIOA_PIN4) | \ | ||
| 293 | PIN_ODR_HIGH(GPIOA_PIN5) | \ | ||
| 294 | PIN_ODR_HIGH(GPIOA_PIN6) | \ | ||
| 295 | PIN_ODR_HIGH(GPIOA_PIN7) | \ | ||
| 296 | PIN_ODR_HIGH(GPIOA_PIN8) | \ | ||
| 297 | PIN_ODR_HIGH(GPIOA_PIN9) | \ | ||
| 298 | PIN_ODR_HIGH(GPIOA_PIN10) | \ | ||
| 299 | PIN_ODR_HIGH(GPIOA_PIN11) | \ | ||
| 300 | PIN_ODR_HIGH(GPIOA_PIN12) | \ | ||
| 301 | PIN_ODR_HIGH(GPIOA_SWDAT) | \ | ||
| 302 | PIN_ODR_HIGH(GPIOA_SWCLK) | \ | ||
| 303 | PIN_ODR_HIGH(GPIOA_PIN15)) | ||
| 304 | #define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ | ||
| 305 | PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ | ||
| 306 | PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ | ||
| 307 | PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ | ||
| 308 | PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ | ||
| 309 | PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ | ||
| 310 | PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ | ||
| 311 | PIN_AFIO_AF(GPIOA_PIN7, 0U)) | ||
| 312 | #define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ | ||
| 313 | PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ | ||
| 314 | PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ | ||
| 315 | PIN_AFIO_AF(GPIOA_PIN11, 0U) | \ | ||
| 316 | PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ | ||
| 317 | PIN_AFIO_AF(GPIOA_SWDAT, 0U) | \ | ||
| 318 | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ | ||
| 319 | PIN_AFIO_AF(GPIOA_PIN15, 0U)) | ||
| 320 | |||
| 321 | /* | ||
| 322 | * GPIOB setup: | ||
| 323 | * | ||
| 324 | * PB0 - PIN0 (input pullup). | ||
| 325 | * PB1 - PIN1 (input pullup). | ||
| 326 | * PB2 - PIN2 (input pullup). | ||
| 327 | * PB3 - PIN3 (input pullup). | ||
| 328 | * PB4 - PIN4 (input pullup). | ||
| 329 | * PB5 - PIN5 (input pullup). | ||
| 330 | * PB6 - PIN6 (input pullup). | ||
| 331 | * PB7 - PIN7 (input pullup). | ||
| 332 | * PB8 - PIN8 (input pullup). | ||
| 333 | * PB9 - PIN9 (input pullup). | ||
| 334 | * PB10 - PIN10 (input pullup). | ||
| 335 | * PB11 - PIN11 (input pullup). | ||
| 336 | * PB12 - PIN12 (input pullup). | ||
| 337 | * PB13 - PIN13 (input pullup). | ||
| 338 | * PB14 - PIN14 (input pullup). | ||
| 339 | * PB15 - PIN15 (input pullup). | ||
| 340 | */ | ||
| 341 | #define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ | ||
| 342 | PIN_MODE_INPUT(GPIOB_PIN1) | \ | ||
| 343 | PIN_MODE_INPUT(GPIOB_PIN2) | \ | ||
| 344 | PIN_MODE_INPUT(GPIOB_PIN3) | \ | ||
| 345 | PIN_MODE_INPUT(GPIOB_PIN4) | \ | ||
| 346 | PIN_MODE_INPUT(GPIOB_PIN5) | \ | ||
| 347 | PIN_MODE_INPUT(GPIOB_PIN6) | \ | ||
| 348 | PIN_MODE_INPUT(GPIOB_PIN7) | \ | ||
| 349 | PIN_MODE_INPUT(GPIOB_PIN8) | \ | ||
| 350 | PIN_MODE_INPUT(GPIOB_PIN9) | \ | ||
| 351 | PIN_MODE_INPUT(GPIOB_PIN10) | \ | ||
| 352 | PIN_MODE_INPUT(GPIOB_PIN11) | \ | ||
| 353 | PIN_MODE_INPUT(GPIOB_PIN12) | \ | ||
| 354 | PIN_MODE_INPUT(GPIOB_PIN13) | \ | ||
| 355 | PIN_MODE_INPUT(GPIOB_PIN14) | \ | ||
| 356 | PIN_MODE_INPUT(GPIOB_PIN15)) | ||
| 357 | #define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ | ||
| 358 | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ | ||
| 359 | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ | ||
| 360 | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ | ||
| 361 | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ | ||
| 362 | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ | ||
| 363 | PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ | ||
| 364 | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ | ||
| 365 | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ | ||
| 366 | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ | ||
| 367 | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ | ||
| 368 | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ | ||
| 369 | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ | ||
| 370 | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ | ||
| 371 | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ | ||
| 372 | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) | ||
| 373 | #define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ | ||
| 374 | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ | ||
| 375 | PIN_OSPEED_HIGH(GPIOB_PIN2) | \ | ||
| 376 | PIN_OSPEED_HIGH(GPIOB_PIN3) | \ | ||
| 377 | PIN_OSPEED_HIGH(GPIOB_PIN4) | \ | ||
| 378 | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ | ||
| 379 | PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ | ||
| 380 | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ | ||
| 381 | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ | ||
| 382 | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ | ||
| 383 | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ | ||
| 384 | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ | ||
| 385 | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ | ||
| 386 | PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ | ||
| 387 | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ | ||
| 388 | PIN_OSPEED_VERYLOW(GPIOB_PIN15)) | ||
| 389 | #define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ | ||
| 390 | PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ | ||
| 391 | PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ | ||
| 392 | PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ | ||
| 393 | PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ | ||
| 394 | PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ | ||
| 395 | PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ | ||
| 396 | PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ | ||
| 397 | PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ | ||
| 398 | PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ | ||
| 399 | PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ | ||
| 400 | PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ | ||
| 401 | PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ | ||
| 402 | PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ | ||
| 403 | PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ | ||
| 404 | PIN_PUPDR_PULLUP(GPIOB_PIN15)) | ||
| 405 | #define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ | ||
| 406 | PIN_ODR_HIGH(GPIOB_PIN1) | \ | ||
| 407 | PIN_ODR_HIGH(GPIOB_PIN2) | \ | ||
| 408 | PIN_ODR_HIGH(GPIOB_PIN3) | \ | ||
| 409 | PIN_ODR_HIGH(GPIOB_PIN4) | \ | ||
| 410 | PIN_ODR_HIGH(GPIOB_PIN5) | \ | ||
| 411 | PIN_ODR_HIGH(GPIOB_PIN6) | \ | ||
| 412 | PIN_ODR_HIGH(GPIOB_PIN7) | \ | ||
| 413 | PIN_ODR_HIGH(GPIOB_PIN8) | \ | ||
| 414 | PIN_ODR_HIGH(GPIOB_PIN9) | \ | ||
| 415 | PIN_ODR_HIGH(GPIOB_PIN10) | \ | ||
| 416 | PIN_ODR_HIGH(GPIOB_PIN11) | \ | ||
| 417 | PIN_ODR_HIGH(GPIOB_PIN12) | \ | ||
| 418 | PIN_ODR_HIGH(GPIOB_PIN13) | \ | ||
| 419 | PIN_ODR_HIGH(GPIOB_PIN14) | \ | ||
| 420 | PIN_ODR_HIGH(GPIOB_PIN15)) | ||
| 421 | #define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ | ||
| 422 | PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ | ||
| 423 | PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ | ||
| 424 | PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ | ||
| 425 | PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ | ||
| 426 | PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ | ||
| 427 | PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ | ||
| 428 | PIN_AFIO_AF(GPIOB_PIN7, 0U)) | ||
| 429 | #define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ | ||
| 430 | PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ | ||
| 431 | PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ | ||
| 432 | PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ | ||
| 433 | PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ | ||
| 434 | PIN_AFIO_AF(GPIOB_PIN13, 0U) | \ | ||
| 435 | PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ | ||
| 436 | PIN_AFIO_AF(GPIOB_PIN15, 0U)) | ||
| 437 | |||
| 438 | /* | ||
| 439 | * GPIOC setup: | ||
| 440 | * | ||
| 441 | * PC0 - PIN0 (input pullup). | ||
| 442 | * PC1 - PIN1 (input pullup). | ||
| 443 | * PC2 - PIN2 (input pullup). | ||
| 444 | * PC3 - PIN3 (input pullup). | ||
| 445 | * PC4 - PIN4 (input pullup). | ||
| 446 | * PC5 - PIN5 (input pullup). | ||
| 447 | * PC6 - PIN6 (input pullup). | ||
| 448 | * PC7 - PIN7 (input pullup). | ||
| 449 | * PC8 - LED4 (output pushpull maximum). | ||
| 450 | * PC9 - LED3 (output pushpull maximum). | ||
| 451 | * PC10 - PIN10 (input pullup). | ||
| 452 | * PC11 - PIN11 (input pullup). | ||
| 453 | * PC12 - PIN12 (input pullup). | ||
| 454 | * PC13 - PIN13 (input pullup). | ||
| 455 | * PC14 - OSC32_IN (input floating). | ||
| 456 | * PC15 - OSC32_OUT (input floating). | ||
| 457 | */ | ||
| 458 | #define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ | ||
| 459 | PIN_MODE_INPUT(GPIOC_PIN1) | \ | ||
| 460 | PIN_MODE_INPUT(GPIOC_PIN2) | \ | ||
| 461 | PIN_MODE_INPUT(GPIOC_PIN3) | \ | ||
| 462 | PIN_MODE_INPUT(GPIOC_PIN4) | \ | ||
| 463 | PIN_MODE_INPUT(GPIOC_PIN5) | \ | ||
| 464 | PIN_MODE_INPUT(GPIOC_PIN6) | \ | ||
| 465 | PIN_MODE_INPUT(GPIOC_PIN7) | \ | ||
| 466 | PIN_MODE_OUTPUT(GPIOC_LED4) | \ | ||
| 467 | PIN_MODE_OUTPUT(GPIOC_LED3) | \ | ||
| 468 | PIN_MODE_INPUT(GPIOC_PIN10) | \ | ||
| 469 | PIN_MODE_INPUT(GPIOC_PIN11) | \ | ||
| 470 | PIN_MODE_INPUT(GPIOC_PIN12) | \ | ||
| 471 | PIN_MODE_INPUT(GPIOC_PIN13) | \ | ||
| 472 | PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ | ||
| 473 | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) | ||
| 474 | #define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ | ||
| 475 | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ | ||
| 476 | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ | ||
| 477 | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ | ||
| 478 | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ | ||
| 479 | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ | ||
| 480 | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ | ||
| 481 | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ | ||
| 482 | PIN_OTYPE_PUSHPULL(GPIOC_LED4) | \ | ||
| 483 | PIN_OTYPE_PUSHPULL(GPIOC_LED3) | \ | ||
| 484 | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ | ||
| 485 | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ | ||
| 486 | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ | ||
| 487 | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ | ||
| 488 | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ | ||
| 489 | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) | ||
| 490 | #define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ | ||
| 491 | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ | ||
| 492 | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ | ||
| 493 | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ | ||
| 494 | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ | ||
| 495 | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ | ||
| 496 | PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ | ||
| 497 | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ | ||
| 498 | PIN_OSPEED_HIGH(GPIOC_LED4) | \ | ||
| 499 | PIN_OSPEED_HIGH(GPIOC_LED3) | \ | ||
| 500 | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ | ||
| 501 | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ | ||
| 502 | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ | ||
| 503 | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ | ||
| 504 | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ | ||
| 505 | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) | ||
| 506 | #define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ | ||
| 507 | PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ | ||
| 508 | PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ | ||
| 509 | PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ | ||
| 510 | PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ | ||
| 511 | PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ | ||
| 512 | PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ | ||
| 513 | PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ | ||
| 514 | PIN_PUPDR_FLOATING(GPIOC_LED4) | \ | ||
| 515 | PIN_PUPDR_FLOATING(GPIOC_LED3) | \ | ||
| 516 | PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ | ||
| 517 | PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ | ||
| 518 | PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ | ||
| 519 | PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ | ||
| 520 | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ | ||
| 521 | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) | ||
| 522 | #define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ | ||
| 523 | PIN_ODR_HIGH(GPIOC_PIN1) | \ | ||
| 524 | PIN_ODR_HIGH(GPIOC_PIN2) | \ | ||
| 525 | PIN_ODR_HIGH(GPIOC_PIN3) | \ | ||
| 526 | PIN_ODR_HIGH(GPIOC_PIN4) | \ | ||
| 527 | PIN_ODR_HIGH(GPIOC_PIN5) | \ | ||
| 528 | PIN_ODR_HIGH(GPIOC_PIN6) | \ | ||
| 529 | PIN_ODR_HIGH(GPIOC_PIN7) | \ | ||
| 530 | PIN_ODR_LOW(GPIOC_LED4) | \ | ||
| 531 | PIN_ODR_LOW(GPIOC_LED3) | \ | ||
| 532 | PIN_ODR_HIGH(GPIOC_PIN10) | \ | ||
| 533 | PIN_ODR_HIGH(GPIOC_PIN11) | \ | ||
| 534 | PIN_ODR_HIGH(GPIOC_PIN12) | \ | ||
| 535 | PIN_ODR_HIGH(GPIOC_PIN13) | \ | ||
| 536 | PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ | ||
| 537 | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) | ||
| 538 | #define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0U) | \ | ||
| 539 | PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ | ||
| 540 | PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ | ||
| 541 | PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ | ||
| 542 | PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ | ||
| 543 | PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ | ||
| 544 | PIN_AFIO_AF(GPIOC_PIN6, 0U) | \ | ||
| 545 | PIN_AFIO_AF(GPIOC_PIN7, 0U)) | ||
| 546 | #define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED4, 0U) | \ | ||
| 547 | PIN_AFIO_AF(GPIOC_LED3, 0U) | \ | ||
| 548 | PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ | ||
| 549 | PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ | ||
| 550 | PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ | ||
| 551 | PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ | ||
| 552 | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ | ||
| 553 | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) | ||
| 554 | |||
| 555 | /* | ||
| 556 | * GPIOD setup: | ||
| 557 | * | ||
| 558 | * PD0 - PIN0 (input pullup). | ||
| 559 | * PD1 - PIN1 (input pullup). | ||
| 560 | * PD2 - PIN2 (input pullup). | ||
| 561 | * PD3 - PIN3 (input pullup). | ||
| 562 | * PD4 - PIN4 (input pullup). | ||
| 563 | * PD5 - PIN5 (input pullup). | ||
| 564 | * PD6 - PIN6 (input pullup). | ||
| 565 | * PD7 - PIN7 (input pullup). | ||
| 566 | * PD8 - PIN8 (input pullup). | ||
| 567 | * PD9 - PIN9 (input pullup). | ||
| 568 | * PD10 - PIN10 (input pullup). | ||
| 569 | * PD11 - PIN11 (input pullup). | ||
| 570 | * PD12 - PIN12 (input pullup). | ||
| 571 | * PD13 - PIN13 (input pullup). | ||
| 572 | * PD14 - PIN14 (input pullup). | ||
| 573 | * PD15 - PIN15 (input pullup). | ||
| 574 | */ | ||
| 575 | #define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ | ||
| 576 | PIN_MODE_INPUT(GPIOD_PIN1) | \ | ||
| 577 | PIN_MODE_INPUT(GPIOD_PIN2) | \ | ||
| 578 | PIN_MODE_INPUT(GPIOD_PIN3) | \ | ||
| 579 | PIN_MODE_INPUT(GPIOD_PIN4) | \ | ||
| 580 | PIN_MODE_INPUT(GPIOD_PIN5) | \ | ||
| 581 | PIN_MODE_INPUT(GPIOD_PIN6) | \ | ||
| 582 | PIN_MODE_INPUT(GPIOD_PIN7) | \ | ||
| 583 | PIN_MODE_INPUT(GPIOD_PIN8) | \ | ||
| 584 | PIN_MODE_INPUT(GPIOD_PIN9) | \ | ||
| 585 | PIN_MODE_INPUT(GPIOD_PIN10) | \ | ||
| 586 | PIN_MODE_INPUT(GPIOD_PIN11) | \ | ||
| 587 | PIN_MODE_INPUT(GPIOD_PIN12) | \ | ||
| 588 | PIN_MODE_INPUT(GPIOD_PIN13) | \ | ||
| 589 | PIN_MODE_INPUT(GPIOD_PIN14) | \ | ||
| 590 | PIN_MODE_INPUT(GPIOD_PIN15)) | ||
| 591 | #define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ | ||
| 592 | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ | ||
| 593 | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ | ||
| 594 | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ | ||
| 595 | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ | ||
| 596 | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ | ||
| 597 | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ | ||
| 598 | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ | ||
| 599 | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ | ||
| 600 | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ | ||
| 601 | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ | ||
| 602 | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ | ||
| 603 | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ | ||
| 604 | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ | ||
| 605 | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ | ||
| 606 | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) | ||
| 607 | #define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ | ||
| 608 | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ | ||
| 609 | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ | ||
| 610 | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ | ||
| 611 | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ | ||
| 612 | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ | ||
| 613 | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ | ||
| 614 | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ | ||
| 615 | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ | ||
| 616 | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ | ||
| 617 | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ | ||
| 618 | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ | ||
| 619 | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ | ||
| 620 | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ | ||
| 621 | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ | ||
| 622 | PIN_OSPEED_VERYLOW(GPIOD_PIN15)) | ||
| 623 | #define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ | ||
| 624 | PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ | ||
| 625 | PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ | ||
| 626 | PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ | ||
| 627 | PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ | ||
| 628 | PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ | ||
| 629 | PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ | ||
| 630 | PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ | ||
| 631 | PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ | ||
| 632 | PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ | ||
| 633 | PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ | ||
| 634 | PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ | ||
| 635 | PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ | ||
| 636 | PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ | ||
| 637 | PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ | ||
| 638 | PIN_PUPDR_PULLUP(GPIOD_PIN15)) | ||
| 639 | #define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ | ||
| 640 | PIN_ODR_HIGH(GPIOD_PIN1) | \ | ||
| 641 | PIN_ODR_HIGH(GPIOD_PIN2) | \ | ||
| 642 | PIN_ODR_HIGH(GPIOD_PIN3) | \ | ||
| 643 | PIN_ODR_HIGH(GPIOD_PIN4) | \ | ||
| 644 | PIN_ODR_HIGH(GPIOD_PIN5) | \ | ||
| 645 | PIN_ODR_HIGH(GPIOD_PIN6) | \ | ||
| 646 | PIN_ODR_HIGH(GPIOD_PIN7) | \ | ||
| 647 | PIN_ODR_HIGH(GPIOD_PIN8) | \ | ||
| 648 | PIN_ODR_HIGH(GPIOD_PIN9) | \ | ||
| 649 | PIN_ODR_HIGH(GPIOD_PIN10) | \ | ||
| 650 | PIN_ODR_HIGH(GPIOD_PIN11) | \ | ||
| 651 | PIN_ODR_HIGH(GPIOD_PIN12) | \ | ||
| 652 | PIN_ODR_HIGH(GPIOD_PIN13) | \ | ||
| 653 | PIN_ODR_HIGH(GPIOD_PIN14) | \ | ||
| 654 | PIN_ODR_HIGH(GPIOD_PIN15)) | ||
| 655 | #define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ | ||
| 656 | PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ | ||
| 657 | PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ | ||
| 658 | PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ | ||
| 659 | PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ | ||
| 660 | PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ | ||
| 661 | PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ | ||
| 662 | PIN_AFIO_AF(GPIOD_PIN7, 0U)) | ||
| 663 | #define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ | ||
| 664 | PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ | ||
| 665 | PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ | ||
| 666 | PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ | ||
| 667 | PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ | ||
| 668 | PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ | ||
| 669 | PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ | ||
| 670 | PIN_AFIO_AF(GPIOD_PIN15, 0U)) | ||
| 671 | |||
| 672 | /* | ||
| 673 | * GPIOF setup: | ||
| 674 | * | ||
| 675 | ******** PF0 - OSC_IN (input floating). | ||
| 676 | ******** PF1 - OSC_OUT (input floating). | ||
| 677 | * PF0 - I2C1_SDA (alternate 0). | ||
| 678 | * PF1 - I2C1_SCL (alternate 0). | ||
| 679 | * PF2 - PIN2 (input pullup). | ||
| 680 | * PF3 - PIN3 (input pullup). | ||
| 681 | * PF4 - PIN4 (input pullup). | ||
| 682 | * PF5 - PIN5 (input pullup). | ||
| 683 | * PF6 - PIN6 (input pullup). | ||
| 684 | * PF7 - PIN7 (input pullup). | ||
| 685 | * PF8 - PIN8 (input pullup). | ||
| 686 | * PF9 - PIN9 (input pullup). | ||
| 687 | * PF10 - PIN10 (input pullup). | ||
| 688 | * PF11 - PIN11 (input pullup). | ||
| 689 | * PF12 - PIN12 (input pullup). | ||
| 690 | * PF13 - PIN13 (input pullup). | ||
| 691 | * PF14 - PIN14 (input pullup). | ||
| 692 | * PF15 - PIN15 (input pullup). | ||
| 693 | */ | ||
| 694 | #define VAL_GPIOF_MODER (PIN_MODE_ALTERNATE(GPIOF_I2C1_SDA) | \ | ||
| 695 | PIN_MODE_ALTERNATE(GPIOF_I2C1_SCL) | \ | ||
| 696 | PIN_MODE_INPUT(GPIOF_PIN2) | \ | ||
| 697 | PIN_MODE_INPUT(GPIOF_PIN3) | \ | ||
| 698 | PIN_MODE_INPUT(GPIOF_PIN4) | \ | ||
| 699 | PIN_MODE_INPUT(GPIOF_PIN5) | \ | ||
| 700 | PIN_MODE_INPUT(GPIOF_PIN6) | \ | ||
| 701 | PIN_MODE_INPUT(GPIOF_PIN7) | \ | ||
| 702 | PIN_MODE_INPUT(GPIOF_PIN8) | \ | ||
| 703 | PIN_MODE_INPUT(GPIOF_PIN9) | \ | ||
| 704 | PIN_MODE_INPUT(GPIOF_PIN10) | \ | ||
| 705 | PIN_MODE_INPUT(GPIOF_PIN11) | \ | ||
| 706 | PIN_MODE_INPUT(GPIOF_PIN12) | \ | ||
| 707 | PIN_MODE_INPUT(GPIOF_PIN13) | \ | ||
| 708 | PIN_MODE_INPUT(GPIOF_PIN14) | \ | ||
| 709 | PIN_MODE_INPUT(GPIOF_PIN15)) | ||
| 710 | #define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C1_SDA) | \ | ||
| 711 | PIN_OTYPE_PUSHPULL(GPIOF_I2C1_SCL) | \ | ||
| 712 | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ | ||
| 713 | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ | ||
| 714 | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ | ||
| 715 | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ | ||
| 716 | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ | ||
| 717 | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ | ||
| 718 | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ | ||
| 719 | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ | ||
| 720 | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ | ||
| 721 | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ | ||
| 722 | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ | ||
| 723 | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ | ||
| 724 | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ | ||
| 725 | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) | ||
| 726 | #define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C1_SDA) | \ | ||
| 727 | PIN_OSPEED_HIGH(GPIOF_I2C1_SCL) | \ | ||
| 728 | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ | ||
| 729 | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ | ||
| 730 | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ | ||
| 731 | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ | ||
| 732 | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ | ||
| 733 | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ | ||
| 734 | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ | ||
| 735 | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ | ||
| 736 | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ | ||
| 737 | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ | ||
| 738 | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ | ||
| 739 | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ | ||
| 740 | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ | ||
| 741 | PIN_OSPEED_VERYLOW(GPIOF_PIN15)) | ||
| 742 | #define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_I2C1_SDA) | \ | ||
| 743 | PIN_PUPDR_PULLUP(GPIOF_I2C1_SCL) | \ | ||
| 744 | PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ | ||
| 745 | PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ | ||
| 746 | PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ | ||
| 747 | PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ | ||
| 748 | PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ | ||
| 749 | PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ | ||
| 750 | PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ | ||
| 751 | PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ | ||
| 752 | PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ | ||
| 753 | PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ | ||
| 754 | PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ | ||
| 755 | PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ | ||
| 756 | PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ | ||
| 757 | PIN_PUPDR_PULLUP(GPIOF_PIN15)) | ||
| 758 | #define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C1_SDA) | \ | ||
| 759 | PIN_ODR_HIGH(GPIOF_I2C1_SCL) | \ | ||
| 760 | PIN_ODR_HIGH(GPIOF_PIN2) | \ | ||
| 761 | PIN_ODR_HIGH(GPIOF_PIN3) | \ | ||
| 762 | PIN_ODR_HIGH(GPIOF_PIN4) | \ | ||
| 763 | PIN_ODR_HIGH(GPIOF_PIN5) | \ | ||
| 764 | PIN_ODR_HIGH(GPIOF_PIN6) | \ | ||
| 765 | PIN_ODR_HIGH(GPIOF_PIN7) | \ | ||
| 766 | PIN_ODR_HIGH(GPIOF_PIN8) | \ | ||
| 767 | PIN_ODR_HIGH(GPIOF_PIN9) | \ | ||
| 768 | PIN_ODR_HIGH(GPIOF_PIN10) | \ | ||
| 769 | PIN_ODR_HIGH(GPIOF_PIN11) | \ | ||
| 770 | PIN_ODR_HIGH(GPIOF_PIN12) | \ | ||
| 771 | PIN_ODR_HIGH(GPIOF_PIN13) | \ | ||
| 772 | PIN_ODR_HIGH(GPIOF_PIN14) | \ | ||
| 773 | PIN_ODR_HIGH(GPIOF_PIN15)) | ||
| 774 | #define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C1_SDA, 0U) | \ | ||
| 775 | PIN_AFIO_AF(GPIOF_I2C1_SCL, 0U) | \ | ||
| 776 | PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ | ||
| 777 | PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ | ||
| 778 | PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ | ||
| 779 | PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ | ||
| 780 | PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ | ||
| 781 | PIN_AFIO_AF(GPIOF_PIN7, 0U)) | ||
| 782 | #define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ | ||
| 783 | PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ | ||
| 784 | PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ | ||
| 785 | PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ | ||
| 786 | PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ | ||
| 787 | PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ | ||
| 788 | PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ | ||
| 789 | PIN_AFIO_AF(GPIOF_PIN15, 0U)) | ||
| 790 | |||
| 791 | /*===========================================================================*/ | ||
| 792 | /* External declarations. */ | ||
| 793 | /*===========================================================================*/ | ||
| 794 | |||
| 795 | #if !defined(_FROM_ASM_) | ||
| 796 | #ifdef __cplusplus | ||
| 797 | extern "C" { | ||
| 798 | #endif | ||
| 799 | void boardInit(void); | ||
| 800 | #ifdef __cplusplus | ||
| 801 | } | ||
| 802 | #endif | ||
| 803 | #endif /* _FROM_ASM_ */ | ||
| 804 | |||
| 805 | #endif /* BOARD_H */ | ||
diff --git a/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk new file mode 100644 index 000000000..3fff4fbbf --- /dev/null +++ b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | # List of all the board related files. | ||
| 2 | BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c | ||
| 3 | |||
| 4 | # Required include directories | ||
| 5 | BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 | ||
| 6 | |||
| 7 | # Shared variables | ||
| 8 | ALLCSRC += $(BOARDSRC) | ||
| 9 | ALLINC += $(BOARDINC) | ||
diff --git a/keyboards/chavdai40/bootloader_defs.h b/keyboards/chavdai40/bootloader_defs.h new file mode 100644 index 000000000..4994be9c2 --- /dev/null +++ b/keyboards/chavdai40/bootloader_defs.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | /* Address for jumping to bootloader on STM32 chips. */ | ||
| 2 | /* It is chip dependent, the correct number can be looked up here: | ||
| 3 | * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf | ||
| 4 | * This also requires a patch to chibios: | ||
| 5 | * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch | ||
| 6 | */ | ||
| 7 | #define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file | ||
diff --git a/keyboards/chavdai40/chavdai40.c b/keyboards/chavdai40/chavdai40.c new file mode 100644 index 000000000..6101732e2 --- /dev/null +++ b/keyboards/chavdai40/chavdai40.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 "chavdai40.h" | ||
diff --git a/keyboards/chavdai40/chavdai40.h b/keyboards/chavdai40/chavdai40.h new file mode 100644 index 000000000..a10f695c7 --- /dev/null +++ b/keyboards/chavdai40/chavdai40.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #define XXX KC_NO | ||
| 21 | |||
| 22 | #include "quantum.h" | ||
| 23 | |||
| 24 | // This a shortcut to help you visually see your layout. | ||
| 25 | |||
| 26 | #define LAYOUT_44key( \ | ||
| 27 | k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ | ||
| 28 | k14 , k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25 , \ | ||
| 29 | k26 , k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, \ | ||
| 30 | k38, k39, k40, k41, k42, k43, k44 \ | ||
| 31 | ) { \ | ||
| 32 | { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13 }, \ | ||
| 33 | { k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, XXX }, \ | ||
| 34 | { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ | ||
| 35 | { k38, k39, XXX, k40, XXX, k41, XXX, XXX, k42, k43, k44, XXX, XXX } \ | ||
| 36 | } | ||
| 37 | |||
| 38 | #define LAYOUT_42key( \ | ||
| 39 | k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ | ||
| 40 | k14 , k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25 , \ | ||
| 41 | k26 , k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, \ | ||
| 42 | k38, k39, k41, k43, k44 \ | ||
| 43 | ) { \ | ||
| 44 | { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13 }, \ | ||
| 45 | { k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, XXX }, \ | ||
| 46 | { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ | ||
| 47 | { k38, k39, XXX, XXX, XXX, k41, XXX, XXX, XXX, k43, k44, XXX, XXX } \ | ||
| 48 | } | ||
| 49 | |||
diff --git a/keyboards/chavdai40/chconf.h b/keyboards/chavdai40/chconf.h new file mode 100644 index 000000000..6d169b36e --- /dev/null +++ b/keyboards/chavdai40/chconf.h | |||
| @@ -0,0 +1,714 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
| 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 | /** | ||
| 18 | * @file rt/templates/chconf.h | ||
| 19 | * @brief Configuration file template. | ||
| 20 | * @details A copy of this file must be placed in each project directory, it | ||
| 21 | * contains the application specific kernel settings. | ||
| 22 | * | ||
| 23 | * @addtogroup config | ||
| 24 | * @details Kernel related settings and hooks. | ||
| 25 | * @{ | ||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef CHCONF_H | ||
| 29 | #define CHCONF_H | ||
| 30 | |||
| 31 | #define _CHIBIOS_RT_CONF_ | ||
| 32 | #define _CHIBIOS_RT_CONF_VER_6_0_ | ||
| 33 | |||
| 34 | /*===========================================================================*/ | ||
| 35 | /** | ||
| 36 | * @name System timers settings | ||
| 37 | * @{ | ||
| 38 | */ | ||
| 39 | /*===========================================================================*/ | ||
| 40 | |||
| 41 | /** | ||
| 42 | * @brief System time counter resolution. | ||
| 43 | * @note Allowed values are 16 or 32 bits. | ||
| 44 | */ | ||
| 45 | #if !defined(CH_CFG_ST_RESOLUTION) | ||
| 46 | #define CH_CFG_ST_RESOLUTION 32 | ||
| 47 | #endif | ||
| 48 | |||
| 49 | /** | ||
| 50 | * @brief System tick frequency. | ||
| 51 | * @details Frequency of the system timer that drives the system ticks. This | ||
| 52 | * setting also defines the system tick time unit. | ||
| 53 | */ | ||
| 54 | #if !defined(CH_CFG_ST_FREQUENCY) | ||
| 55 | #define CH_CFG_ST_FREQUENCY 10000 | ||
| 56 | #endif | ||
| 57 | |||
| 58 | /** | ||
| 59 | * @brief Time intervals data size. | ||
| 60 | * @note Allowed values are 16, 32 or 64 bits. | ||
| 61 | */ | ||
| 62 | #if !defined(CH_CFG_INTERVALS_SIZE) | ||
| 63 | #define CH_CFG_INTERVALS_SIZE 32 | ||
| 64 | #endif | ||
| 65 | |||
| 66 | /** | ||
| 67 | * @brief Time types data size. | ||
| 68 | * @note Allowed values are 16 or 32 bits. | ||
| 69 | */ | ||
| 70 | #if !defined(CH_CFG_TIME_TYPES_SIZE) | ||
| 71 | #define CH_CFG_TIME_TYPES_SIZE 32 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /** | ||
| 75 | * @brief Time delta constant for the tick-less mode. | ||
| 76 | * @note If this value is zero then the system uses the classic | ||
| 77 | * periodic tick. This value represents the minimum number | ||
| 78 | * of ticks that is safe to specify in a timeout directive. | ||
| 79 | * The value one is not valid, timeouts are rounded up to | ||
| 80 | * this value. | ||
| 81 | */ | ||
| 82 | #if !defined(CH_CFG_ST_TIMEDELTA) | ||
| 83 | #define CH_CFG_ST_TIMEDELTA 2 | ||
| 84 | #endif | ||
| 85 | |||
| 86 | /** @} */ | ||
| 87 | |||
| 88 | /*===========================================================================*/ | ||
| 89 | /** | ||
| 90 | * @name Kernel parameters and options | ||
| 91 | * @{ | ||
| 92 | */ | ||
| 93 | /*===========================================================================*/ | ||
| 94 | |||
| 95 | /** | ||
| 96 | * @brief Round robin interval. | ||
| 97 | * @details This constant is the number of system ticks allowed for the | ||
| 98 | * threads before preemption occurs. Setting this value to zero | ||
| 99 | * disables the preemption for threads with equal priority and the | ||
| 100 | * round robin becomes cooperative. Note that higher priority | ||
| 101 | * threads can still preempt, the kernel is always preemptive. | ||
| 102 | * @note Disabling the round robin preemption makes the kernel more compact | ||
| 103 | * and generally faster. | ||
| 104 | * @note The round robin preemption is not supported in tickless mode and | ||
| 105 | * must be set to zero in that case. | ||
| 106 | */ | ||
| 107 | #if !defined(CH_CFG_TIME_QUANTUM) | ||
| 108 | #define CH_CFG_TIME_QUANTUM 0 | ||
| 109 | #endif | ||
| 110 | |||
| 111 | /** | ||
| 112 | * @brief Managed RAM size. | ||
| 113 | * @details Size of the RAM area to be managed by the OS. If set to zero | ||
| 114 | * then the whole available RAM is used. The core memory is made | ||
| 115 | * available to the heap allocator and/or can be used directly through | ||
| 116 | * the simplified core memory allocator. | ||
| 117 | * | ||
| 118 | * @note In order to let the OS manage the whole RAM the linker script must | ||
| 119 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | ||
| 120 | * @note Requires @p CH_CFG_USE_MEMCORE. | ||
| 121 | */ | ||
| 122 | #if !defined(CH_CFG_MEMCORE_SIZE) | ||
| 123 | #define CH_CFG_MEMCORE_SIZE 0 | ||
| 124 | #endif | ||
| 125 | |||
| 126 | /** | ||
| 127 | * @brief Idle thread automatic spawn suppression. | ||
| 128 | * @details When this option is activated the function @p chSysInit() | ||
| 129 | * does not spawn the idle thread. The application @p main() | ||
| 130 | * function becomes the idle thread and must implement an | ||
| 131 | * infinite loop. | ||
| 132 | */ | ||
| 133 | #if !defined(CH_CFG_NO_IDLE_THREAD) | ||
| 134 | #define CH_CFG_NO_IDLE_THREAD FALSE | ||
| 135 | #endif | ||
| 136 | |||
| 137 | /** @} */ | ||
| 138 | |||
| 139 | /*===========================================================================*/ | ||
| 140 | /** | ||
| 141 | * @name Performance options | ||
| 142 | * @{ | ||
| 143 | */ | ||
| 144 | /*===========================================================================*/ | ||
| 145 | |||
| 146 | /** | ||
| 147 | * @brief OS optimization. | ||
| 148 | * @details If enabled then time efficient rather than space efficient code | ||
| 149 | * is used when two possible implementations exist. | ||
| 150 | * | ||
| 151 | * @note This is not related to the compiler optimization options. | ||
| 152 | * @note The default is @p TRUE. | ||
| 153 | */ | ||
| 154 | #if !defined(CH_CFG_OPTIMIZE_SPEED) | ||
| 155 | #define CH_CFG_OPTIMIZE_SPEED TRUE | ||
| 156 | #endif | ||
| 157 | |||
| 158 | /** @} */ | ||
| 159 | |||
| 160 | /*===========================================================================*/ | ||
| 161 | /** | ||
| 162 | * @name Subsystem options | ||
| 163 | * @{ | ||
| 164 | */ | ||
| 165 | /*===========================================================================*/ | ||
| 166 | |||
| 167 | /** | ||
| 168 | * @brief Time Measurement APIs. | ||
| 169 | * @details If enabled then the time measurement APIs are included in | ||
| 170 | * the kernel. | ||
| 171 | * | ||
| 172 | * @note The default is @p TRUE. | ||
| 173 | */ | ||
| 174 | #if !defined(CH_CFG_USE_TM) | ||
| 175 | #define CH_CFG_USE_TM FALSE | ||
| 176 | #endif | ||
| 177 | |||
| 178 | /** | ||
| 179 | * @brief Threads registry APIs. | ||
| 180 | * @details If enabled then the registry APIs are included in the kernel. | ||
| 181 | * | ||
| 182 | * @note The default is @p TRUE. | ||
| 183 | */ | ||
| 184 | #if !defined(CH_CFG_USE_REGISTRY) | ||
| 185 | #define CH_CFG_USE_REGISTRY TRUE | ||
| 186 | #endif | ||
| 187 | |||
| 188 | /** | ||
| 189 | * @brief Threads synchronization APIs. | ||
| 190 | * @details If enabled then the @p chThdWait() function is included in | ||
| 191 | * the kernel. | ||
| 192 | * | ||
| 193 | * @note The default is @p TRUE. | ||
| 194 | */ | ||
| 195 | #if !defined(CH_CFG_USE_WAITEXIT) | ||
| 196 | #define CH_CFG_USE_WAITEXIT TRUE | ||
| 197 | #endif | ||
| 198 | |||
| 199 | /** | ||
| 200 | * @brief Semaphores APIs. | ||
| 201 | * @details If enabled then the Semaphores APIs are included in the kernel. | ||
| 202 | * | ||
| 203 | * @note The default is @p TRUE. | ||
| 204 | */ | ||
| 205 | #if !defined(CH_CFG_USE_SEMAPHORES) | ||
| 206 | #define CH_CFG_USE_SEMAPHORES TRUE | ||
| 207 | #endif | ||
| 208 | |||
| 209 | /** | ||
| 210 | * @brief Semaphores queuing mode. | ||
| 211 | * @details If enabled then the threads are enqueued on semaphores by | ||
| 212 | * priority rather than in FIFO order. | ||
| 213 | * | ||
| 214 | * @note The default is @p FALSE. Enable this if you have special | ||
| 215 | * requirements. | ||
| 216 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
| 217 | */ | ||
| 218 | #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) | ||
| 219 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | ||
| 220 | #endif | ||
| 221 | |||
| 222 | /** | ||
| 223 | * @brief Mutexes APIs. | ||
| 224 | * @details If enabled then the mutexes APIs are included in the kernel. | ||
| 225 | * | ||
| 226 | * @note The default is @p TRUE. | ||
| 227 | */ | ||
| 228 | #if !defined(CH_CFG_USE_MUTEXES) | ||
| 229 | #define CH_CFG_USE_MUTEXES TRUE | ||
| 230 | #endif | ||
| 231 | |||
| 232 | /** | ||
| 233 | * @brief Enables recursive behavior on mutexes. | ||
| 234 | * @note Recursive mutexes are heavier and have an increased | ||
| 235 | * memory footprint. | ||
| 236 | * | ||
| 237 | * @note The default is @p FALSE. | ||
| 238 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
| 239 | */ | ||
| 240 | #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) | ||
| 241 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | ||
| 242 | #endif | ||
| 243 | |||
| 244 | /** | ||
| 245 | * @brief Conditional Variables APIs. | ||
| 246 | * @details If enabled then the conditional variables APIs are included | ||
| 247 | * in the kernel. | ||
| 248 | * | ||
| 249 | * @note The default is @p TRUE. | ||
| 250 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
| 251 | */ | ||
| 252 | #if !defined(CH_CFG_USE_CONDVARS) | ||
| 253 | #define CH_CFG_USE_CONDVARS TRUE | ||
| 254 | #endif | ||
| 255 | |||
| 256 | /** | ||
| 257 | * @brief Conditional Variables APIs with timeout. | ||
| 258 | * @details If enabled then the conditional variables APIs with timeout | ||
| 259 | * specification are included in the kernel. | ||
| 260 | * | ||
| 261 | * @note The default is @p TRUE. | ||
| 262 | * @note Requires @p CH_CFG_USE_CONDVARS. | ||
| 263 | */ | ||
| 264 | #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) | ||
| 265 | #define CH_CFG_USE_CONDVARS_TIMEOUT TRUE | ||
| 266 | #endif | ||
| 267 | |||
| 268 | /** | ||
| 269 | * @brief Events Flags APIs. | ||
| 270 | * @details If enabled then the event flags APIs are included in the kernel. | ||
| 271 | * | ||
| 272 | * @note The default is @p TRUE. | ||
| 273 | */ | ||
| 274 | #if !defined(CH_CFG_USE_EVENTS) | ||
| 275 | #define CH_CFG_USE_EVENTS TRUE | ||
| 276 | #endif | ||
| 277 | |||
| 278 | /** | ||
| 279 | * @brief Events Flags APIs with timeout. | ||
| 280 | * @details If enabled then the events APIs with timeout specification | ||
| 281 | * are included in the kernel. | ||
| 282 | * | ||
| 283 | * @note The default is @p TRUE. | ||
| 284 | * @note Requires @p CH_CFG_USE_EVENTS. | ||
| 285 | */ | ||
| 286 | #if !defined(CH_CFG_USE_EVENTS_TIMEOUT) | ||
| 287 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | ||
| 288 | #endif | ||
| 289 | |||
| 290 | /** | ||
| 291 | * @brief Synchronous Messages APIs. | ||
| 292 | * @details If enabled then the synchronous messages APIs are included | ||
| 293 | * in the kernel. | ||
| 294 | * | ||
| 295 | * @note The default is @p TRUE. | ||
| 296 | */ | ||
| 297 | #if !defined(CH_CFG_USE_MESSAGES) | ||
| 298 | #define CH_CFG_USE_MESSAGES TRUE | ||
| 299 | #endif | ||
| 300 | |||
| 301 | /** | ||
| 302 | * @brief Synchronous Messages queuing mode. | ||
| 303 | * @details If enabled then messages are served by priority rather than in | ||
| 304 | * FIFO order. | ||
| 305 | * | ||
| 306 | * @note The default is @p FALSE. Enable this if you have special | ||
| 307 | * requirements. | ||
| 308 | * @note Requires @p CH_CFG_USE_MESSAGES. | ||
| 309 | */ | ||
| 310 | #if !defined(CH_CFG_USE_MESSAGES_PRIORITY) | ||
| 311 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE | ||
| 312 | #endif | ||
| 313 | |||
| 314 | /** | ||
| 315 | * @brief Mailboxes APIs. | ||
| 316 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | ||
| 317 | * included in the kernel. | ||
| 318 | * | ||
| 319 | * @note The default is @p TRUE. | ||
| 320 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
| 321 | */ | ||
| 322 | #if !defined(CH_CFG_USE_MAILBOXES) | ||
| 323 | #define CH_CFG_USE_MAILBOXES TRUE | ||
| 324 | #endif | ||
| 325 | |||
| 326 | /** | ||
| 327 | * @brief Core Memory Manager APIs. | ||
| 328 | * @details If enabled then the core memory manager APIs are included | ||
| 329 | * in the kernel. | ||
| 330 | * | ||
| 331 | * @note The default is @p TRUE. | ||
| 332 | */ | ||
| 333 | #if !defined(CH_CFG_USE_MEMCORE) | ||
| 334 | #define CH_CFG_USE_MEMCORE TRUE | ||
| 335 | #endif | ||
| 336 | |||
| 337 | /** | ||
| 338 | * @brief Heap Allocator APIs. | ||
| 339 | * @details If enabled then the memory heap allocator APIs are included | ||
| 340 | * in the kernel. | ||
| 341 | * | ||
| 342 | * @note The default is @p TRUE. | ||
| 343 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | ||
| 344 | * @p CH_CFG_USE_SEMAPHORES. | ||
| 345 | * @note Mutexes are recommended. | ||
| 346 | */ | ||
| 347 | #if !defined(CH_CFG_USE_HEAP) | ||
| 348 | #define CH_CFG_USE_HEAP TRUE | ||
| 349 | #endif | ||
| 350 | |||
| 351 | /** | ||
| 352 | * @brief Memory Pools Allocator APIs. | ||
| 353 | * @details If enabled then the memory pools allocator APIs are included | ||
| 354 | * in the kernel. | ||
| 355 | * | ||
| 356 | * @note The default is @p TRUE. | ||
| 357 | */ | ||
| 358 | #if !defined(CH_CFG_USE_MEMPOOLS) | ||
| 359 | #define CH_CFG_USE_MEMPOOLS TRUE | ||
| 360 | #endif | ||
| 361 | |||
| 362 | /** | ||
| 363 | * @brief Objects FIFOs APIs. | ||
| 364 | * @details If enabled then the objects FIFOs APIs are included | ||
| 365 | * in the kernel. | ||
| 366 | * | ||
| 367 | * @note The default is @p TRUE. | ||
| 368 | */ | ||
| 369 | #if !defined(CH_CFG_USE_OBJ_FIFOS) | ||
| 370 | #define CH_CFG_USE_OBJ_FIFOS TRUE | ||
| 371 | #endif | ||
| 372 | |||
| 373 | /** | ||
| 374 | * @brief Pipes APIs. | ||
| 375 | * @details If enabled then the pipes APIs are included | ||
| 376 | * in the kernel. | ||
| 377 | * | ||
| 378 | * @note The default is @p TRUE. | ||
| 379 | */ | ||
| 380 | #if !defined(CH_CFG_USE_PIPES) | ||
| 381 | #define CH_CFG_USE_PIPES TRUE | ||
| 382 | #endif | ||
| 383 | |||
| 384 | /** | ||
| 385 | * @brief Dynamic Threads APIs. | ||
| 386 | * @details If enabled then the dynamic threads creation APIs are included | ||
| 387 | * in the kernel. | ||
| 388 | * | ||
| 389 | * @note The default is @p TRUE. | ||
| 390 | * @note Requires @p CH_CFG_USE_WAITEXIT. | ||
| 391 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | ||
| 392 | */ | ||
| 393 | #if !defined(CH_CFG_USE_DYNAMIC) | ||
| 394 | #define CH_CFG_USE_DYNAMIC TRUE | ||
| 395 | #endif | ||
| 396 | |||
| 397 | /** @} */ | ||
| 398 | |||
| 399 | /*===========================================================================*/ | ||
| 400 | /** | ||
| 401 | * @name Objects factory options | ||
| 402 | * @{ | ||
| 403 | */ | ||
| 404 | /*===========================================================================*/ | ||
| 405 | |||
| 406 | /** | ||
| 407 | * @brief Objects Factory APIs. | ||
| 408 | * @details If enabled then the objects factory APIs are included in the | ||
| 409 | * kernel. | ||
| 410 | * | ||
| 411 | * @note The default is @p FALSE. | ||
| 412 | */ | ||
| 413 | #if !defined(CH_CFG_USE_FACTORY) | ||
| 414 | #define CH_CFG_USE_FACTORY TRUE | ||
| 415 | #endif | ||
| 416 | |||
| 417 | /** | ||
| 418 | * @brief Maximum length for object names. | ||
| 419 | * @details If the specified length is zero then the name is stored by | ||
| 420 | * pointer but this could have unintended side effects. | ||
| 421 | */ | ||
| 422 | #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) | ||
| 423 | #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /** | ||
| 427 | * @brief Enables the registry of generic objects. | ||
| 428 | */ | ||
| 429 | #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) | ||
| 430 | #define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE | ||
| 431 | #endif | ||
| 432 | |||
| 433 | /** | ||
| 434 | * @brief Enables factory for generic buffers. | ||
| 435 | */ | ||
| 436 | #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) | ||
| 437 | #define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE | ||
| 438 | #endif | ||
| 439 | |||
| 440 | /** | ||
| 441 | * @brief Enables factory for semaphores. | ||
| 442 | */ | ||
| 443 | #if !defined(CH_CFG_FACTORY_SEMAPHORES) | ||
| 444 | #define CH_CFG_FACTORY_SEMAPHORES TRUE | ||
| 445 | #endif | ||
| 446 | |||
| 447 | /** | ||
| 448 | * @brief Enables factory for mailboxes. | ||
| 449 | */ | ||
| 450 | #if !defined(CH_CFG_FACTORY_MAILBOXES) | ||
| 451 | #define CH_CFG_FACTORY_MAILBOXES TRUE | ||
| 452 | #endif | ||
| 453 | |||
| 454 | /** | ||
| 455 | * @brief Enables factory for objects FIFOs. | ||
| 456 | */ | ||
| 457 | #if !defined(CH_CFG_FACTORY_OBJ_FIFOS) | ||
| 458 | #define CH_CFG_FACTORY_OBJ_FIFOS TRUE | ||
| 459 | #endif | ||
| 460 | |||
| 461 | /** | ||
| 462 | * @brief Enables factory for Pipes. | ||
| 463 | */ | ||
| 464 | #if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) | ||
| 465 | #define CH_CFG_FACTORY_PIPES TRUE | ||
| 466 | #endif | ||
| 467 | |||
| 468 | /** @} */ | ||
| 469 | |||
| 470 | /*===========================================================================*/ | ||
| 471 | /** | ||
| 472 | * @name Debug options | ||
| 473 | * @{ | ||
| 474 | */ | ||
| 475 | /*===========================================================================*/ | ||
| 476 | |||
| 477 | /** | ||
| 478 | * @brief Debug option, kernel statistics. | ||
| 479 | * | ||
| 480 | * @note The default is @p FALSE. | ||
| 481 | */ | ||
| 482 | #if !defined(CH_DBG_STATISTICS) | ||
| 483 | #define CH_DBG_STATISTICS FALSE | ||
| 484 | #endif | ||
| 485 | |||
| 486 | /** | ||
| 487 | * @brief Debug option, system state check. | ||
| 488 | * @details If enabled the correct call protocol for system APIs is checked | ||
| 489 | * at runtime. | ||
| 490 | * | ||
| 491 | * @note The default is @p FALSE. | ||
| 492 | */ | ||
| 493 | #if !defined(CH_DBG_SYSTEM_STATE_CHECK) | ||
| 494 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE | ||
| 495 | #endif | ||
| 496 | |||
| 497 | /** | ||
| 498 | * @brief Debug option, parameters checks. | ||
| 499 | * @details If enabled then the checks on the API functions input | ||
| 500 | * parameters are activated. | ||
| 501 | * | ||
| 502 | * @note The default is @p FALSE. | ||
| 503 | */ | ||
| 504 | #if !defined(CH_DBG_ENABLE_CHECKS) | ||
| 505 | #define CH_DBG_ENABLE_CHECKS FALSE | ||
| 506 | #endif | ||
| 507 | |||
| 508 | /** | ||
| 509 | * @brief Debug option, consistency checks. | ||
| 510 | * @details If enabled then all the assertions in the kernel code are | ||
| 511 | * activated. This includes consistency checks inside the kernel, | ||
| 512 | * runtime anomalies and port-defined checks. | ||
| 513 | * | ||
| 514 | * @note The default is @p FALSE. | ||
| 515 | */ | ||
| 516 | #if !defined(CH_DBG_ENABLE_ASSERTS) | ||
| 517 | #define CH_DBG_ENABLE_ASSERTS FALSE | ||
| 518 | #endif | ||
| 519 | |||
| 520 | /** | ||
| 521 | * @brief Debug option, trace buffer. | ||
| 522 | * @details If enabled then the trace buffer is activated. | ||
| 523 | * | ||
| 524 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | ||
| 525 | */ | ||
| 526 | #if !defined(CH_DBG_TRACE_MASK) | ||
| 527 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | ||
| 528 | #endif | ||
| 529 | |||
| 530 | /** | ||
| 531 | * @brief Trace buffer entries. | ||
| 532 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | ||
| 533 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | ||
| 534 | */ | ||
| 535 | #if !defined(CH_DBG_TRACE_BUFFER_SIZE) | ||
| 536 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | ||
| 537 | #endif | ||
| 538 | |||
| 539 | /** | ||
| 540 | * @brief Debug option, stack checks. | ||
| 541 | * @details If enabled then a runtime stack check is performed. | ||
| 542 | * | ||
| 543 | * @note The default is @p FALSE. | ||
| 544 | * @note The stack check is performed in a architecture/port dependent way. | ||
| 545 | * It may not be implemented or some ports. | ||
| 546 | * @note The default failure mode is to halt the system with the global | ||
| 547 | * @p panic_msg variable set to @p NULL. | ||
| 548 | */ | ||
| 549 | #if !defined(CH_DBG_ENABLE_STACK_CHECK) | ||
| 550 | #define CH_DBG_ENABLE_STACK_CHECK FALSE | ||
| 551 | #endif | ||
| 552 | |||
| 553 | /** | ||
| 554 | * @brief Debug option, stacks initialization. | ||
| 555 | * @details If enabled then the threads working area is filled with a byte | ||
| 556 | * value when a thread is created. This can be useful for the | ||
| 557 | * runtime measurement of the used stack. | ||
| 558 | * | ||
| 559 | * @note The default is @p FALSE. | ||
| 560 | */ | ||
| 561 | #if !defined(CH_DBG_FILL_THREADS) | ||
| 562 | #define CH_DBG_FILL_THREADS FALSE | ||
| 563 | #endif | ||
| 564 | |||
| 565 | /** | ||
| 566 | * @brief Debug option, threads profiling. | ||
| 567 | * @details If enabled then a field is added to the @p thread_t structure that | ||
| 568 | * counts the system ticks occurred while executing the thread. | ||
| 569 | * | ||
| 570 | * @note The default is @p FALSE. | ||
| 571 | * @note This debug option is not currently compatible with the | ||
| 572 | * tickless mode. | ||
| 573 | */ | ||
| 574 | #if !defined(CH_DBG_THREADS_PROFILING) | ||
| 575 | #define CH_DBG_THREADS_PROFILING FALSE | ||
| 576 | #endif | ||
| 577 | |||
| 578 | /** @} */ | ||
| 579 | |||
| 580 | /*===========================================================================*/ | ||
| 581 | /** | ||
| 582 | * @name Kernel hooks | ||
| 583 | * @{ | ||
| 584 | */ | ||
| 585 | /*===========================================================================*/ | ||
| 586 | |||
| 587 | /** | ||
| 588 | * @brief System structure extension. | ||
| 589 | * @details User fields added to the end of the @p ch_system_t structure. | ||
| 590 | */ | ||
| 591 | #define CH_CFG_SYSTEM_EXTRA_FIELDS \ | ||
| 592 | /* Add threads custom fields here.*/ | ||
| 593 | |||
| 594 | /** | ||
| 595 | * @brief System initialization hook. | ||
| 596 | * @details User initialization code added to the @p chSysInit() function | ||
| 597 | * just before interrupts are enabled globally. | ||
| 598 | */ | ||
| 599 | #define CH_CFG_SYSTEM_INIT_HOOK() { \ | ||
| 600 | /* Add threads initialization code here.*/ \ | ||
| 601 | } | ||
| 602 | |||
| 603 | /** | ||
| 604 | * @brief Threads descriptor structure extension. | ||
| 605 | * @details User fields added to the end of the @p thread_t structure. | ||
| 606 | */ | ||
| 607 | #define CH_CFG_THREAD_EXTRA_FIELDS \ | ||
| 608 | /* Add threads custom fields here.*/ | ||
| 609 | |||
| 610 | /** | ||
| 611 | * @brief Threads initialization hook. | ||
| 612 | * @details User initialization code added to the @p _thread_init() function. | ||
| 613 | * | ||
| 614 | * @note It is invoked from within @p _thread_init() and implicitly from all | ||
| 615 | * the threads creation APIs. | ||
| 616 | */ | ||
| 617 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | ||
| 618 | /* Add threads initialization code here.*/ \ | ||
| 619 | } | ||
| 620 | |||
| 621 | /** | ||
| 622 | * @brief Threads finalization hook. | ||
| 623 | * @details User finalization code added to the @p chThdExit() API. | ||
| 624 | */ | ||
| 625 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | ||
| 626 | /* Add threads finalization code here.*/ \ | ||
| 627 | } | ||
| 628 | |||
| 629 | /** | ||
| 630 | * @brief Context switch hook. | ||
| 631 | * @details This hook is invoked just before switching between threads. | ||
| 632 | */ | ||
| 633 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | ||
| 634 | /* Context switch code here.*/ \ | ||
| 635 | } | ||
| 636 | |||
| 637 | /** | ||
| 638 | * @brief ISR enter hook. | ||
| 639 | */ | ||
| 640 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | ||
| 641 | /* IRQ prologue code here.*/ \ | ||
| 642 | } | ||
| 643 | |||
| 644 | /** | ||
| 645 | * @brief ISR exit hook. | ||
| 646 | */ | ||
| 647 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | ||
| 648 | /* IRQ epilogue code here.*/ \ | ||
| 649 | } | ||
| 650 | |||
| 651 | /** | ||
| 652 | * @brief Idle thread enter hook. | ||
| 653 | * @note This hook is invoked within a critical zone, no OS functions | ||
| 654 | * should be invoked from here. | ||
| 655 | * @note This macro can be used to activate a power saving mode. | ||
| 656 | */ | ||
| 657 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | ||
| 658 | /* Idle-enter code here.*/ \ | ||
| 659 | } | ||
| 660 | |||
| 661 | /** | ||
| 662 | * @brief Idle thread leave hook. | ||
| 663 | * @note This hook is invoked within a critical zone, no OS functions | ||
| 664 | * should be invoked from here. | ||
| 665 | * @note This macro can be used to deactivate a power saving mode. | ||
| 666 | */ | ||
| 667 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | ||
| 668 | /* Idle-leave code here.*/ \ | ||
| 669 | } | ||
| 670 | |||
| 671 | /** | ||
| 672 | * @brief Idle Loop hook. | ||
| 673 | * @details This hook is continuously invoked by the idle thread loop. | ||
| 674 | */ | ||
| 675 | #define CH_CFG_IDLE_LOOP_HOOK() { \ | ||
| 676 | /* Idle loop code here.*/ \ | ||
| 677 | } | ||
| 678 | |||
| 679 | /** | ||
| 680 | * @brief System tick event hook. | ||
| 681 | * @details This hook is invoked in the system tick handler immediately | ||
| 682 | * after processing the virtual timers queue. | ||
| 683 | */ | ||
| 684 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ | ||
| 685 | /* System tick event code here.*/ \ | ||
| 686 | } | ||
| 687 | |||
| 688 | /** | ||
| 689 | * @brief System halt hook. | ||
| 690 | * @details This hook is invoked in case to a system halting error before | ||
| 691 | * the system is halted. | ||
| 692 | */ | ||
| 693 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | ||
| 694 | /* System halt code here.*/ \ | ||
| 695 | } | ||
| 696 | |||
| 697 | /** | ||
| 698 | * @brief Trace hook. | ||
| 699 | * @details This hook is invoked each time a new record is written in the | ||
| 700 | * trace buffer. | ||
| 701 | */ | ||
| 702 | #define CH_CFG_TRACE_HOOK(tep) { \ | ||
| 703 | /* Trace code here.*/ \ | ||
| 704 | } | ||
| 705 | |||
| 706 | /** @} */ | ||
| 707 | |||
| 708 | /*===========================================================================*/ | ||
| 709 | /* Port-specific settings (override port settings defaulted in chcore.h). */ | ||
| 710 | /*===========================================================================*/ | ||
| 711 | |||
| 712 | #endif /* CHCONF_H */ | ||
| 713 | |||
| 714 | /** @} */ | ||
diff --git a/keyboards/chavdai40/config.h b/keyboards/chavdai40/config.h new file mode 100644 index 000000000..a3dcf84e9 --- /dev/null +++ b/keyboards/chavdai40/config.h | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0x16D0 | ||
| 24 | #define PRODUCT_ID 0x0F95 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER t-miyajima | ||
| 27 | #define PRODUCT Chavdai40 | ||
| 28 | |||
| 29 | /* usb power settings */ | ||
| 30 | #define USB_MAX_POWER_CONSUMPTION 100 | ||
| 31 | |||
| 32 | /* key matrix size */ | ||
| 33 | #define MATRIX_ROWS 4 | ||
| 34 | #define MATRIX_COLS 13 | ||
| 35 | |||
| 36 | |||
| 37 | #define MATRIX_ROW_PINS { A0, A15, B5, B6 } | ||
| 38 | #define MATRIX_COL_PINS { B8, B4, B3, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1 } | ||
| 39 | #define UNUSED_PINS | ||
| 40 | |||
| 41 | /* COL2ROW, ROW2COL*/ | ||
| 42 | #define DIODE_DIRECTION COL2ROW | ||
| 43 | |||
| 44 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 45 | #define DEBOUNCE 5 | ||
| 46 | |||
| 47 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 48 | //#define MATRIX_HAS_GHOST | ||
| 49 | |||
| 50 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 51 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 52 | */ | ||
| 53 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Force NKRO | ||
| 57 | * | ||
| 58 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 59 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 60 | * makefile for this to work.) | ||
| 61 | * | ||
| 62 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 63 | * until the next keyboard reset. | ||
| 64 | * | ||
| 65 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 66 | * fully operational during normal computer usage. | ||
| 67 | * | ||
| 68 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 69 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 70 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 71 | * power-up. | ||
| 72 | * | ||
| 73 | */ | ||
| 74 | //#define FORCE_NKRO | ||
diff --git a/keyboards/chavdai40/halconf.h b/keyboards/chavdai40/halconf.h new file mode 100644 index 000000000..383f3a8bb --- /dev/null +++ b/keyboards/chavdai40/halconf.h | |||
| @@ -0,0 +1,525 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
| 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 | /** | ||
| 18 | * @file templates/halconf.h | ||
| 19 | * @brief HAL configuration header. | ||
| 20 | * @details HAL configuration file, this file allows to enable or disable the | ||
| 21 | * various device drivers from your application. You may also use | ||
| 22 | * this file in order to override the device drivers default settings. | ||
| 23 | * | ||
| 24 | * @addtogroup HAL_CONF | ||
| 25 | * @{ | ||
| 26 | */ | ||
| 27 | |||
| 28 | #ifndef HALCONF_H | ||
| 29 | #define HALCONF_H | ||
| 30 | |||
| 31 | #define _CHIBIOS_HAL_CONF_ | ||
| 32 | #define _CHIBIOS_HAL_CONF_VER_7_0_ | ||
| 33 | |||
| 34 | #include "mcuconf.h" | ||
| 35 | |||
| 36 | /** | ||
| 37 | * @brief Enables the PAL subsystem. | ||
| 38 | */ | ||
| 39 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | ||
| 40 | #define HAL_USE_PAL TRUE | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @brief Enables the ADC subsystem. | ||
| 45 | */ | ||
| 46 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | ||
| 47 | #define HAL_USE_ADC FALSE | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Enables the CAN subsystem. | ||
| 52 | */ | ||
| 53 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | ||
| 54 | #define HAL_USE_CAN FALSE | ||
| 55 | #endif | ||
| 56 | |||
| 57 | /** | ||
| 58 | * @brief Enables the cryptographic subsystem. | ||
| 59 | */ | ||
| 60 | #if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) | ||
| 61 | #define HAL_USE_CRY FALSE | ||
| 62 | #endif | ||
| 63 | |||
| 64 | /** | ||
| 65 | * @brief Enables the DAC subsystem. | ||
| 66 | */ | ||
| 67 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | ||
| 68 | #define HAL_USE_DAC FALSE | ||
| 69 | #endif | ||
| 70 | |||
| 71 | /** | ||
| 72 | * @brief Enables the GPT subsystem. | ||
| 73 | */ | ||
| 74 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | ||
| 75 | #define HAL_USE_GPT FALSE | ||
| 76 | #endif | ||
| 77 | |||
| 78 | /** | ||
| 79 | * @brief Enables the I2C subsystem. | ||
| 80 | */ | ||
| 81 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | ||
| 82 | #define HAL_USE_I2C FALSE | ||
| 83 | #endif | ||
| 84 | |||
| 85 | /** | ||
| 86 | * @brief Enables the I2S subsystem. | ||
| 87 | */ | ||
| 88 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | ||
| 89 | #define HAL_USE_I2S FALSE | ||
| 90 | #endif | ||
| 91 | |||
| 92 | /** | ||
| 93 | * @brief Enables the ICU subsystem. | ||
| 94 | */ | ||
| 95 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | ||
| 96 | #define HAL_USE_ICU FALSE | ||
| 97 | #endif | ||
| 98 | |||
| 99 | /** | ||
| 100 | * @brief Enables the MAC subsystem. | ||
| 101 | */ | ||
| 102 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | ||
| 103 | #define HAL_USE_MAC FALSE | ||
| 104 | #endif | ||
| 105 | |||
| 106 | /** | ||
| 107 | * @brief Enables the MMC_SPI subsystem. | ||
| 108 | */ | ||
| 109 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | ||
| 110 | #define HAL_USE_MMC_SPI FALSE | ||
| 111 | #endif | ||
| 112 | |||
| 113 | /** | ||
| 114 | * @brief Enables the PWM subsystem. | ||
| 115 | */ | ||
| 116 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | ||
| 117 | #define HAL_USE_PWM FALSE | ||
| 118 | #endif | ||
| 119 | |||
| 120 | /** | ||
| 121 | * @brief Enables the RTC subsystem. | ||
| 122 | */ | ||
| 123 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | ||
| 124 | #define HAL_USE_RTC FALSE | ||
| 125 | #endif | ||
| 126 | |||
| 127 | /** | ||
| 128 | * @brief Enables the SDC subsystem. | ||
| 129 | */ | ||
| 130 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | ||
| 131 | #define HAL_USE_SDC FALSE | ||
| 132 | #endif | ||
| 133 | |||
| 134 | /** | ||
| 135 | * @brief Enables the SERIAL subsystem. | ||
| 136 | */ | ||
| 137 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | ||
| 138 | #define HAL_USE_SERIAL TRUE | ||
| 139 | #endif | ||
| 140 | |||
| 141 | /** | ||
| 142 | * @brief Enables the SERIAL over USB subsystem. | ||
| 143 | */ | ||
| 144 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | ||
| 145 | #define HAL_USE_SERIAL_USB FALSE | ||
| 146 | #endif | ||
| 147 | |||
| 148 | /** | ||
| 149 | * @brief Enables the SIO subsystem. | ||
| 150 | */ | ||
| 151 | #if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) | ||
| 152 | #define HAL_USE_SIO FALSE | ||
| 153 | #endif | ||
| 154 | |||
| 155 | /** | ||
| 156 | * @brief Enables the SPI subsystem. | ||
| 157 | */ | ||
| 158 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | ||
| 159 | #define HAL_USE_SPI FALSE | ||
| 160 | #endif | ||
| 161 | |||
| 162 | /** | ||
| 163 | * @brief Enables the TRNG subsystem. | ||
| 164 | */ | ||
| 165 | #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) | ||
| 166 | #define HAL_USE_TRNG FALSE | ||
| 167 | #endif | ||
| 168 | |||
| 169 | /** | ||
| 170 | * @brief Enables the UART subsystem. | ||
| 171 | */ | ||
| 172 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | ||
| 173 | #define HAL_USE_UART FALSE | ||
| 174 | #endif | ||
| 175 | |||
| 176 | /** | ||
| 177 | * @brief Enables the USB subsystem. | ||
| 178 | */ | ||
| 179 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | ||
| 180 | #define HAL_USE_USB TRUE | ||
| 181 | #endif | ||
| 182 | |||
| 183 | /** | ||
| 184 | * @brief Enables the WDG subsystem. | ||
| 185 | */ | ||
| 186 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | ||
| 187 | #define HAL_USE_WDG FALSE | ||
| 188 | #endif | ||
| 189 | |||
| 190 | /** | ||
| 191 | * @brief Enables the WSPI subsystem. | ||
| 192 | */ | ||
| 193 | #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) | ||
| 194 | #define HAL_USE_WSPI FALSE | ||
| 195 | #endif | ||
| 196 | |||
| 197 | /*===========================================================================*/ | ||
| 198 | /* PAL driver related settings. */ | ||
| 199 | /*===========================================================================*/ | ||
| 200 | |||
| 201 | /** | ||
| 202 | * @brief Enables synchronous APIs. | ||
| 203 | * @note Disabling this option saves both code and data space. | ||
| 204 | */ | ||
| 205 | #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
| 206 | #define PAL_USE_CALLBACKS FALSE | ||
| 207 | #endif | ||
| 208 | |||
| 209 | /** | ||
| 210 | * @brief Enables synchronous APIs. | ||
| 211 | * @note Disabling this option saves both code and data space. | ||
| 212 | */ | ||
| 213 | #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) | ||
| 214 | #define PAL_USE_WAIT FALSE | ||
| 215 | #endif | ||
| 216 | |||
| 217 | /*===========================================================================*/ | ||
| 218 | /* ADC driver related settings. */ | ||
| 219 | /*===========================================================================*/ | ||
| 220 | |||
| 221 | /** | ||
| 222 | * @brief Enables synchronous APIs. | ||
| 223 | * @note Disabling this option saves both code and data space. | ||
| 224 | */ | ||
| 225 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | ||
| 226 | #define ADC_USE_WAIT TRUE | ||
| 227 | #endif | ||
| 228 | |||
| 229 | /** | ||
| 230 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | ||
| 231 | * @note Disabling this option saves both code and data space. | ||
| 232 | */ | ||
| 233 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 234 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | ||
| 235 | #endif | ||
| 236 | |||
| 237 | /*===========================================================================*/ | ||
| 238 | /* CAN driver related settings. */ | ||
| 239 | /*===========================================================================*/ | ||
| 240 | |||
| 241 | /** | ||
| 242 | * @brief Sleep mode related APIs inclusion switch. | ||
| 243 | */ | ||
| 244 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | ||
| 245 | #define CAN_USE_SLEEP_MODE TRUE | ||
| 246 | #endif | ||
| 247 | |||
| 248 | /** | ||
| 249 | * @brief Enforces the driver to use direct callbacks rather than OSAL events. | ||
| 250 | */ | ||
| 251 | #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
| 252 | #define CAN_ENFORCE_USE_CALLBACKS FALSE | ||
| 253 | #endif | ||
| 254 | |||
| 255 | /*===========================================================================*/ | ||
| 256 | /* CRY driver related settings. */ | ||
| 257 | /*===========================================================================*/ | ||
| 258 | |||
| 259 | /** | ||
| 260 | * @brief Enables the SW fall-back of the cryptographic driver. | ||
| 261 | * @details When enabled, this option, activates a fall-back software | ||
| 262 | * implementation for algorithms not supported by the underlying | ||
| 263 | * hardware. | ||
| 264 | * @note Fall-back implementations may not be present for all algorithms. | ||
| 265 | */ | ||
| 266 | #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) | ||
| 267 | #define HAL_CRY_USE_FALLBACK FALSE | ||
| 268 | #endif | ||
| 269 | |||
| 270 | /** | ||
| 271 | * @brief Makes the driver forcibly use the fall-back implementations. | ||
| 272 | */ | ||
| 273 | #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) | ||
| 274 | #define HAL_CRY_ENFORCE_FALLBACK FALSE | ||
| 275 | #endif | ||
| 276 | |||
| 277 | /*===========================================================================*/ | ||
| 278 | /* DAC driver related settings. */ | ||
| 279 | /*===========================================================================*/ | ||
| 280 | |||
| 281 | /** | ||
| 282 | * @brief Enables synchronous APIs. | ||
| 283 | * @note Disabling this option saves both code and data space. | ||
| 284 | */ | ||
| 285 | #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) | ||
| 286 | #define DAC_USE_WAIT TRUE | ||
| 287 | #endif | ||
| 288 | |||
| 289 | /** | ||
| 290 | * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. | ||
| 291 | * @note Disabling this option saves both code and data space. | ||
| 292 | */ | ||
| 293 | #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 294 | #define DAC_USE_MUTUAL_EXCLUSION TRUE | ||
| 295 | #endif | ||
| 296 | |||
| 297 | /*===========================================================================*/ | ||
| 298 | /* I2C driver related settings. */ | ||
| 299 | /*===========================================================================*/ | ||
| 300 | |||
| 301 | /** | ||
| 302 | * @brief Enables the mutual exclusion APIs on the I2C bus. | ||
| 303 | */ | ||
| 304 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 305 | #define I2C_USE_MUTUAL_EXCLUSION TRUE | ||
| 306 | #endif | ||
| 307 | |||
| 308 | /*===========================================================================*/ | ||
| 309 | /* MAC driver related settings. */ | ||
| 310 | /*===========================================================================*/ | ||
| 311 | |||
| 312 | /** | ||
| 313 | * @brief Enables the zero-copy API. | ||
| 314 | */ | ||
| 315 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | ||
| 316 | #define MAC_USE_ZERO_COPY FALSE | ||
| 317 | #endif | ||
| 318 | |||
| 319 | /** | ||
| 320 | * @brief Enables an event sources for incoming packets. | ||
| 321 | */ | ||
| 322 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | ||
| 323 | #define MAC_USE_EVENTS TRUE | ||
| 324 | #endif | ||
| 325 | |||
| 326 | /*===========================================================================*/ | ||
| 327 | /* MMC_SPI driver related settings. */ | ||
| 328 | /*===========================================================================*/ | ||
| 329 | |||
| 330 | /** | ||
| 331 | * @brief Delays insertions. | ||
| 332 | * @details If enabled this options inserts delays into the MMC waiting | ||
| 333 | * routines releasing some extra CPU time for the threads with | ||
| 334 | * lower priority, this may slow down the driver a bit however. | ||
| 335 | * This option is recommended also if the SPI driver does not | ||
| 336 | * use a DMA channel and heavily loads the CPU. | ||
| 337 | */ | ||
| 338 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | ||
| 339 | #define MMC_NICE_WAITING TRUE | ||
| 340 | #endif | ||
| 341 | |||
| 342 | /*===========================================================================*/ | ||
| 343 | /* SDC driver related settings. */ | ||
| 344 | /*===========================================================================*/ | ||
| 345 | |||
| 346 | /** | ||
| 347 | * @brief Number of initialization attempts before rejecting the card. | ||
| 348 | * @note Attempts are performed at 10mS intervals. | ||
| 349 | */ | ||
| 350 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | ||
| 351 | #define SDC_INIT_RETRY 100 | ||
| 352 | #endif | ||
| 353 | |||
| 354 | /** | ||
| 355 | * @brief Include support for MMC cards. | ||
| 356 | * @note MMC support is not yet implemented so this option must be kept | ||
| 357 | * at @p FALSE. | ||
| 358 | */ | ||
| 359 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | ||
| 360 | #define SDC_MMC_SUPPORT FALSE | ||
| 361 | #endif | ||
| 362 | |||
| 363 | /** | ||
| 364 | * @brief Delays insertions. | ||
| 365 | * @details If enabled this options inserts delays into the MMC waiting | ||
| 366 | * routines releasing some extra CPU time for the threads with | ||
| 367 | * lower priority, this may slow down the driver a bit however. | ||
| 368 | */ | ||
| 369 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | ||
| 370 | #define SDC_NICE_WAITING TRUE | ||
| 371 | #endif | ||
| 372 | |||
| 373 | /** | ||
| 374 | * @brief OCR initialization constant for V20 cards. | ||
| 375 | */ | ||
| 376 | #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) | ||
| 377 | #define SDC_INIT_OCR_V20 0x50FF8000U | ||
| 378 | #endif | ||
| 379 | |||
| 380 | /** | ||
| 381 | * @brief OCR initialization constant for non-V20 cards. | ||
| 382 | */ | ||
| 383 | #if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) | ||
| 384 | #define SDC_INIT_OCR 0x80100000U | ||
| 385 | #endif | ||
| 386 | |||
| 387 | /*===========================================================================*/ | ||
| 388 | /* SERIAL driver related settings. */ | ||
| 389 | /*===========================================================================*/ | ||
| 390 | |||
| 391 | /** | ||
| 392 | * @brief Default bit rate. | ||
| 393 | * @details Configuration parameter, this is the baud rate selected for the | ||
| 394 | * default configuration. | ||
| 395 | */ | ||
| 396 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | ||
| 397 | #define SERIAL_DEFAULT_BITRATE 38400 | ||
| 398 | #endif | ||
| 399 | |||
| 400 | /** | ||
| 401 | * @brief Serial buffers size. | ||
| 402 | * @details Configuration parameter, you can change the depth of the queue | ||
| 403 | * buffers depending on the requirements of your application. | ||
| 404 | * @note The default is 16 bytes for both the transmission and receive | ||
| 405 | * buffers. | ||
| 406 | */ | ||
| 407 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
| 408 | #define SERIAL_BUFFERS_SIZE 16 | ||
| 409 | #endif | ||
| 410 | |||
| 411 | /*===========================================================================*/ | ||
| 412 | /* SERIAL_USB driver related setting. */ | ||
| 413 | /*===========================================================================*/ | ||
| 414 | |||
| 415 | /** | ||
| 416 | * @brief Serial over USB buffers size. | ||
| 417 | * @details Configuration parameter, the buffer size must be a multiple of | ||
| 418 | * the USB data endpoint maximum packet size. | ||
| 419 | * @note The default is 256 bytes for both the transmission and receive | ||
| 420 | * buffers. | ||
| 421 | */ | ||
| 422 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
| 423 | #define SERIAL_USB_BUFFERS_SIZE 256 | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /** | ||
| 427 | * @brief Serial over USB number of buffers. | ||
| 428 | * @note The default is 2 buffers. | ||
| 429 | */ | ||
| 430 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | ||
| 431 | #define SERIAL_USB_BUFFERS_NUMBER 2 | ||
| 432 | #endif | ||
| 433 | |||
| 434 | /*===========================================================================*/ | ||
| 435 | /* SPI driver related settings. */ | ||
| 436 | /*===========================================================================*/ | ||
| 437 | |||
| 438 | /** | ||
| 439 | * @brief Enables synchronous APIs. | ||
| 440 | * @note Disabling this option saves both code and data space. | ||
| 441 | */ | ||
| 442 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | ||
| 443 | #define SPI_USE_WAIT TRUE | ||
| 444 | #endif | ||
| 445 | |||
| 446 | /** | ||
| 447 | * @brief Enables circular transfers APIs. | ||
| 448 | * @note Disabling this option saves both code and data space. | ||
| 449 | */ | ||
| 450 | #if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) | ||
| 451 | #define SPI_USE_CIRCULAR FALSE | ||
| 452 | #endif | ||
| 453 | |||
| 454 | |||
| 455 | /** | ||
| 456 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | ||
| 457 | * @note Disabling this option saves both code and data space. | ||
| 458 | */ | ||
| 459 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 460 | #define SPI_USE_MUTUAL_EXCLUSION TRUE | ||
| 461 | #endif | ||
| 462 | |||
| 463 | /** | ||
| 464 | * @brief Handling method for SPI CS line. | ||
| 465 | * @note Disabling this option saves both code and data space. | ||
| 466 | */ | ||
| 467 | #if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) | ||
| 468 | #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
| 469 | #endif | ||
| 470 | |||
| 471 | /*===========================================================================*/ | ||
| 472 | /* UART driver related settings. */ | ||
| 473 | /*===========================================================================*/ | ||
| 474 | |||
| 475 | /** | ||
| 476 | * @brief Enables synchronous APIs. | ||
| 477 | * @note Disabling this option saves both code and data space. | ||
| 478 | */ | ||
| 479 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | ||
| 480 | #define UART_USE_WAIT FALSE | ||
| 481 | #endif | ||
| 482 | |||
| 483 | /** | ||
| 484 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | ||
| 485 | * @note Disabling this option saves both code and data space. | ||
| 486 | */ | ||
| 487 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 488 | #define UART_USE_MUTUAL_EXCLUSION FALSE | ||
| 489 | #endif | ||
| 490 | |||
| 491 | /*===========================================================================*/ | ||
| 492 | /* USB driver related settings. */ | ||
| 493 | /*===========================================================================*/ | ||
| 494 | |||
| 495 | /** | ||
| 496 | * @brief Enables synchronous APIs. | ||
| 497 | * @note Disabling this option saves both code and data space. | ||
| 498 | */ | ||
| 499 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | ||
| 500 | #define USB_USE_WAIT TRUE | ||
| 501 | #endif | ||
| 502 | |||
| 503 | /*===========================================================================*/ | ||
| 504 | /* WSPI driver related settings. */ | ||
| 505 | /*===========================================================================*/ | ||
| 506 | |||
| 507 | /** | ||
| 508 | * @brief Enables synchronous APIs. | ||
| 509 | * @note Disabling this option saves both code and data space. | ||
| 510 | */ | ||
| 511 | #if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) | ||
| 512 | #define WSPI_USE_WAIT TRUE | ||
| 513 | #endif | ||
| 514 | |||
| 515 | /** | ||
| 516 | * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. | ||
| 517 | * @note Disabling this option saves both code and data space. | ||
| 518 | */ | ||
| 519 | #if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
| 520 | #define WSPI_USE_MUTUAL_EXCLUSION TRUE | ||
| 521 | #endif | ||
| 522 | |||
| 523 | #endif /* HALCONF_H */ | ||
| 524 | |||
| 525 | /** @} */ | ||
diff --git a/keyboards/chavdai40/info.json b/keyboards/chavdai40/info.json new file mode 100644 index 000000000..53007b923 --- /dev/null +++ b/keyboards/chavdai40/info.json | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "chavdai40", | ||
| 3 | "url": "https://github.com/dvorak55/chavdai40", | ||
| 4 | "maintainer": "t-miyajima", | ||
| 5 | "width": 14, | ||
| 6 | "height": 4, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_44key": { | ||
| 9 | "layout": [ | ||
| 10 | {"x":0, "y":0, "w":1.5}, | ||
| 11 | {"label":"Q", "x":1.5, "y":0}, | ||
| 12 | {"label":"W", "x":2.5, "y":0}, | ||
| 13 | {"label":"E", "x":3.5, "y":0}, | ||
| 14 | {"label":"R", "x":4.5, "y":0}, | ||
| 15 | {"label":"T", "x":5.5, "y":0}, | ||
| 16 | {"label":"Y", "x":6.5, "y":0}, | ||
| 17 | {"label":"U", "x":7.5, "y":0}, | ||
| 18 | {"label":"I", "x":8.5, "y":0}, | ||
| 19 | {"label":"O", "x":9.5, "y":0}, | ||
| 20 | {"label":"P", "x":10.5, "y":0}, | ||
| 21 | {"label":"_", "x":11.5, "y":0}, | ||
| 22 | {"label":"Backspace", "x":12.5, "y":0, "w":1.5}, | ||
| 23 | {"label":"Ctrl", "x":0, "y":1, "w":1.75}, | ||
| 24 | {"label":"A", "x":1.75, "y":1}, | ||
| 25 | {"label":"S", "x":2.75, "y":1}, | ||
| 26 | {"label":"D", "x":3.75, "y":1}, | ||
| 27 | {"label":"F", "x":4.75, "y":1}, | ||
| 28 | {"label":"G", "x":5.75, "y":1}, | ||
| 29 | {"label":"H", "x":6.75, "y":1}, | ||
| 30 | {"label":"J", "x":7.75, "y":1}, | ||
| 31 | {"label":"K", "x":8.75, "y":1}, | ||
| 32 | {"label":"L", "x":9.75, "y":1}, | ||
| 33 | {"label":":", "x":10.75, "y":1}, | ||
| 34 | {"label":"Enter", "x":11.75, "y":1, "w":2.25}, | ||
| 35 | {"label":"Shift", "x":0, "y":2, "w":2.25}, | ||
| 36 | {"label":"Z", "x":2.25, "y":2}, | ||
| 37 | {"label":"X", "x":3.25, "y":2}, | ||
| 38 | {"label":"C", "x":4.25, "y":2}, | ||
| 39 | {"label":"V", "x":5.25, "y":2}, | ||
| 40 | {"label":"B", "x":6.25, "y":2}, | ||
| 41 | {"label":"N", "x":7.25, "y":2}, | ||
| 42 | {"label":"M", "x":8.25, "y":2}, | ||
| 43 | {"label":"<", "x":9.25, "y":2}, | ||
| 44 | {"label":">", "x":10.25, "y":2}, | ||
| 45 | {"label":"?", "x":11.25, "y":2, "w":1.25}, | ||
| 46 | {"x":12.5, "y":2, "w":1.25}, | ||
| 47 | {"label":"Alt", "x":1.38, "y":3, "w":1.25}, | ||
| 48 | {"label":"Win", "x":2.63, "y":3, "w":1.25}, | ||
| 49 | {"x":3.88, "y":3, "w":2.25}, | ||
| 50 | {"x":6.13, "y":3, "w":2.75}, | ||
| 51 | {"label":"Win", "x":8.88, "y":3, "w":1.25}, | ||
| 52 | {"label":"Alt", "x":10.13, "y":3, "w":1.25}, | ||
| 53 | {"label":"Esc", "x":11.38, "y":3, "w":1.25}] | ||
| 54 | }, | ||
| 55 | "LAYOUT_42key": { | ||
| 56 | "layout": [ | ||
| 57 | {"x":0, "y":0, "w":1.5}, | ||
| 58 | {"label":"Q", "x":1.5, "y":0}, | ||
| 59 | {"label":"W", "x":2.5, "y":0}, | ||
| 60 | {"label":"E", "x":3.5, "y":0}, | ||
| 61 | {"label":"R", "x":4.5, "y":0}, | ||
| 62 | {"label":"T", "x":5.5, "y":0}, | ||
| 63 | {"label":"Y", "x":6.5, "y":0}, | ||
| 64 | {"label":"U", "x":7.5, "y":0}, | ||
| 65 | {"label":"I", "x":8.5, "y":0}, | ||
| 66 | {"label":"O", "x":9.5, "y":0}, | ||
| 67 | {"label":"P", "x":10.5, "y":0}, | ||
| 68 | {"label":"_", "x":11.5, "y":0}, | ||
| 69 | {"label":"Backspace", "x":12.5, "y":0, "w":1.5}, | ||
| 70 | {"label":"Ctrl", "x":0, "y":1, "w":1.75}, | ||
| 71 | {"label":"A", "x":1.75, "y":1}, | ||
| 72 | {"label":"S", "x":2.75, "y":1}, | ||
| 73 | {"label":"D", "x":3.75, "y":1}, | ||
| 74 | {"label":"F", "x":4.75, "y":1}, | ||
| 75 | {"label":"G", "x":5.75, "y":1}, | ||
| 76 | {"label":"H", "x":6.75, "y":1}, | ||
| 77 | {"label":"J", "x":7.75, "y":1}, | ||
| 78 | {"label":"K", "x":8.75, "y":1}, | ||
| 79 | {"label":"L", "x":9.75, "y":1}, | ||
| 80 | {"label":":", "x":10.75, "y":1}, | ||
| 81 | {"label":"Enter", "x":11.75, "y":1, "w":2.25}, | ||
| 82 | {"label":"Shift", "x":0, "y":2, "w":2.25}, | ||
| 83 | {"label":"Z", "x":2.25, "y":2}, | ||
| 84 | {"label":"X", "x":3.25, "y":2}, | ||
| 85 | {"label":"C", "x":4.25, "y":2}, | ||
| 86 | {"label":"V", "x":5.25, "y":2}, | ||
| 87 | {"label":"B", "x":6.25, "y":2}, | ||
| 88 | {"label":"N", "x":7.25, "y":2}, | ||
| 89 | {"label":"M", "x":8.25, "y":2}, | ||
| 90 | {"label":"<", "x":9.25, "y":2}, | ||
| 91 | {"label":">", "x":10.25, "y":2}, | ||
| 92 | {"label":"?", "x":11.25, "y":2, "w":1.25}, | ||
| 93 | {"x":12.5, "y":2, "w":1.25}, | ||
| 94 | {"label":"Alt", "x":1.38, "y":3, "w":1.25}, | ||
| 95 | {"label":"Win", "x":2.63, "y":3, "w":1.25}, | ||
| 96 | {"x":3.88, "y":3, "w":6.25}, | ||
| 97 | {"label":"Win", "x":10.13, "y":3, "w":1.25}, | ||
| 98 | {"label":"Alt", "x":11.38, "y":3, "w":1.25}] | ||
| 99 | } | ||
| 100 | } | ||
| 101 | } \ No newline at end of file | ||
diff --git a/keyboards/chavdai40/keymaps/42keys-dvorak/config.h b/keyboards/chavdai40/keymaps/42keys-dvorak/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-dvorak/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c b/keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c new file mode 100644 index 000000000..3ea66f5f3 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | /| ,| .| P| Y| F| G| C| R| L| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| O| E| U| I| D| H| T| N| S| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | ;| Q| J| K| X| B| M| W| V| Z| Lyr| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Space |Win |Alt | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_42key( /* Base */ | ||
| 31 | KC_TAB, KC_SLASH, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, | ||
| 33 | KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(1), | ||
| 34 | KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT), | ||
| 35 | LAYOUT_42key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
| 41 | |||
diff --git a/keyboards/chavdai40/keymaps/42keys-eucalyn/config.h b/keyboards/chavdai40/keymaps/42keys-eucalyn/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-eucalyn/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c b/keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c new file mode 100644 index 000000000..a464a586e --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | ;| ,| .| P| Q| Y| G| D| M| F| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| O| E| I| U| B| N| T| R| S| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | Z| X| C| V| W| H| J| K| L| /| Lyr| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Space |Win |Alt | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_42key( /* Base */ | ||
| 31 | KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Q, KC_Y, KC_G, KC_D, KC_M, KC_F, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_O, KC_E, KC_I, KC_U, KC_B, KC_N, KC_T, KC_R, KC_S, KC_ENTER, | ||
| 33 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_W, KC_H, KC_J, KC_K, KC_L, KC_SLASH, MO(1), | ||
| 34 | KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT), | ||
| 35 | LAYOUT_42key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
diff --git a/keyboards/chavdai40/keymaps/42keys-qwerty/config.h b/keyboards/chavdai40/keymaps/42keys-qwerty/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-qwerty/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c b/keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c new file mode 100644 index 000000000..fb5a7bd69 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | Q| W| E| R| T| Y| U| I| O| P| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| S| D| F| G| H| J| K| L| ;| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | Z| X| C| V| B| N| M| ,| .| /| Lyr| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Space |Win |Alt | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_42key( /* Base */ | ||
| 31 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_ENTER, | ||
| 33 | KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, MO(1), | ||
| 34 | KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT), | ||
| 35 | LAYOUT_42key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
diff --git a/keyboards/chavdai40/keymaps/44keys-dvorak/config.h b/keyboards/chavdai40/keymaps/44keys-dvorak/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-dvorak/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c b/keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c new file mode 100644 index 000000000..09dd15e71 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | /| ,| .| P| Y| F| G| C| R| L| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| O| E| U| I| D| H| T| N| S| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | ;| Q| J| K| X| B| M| W| V| Z| Del| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Layer | Space |Win |Alt |Esc | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_44key( /* Base */ | ||
| 31 | KC_TAB, KC_SLASH, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, | ||
| 33 | KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_DELETE, | ||
| 34 | KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), | ||
| 35 | LAYOUT_44key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
diff --git a/keyboards/chavdai40/keymaps/44keys-eucalyn/config.h b/keyboards/chavdai40/keymaps/44keys-eucalyn/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-eucalyn/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c b/keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c new file mode 100644 index 000000000..a8a48899e --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | ;| ,| .| P| Q| Y| G| D| M| F| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| O| E| I| U| B| N| T| R| S| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | Z| X| C| V| W| H| J| K| L| /| Del| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Layer | Space |Win |Alt |Esc | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_44key( /* Base */ | ||
| 31 | KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Q, KC_Y, KC_G, KC_D, KC_M, KC_F, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_O, KC_E, KC_I, KC_U, KC_B, KC_N, KC_T, KC_R, KC_S, KC_ENTER, | ||
| 33 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_W, KC_H, KC_J, KC_K, KC_L, KC_SLASH, KC_DELETE, | ||
| 34 | KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), | ||
| 35 | LAYOUT_44key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
diff --git a/keyboards/chavdai40/keymaps/44keys-qwerty/config.h b/keyboards/chavdai40/keymaps/44keys-qwerty/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-qwerty/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c b/keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c new file mode 100644 index 000000000..b709b34fb --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | Q| W| E| R| T| Y| U| I| O| P| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| S| D| F| G| H| J| K| L| ;| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | Z| X| C| V| B| N| M| ,| .| /| Del| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Layer | Space |Win |Alt |Esc | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_44key( /* Base */ | ||
| 31 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_ENTER, | ||
| 33 | KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_DELETE, | ||
| 34 | KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), | ||
| 35 | LAYOUT_44key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
diff --git a/keyboards/chavdai40/keymaps/default/config.h b/keyboards/chavdai40/keymaps/default/config.h new file mode 100644 index 000000000..bbcd7cdf9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/default/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 PERMISSIVE_HOLD | ||
| 21 | #define RETRO_TAPPING | ||
| 22 | #define TAPPING_TERM 5 | ||
diff --git a/keyboards/chavdai40/keymaps/default/keymap.c b/keyboards/chavdai40/keymaps/default/keymap.c new file mode 100644 index 000000000..b709b34fb --- /dev/null +++ b/keyboards/chavdai40/keymaps/default/keymap.c | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* Copyright 2020 t-miyajima | ||
| 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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | /* Keymap _BL: (Base Layer) Default Layer | ||
| 20 | * ,-------------------------------------------------------. | ||
| 21 | * | Tab | Q| W| E| R| T| Y| U| I| O| P| -| Bspc| | ||
| 22 | * |-------------------------------------------------------| | ||
| 23 | * | Ctrl | A| S| D| F| G| H| J| K| L| ;| Return| | ||
| 24 | * |-------------------------------------------------------| | ||
| 25 | * | Shift | Z| X| C| V| B| N| M| ,| .| /| Del| | ||
| 26 | * `----.---------------------------------------------.---' | ||
| 27 | * | Alt |Win | Layer | Space |Win |Alt |Esc | | ||
| 28 | * `---------------------------------------------' | ||
| 29 | */ | ||
| 30 | LAYOUT_44key( /* Base */ | ||
| 31 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINUS, KC_BSPACE, | ||
| 32 | KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_ENTER, | ||
| 33 | KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_DELETE, | ||
| 34 | KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), | ||
| 35 | LAYOUT_44key( /* layer 1 */ | ||
| 36 | KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, | ||
| 37 | KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, | ||
| 38 | KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 40 | }; | ||
diff --git a/keyboards/chavdai40/mcuconf.h b/keyboards/chavdai40/mcuconf.h new file mode 100644 index 000000000..0cc575d40 --- /dev/null +++ b/keyboards/chavdai40/mcuconf.h | |||
| @@ -0,0 +1,190 @@ | |||
| 1 | /* | ||
| 2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
| 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 | * STM32F0xx drivers configuration. | ||
| 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 | * 0...3 Lowest...Highest. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #define STM32F0xx_MCUCONF | ||
| 35 | |||
| 36 | /* | ||
| 37 | * HAL driver system settings. | ||
| 38 | */ | ||
| 39 | #define STM32_NO_INIT FALSE | ||
| 40 | #define STM32_PVD_ENABLE FALSE | ||
| 41 | #define STM32_PLS STM32_PLS_LEV0 | ||
| 42 | #define STM32_HSI_ENABLED TRUE | ||
| 43 | #define STM32_HSI14_ENABLED TRUE | ||
| 44 | #define STM32_HSI48_ENABLED FALSE | ||
| 45 | #define STM32_LSI_ENABLED TRUE | ||
| 46 | #define STM32_HSE_ENABLED FALSE | ||
| 47 | #define STM32_LSE_ENABLED FALSE | ||
| 48 | #define STM32_SW STM32_SW_PLL | ||
| 49 | #define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 | ||
| 50 | #define STM32_PREDIV_VALUE 1 | ||
| 51 | #define STM32_PLLMUL_VALUE 12 | ||
| 52 | #define STM32_HPRE STM32_HPRE_DIV1 | ||
| 53 | #define STM32_PPRE STM32_PPRE_DIV1 | ||
| 54 | #define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | ||
| 55 | #define STM32_MCOPRE STM32_MCOPRE_DIV1 | ||
| 56 | #define STM32_PLLNODIV STM32_PLLNODIV_DIV2 | ||
| 57 | #define STM32_USBSW STM32_USBSW_HSI48 | ||
| 58 | #define STM32_CECSW STM32_CECSW_HSI | ||
| 59 | #define STM32_I2C1SW STM32_I2C1SW_HSI | ||
| 60 | #define STM32_USART1SW STM32_USART1SW_PCLK | ||
| 61 | #define STM32_RTCSEL STM32_RTCSEL_LSI | ||
| 62 | |||
| 63 | /* | ||
| 64 | * IRQ system settings. | ||
| 65 | */ | ||
| 66 | #define STM32_IRQ_EXTI0_1_IRQ_PRIORITY 3 | ||
| 67 | #define STM32_IRQ_EXTI2_3_IRQ_PRIORITY 3 | ||
| 68 | #define STM32_IRQ_EXTI4_15_IRQ_PRIORITY 3 | ||
| 69 | #define STM32_IRQ_EXTI16_IRQ_PRIORITY 3 | ||
| 70 | #define STM32_IRQ_EXTI17_20_IRQ_PRIORITY 3 | ||
| 71 | #define STM32_IRQ_EXTI21_22_IRQ_PRIORITY 3 | ||
| 72 | |||
| 73 | /* | ||
| 74 | * ADC driver system settings. | ||
| 75 | */ | ||
| 76 | #define STM32_ADC_USE_ADC1 FALSE | ||
| 77 | #define STM32_ADC_ADC1_CKMODE STM32_ADC_CKMODE_ADCCLK | ||
| 78 | #define STM32_ADC_ADC1_DMA_PRIORITY 2 | ||
| 79 | #define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 | ||
| 80 | #define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) | ||
| 81 | |||
| 82 | /* | ||
| 83 | * GPT driver system settings. | ||
| 84 | */ | ||
| 85 | #define STM32_GPT_USE_TIM1 FALSE | ||
| 86 | #define STM32_GPT_USE_TIM2 FALSE | ||
| 87 | #define STM32_GPT_USE_TIM3 FALSE | ||
| 88 | #define STM32_GPT_USE_TIM14 FALSE | ||
| 89 | #define STM32_GPT_TIM1_IRQ_PRIORITY 2 | ||
| 90 | #define STM32_GPT_TIM2_IRQ_PRIORITY 2 | ||
| 91 | #define STM32_GPT_TIM3_IRQ_PRIORITY 2 | ||
| 92 | #define STM32_GPT_TIM14_IRQ_PRIORITY 2 | ||
| 93 | |||
| 94 | /* | ||
| 95 | * I2C driver system settings. | ||
| 96 | */ | ||
| 97 | #define STM32_I2C_USE_I2C1 FALSE | ||
| 98 | #define STM32_I2C_BUSY_TIMEOUT 50 | ||
| 99 | #define STM32_I2C_I2C1_IRQ_PRIORITY 3 | ||
| 100 | #define STM32_I2C_USE_DMA TRUE | ||
| 101 | #define STM32_I2C_I2C1_DMA_PRIORITY 1 | ||
| 102 | #define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
| 103 | #define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
| 104 | #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | ||
| 105 | |||
| 106 | /* | ||
| 107 | * I2S driver system settings. | ||
| 108 | */ | ||
| 109 | #define STM32_I2S_USE_SPI1 FALSE | ||
| 110 | #define STM32_I2S_SPI1_MODE (STM32_I2S_MODE_MASTER | \ | ||
| 111 | STM32_I2S_MODE_RX) | ||
| 112 | #define STM32_I2S_SPI1_IRQ_PRIORITY 2 | ||
| 113 | #define STM32_I2S_SPI1_DMA_PRIORITY 1 | ||
| 114 | #define STM32_I2S_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
| 115 | #define STM32_I2S_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
| 116 | #define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") | ||
| 117 | |||
| 118 | /* | ||
| 119 | * ICU driver system settings. | ||
| 120 | */ | ||
| 121 | #define STM32_ICU_USE_TIM1 FALSE | ||
| 122 | #define STM32_ICU_USE_TIM2 FALSE | ||
| 123 | #define STM32_ICU_USE_TIM3 FALSE | ||
| 124 | #define STM32_ICU_TIM1_IRQ_PRIORITY 3 | ||
| 125 | #define STM32_ICU_TIM2_IRQ_PRIORITY 3 | ||
| 126 | #define STM32_ICU_TIM3_IRQ_PRIORITY 3 | ||
| 127 | |||
| 128 | /* | ||
| 129 | * PWM driver system settings. | ||
| 130 | */ | ||
| 131 | #define STM32_PWM_USE_ADVANCED FALSE | ||
| 132 | #define STM32_PWM_USE_TIM1 FALSE | ||
| 133 | #define STM32_PWM_USE_TIM2 FALSE | ||
| 134 | #define STM32_PWM_USE_TIM3 FALSE | ||
| 135 | #define STM32_PWM_TIM1_IRQ_PRIORITY 3 | ||
| 136 | #define STM32_PWM_TIM2_IRQ_PRIORITY 3 | ||
| 137 | #define STM32_PWM_TIM3_IRQ_PRIORITY 3 | ||
| 138 | |||
| 139 | /* | ||
| 140 | * SERIAL driver system settings. | ||
| 141 | */ | ||
| 142 | #define STM32_SERIAL_USE_USART1 FALSE | ||
| 143 | #define STM32_SERIAL_USE_USART2 TRUE | ||
| 144 | #define STM32_SERIAL_USART1_PRIORITY 3 | ||
| 145 | #define STM32_SERIAL_USART2_PRIORITY 3 | ||
| 146 | |||
| 147 | /* | ||
| 148 | * SPI driver system settings. | ||
| 149 | */ | ||
| 150 | #define STM32_SPI_USE_SPI1 FALSE | ||
| 151 | #define STM32_SPI_SPI1_DMA_PRIORITY 1 | ||
| 152 | #define STM32_SPI_SPI1_IRQ_PRIORITY 2 | ||
| 153 | #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
| 154 | #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
| 155 | #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | ||
| 156 | |||
| 157 | /* | ||
| 158 | * ST driver system settings. | ||
| 159 | */ | ||
| 160 | #define STM32_ST_IRQ_PRIORITY 2 | ||
| 161 | #define STM32_ST_USE_TIMER 2 | ||
| 162 | |||
| 163 | /* | ||
| 164 | * UART driver system settings. | ||
| 165 | */ | ||
| 166 | #define STM32_UART_USE_USART1 FALSE | ||
| 167 | #define STM32_UART_USE_USART2 FALSE | ||
| 168 | #define STM32_UART_USART1_IRQ_PRIORITY 3 | ||
| 169 | #define STM32_UART_USART2_IRQ_PRIORITY 3 | ||
| 170 | #define STM32_UART_USART1_DMA_PRIORITY 0 | ||
| 171 | #define STM32_UART_USART2_DMA_PRIORITY 0 | ||
| 172 | #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | ||
| 173 | #define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | ||
| 174 | #define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | ||
| 175 | #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | ||
| 176 | #define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | ||
| 177 | |||
| 178 | /* | ||
| 179 | * WDG driver system settings. | ||
| 180 | */ | ||
| 181 | #define STM32_WDG_USE_IWDG FALSE | ||
| 182 | |||
| 183 | /* | ||
| 184 | * USB driver system settings. | ||
| 185 | */ | ||
| 186 | #define STM32_USB_USE_USB1 TRUE | ||
| 187 | #define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | ||
| 188 | #define STM32_USB_USB1_LP_IRQ_PRIORITY 3 | ||
| 189 | |||
| 190 | #endif /* MCUCONF_H */ | ||
diff --git a/keyboards/chavdai40/readme.md b/keyboards/chavdai40/readme.md new file mode 100644 index 000000000..57af68d0a --- /dev/null +++ b/keyboards/chavdai40/readme.md | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # chavdai40 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | Chavdai40 is very simple decoratable 40% keyboard | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [t-miyajima](https://github.com/dvorak55) | ||
| 8 | * Hardware Supported: Chavdai40 PCB rev1 | ||
| 9 | * Hardware Availability: not yet available. | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make chavdai40:default | ||
| 14 | |||
| 15 | Flashing example for this keyboard: | ||
| 16 | |||
| 17 | make chavdai40:default:flash | ||
| 18 | |||
| 19 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/chavdai40/rules.mk b/keyboards/chavdai40/rules.mk new file mode 100644 index 000000000..64c6f662a --- /dev/null +++ b/keyboards/chavdai40/rules.mk | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F042 | ||
| 3 | |||
| 4 | # Build Options | ||
| 5 | # change yes to no to disable | ||
| 6 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 7 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 8 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 9 | CONSOLE_ENABLE = no # Console for debug | ||
| 10 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 11 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 12 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 13 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 14 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 16 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 17 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 18 | AUDIO_ENABLE = no # Audio output \ No newline at end of file | ||
