diff options
| author | Ryan <fauxpark@gmail.com> | 2021-01-23 14:23:38 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-23 14:23:38 +1100 |
| commit | 7d774fa1dcd90097b06a8589f9087edfbc21967a (patch) | |
| tree | e3821d9b2298ccce69cc28407223a9f7b64e3fdf | |
| parent | 3a7573436ae6ab20973389a4051a8785399539f2 (diff) | |
| download | qmk_firmware-7d774fa1dcd90097b06a8589f9087edfbc21967a.tar.gz qmk_firmware-7d774fa1dcd90097b06a8589f9087edfbc21967a.zip | |
Infinity60 refactor (#11650)
| -rw-r--r-- | keyboards/infinity60/MEMO.txt | 385 | ||||
| -rw-r--r-- | keyboards/infinity60/config.h | 47 | ||||
| -rw-r--r-- | keyboards/infinity60/infinity60.c | 16 | ||||
| -rw-r--r-- | keyboards/infinity60/infinity60.h | 54 | ||||
| -rw-r--r-- | keyboards/infinity60/info.json | 153 | ||||
| -rw-r--r-- | keyboards/infinity60/keymaps/default/keymap.c | 72 | ||||
| -rw-r--r-- | keyboards/infinity60/keymaps/hasu/keymap.c | 70 | ||||
| -rw-r--r-- | keyboards/infinity60/matrix.c | 198 | ||||
| -rw-r--r-- | keyboards/infinity60/readme.md | 14 | ||||
| -rw-r--r-- | keyboards/infinity60/rules.mk | 29 |
10 files changed, 213 insertions, 825 deletions
diff --git a/keyboards/infinity60/MEMO.txt b/keyboards/infinity60/MEMO.txt deleted file mode 100644 index e2886aa00..000000000 --- a/keyboards/infinity60/MEMO.txt +++ /dev/null | |||
| @@ -1,385 +0,0 @@ | |||
| 1 | flabbergast's TMK/ChibiOS port | ||
| 2 | ============================== | ||
| 3 | 2015/10/16 | ||
| 4 | |||
| 5 | |||
| 6 | Build | ||
| 7 | ----- | ||
| 8 | $ git clone -b chibios https://github.com/flabbergast/tmk_keyboard.git | ||
| 9 | |||
| 10 | $ cd tmk_keyboard | ||
| 11 | $ git submodule add -f -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios | ||
| 12 | or | ||
| 13 | $ cd tmk_keyboard/tmk_core/tool/chibios | ||
| 14 | $ git clone -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios | ||
| 15 | |||
| 16 | $ cd tmk_keyboard/keyboard/infinity_chibios | ||
| 17 | $ make | ||
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | Chibios Configuration | ||
| 23 | --------------------- | ||
| 24 | halconf.h: for HAL configuration | ||
| 25 | placed in project directory | ||
| 26 | read in chibios/os/hal/hal.mk | ||
| 27 | included in chibios/os/hal/include/hal.h | ||
| 28 | mcuconf.h: for MCU configuration | ||
| 29 | placed in project directory | ||
| 30 | included in halconf.h | ||
| 31 | |||
| 32 | |||
| 33 | Chibios Term | ||
| 34 | ------------ | ||
| 35 | PAL = Port Abstraction Layer | ||
| 36 | palWritePad | ||
| 37 | palReadPad | ||
| 38 | palSetPad | ||
| 39 | chibios/os/hal/include/pal.h | ||
| 40 | |||
| 41 | LLD = Low Level Driver | ||
| 42 | |||
| 43 | |||
| 44 | Makefile | ||
| 45 | -------- | ||
| 46 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 47 | MCU_FAMILY = KINETIS | ||
| 48 | MCU_SERIES = KL2x | ||
| 49 | |||
| 50 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 51 | # or <this_dir>/ld/ | ||
| 52 | MCU_LDSCRIPT = MKL26Z64 | ||
| 53 | |||
| 54 | # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ | ||
| 55 | MCU_STARTUP = kl2x | ||
| 56 | |||
| 57 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
| 58 | # or <this_dir>/boards | ||
| 59 | BOARD = PJRC_TEENSY_LC | ||
| 60 | |||
| 61 | MCU = cortex-m0 | ||
| 62 | |||
| 63 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 64 | ARMV = 6 | ||
| 65 | |||
| 66 | |||
| 67 | halconf.h | ||
| 68 | --------- | ||
| 69 | |||
| 70 | |||
| 71 | mcuconf.h | ||
| 72 | --------- | ||
| 73 | |||
| 74 | |||
| 75 | chconf.h | ||
| 76 | -------- | ||
| 77 | |||
| 78 | |||
| 79 | ld script | ||
| 80 | --------- | ||
| 81 | --- ../../tmk_core/tool/chibios/chibios/os/common/ports/ARMCMx/compilers/GCC/ld/MKL26Z64.ld 2015-10-15 09:08:58.732904304 +0900 | ||
| 82 | +++ ld/MKL26Z64.ld 2015-10-15 08:48:06.430215496 +0900 | ||
| 83 | @@ -27,7 +27,8 @@ | ||
| 84 | { | ||
| 85 | flash0 : org = 0x00000000, len = 0xc0 | ||
| 86 | flashcfg : org = 0x00000400, len = 0x10 | ||
| 87 | - flash : org = 0x00000410, len = 64k - 0x410 | ||
| 88 | + flash : org = 0x00000410, len = 62k - 0x410 | ||
| 89 | + eeprom_emu : org = 0x0000F800, len = 2k | ||
| 90 | ram : org = 0x1FFFF800, len = 8k | ||
| 91 | } | ||
| 92 | |||
| 93 | @@ -35,6 +36,10 @@ | ||
| 94 | __ram_size__ = LENGTH(ram); | ||
| 95 | __ram_end__ = __ram_start__ + __ram_size__; | ||
| 96 | |||
| 97 | +__eeprom_workarea_start__ = ORIGIN(eeprom_emu); | ||
| 98 | +__eeprom_workarea_size__ = LENGTH(eeprom_emu); | ||
| 99 | +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; | ||
| 100 | + | ||
| 101 | SECTIONS | ||
| 102 | { | ||
| 103 | . = 0; | ||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | Configuration/Startup for Infinity 60% | ||
| 108 | -------------------------------------- | ||
| 109 | Configuration: | ||
| 110 | |||
| 111 | |||
| 112 | Clock: | ||
| 113 | Inifinity | ||
| 114 | FEI(FLL Engaged Internal) mode with core clock:48MHz, bus clock:48MHz, flash clock:24MHz | ||
| 115 | Clock dividor: | ||
| 116 | SIM_CLKDIV1[OUTDIV1] = 0 divide-by-1 for core clock | ||
| 117 | SIM_CLKDIV1[OUTDIV2] = 0 divide-by-1 for bus clock | ||
| 118 | SIM_CLKDIV1[OUTDIV4] = 1 divide-by-2 for flash clock | ||
| 119 | Internal reference clock: | ||
| 120 | MCG_C1[IREFS] = 1 Internal Reference Select for clock source for FLL | ||
| 121 | MCG_C1[IRCLKEN] = 1 Internal Reference Clock Enable | ||
| 122 | FLL multipilication: | ||
| 123 | MCG_C4[DMX32] = 1 | ||
| 124 | MCG_C4[DRST_DRS] = 01 FLL factor 1464 * 32.768kHz = 48MHz | ||
| 125 | |||
| 126 | chibios/os/hal/ports/KINETIS/K20x/hal_lld.c | ||
| 127 | k20x_clock_init(): called in __early_init() defined in board.c | ||
| 128 | disable watchdog and configure clock | ||
| 129 | |||
| 130 | configurable macros: | ||
| 131 | KINETIS_NO_INIT: whether init or not | ||
| 132 | KINETIS_MCG_MODE: clock mode | ||
| 133 | KINETIS_MCG_MODE_FEI | ||
| 134 | KINETIS_MCG_MODE_PEE | ||
| 135 | hal/ports/KINETIS/K20x/hal_lld.h | ||
| 136 | |||
| 137 | |||
| 138 | chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h | ||
| 139 | PALConfig pal_default_config | ||
| 140 | boardInit() | ||
| 141 | __early_init() | ||
| 142 | macro definitions for board infos, freq and mcu type | ||
| 143 | |||
| 144 | chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.c | ||
| 145 | |||
| 146 | USB | ||
| 147 | |||
| 148 | |||
| 149 | Startup | ||
| 150 | ------- | ||
| 151 | common/ports/ARMCMx/GCC/crt0_v[67]m.s | ||
| 152 | Reset_Handler: startup code | ||
| 153 | common/ports/ARMCMx/GCC/crt1.c | ||
| 154 | __core_init(): weak | ||
| 155 | __early_init(): weak | ||
| 156 | __late_init(): weak | ||
| 157 | __default_exit(): weak | ||
| 158 | called from Reset_Handler of crt0 | ||
| 159 | common/ports/ARMCMx/GCC/vector.c | ||
| 160 | common/ports/ARMCMx/GCC/ld/*.ld | ||
| 161 | |||
| 162 | chibios/os/common/ports/ARMCMx/compilers/GCC/ | ||
| 163 | ├── crt0_v6m.s | ||
| 164 | ├── crt0_v7m.s | ||
| 165 | ├── crt1.c | ||
| 166 | ├── ld | ||
| 167 | │ ├── MK20DX128BLDR3.ld | ||
| 168 | │ ├── MK20DX128BLDR4.ld | ||
| 169 | │ ├── MK20DX128.ld | ||
| 170 | │ ├── MK20DX256.ld | ||
| 171 | │ ├── MKL25Z128.ld | ||
| 172 | │ ├── MKL26Z128.ld | ||
| 173 | │ ├── MKL26Z64.ld | ||
| 174 | │ └── STM32L476xG.ld | ||
| 175 | ├── mk | ||
| 176 | │ ├── startup_k20x5.mk | ||
| 177 | │ ├── startup_k20x7.mk | ||
| 178 | │ ├── startup_k20x.mk | ||
| 179 | │ ├── startup_kl2x.mk | ||
| 180 | │ └── startup_stm32l4xx.mk | ||
| 181 | ├── rules.ld | ||
| 182 | ├── rules.mk | ||
| 183 | └── vectors.c | ||
| 184 | |||
| 185 | chibios/os/hal/ | ||
| 186 | ├── boards | ||
| 187 | │ ├── FREESCALE_FREEDOM_K20D50M | ||
| 188 | │ │ ├── board.c | ||
| 189 | │ │ ├── board.h | ||
| 190 | │ │ └── board.mk | ||
| 191 | │ ├── MCHCK_K20 | ||
| 192 | │ │ ├── board.c | ||
| 193 | │ │ ├── board.h | ||
| 194 | │ │ └── board.mk | ||
| 195 | │ ├── PJRC_TEENSY_3 | ||
| 196 | │ │ ├── board.c | ||
| 197 | │ │ ├── board.h | ||
| 198 | │ │ └── board.mk | ||
| 199 | │ ├── PJRC_TEENSY_3_1 | ||
| 200 | │ │ ├── board.c | ||
| 201 | │ │ ├── board.h | ||
| 202 | │ │ └── board.mk | ||
| 203 | │ ├── PJRC_TEENSY_LC | ||
| 204 | │ │ ├── board.c | ||
| 205 | │ │ ├── board.h | ||
| 206 | │ │ └── board.mk | ||
| 207 | │ ├── readme.txt | ||
| 208 | │ ├── simulator | ||
| 209 | │ │ ├── board.c | ||
| 210 | │ │ ├── board.h | ||
| 211 | │ │ └── board.mk | ||
| 212 | │ ├── ST_NUCLEO_F030R8 | ||
| 213 | │ │ ├── board.c | ||
| 214 | │ │ ├── board.h | ||
| 215 | │ │ ├── board.mk | ||
| 216 | │ │ └── cfg | ||
| 217 | │ │ └── board.chcfg | ||
| 218 | ├── hal.mk | ||
| 219 | ├── include | ||
| 220 | │ ├── adc.h | ||
| 221 | │ ├── can.h | ||
| 222 | │ ├── dac.h | ||
| 223 | │ ├── ext.h | ||
| 224 | │ ├── gpt.h | ||
| 225 | │ ├── hal_channels.h | ||
| 226 | │ ├── hal_files.h | ||
| 227 | │ ├── hal.h | ||
| 228 | │ ├── hal_ioblock.h | ||
| 229 | │ ├── hal_mmcsd.h | ||
| 230 | │ ├── hal_queues.h | ||
| 231 | │ ├── hal_streams.h | ||
| 232 | │ ├── i2c.h | ||
| 233 | │ ├── i2s.h | ||
| 234 | │ ├── icu.h | ||
| 235 | │ ├── mac.h | ||
| 236 | │ ├── mii.h | ||
| 237 | │ ├── mmc_spi.h | ||
| 238 | │ ├── pal.h | ||
| 239 | │ ├── pwm.h | ||
| 240 | │ ├── rtc.h | ||
| 241 | │ ├── sdc.h | ||
| 242 | │ ├── serial.h | ||
| 243 | │ ├── serial_usb.h | ||
| 244 | │ ├── spi.h | ||
| 245 | │ ├── st.h | ||
| 246 | │ ├── uart.h | ||
| 247 | │ └── usb.h | ||
| 248 | ├── lib | ||
| 249 | │ └── streams | ||
| 250 | │ ├── chprintf.c | ||
| 251 | │ ├── chprintf.h | ||
| 252 | │ ├── memstreams.c | ||
| 253 | │ ├── memstreams.h | ||
| 254 | │ ├── nullstreams.c | ||
| 255 | │ └── nullstreams.h | ||
| 256 | ├── osal | ||
| 257 | │ ├── nil | ||
| 258 | │ │ ├── osal.c | ||
| 259 | │ │ ├── osal.h | ||
| 260 | │ │ └── osal.mk | ||
| 261 | │ ├── os-less | ||
| 262 | │ │ └── ARMCMx | ||
| 263 | │ │ ├── osal.c | ||
| 264 | │ │ ├── osal.h | ||
| 265 | │ │ └── osal.mk | ||
| 266 | │ └── rt | ||
| 267 | │ ├── osal.c | ||
| 268 | │ ├── osal.h | ||
| 269 | │ └── osal.mk | ||
| 270 | ├── ports | ||
| 271 | │ ├── AVR | ||
| 272 | │ ├── common | ||
| 273 | │ │ └── ARMCMx | ||
| 274 | │ │ ├── mpu.h | ||
| 275 | │ │ ├── nvic.c | ||
| 276 | │ │ └── nvic.h | ||
| 277 | │ ├── KINETIS | ||
| 278 | │ │ ├── K20x | ||
| 279 | │ │ │ ├── hal_lld.c | ||
| 280 | │ │ │ ├── hal_lld.h | ||
| 281 | │ │ │ ├── kinetis_registry.h | ||
| 282 | │ │ │ ├── platform.dox | ||
| 283 | │ │ │ ├── platform.mk | ||
| 284 | │ │ │ ├── pwm_lld.c | ||
| 285 | │ │ │ ├── pwm_lld.h | ||
| 286 | │ │ │ ├── spi_lld.c | ||
| 287 | │ │ │ └── spi_lld.h | ||
| 288 | │ │ ├── KL2x | ||
| 289 | │ │ │ ├── hal_lld.c | ||
| 290 | │ │ │ ├── hal_lld.h | ||
| 291 | │ │ │ ├── kinetis_registry.h | ||
| 292 | │ │ │ ├── platform.mk | ||
| 293 | │ │ │ ├── pwm_lld.c | ||
| 294 | │ │ │ └── pwm_lld.h | ||
| 295 | │ │ ├── LLD | ||
| 296 | │ │ │ ├── adc_lld.c | ||
| 297 | │ │ │ ├── adc_lld.h | ||
| 298 | │ │ │ ├── ext_lld.c | ||
| 299 | │ │ │ ├── ext_lld.h | ||
| 300 | │ │ │ ├── gpt_lld.c | ||
| 301 | │ │ │ ├── gpt_lld.h | ||
| 302 | │ │ │ ├── i2c_lld.c | ||
| 303 | │ │ │ ├── i2c_lld.h | ||
| 304 | │ │ │ ├── pal_lld.c | ||
| 305 | │ │ │ ├── pal_lld.h | ||
| 306 | │ │ │ ├── serial_lld.c | ||
| 307 | │ │ │ ├── serial_lld.h | ||
| 308 | │ │ │ ├── st_lld.c | ||
| 309 | │ │ │ ├── st_lld.h | ||
| 310 | │ │ │ ├── usb_lld.c | ||
| 311 | │ │ │ └── usb_lld.h | ||
| 312 | │ │ └── README.md | ||
| 313 | │ ├── LPC | ||
| 314 | │ ├── simulator | ||
| 315 | │ └── STM32 | ||
| 316 | ├── src | ||
| 317 | │ ├── adc.c | ||
| 318 | │ ├── can.c | ||
| 319 | │ ├── dac.c | ||
| 320 | │ ├── ext.c | ||
| 321 | │ ├── gpt.c | ||
| 322 | │ ├── hal.c | ||
| 323 | │ ├── hal_mmcsd.c | ||
| 324 | │ ├── hal_queues.c | ||
| 325 | │ ├── i2c.c | ||
| 326 | │ ├── i2s.c | ||
| 327 | │ ├── icu.c | ||
| 328 | │ ├── mac.c | ||
| 329 | │ ├── mmc_spi.c | ||
| 330 | │ ├── pal.c | ||
| 331 | │ ├── pwm.c | ||
| 332 | │ ├── rtc.c | ||
| 333 | │ ├── sdc.c | ||
| 334 | │ ├── serial.c | ||
| 335 | │ ├── serial_usb.c | ||
| 336 | │ ├── spi.c | ||
| 337 | │ ├── st.c | ||
| 338 | │ ├── uart.c | ||
| 339 | │ └── usb.c | ||
| 340 | └── templates | ||
| 341 | ├── adc_lld.c | ||
| 342 | ├── adc_lld.h | ||
| 343 | ├── can_lld.c | ||
| 344 | ├── can_lld.h | ||
| 345 | ├── dac_lld.c | ||
| 346 | ├── dac_lld.h | ||
| 347 | ├── ext_lld.c | ||
| 348 | ├── ext_lld.h | ||
| 349 | ├── gpt_lld.c | ||
| 350 | ├── gpt_lld.h | ||
| 351 | ├── halconf.h | ||
| 352 | ├── hal_lld.c | ||
| 353 | ├── hal_lld.h | ||
| 354 | ├── i2c_lld.c | ||
| 355 | ├── i2c_lld.h | ||
| 356 | ├── i2s_lld.c | ||
| 357 | ├── i2s_lld.h | ||
| 358 | ├── icu_lld.c | ||
| 359 | ├── icu_lld.h | ||
| 360 | ├── mac_lld.c | ||
| 361 | ├── mac_lld.h | ||
| 362 | ├── mcuconf.h | ||
| 363 | ├── osal | ||
| 364 | │ ├── osal.c | ||
| 365 | │ ├── osal.h | ||
| 366 | │ └── osal.mk | ||
| 367 | ├── pal_lld.c | ||
| 368 | ├── pal_lld.h | ||
| 369 | ├── platform.mk | ||
| 370 | ├── pwm_lld.c | ||
| 371 | ├── pwm_lld.h | ||
| 372 | ├── rtc_lld.c | ||
| 373 | ├── rtc_lld.h | ||
| 374 | ├── sdc_lld.c | ||
| 375 | ├── sdc_lld.h | ||
| 376 | ├── serial_lld.c | ||
| 377 | ├── serial_lld.h | ||
| 378 | ├── spi_lld.c | ||
| 379 | ├── spi_lld.h | ||
| 380 | ├── st_lld.c | ||
| 381 | ├── st_lld.h | ||
| 382 | ├── uart_lld.c | ||
| 383 | ├── uart_lld.h | ||
| 384 | ├── usb_lld.c | ||
| 385 | └── usb_lld.h | ||
diff --git a/keyboards/infinity60/config.h b/keyboards/infinity60/config.h index 16272e427..7cc5b3f91 100644 --- a/keyboards/infinity60/config.h +++ b/keyboards/infinity60/config.h | |||
| @@ -15,36 +15,47 @@ You should have received a copy of the GNU General Public License | |||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #ifndef CONFIG_H | 18 | #pragma once |
| 19 | #define CONFIG_H | ||
| 20 | 19 | ||
| 21 | /* USB Device descriptor parameter */ | 20 | /* USB Device descriptor parameter */ |
| 22 | #define VENDOR_ID 0x1c11 | 21 | #define VENDOR_ID 0x1C11 |
| 23 | #define PRODUCT_ID 0xb04d | 22 | #define PRODUCT_ID 0xB04D |
| 24 | #define DEVICE_VER 0x0001 | 23 | #define DEVICE_VER 0x0001 |
| 25 | #define MANUFACTURER Input Club | 24 | #define MANUFACTURER Input Club |
| 26 | #define PRODUCT Infinity_60%_LED/QMK | 25 | #define PRODUCT Infinity 60% (QMK) |
| 26 | |||
| 27 | /* key matrix size */ | 27 | /* key matrix size */ |
| 28 | #define MATRIX_ROWS 9 | 28 | #define MATRIX_ROWS 7 |
| 29 | #define MATRIX_COLS 7 | 29 | #define MATRIX_COLS 9 |
| 30 | 30 | ||
| 31 | /* define if matrix has ghost */ | 31 | /* |
| 32 | //#define MATRIX_HAS_GHOST | 32 | * Keyboard Matrix Assignments |
| 33 | * | ||
| 34 | * Change this to how you wired your keyboard | ||
| 35 | * COLS: AVR pins used for columns, left to right | ||
| 36 | * ROWS: AVR pins used for rows, top to bottom | ||
| 37 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 38 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 39 | * | ||
| 40 | */ | ||
| 41 | #define MATRIX_ROW_PINS { D1, D2, D3, D4, D5, D6, D7 } | ||
| 42 | #define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5, C6, C7, D0 } | ||
| 43 | #define UNUSED_PINS | ||
| 44 | |||
| 45 | /* COL2ROW, ROW2COL */ | ||
| 46 | #define DIODE_DIRECTION COL2ROW | ||
| 33 | 47 | ||
| 34 | /* Set 0 if debouncing isn't needed */ | 48 | /* Set 0 if debouncing isn't needed */ |
| 35 | #define DEBOUNCE 5 | 49 | #define DEBOUNCE 5 |
| 50 | |||
| 51 | /* define if matrix has ghost */ | ||
| 52 | //#define MATRIX_HAS_GHOST | ||
| 36 | 53 | ||
| 37 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 54 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
| 38 | //#define LOCKING_SUPPORT_ENABLE | 55 | //#define LOCKING_SUPPORT_ENABLE |
| 39 | /* Locking resynchronize hack */ | 56 | /* Locking resynchronize hack */ |
| 40 | //#define LOCKING_RESYNC_ENABLE | 57 | //#define LOCKING_RESYNC_ENABLE |
| 41 | 58 | ||
| 42 | /* Keymap for Infinity prototype */ | ||
| 43 | //#define INFINITY_PROTOTYPE | ||
| 44 | |||
| 45 | /* Keymap for Infinity 1.1a (first revision with LED support) */ | ||
| 46 | #define INFINITY_LED | ||
| 47 | |||
| 48 | /* | 59 | /* |
| 49 | * Feature disable options | 60 | * Feature disable options |
| 50 | * These options are also useful to firmware size reduction. | 61 | * These options are also useful to firmware size reduction. |
| @@ -62,5 +73,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 62 | //#define NO_ACTION_ONESHOT | 73 | //#define NO_ACTION_ONESHOT |
| 63 | //#define NO_ACTION_MACRO | 74 | //#define NO_ACTION_MACRO |
| 64 | //#define NO_ACTION_FUNCTION | 75 | //#define NO_ACTION_FUNCTION |
| 65 | |||
| 66 | #endif | ||
diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c index fdeed5124..73751140e 100644 --- a/keyboards/infinity60/infinity60.c +++ b/keyboards/infinity60/infinity60.c | |||
| @@ -14,19 +14,5 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | #include "infinity60.h" | ||
| 18 | |||
| 19 | void matrix_init_kb(void) { | ||
| 20 | // put your keyboard start-up code here | ||
| 21 | // runs once when the firmware starts up | ||
| 22 | |||
| 23 | matrix_init_user(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void matrix_scan_kb(void) { | ||
| 27 | // put your looping keyboard code here | ||
| 28 | // runs every cycle (a lot) | ||
| 29 | |||
| 30 | matrix_scan_user(); | ||
| 31 | } | ||
| 32 | 17 | ||
| 18 | #include "infinity60.h" | ||
diff --git a/keyboards/infinity60/infinity60.h b/keyboards/infinity60/infinity60.h index a71921045..ac1470d5f 100644 --- a/keyboards/infinity60/infinity60.h +++ b/keyboards/infinity60/infinity60.h | |||
| @@ -14,51 +14,23 @@ GNU General Public License for more details. | |||
| 14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | |||
| 17 | #pragma once | 18 | #pragma once |
| 18 | 19 | ||
| 19 | #include "quantum.h" | 20 | #include "quantum.h" |
| 20 | 21 | ||
| 21 | #ifdef INFINITY_PROTOTYPE | ||
| 22 | |||
| 23 | /* Infinity prototype */ | ||
| 24 | #define LAYOUT_60_ansi_split_bs_rshift( \ | 22 | #define LAYOUT_60_ansi_split_bs_rshift( \ |
| 25 | K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K86, \ | 23 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k10, k11, k12, k13, k14, k15, \ |
| 26 | K51, K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, \ | 24 | k16, k17, k18, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k31, \ |
| 27 | K13, K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, \ | 25 | k32, k33, k34, k35, k36, k37, k38, k40, k41, k42, k43, k44, k45, \ |
| 28 | K54, K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, \ | 26 | k46, k47, k48, k50, k51, k52, k53, k54, k55, k56, k57, k58, k60, \ |
| 29 | K06, K16, K26, K36, K46, K56, K66, K76 \ | 27 | k61, k62, k63, k64, k65, k66, k67, k68 \ |
| 30 | ) { \ | 28 | ) { \ |
| 31 | { K00, K01, K02, K03, K04, K05, K06 }, \ | 29 | { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ |
| 32 | { K10, K11, K12, K13, K14, K15, K16 }, \ | 30 | { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ |
| 33 | { K20, K21, K22, K23, K24, K25, K26 }, \ | 31 | { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ |
| 34 | { K30, K31, K32, K33, K34, K35, K36 }, \ | 32 | { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ |
| 35 | { K40, K41, K42, K43, K44, K45, K46 }, \ | 33 | { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ |
| 36 | { K50, K51, K52, K53, K54, K55, K56 }, \ | 34 | { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ |
| 37 | { K60, K61, K62, K63, K64, K65, K66 }, \ | 35 | { k60, k61, k62, k63, k64, k65, k66, k67, k68 } \ |
| 38 | { K70, K71, K72, K73, K74, K75, K76 }, \ | ||
| 39 | { K80, K81, K82, K83, K84, K85, K86 } \ | ||
| 40 | } | 36 | } |
| 41 | |||
| 42 | #else | ||
| 43 | |||
| 44 | /* Infinity production */ | ||
| 45 | #define LAYOUT_60_ansi_split_bs_rshift( \ | ||
| 46 | K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, \ | ||
| 47 | K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, \ | ||
| 48 | K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, \ | ||
| 49 | K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, K06, \ | ||
| 50 | K16, K26, K36, K46, K56, K66, K76, K86 \ | ||
| 51 | ) { \ | ||
| 52 | { K00, K01, K02, K03, K04, K05, K06 }, \ | ||
| 53 | { K10, K11, K12, K13, K14, K15, K16 }, \ | ||
| 54 | { K20, K21, K22, K23, K24, K25, K26 }, \ | ||
| 55 | { K30, K31, K32, K33, K34, K35, K36 }, \ | ||
| 56 | { K40, K41, K42, K43, K44, K45, K46 }, \ | ||
| 57 | { K50, K51, K52, K53, K54, K55, K56 }, \ | ||
| 58 | { K60, K61, K62, K63, K64, K65, K66 }, \ | ||
| 59 | { K70, K71, K72, K73, K74, K75, K76 }, \ | ||
| 60 | { K80, K81, K82, K83, K84, K85, K86 } \ | ||
| 61 | } | ||
| 62 | |||
| 63 | #endif | ||
| 64 | |||
diff --git a/keyboards/infinity60/info.json b/keyboards/infinity60/info.json index 06df911e5..b512d7d88 100644 --- a/keyboards/infinity60/info.json +++ b/keyboards/infinity60/info.json | |||
| @@ -1,78 +1,81 @@ | |||
| 1 | { | 1 | { |
| 2 | "keyboard_name": "Infinity 60%", | 2 | "keyboard_name": "Infinity 60%", |
| 3 | "keyboard_folder": "infinity60", | 3 | "keyboard_folder": "infinity60", |
| 4 | "url": "https://input.club/devices/infinity-keyboard/", | 4 | "url": "https://input.club/devices/infinity-keyboard/", |
| 5 | "maintainer": "qmk", | 5 | "maintainer": "qmk", |
| 6 | "width": 15, | 6 | "width": 15, |
| 7 | "height": 5, | 7 | "height": 5, |
| 8 | "layouts": { | 8 | "layouts": { |
| 9 | "LAYOUT_60_ansi_split_bs_rshift": { | 9 | "LAYOUT_60_ansi_split_bs_rshift": { |
| 10 | "key_count": 63, | 10 | "layout": [ |
| 11 | "layout": [ | 11 | {"x": 0, "y": 0}, |
| 12 | {"label":"Esc", "x":0, "y":0}, | 12 | {"x": 1, "y": 0}, |
| 13 | {"label":"1", "x":1, "y":0}, | 13 | {"x": 2, "y": 0}, |
| 14 | {"label":"2", "x":2, "y":0}, | 14 | {"x": 3, "y": 0}, |
| 15 | {"label":"3", "x":3, "y":0}, | 15 | {"x": 4, "y": 0}, |
| 16 | {"label":"4", "x":4, "y":0}, | 16 | {"x": 5, "y": 0}, |
| 17 | {"label":"5", "x":5, "y":0}, | 17 | {"x": 6, "y": 0}, |
| 18 | {"label":"6", "x":6, "y":0}, | 18 | {"x": 7, "y": 0}, |
| 19 | {"label":"7", "x":7, "y":0}, | 19 | {"x": 8, "y": 0}, |
| 20 | {"label":"8", "x":8, "y":0}, | 20 | {"x": 9, "y": 0}, |
| 21 | {"label":"9", "x":9, "y":0}, | 21 | {"x": 10, "y": 0}, |
| 22 | {"label":"0", "x":10, "y":0}, | 22 | {"x": 11, "y": 0}, |
| 23 | {"label":"-", "x":11, "y":0}, | 23 | {"x": 12, "y": 0}, |
| 24 | {"label":"=", "x":12, "y":0}, | 24 | {"x": 13, "y": 0}, |
| 25 | {"label":"\\", "x":13, "y":0}, | 25 | {"x": 14, "y": 0}, |
| 26 | {"label":"`", "x":14, "y":0}, | 26 | |
| 27 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | 27 | {"x": 0, "y": 1, "w": 1.5}, |
| 28 | {"label":"Q", "x":1.5, "y":1}, | 28 | {"x": 1.5, "y": 1}, |
| 29 | {"label":"W", "x":2.5, "y":1}, | 29 | {"x": 2.5, "y": 1}, |
| 30 | {"label":"E", "x":3.5, "y":1}, | 30 | {"x": 3.5, "y": 1}, |
| 31 | {"label":"R", "x":4.5, "y":1}, | 31 | {"x": 4.5, "y": 1}, |
| 32 | {"label":"T", "x":5.5, "y":1}, | 32 | {"x": 5.5, "y": 1}, |
| 33 | {"label":"Y", "x":6.5, "y":1}, | 33 | {"x": 6.5, "y": 1}, |
| 34 | {"label":"U", "x":7.5, "y":1}, | 34 | {"x": 7.5, "y": 1}, |
| 35 | {"label":"I", "x":8.5, "y":1}, | 35 | {"x": 8.5, "y": 1}, |
| 36 | {"label":"O", "x":9.5, "y":1}, | 36 | {"x": 9.5, "y": 1}, |
| 37 | {"label":"P", "x":10.5, "y":1}, | 37 | {"x": 10.5, "y": 1}, |
| 38 | {"label":"[", "x":11.5, "y":1}, | 38 | {"x": 11.5, "y": 1}, |
| 39 | {"label":"]", "x":12.5, "y":1}, | 39 | {"x": 12.5, "y": 1}, |
| 40 | {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, | 40 | {"x": 13.5, "y": 1, "w": 1.5}, |
| 41 | {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, | 41 | |
| 42 | {"label":"A", "x":1.75, "y":2}, | 42 | {"x": 0, "y": 2, "w": 1.75}, |
| 43 | {"label":"S", "x":2.75, "y":2}, | 43 | {"x": 1.75, "y": 2}, |
| 44 | {"label":"D", "x":3.75, "y":2}, | 44 | {"x": 2.75, "y": 2}, |
| 45 | {"label":"F", "x":4.75, "y":2}, | 45 | {"x": 3.75, "y": 2}, |
| 46 | {"label":"G", "x":5.75, "y":2}, | 46 | {"x": 4.75, "y": 2}, |
| 47 | {"label":"H", "x":6.75, "y":2}, | 47 | {"x": 5.75, "y": 2}, |
| 48 | {"label":"J", "x":7.75, "y":2}, | 48 | {"x": 6.75, "y": 2}, |
| 49 | {"label":"K", "x":8.75, "y":2}, | 49 | {"x": 7.75, "y": 2}, |
| 50 | {"label":"L", "x":9.75, "y":2}, | 50 | {"x": 8.75, "y": 2}, |
| 51 | {"label":";", "x":10.75, "y":2}, | 51 | {"x": 9.75, "y": 2}, |
| 52 | {"label":"'", "x":11.75, "y":2}, | 52 | {"x": 10.75, "y": 2}, |
| 53 | {"label":"Enter", "x":12.75, "y":2, "w":2.25}, | 53 | {"x": 11.75, "y": 2}, |
| 54 | {"label":"Shift", "x":0, "y":3, "w":2.25}, | 54 | {"x": 12.75, "y": 2, "w": 2.25}, |
| 55 | {"label":"Z", "x":2.25, "y":3}, | 55 | |
| 56 | {"label":"X", "x":3.25, "y":3}, | 56 | {"x": 0, "y": 3, "w": 2.25}, |
| 57 | {"label":"C", "x":4.25, "y":3}, | 57 | {"x": 2.25, "y": 3}, |
| 58 | {"label":"V", "x":5.25, "y":3}, | 58 | {"x": 3.25, "y": 3}, |
| 59 | {"label":"B", "x":6.25, "y":3}, | 59 | {"x": 4.25, "y": 3}, |
| 60 | {"label":"N", "x":7.25, "y":3}, | 60 | {"x": 5.25, "y": 3}, |
| 61 | {"label":"M", "x":8.25, "y":3}, | 61 | {"x": 6.25, "y": 3}, |
| 62 | {"label":",", "x":9.25, "y":3}, | 62 | {"x": 7.25, "y": 3}, |
| 63 | {"label":".", "x":10.25, "y":3}, | 63 | {"x": 8.25, "y": 3}, |
| 64 | {"label":"/", "x":11.25, "y":3}, | 64 | {"x": 9.25, "y": 3}, |
| 65 | {"label":"Shift", "x":12.25, "y":3, "w":1.75}, | 65 | {"x": 10.25, "y": 3}, |
| 66 | {"label":"Fn", "x":14, "y":3}, | 66 | {"x": 11.25, "y": 3}, |
| 67 | {"label":"Ctrl", "x":0, "y":4, "w":1.5}, | 67 | {"x": 12.25, "y": 3, "w": 1.75}, |
| 68 | {"label":"GUI", "x":1.5, "y":4}, | 68 | {"x": 14, "y": 3}, |
| 69 | {"label":"Alt", "x":2.5, "y":4, "w":1.5}, | 69 | |
| 70 | {"label":"Space", "x":4, "y":4, "w":6}, | 70 | {"x": 0, "y": 4, "w": 1.5}, |
| 71 | {"label":"Alt", "x":10, "y":4, "w":1.5}, | 71 | {"x": 1.5, "y": 4}, |
| 72 | {"label":"GUI", "x":11.5, "y":4}, | 72 | {"x": 2.5, "y": 4, "w": 1.5}, |
| 73 | {"label":"Fn", "x":12.5, "y":4}, | 73 | {"x": 4, "y": 4, "w": 6}, |
| 74 | {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} | 74 | {"x": 10, "y": 4, "w": 1.5}, |
| 75 | ] | 75 | {"x": 11.5, "y": 4}, |
| 76 | {"x": 12.5, "y": 4}, | ||
| 77 | {"x": 13.5, "y": 4, "w": 1.5} | ||
| 78 | ] | ||
| 79 | } | ||
| 76 | } | 80 | } |
| 77 | } | ||
| 78 | } | 81 | } |
diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index f64e7c899..5766d503c 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c | |||
| @@ -1,43 +1,45 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 4 | /* Layer 0: Default Layer | 4 | /* |
| 5 | * ,-----------------------------------------------------------. | 5 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ |
| 6 | * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| | 6 | * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ |
| 7 | * |-----------------------------------------------------------| | 7 | * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ |
| 8 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Bksp| | 8 | * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ Bspc│ |
| 9 | * |-----------------------------------------------------------| | 9 | * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ |
| 10 | * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | | 10 | * │ Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ |
| 11 | * |-----------------------------------------------------------| | 11 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ |
| 12 | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| | 12 | * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ Fn│ |
| 13 | * |-----------------------------------------------------------' | 13 | * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴┬───┬─┴───┤ |
| 14 | * | |Gui|Alt | Space |Alt |Gui| | | | 14 | * │ │GUI│ Alt │ │ Alt │GUI│ │ │ |
| 15 | * `-----------------------------------------------------------' | 15 | * └─────┴───┴─────┴───────────────────────┴─────┴───┴───┴─────┘ |
| 16 | */ | 16 | */ |
| 17 | [0] = LAYOUT_60_ansi_split_bs_rshift( | 17 | [0] = LAYOUT_60_ansi_split_bs_rshift( |
| 18 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS, KC_GRV, \ | 18 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, |
| 19 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, \ | 19 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, |
| 20 | KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, \ | 20 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, |
| 21 | KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,MO(1), \ | 21 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), |
| 22 | KC_NO, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_NO, KC_NO), | 22 | XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX |
| 23 | ), | ||
| 23 | 24 | ||
| 24 | /* Layer 1: HHKB mode (HHKB Fn) | 25 | /* |
| 25 | * ,-----------------------------------------------------------. | 26 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ |
| 26 | * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| | 27 | * │Pwr│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Ins│Del│ |
| 27 | * |-----------------------------------------------------------| | 28 | * ├───┴─┬─┴───┴───┴───┴───┴───┴───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┘ |
| 28 | * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| | 29 | * │Caps │ │ │ │ │ │ │ │PSc│Slk│Pse│ ↑ │ │ │ |
| 29 | * |-----------------------------------------------------------| | 30 | * └─────┘┌───┬───┬───┐──┴┬──┴┌───┬──┴┬──┴┬──┴┬──┴┬──┴┬────────┐ |
| 30 | * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | | 31 | * │ │Vl-│Vl+│Mut│ │ │ * │ / │Hom│PgU│ ← │ → │ Enter │ |
| 31 | * |-----------------------------------------------------------| | 32 | * ├──────└─┬─┴───┴───┘─┬─┴─┬─└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┘ |
| 32 | * | | | | | | | +| -|End|PgD|Dow| | | | 33 | * │ │ │ │ │ │ │ + │ - │End│PgD│ ↓ │ │ │ |
| 33 | * `-----------------------------------------------------------' | 34 | * ├─────┬──┴┬──┴──┬┴───┴───┴───└───┴───┴───┴───┴───┘┬───┬─┴───┤ |
| 34 | * | |Gui|Alt | Space |Alt |Gui| | | | 35 | * │ │ │ │ │ │ │ │ │ |
| 35 | * `-----------------------------------------------------------' | 36 | * └─────┴───┴─────┴───────────────────────┴─────┴───┴───┴─────┘ |
| 36 | */ | 37 | */ |
| 37 | [1] = LAYOUT_60_ansi_split_bs_rshift( | 38 | [1] = LAYOUT_60_ansi_split_bs_rshift( |
| 38 | KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | 39 | KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
| 39 | KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ | 40 | KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, |
| 40 | KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_PENT, \ | 41 | _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, |
| 41 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS, \ | 42 | _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, |
| 42 | KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), | 43 | _______, _______, _______, _______, _______, _______, _______, _______ |
| 44 | ) | ||
| 43 | }; | 45 | }; |
diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index 51def2656..be14c1b97 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c | |||
| @@ -15,11 +15,12 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 15 | * `-----------------------------------------------------------' | 15 | * `-----------------------------------------------------------' |
| 16 | */ | 16 | */ |
| 17 | [0] = LAYOUT_60_ansi_split_bs_rshift( | 17 | [0] = LAYOUT_60_ansi_split_bs_rshift( |
| 18 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, \ | 18 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, |
| 19 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, \ | 19 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, |
| 20 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_SCLN), KC_QUOT,MT(KC_RCTL, KC_ENT), \ | 20 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_SCLN), KC_QUOT, MT(KC_RCTL, KC_ENT), |
| 21 | OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, LT(2, KC_SLSH), KC_RSFT,TG(1), \ | 21 | OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(2, KC_SLSH), KC_RSFT, TG(1), |
| 22 | KC_NO, KC_LGUI,KC_LALT, LT(4, KC_SPC), MO(4), KC_RGUI,KC_NO, KC_NO), | 22 | KC_NO, KC_LGUI, KC_LALT, LT(4, KC_SPC), MO(4), KC_RGUI, KC_NO, KC_NO |
| 23 | ), | ||
| 23 | 24 | ||
| 24 | /* Layer 1: HHKB mode (HHKB Fn) | 25 | /* Layer 1: HHKB mode (HHKB Fn) |
| 25 | * ,-----------------------------------------------------------. | 26 | * ,-----------------------------------------------------------. |
| @@ -35,11 +36,12 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 35 | * `-----------------------------------------------------------' | 36 | * `-----------------------------------------------------------' |
| 36 | */ | 37 | */ |
| 37 | [1] = LAYOUT_60_ansi_split_bs_rshift( | 38 | [1] = LAYOUT_60_ansi_split_bs_rshift( |
| 38 | KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | 39 | KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
| 39 | KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS,KC_BSPC, \ | 40 | KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS,KC_BSPC, |
| 40 | KC_LCTL,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_ENT, \ | 41 | KC_LCTL,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_ENT, |
| 41 | KC_LSFT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS, \ | 42 | KC_LSFT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS, |
| 42 | KC_TRNS,KC_LGUI,KC_LALT, KC_TRNS, KC_RALT,KC_RGUI,KC_TRNS,KC_TRNS), | 43 | KC_TRNS,KC_LGUI,KC_LALT, KC_TRNS, KC_RALT,KC_RGUI,KC_TRNS,KC_TRNS |
| 44 | ), | ||
| 43 | 45 | ||
| 44 | /* Layer 2: Vi mode[Slash] | 46 | /* Layer 2: Vi mode[Slash] |
| 45 | * ,-----------------------------------------------------------. | 47 | * ,-----------------------------------------------------------. |
| @@ -55,11 +57,12 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 55 | * `-------------------------------------------' | 57 | * `-------------------------------------------' |
| 56 | */ | 58 | */ |
| 57 | [2] = LAYOUT_60_ansi_split_bs_rshift( | 59 | [2] = LAYOUT_60_ansi_split_bs_rshift( |
| 58 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | 60 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
| 59 | KC_TAB, KC_HOME,KC_PGDN,KC_UP, KC_PGUP,KC_END, KC_HOME,KC_PGDN,KC_PGUP,KC_END, KC_NO, KC_NO, KC_NO, KC_BSPC, \ | 61 | KC_TAB, KC_HOME,KC_PGDN,KC_UP, KC_PGUP,KC_END, KC_HOME,KC_PGDN,KC_PGUP,KC_END, KC_NO, KC_NO, KC_NO, KC_BSPC, |
| 60 | KC_LCTL,KC_NO, KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_NO, KC_NO, KC_ENT, \ | 62 | KC_LCTL,KC_NO, KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_NO, KC_NO, KC_ENT, |
| 61 | KC_LSFT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME,KC_PGDN,KC_PGUP,KC_END, LT(2, KC_SLSH), KC_RSFT,KC_TRNS, \ | 63 | KC_LSFT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME,KC_PGDN,KC_PGUP,KC_END, LT(2, KC_SLSH), KC_RSFT,KC_TRNS, |
| 62 | KC_TRNS,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_TRNS, KC_TRNS), | 64 | KC_TRNS,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_TRNS, KC_TRNS |
| 65 | ), | ||
| 63 | 66 | ||
| 64 | /* Layer 3: Mouse mode(IJKL)[Semicolon] | 67 | /* Layer 3: Mouse mode(IJKL)[Semicolon] |
| 65 | * ,-----------------------------------------------------------. | 68 | * ,-----------------------------------------------------------. |
| @@ -76,11 +79,12 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 76 | * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel | 79 | * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel |
| 77 | */ | 80 | */ |
| 78 | [3] = LAYOUT_60_ansi_split_bs_rshift( | 81 | [3] = LAYOUT_60_ansi_split_bs_rshift( |
| 79 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | 82 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
| 80 | LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R, ALT_T(KC_LEFT), ALT_T(KC_RGHT),LALT(KC_TAB), \ | 83 | LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R, ALT_T(KC_LEFT), ALT_T(KC_RGHT),LALT(KC_TAB), |
| 81 | KC_LCTL, KC_ACL0,KC_ACL1,KC_ACL2,KC_ACL2,KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, LT(3, KC_SCLN), KC_NO, KC_ENT, \ | 84 | KC_LCTL, KC_ACL0,KC_ACL1,KC_ACL2,KC_ACL2,KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, LT(3, KC_SCLN), KC_NO, KC_ENT, |
| 82 | KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT), ALT_T(KC_RGHT), KC_NO, KC_RSFT, KC_TRNS, \ | 85 | KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT), ALT_T(KC_RGHT), KC_NO, KC_RSFT, KC_TRNS, |
| 83 | KC_TRNS, KC_LGUI,KC_LALT, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 86 | KC_TRNS, KC_LGUI,KC_LALT, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
| 87 | ), | ||
| 84 | 88 | ||
| 85 | /* Layer 4: Mouse mode(IJKL)[Space] | 89 | /* Layer 4: Mouse mode(IJKL)[Space] |
| 86 | * ,-----------------------------------------------------------. | 90 | * ,-----------------------------------------------------------. |
| @@ -88,29 +92,19 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 88 | * |-----------------------------------------------------------| | 92 | * |-----------------------------------------------------------| |
| 89 | * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| | 93 | * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| |
| 90 | * |-----------------------------------------------------------| | 94 | * |-----------------------------------------------------------| |
| 91 | * |Contro| | | | | |Mb2|McL|McD|McR|Mb1| |Return | | 95 | * |Contro|VlD|VlU|VlM| | | |McL|McD|McR|Mb1| |Return | |
| 92 | * |-----------------------------------------------------------| | 96 | * |-----------------------------------------------------------| |
| 93 | * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | | 97 | * |Shift | | | | |Mb3|Mb2|Mb1|A/L|A/R| |Shift | | |
| 94 | * `-----------------------------------------------------------' | 98 | * `-----------------------------------------------------------' |
| 95 | * |Gui |Alt | Mb1 |Fn |Fn | | 99 | * |Gui |Alt | Mb1 |Fn |Fn | |
| 96 | * `--------------------------------------------' | 100 | * `--------------------------------------------' |
| 97 | * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel | 101 | * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel |
| 98 | */ | 102 | */ |
| 99 | [4] = LAYOUT_60_ansi_split_bs_rshift( | 103 | [4] = LAYOUT_60_ansi_split_bs_rshift( |
| 100 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | 104 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, |
| 101 | LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R,KC_BTN4,KC_BTN5,LALT(KC_TAB), \ | 105 | LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_MS_U, KC_WH_U, KC_WH_R, KC_BTN4, KC_BTN5, LALT(KC_TAB), |
| 102 | KC_LCTL, KC_VOLD,KC_VOLU,KC_MUTE,KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, KC_BTN1,KC_NO, KC_ENT, \ | 106 | KC_LCTL, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_NO, KC_ENT, |
| 103 | KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT),ALT_T(KC_RGHT),KC_NO, KC_RSFT,KC_TRNS, \ | 107 | KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3, KC_BTN2, KC_BTN1, ALT_T(KC_LEFT), ALT_T(KC_RGHT), KC_NO, KC_RSFT, KC_NO, |
| 104 | KC_TRNS, KC_LGUI,KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), | 108 | KC_NO, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
| 105 | 109 | ) | |
| 106 | }; | ||
| 107 | |||
| 108 | // Runs just one time when the keyboard initializes. | ||
| 109 | void matrix_init_user(void) { | ||
| 110 | |||
| 111 | }; | ||
| 112 | |||
| 113 | // Runs constantly in the background, in a loop. | ||
| 114 | void matrix_scan_user(void) { | ||
| 115 | |||
| 116 | }; | 110 | }; |
diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c deleted file mode 100644 index c147ceecb..000000000 --- a/keyboards/infinity60/matrix.c +++ /dev/null | |||
| @@ -1,198 +0,0 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include <stdbool.h> | ||
| 3 | #include <string.h> | ||
| 4 | #include <hal.h> | ||
| 5 | #include "timer.h" | ||
| 6 | #include "wait.h" | ||
| 7 | #include "print.h" | ||
| 8 | #include "matrix.h" | ||
| 9 | |||
| 10 | |||
| 11 | /* | ||
| 12 | * Infinity Pinusage: | ||
| 13 | * Column pins are input with internal pull-down. Row pins are output and strobe with high. | ||
| 14 | * Key is high or 1 when it turns on. | ||
| 15 | * INFINITY PRODUCTION (NO LED) | ||
| 16 | * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } | ||
| 17 | * row: { PTB0, PTB1, PTB2, PTB3, PTB16, PTB17, PTC4, PTC5, PTD0 } | ||
| 18 | * INFINITY PRODUCTION (WITH LED) | ||
| 19 | * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } | ||
| 20 | * row: { PTC0, PTC1, PTC2, PTC3, PTC4, PTC5, PTC6, PTC7, PTD0 } | ||
| 21 | */ | ||
| 22 | /* matrix state(1:on, 0:off) */ | ||
| 23 | static matrix_row_t matrix[MATRIX_ROWS]; | ||
| 24 | static matrix_row_t matrix_debouncing[MATRIX_ROWS]; | ||
| 25 | static bool debouncing = false; | ||
| 26 | static uint16_t debouncing_time = 0; | ||
| 27 | |||
| 28 | |||
| 29 | void matrix_init(void) | ||
| 30 | { | ||
| 31 | /* Column(sense) */ | ||
| 32 | palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); | ||
| 33 | palSetPadMode(GPIOD, 2, PAL_MODE_INPUT_PULLDOWN); | ||
| 34 | palSetPadMode(GPIOD, 3, PAL_MODE_INPUT_PULLDOWN); | ||
| 35 | palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); | ||
| 36 | palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); | ||
| 37 | palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); | ||
| 38 | palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); | ||
| 39 | |||
| 40 | #ifdef INFINITY_LED | ||
| 41 | /* Row(strobe) */ | ||
| 42 | palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 43 | palSetPadMode(GPIOC, 1, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 44 | palSetPadMode(GPIOC, 2, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 45 | palSetPadMode(GPIOC, 3, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 46 | palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 47 | palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 48 | palSetPadMode(GPIOC, 6, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 49 | palSetPadMode(GPIOC, 7, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 50 | palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 51 | #else | ||
| 52 | /* Row(strobe) */ | ||
| 53 | palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 54 | palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 55 | palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 56 | palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 57 | palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 58 | palSetPadMode(GPIOB, 17, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 59 | palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 60 | palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 61 | palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); | ||
| 62 | #endif | ||
| 63 | memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | ||
| 64 | memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | ||
| 65 | |||
| 66 | matrix_init_quantum(); | ||
| 67 | } | ||
| 68 | |||
| 69 | uint8_t matrix_scan(void) | ||
| 70 | { | ||
| 71 | for (int row = 0; row < MATRIX_ROWS; row++) { | ||
| 72 | matrix_row_t data = 0; | ||
| 73 | #ifdef INFINITY_LED | ||
| 74 | // strobe row | ||
| 75 | switch (row) { | ||
| 76 | case 0: palSetPad(GPIOC, 0); break; | ||
| 77 | case 1: palSetPad(GPIOC, 1); break; | ||
| 78 | case 2: palSetPad(GPIOC, 2); break; | ||
| 79 | case 3: palSetPad(GPIOC, 3); break; | ||
| 80 | case 4: palSetPad(GPIOC, 4); break; | ||
| 81 | case 5: palSetPad(GPIOC, 5); break; | ||
| 82 | case 6: palSetPad(GPIOC, 6); break; | ||
| 83 | case 7: palSetPad(GPIOC, 7); break; | ||
| 84 | case 8: palSetPad(GPIOD, 0); break; | ||
| 85 | } | ||
| 86 | #else | ||
| 87 | // strobe row | ||
| 88 | switch (row) { | ||
| 89 | case 0: palSetPad(GPIOB, 0); break; | ||
| 90 | case 1: palSetPad(GPIOB, 1); break; | ||
| 91 | case 2: palSetPad(GPIOB, 2); break; | ||
| 92 | case 3: palSetPad(GPIOB, 3); break; | ||
| 93 | case 4: palSetPad(GPIOB, 16); break; | ||
| 94 | case 5: palSetPad(GPIOB, 17); break; | ||
| 95 | case 6: palSetPad(GPIOC, 4); break; | ||
| 96 | case 7: palSetPad(GPIOC, 5); break; | ||
| 97 | case 8: palSetPad(GPIOD, 0); break; | ||
| 98 | } | ||
| 99 | #endif | ||
| 100 | |||
| 101 | // need wait to settle pin state | ||
| 102 | // if you wait too short, or have a too high update rate | ||
| 103 | // the keyboard might freeze, or there might not be enough | ||
| 104 | // processing power to update the LCD screen properly. | ||
| 105 | // 20us, or two ticks at 100000Hz seems to be OK | ||
| 106 | wait_us(20); | ||
| 107 | |||
| 108 | // read col data | ||
| 109 | data = (palReadPort(GPIOD)>>1); | ||
| 110 | #ifdef INFINITY_LED | ||
| 111 | // un-strobe row | ||
| 112 | switch (row) { | ||
| 113 | case 0: palClearPad(GPIOC, 0); break; | ||
| 114 | case 1: palClearPad(GPIOC, 1); break; | ||
| 115 | case 2: palClearPad(GPIOC, 2); break; | ||
| 116 | case 3: palClearPad(GPIOC, 3); break; | ||
| 117 | case 4: palClearPad(GPIOC, 4); break; | ||
| 118 | case 5: palClearPad(GPIOC, 5); break; | ||
| 119 | case 6: palClearPad(GPIOC, 6); break; | ||
| 120 | case 7: palClearPad(GPIOC, 7); break; | ||
| 121 | case 8: palClearPad(GPIOD, 0); break; | ||
| 122 | } | ||
| 123 | #else | ||
| 124 | // un-strobe row | ||
| 125 | switch (row) { | ||
| 126 | case 0: palClearPad(GPIOB, 0); break; | ||
| 127 | case 1: palClearPad(GPIOB, 1); break; | ||
| 128 | case 2: palClearPad(GPIOB, 2); break; | ||
| 129 | case 3: palClearPad(GPIOB, 3); break; | ||
| 130 | case 4: palClearPad(GPIOB, 16); break; | ||
| 131 | case 5: palClearPad(GPIOB, 17); break; | ||
| 132 | case 6: palClearPad(GPIOC, 4); break; | ||
| 133 | case 7: palClearPad(GPIOC, 5); break; | ||
| 134 | case 8: palClearPad(GPIOD, 0); break; | ||
| 135 | } | ||
| 136 | #endif | ||
| 137 | |||
| 138 | if (matrix_debouncing[row] != data) { | ||
| 139 | matrix_debouncing[row] = data; | ||
| 140 | debouncing = true; | ||
| 141 | debouncing_time = timer_read(); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { | ||
| 146 | for (int row = 0; row < MATRIX_ROWS; row++) { | ||
| 147 | matrix[row] = matrix_debouncing[row]; | ||
| 148 | } | ||
| 149 | debouncing = false; | ||
| 150 | } | ||
| 151 | matrix_scan_quantum(); | ||
| 152 | return 1; | ||
| 153 | } | ||
| 154 | |||
| 155 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
| 156 | { | ||
| 157 | return (matrix[row] & (1<<col)); | ||
| 158 | } | ||
| 159 | |||
| 160 | matrix_row_t matrix_get_row(uint8_t row) | ||
| 161 | { | ||
| 162 | return matrix[row]; | ||
| 163 | } | ||
| 164 | |||
| 165 | void matrix_print(void) | ||
| 166 | { | ||
| 167 | xprintf("\nr/c 01234567\n"); | ||
| 168 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
| 169 | xprintf("%02X: "); | ||
| 170 | matrix_row_t data = matrix_get_row(row); | ||
| 171 | for (int col = 0; col < MATRIX_COLS; col++) { | ||
| 172 | if (data & (1<<col)) | ||
| 173 | xprintf("1"); | ||
| 174 | else | ||
| 175 | xprintf("0"); | ||
| 176 | } | ||
| 177 | xprintf("\n"); | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 181 | __attribute__ ((weak)) | ||
| 182 | void matrix_init_kb(void) { | ||
| 183 | matrix_init_user(); | ||
| 184 | } | ||
| 185 | |||
| 186 | __attribute__ ((weak)) | ||
| 187 | void matrix_scan_kb(void) { | ||
| 188 | matrix_scan_user(); | ||
| 189 | } | ||
| 190 | |||
| 191 | __attribute__ ((weak)) | ||
| 192 | void matrix_init_user(void) { | ||
| 193 | } | ||
| 194 | |||
| 195 | __attribute__ ((weak)) | ||
| 196 | void matrix_scan_user(void) { | ||
| 197 | } | ||
| 198 | |||
diff --git a/keyboards/infinity60/readme.md b/keyboards/infinity60/readme.md index 01f3a8a2f..d99d1df08 100644 --- a/keyboards/infinity60/readme.md +++ b/keyboards/infinity60/readme.md | |||
| @@ -1,15 +1,17 @@ | |||
| 1 | Infinity 60% | 1 | # Infinity 60% |
| 2 | ============ | ||
| 3 | 2 | ||
| 4 | A compact community driven keyboard. | 3 | A compact community driven keyboard. |
| 5 | 4 | ||
| 6 | Keyboard Maintainer: QMK Community | 5 | * Keyboard Maintainer: QMK Community |
| 7 | Hardware Supported: Infinity 60% PCB | 6 | * Hardware Supported: Infinity 60% PCB |
| 8 | Hardware Availability: https://input.club/devices/infinity-keyboard/ | 7 | * Hardware Availability: https://input.club/devices/infinity-keyboard/ |
| 9 | 8 | ||
| 10 | Make example for this keyboard (after setting up your build environment): | 9 | Make example for this keyboard (after setting up your build environment): |
| 11 | 10 | ||
| 12 | make infinity60:default | 11 | make infinity60:default |
| 13 | 12 | ||
| 14 | 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). | 13 | Flashing example for this keyboard: |
| 14 | |||
| 15 | make infinity60:default:flash | ||
| 15 | 16 | ||
| 17 | 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/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 8f962a53d..595b7bfb9 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk | |||
| @@ -14,24 +14,27 @@ BOOTLOADER = kiibohd | |||
| 14 | BOARD = MCHCK_K20 | 14 | BOARD = MCHCK_K20 |
| 15 | 15 | ||
| 16 | # Build Options | 16 | # Build Options |
| 17 | # comment out to disable the options. | 17 | # change yes to no to disable |
| 18 | # | 18 | # |
| 19 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | 19 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration |
| 20 | MOUSEKEY_ENABLE = yes # Mouse keys | 20 | MOUSEKEY_ENABLE = yes # Mouse keys |
| 21 | EXTRAKEY_ENABLE = yes # Audio control and System control | 21 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 22 | CONSOLE_ENABLE = yes # Console for debug | 22 | CONSOLE_ENABLE = yes # Console for debug |
| 23 | COMMAND_ENABLE = yes # Commands for debug and configuration | 23 | COMMAND_ENABLE = yes # Commands for debug and configuration |
| 24 | SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend | 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 25 | NKRO_ENABLE = yes # USB Nkey Rollover | 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 26 | CUSTOM_MATRIX = yes # Custom matrix file | 26 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 27 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 28 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 29 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 30 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 31 | AUDIO_ENABLE = no # Audio output | ||
| 27 | 32 | ||
| 28 | # project specific files | 33 | # project specific files |
| 29 | SRC = matrix.c \ | 34 | SRC += led.c \ |
| 30 | led.c \ | 35 | led_controller.c |
| 31 | led_controller.c | ||
| 32 | 36 | ||
| 33 | LAYOUTS = 60_ansi_split_bs_rshift | 37 | LAYOUTS = 60_ansi_split_bs_rshift |
| 34 | 38 | ||
| 35 | |||
| 36 | # Enter lower-power sleep mode when on the ChibiOS idle thread | 39 | # Enter lower-power sleep mode when on the ChibiOS idle thread |
| 37 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE | 40 | OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE |
