From: skullydazed Date: Wed, 18 Oct 2017 01:05:21 +0000 (-0700) Subject: Reorganize clueboard into a single directory (#1855) X-Git-Url: https://git.donarmstrong.com/?p=qmk_firmware.git;a=commitdiff_plain;h=3f3fa0791895f14370b4bb3e8512597688c45122 Reorganize clueboard into a single directory (#1855) --- diff --git a/keyboards/clueboard/17/clueboard_17.c b/keyboards/clueboard/17/clueboard_17.c new file mode 100644 index 000000000..04cc81217 --- /dev/null +++ b/keyboards/clueboard/17/clueboard_17.c @@ -0,0 +1,60 @@ +#include "clueboard_17.h" + +int pwm_level; + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1<> 8; + OCR4A = 0xFF & pwm_level; +} diff --git a/keyboards/clueboard/17/clueboard_17.h b/keyboards/clueboard/17/clueboard_17.h new file mode 100644 index 000000000..5e4a5999e --- /dev/null +++ b/keyboards/clueboard/17/clueboard_17.h @@ -0,0 +1,36 @@ +#ifndef CLUEPAD_H +#define CLUEPAD_H + +#include "quantum.h" + + +/* Cluepad matrix layout + * .-------------------. + * |NLCK| /| *| -| + * |-------------------| + * | 7| 8| 9| | + * |--------------| | + * | 4| 5| 6| +| + * |-------------------| + * | 1| 2| 3| | + * |--------------| | + * | 0| .| Ent| + * '-------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k42 \ +) { \ + { k00, k01, k02, k03, }, \ + { k10, k11, k12, k13, }, \ + { k20, k21, k22, KC_NO, }, \ + { k30, k31, k32, k33, }, \ + { k40, KC_NO, k42, KC_NO } \ +} + +#endif diff --git a/keyboards/clueboard/17/config.h b/keyboards/clueboard/17/config.h new file mode 100644 index 000000000..bd64dfd27 --- /dev/null +++ b/keyboards/clueboard/17/config.h @@ -0,0 +1,100 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2312 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT Cluepad with RGB Underlighting +#define DESCRIPTION QMK keyboard firmware for Cluepad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +* row: 0 1 2 3 4 +* pin: +*/ +#define MATRIX_ROW_PINS { B0, D3, D5, D4, D6 } +/* Column pin configuration + * col: 0 1 2 3 + * pin: F4 E6 B1 D2 + */ +#define MATRIX_COL_PINS { F4, E6, B1, D2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Number of backlighting levels */ +#define BACKLIGHT_LEVELS 3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Underlight configuration + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* Debug forcibly enabled */ +#define ALWAYS_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/clueboard/17/keymaps/default/keymap.c b/keyboards/clueboard/17/keymaps/default/keymap.c new file mode 100644 index 000000000..7a0d51851 --- /dev/null +++ b/keyboards/clueboard/17/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +#include "clueboard_17.h" + +#include "backlight.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _RS 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * .-------------------. + * |NL F| /| *| -| + * |-------------------| + * | 7| 8| 9| | + * |--------------| | + * | 4| 5| 6| +| + * |-------------------| + * | 1| 2| 3| | + * |--------------| | + * | 0| .| Ent| + * '-------------------' + */ +[_BL] = KEYMAP( + LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT), + + /* Keymap _FL: Function Layer + * .-------------------. + * |NL F| | | Fn0| + * |-------------------| + * | | Fn4| | | + * |--------------| | + * | Fn3|BL_S| Fn2| Fn6| + * |-------------------| + * | | Fn5| | | + * |--------------| | + * | Fn1| | Fn7| + * '-------------------' + */ +[_FL] = KEYMAP( + LT(_FL, KC_NLCK), KC_TRNS, KC_TRNS, RGB_TOG, \ + KC_TRNS, RGB_SAI, KC_TRNS, RGB_VAI, \ + RGB_HUD, BL_STEP, RGB_HUI, \ + KC_TRNS, RGB_SAD, KC_TRNS, RGB_VAD, \ + RGB_MOD, KC_TRNS) +}; + +/*enum function_id { +};*/ + +const uint16_t PROGMEM fn_actions[] = { +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + } +} + diff --git a/keyboards/clueboard/17/readme.md b/keyboards/clueboard/17/readme.md new file mode 100644 index 000000000..877adc784 --- /dev/null +++ b/keyboards/clueboard/17/readme.md @@ -0,0 +1,16 @@ +# Clueboard 17% (Formerly Cluepad) + +![Clueboard 17%](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w) + +A basic 17 key numpad PCB. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: + * Cluepad PCB 1.0 +* Hardware Availability: [clueboard.co](https://clueboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make clueboard/17:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/17/rules.mk b/keyboards/clueboard/17/rules.mk new file mode 100644 index 000000000..264aba044 --- /dev/null +++ b/keyboards/clueboard/17/rules.mk @@ -0,0 +1,65 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable numpad's backlight functionality +RGBLIGHT_ENABLE = yes +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c new file mode 100644 index 000000000..897f20a88 --- /dev/null +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c @@ -0,0 +1,124 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h new file mode 100644 index 000000000..145d569f0 --- /dev/null +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h @@ -0,0 +1,1187 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for Clueboard 60% Keyboard + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F303XC +#define BOARD_NAME "Clueboard 60 PCB" + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 8000000U +#endif + +// #define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F303xC + +/* + * IO pins assignments. + */ +#define GPIOA_PIN0 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_I2C2_SDA 0U +#define GPIOF_I2C2_SCL 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +#define GPIOG_PIN0 0U +#define GPIOG_PIN1 1U +#define GPIOG_PIN2 2U +#define GPIOG_PIN3 3U +#define GPIOG_PIN4 4U +#define GPIOG_PIN5 5U +#define GPIOG_PIN6 6U +#define GPIOG_PIN7 7U +#define GPIOG_PIN8 8U +#define GPIOG_PIN9 9U +#define GPIOG_PIN10 10U +#define GPIOG_PIN11 11U +#define GPIOG_PIN12 12U +#define GPIOG_PIN13 13U +#define GPIOG_PIN14 14U +#define GPIOG_PIN15 15U + +#define GPIOH_PIN0 0U +#define GPIOH_PIN1 1U +#define GPIOH_PIN2 2U +#define GPIOH_PIN3 3U +#define GPIOH_PIN4 4U +#define GPIOH_PIN5 5U +#define GPIOH_PIN6 6U +#define GPIOH_PIN7 7U +#define GPIOH_PIN8 8U +#define GPIOH_PIN9 9U +#define GPIOH_PIN10 10U +#define GPIOH_PIN11 11U +#define GPIOH_PIN12 12U +#define GPIOH_PIN13 13U +#define GPIOH_PIN14 14U +#define GPIOH_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_PIN6 PAL_LINE(GPIOF, 0U) +#define LINE_PIN7 PAL_LINE(GPIOF, 1U) + +#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) + + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - NC + * PA1 - NC + * PA2 - COL1 + * PA3 - COL2 + * PA4 - SPEAKER1 + * PA5 - SPEAKER2 + * PA6 - COL3 + * PA7 - COL8 + * PA8 - COL6 + * PA9 - COL7 + * PA10 - ROW5 + * PA11 - USB_DM (alternate 14). + * PA12 - USB_DP (alternate 14). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - ROW4 + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ + PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0) | \ + PIN_AFIO_AF(GPIOA_PIN5, 5) | \ + PIN_AFIO_AF(GPIOA_PIN6, 5) | \ + PIN_AFIO_AF(GPIOA_PIN7, 5)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (alternate 0). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). + * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ + PIN_MODE_OUTPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_HIGH(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0) | \ + PIN_AFIO_AF(GPIOB_PIN6, 4) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0) | \ + PIN_AFIO_AF(GPIOB_PIN13, 0) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - PIN8 (input pullup). + * PC9 - PIN9 (input pullup). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - PIN14 (input floating). + * PC15 - PIN15 (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ + PIN_PUPDR_FLOATING(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0) | \ + PIN_AFIO_AF(GPIOC_PIN6, 0) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ + PIN_AFIO_AF(GPIOC_PIN9, 0) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0) | \ + PIN_AFIO_AF(GPIOC_PIN14, 0) | \ + PIN_AFIO_AF(GPIOC_PIN15, 0)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD11 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 L3GD20_CS (output pushpull maximum). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (output pushpull maximum). + * PE9 - PIN9 (output pushpull maximum). + * PE10 - PIN10 (output pushpull maximum). + * PE11 - PIN11 (output pushpull maximum). + * PE12 - PIN12 (output pushpull maximum). + * PE13 - PIN13 (output pushpull maximum). + * PE14 - PIN14 (output pushpull maximum). + * PE15 - PIN15 (output pushpull maximum). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) |\ + PIN_MODE_OUTPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) |\ + PIN_MODE_INPUT(GPIOE_PIN5) |\ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_OUTPUT(GPIOE_PIN8) | \ + PIN_MODE_OUTPUT(GPIOE_PIN9) | \ + PIN_MODE_OUTPUT(GPIOE_PIN10) | \ + PIN_MODE_OUTPUT(GPIOE_PIN11) | \ + PIN_MODE_OUTPUT(GPIOE_PIN12) | \ + PIN_MODE_OUTPUT(GPIOE_PIN13) | \ + PIN_MODE_OUTPUT(GPIOE_PIN14) | \ + PIN_MODE_OUTPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ + PIN_OSPEED_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ + PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ + PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ + PIN_PUPDR_FLOATING(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_LOW(GPIOE_PIN8) | \ + PIN_ODR_LOW(GPIOE_PIN9) | \ + PIN_ODR_LOW(GPIOE_PIN10) | \ + PIN_ODR_LOW(GPIOE_PIN11) | \ + PIN_ODR_LOW(GPIOE_PIN12) | \ + PIN_ODR_LOW(GPIOE_PIN13) | \ + PIN_ODR_LOW(GPIOE_PIN14) | \ + PIN_ODR_LOW(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0) |\ + PIN_AFIO_AF(GPIOE_PIN3, 0) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0) |\ + PIN_AFIO_AF(GPIOE_PIN5, 0) |\ + PIN_AFIO_AF(GPIOE_PIN6, 0) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0)) + +/* + * GPIOF setup: + * + * PF0 - I2C2_SDA (input floating). + * PF1 - I2C2_SCL (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ + PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ + PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ + PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ + PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ + PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ + PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0)) + +/* + * GPIOG setup: + * + * PG0 - PIN0 (input pullup). + * PG1 - PIN1 (input pullup). + * PG2 - PIN2 (input pullup). + * PG3 - PIN3 (input pullup). + * PG4 - PIN4 (input pullup). + * PG5 - PIN5 (input pullup). + * PG6 - PIN6 (input pullup). + * PG7 - PIN7 (input pullup). + * PG8 - PIN8 (input pullup). + * PG9 - PIN9 (input pullup). + * PG10 - PIN10 (input pullup). + * PG11 - PIN11 (input pullup). + * PG12 - PIN12 (input pullup). + * PG13 - PIN13 (input pullup). + * PG14 - PIN14 (input pullup). + * PG15 - PIN15 (input pullup). + */ +#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ + PIN_MODE_INPUT(GPIOG_PIN1) | \ + PIN_MODE_INPUT(GPIOG_PIN2) | \ + PIN_MODE_INPUT(GPIOG_PIN3) | \ + PIN_MODE_INPUT(GPIOG_PIN4) | \ + PIN_MODE_INPUT(GPIOG_PIN5) | \ + PIN_MODE_INPUT(GPIOG_PIN6) | \ + PIN_MODE_INPUT(GPIOG_PIN7) | \ + PIN_MODE_INPUT(GPIOG_PIN8) | \ + PIN_MODE_INPUT(GPIOG_PIN9) | \ + PIN_MODE_INPUT(GPIOG_PIN10) | \ + PIN_MODE_INPUT(GPIOG_PIN11) | \ + PIN_MODE_INPUT(GPIOG_PIN12) | \ + PIN_MODE_INPUT(GPIOG_PIN13) | \ + PIN_MODE_INPUT(GPIOG_PIN14) | \ + PIN_MODE_INPUT(GPIOG_PIN15)) +#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) +#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN15)) +#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN15)) +#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ + PIN_ODR_HIGH(GPIOG_PIN1) | \ + PIN_ODR_HIGH(GPIOG_PIN2) | \ + PIN_ODR_HIGH(GPIOG_PIN3) | \ + PIN_ODR_HIGH(GPIOG_PIN4) | \ + PIN_ODR_HIGH(GPIOG_PIN5) | \ + PIN_ODR_HIGH(GPIOG_PIN6) | \ + PIN_ODR_HIGH(GPIOG_PIN7) | \ + PIN_ODR_HIGH(GPIOG_PIN8) | \ + PIN_ODR_HIGH(GPIOG_PIN9) | \ + PIN_ODR_HIGH(GPIOG_PIN10) | \ + PIN_ODR_HIGH(GPIOG_PIN11) | \ + PIN_ODR_HIGH(GPIOG_PIN12) | \ + PIN_ODR_HIGH(GPIOG_PIN13) | \ + PIN_ODR_HIGH(GPIOG_PIN14) | \ + PIN_ODR_HIGH(GPIOG_PIN15)) +#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ + PIN_AFIO_AF(GPIOG_PIN1, 0) | \ + PIN_AFIO_AF(GPIOG_PIN2, 0) | \ + PIN_AFIO_AF(GPIOG_PIN3, 0) | \ + PIN_AFIO_AF(GPIOG_PIN4, 0) | \ + PIN_AFIO_AF(GPIOG_PIN5, 0) | \ + PIN_AFIO_AF(GPIOG_PIN6, 0) | \ + PIN_AFIO_AF(GPIOG_PIN7, 0)) +#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ + PIN_AFIO_AF(GPIOG_PIN9, 0) | \ + PIN_AFIO_AF(GPIOG_PIN10, 0) | \ + PIN_AFIO_AF(GPIOG_PIN11, 0) | \ + PIN_AFIO_AF(GPIOG_PIN12, 0) | \ + PIN_AFIO_AF(GPIOG_PIN13, 0) | \ + PIN_AFIO_AF(GPIOG_PIN14, 0) | \ + PIN_AFIO_AF(GPIOG_PIN15, 0)) + +/* + * GPIOH setup: + * + * PH0 - PIN0 (input pullup). + * PH1 - PIN1 (input pullup). + * PH2 - PIN2 (input pullup). + * PH3 - PIN3 (input pullup). + * PH4 - PIN4 (input pullup). + * PH5 - PIN5 (input pullup). + * PH6 - PIN6 (input pullup). + * PH7 - PIN7 (input pullup). + * PH8 - PIN8 (input pullup). + * PH9 - PIN9 (input pullup). + * PH10 - PIN10 (input pullup). + * PH11 - PIN11 (input pullup). + * PH12 - PIN12 (input pullup). + * PH13 - PIN13 (input pullup). + * PH14 - PIN14 (input pullup). + * PH15 - PIN15 (input pullup). + */ +#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ + PIN_MODE_INPUT(GPIOH_PIN1) | \ + PIN_MODE_INPUT(GPIOH_PIN2) | \ + PIN_MODE_INPUT(GPIOH_PIN3) | \ + PIN_MODE_INPUT(GPIOH_PIN4) | \ + PIN_MODE_INPUT(GPIOH_PIN5) | \ + PIN_MODE_INPUT(GPIOH_PIN6) | \ + PIN_MODE_INPUT(GPIOH_PIN7) | \ + PIN_MODE_INPUT(GPIOH_PIN8) | \ + PIN_MODE_INPUT(GPIOH_PIN9) | \ + PIN_MODE_INPUT(GPIOH_PIN10) | \ + PIN_MODE_INPUT(GPIOH_PIN11) | \ + PIN_MODE_INPUT(GPIOH_PIN12) | \ + PIN_MODE_INPUT(GPIOH_PIN13) | \ + PIN_MODE_INPUT(GPIOH_PIN14) | \ + PIN_MODE_INPUT(GPIOH_PIN15)) +#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) +#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN15)) +#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN15)) +#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ + PIN_ODR_HIGH(GPIOH_PIN1) | \ + PIN_ODR_HIGH(GPIOH_PIN2) | \ + PIN_ODR_HIGH(GPIOH_PIN3) | \ + PIN_ODR_HIGH(GPIOH_PIN4) | \ + PIN_ODR_HIGH(GPIOH_PIN5) | \ + PIN_ODR_HIGH(GPIOH_PIN6) | \ + PIN_ODR_HIGH(GPIOH_PIN7) | \ + PIN_ODR_HIGH(GPIOH_PIN8) | \ + PIN_ODR_HIGH(GPIOH_PIN9) | \ + PIN_ODR_HIGH(GPIOH_PIN10) | \ + PIN_ODR_HIGH(GPIOH_PIN11) | \ + PIN_ODR_HIGH(GPIOH_PIN12) | \ + PIN_ODR_HIGH(GPIOH_PIN13) | \ + PIN_ODR_HIGH(GPIOH_PIN14) | \ + PIN_ODR_HIGH(GPIOH_PIN15)) +#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ + PIN_AFIO_AF(GPIOH_PIN1, 0) | \ + PIN_AFIO_AF(GPIOH_PIN2, 0) | \ + PIN_AFIO_AF(GPIOH_PIN3, 0) | \ + PIN_AFIO_AF(GPIOH_PIN4, 0) | \ + PIN_AFIO_AF(GPIOH_PIN5, 0) | \ + PIN_AFIO_AF(GPIOH_PIN6, 0) | \ + PIN_AFIO_AF(GPIOH_PIN7, 0)) +#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ + PIN_AFIO_AF(GPIOH_PIN9, 0) | \ + PIN_AFIO_AF(GPIOH_PIN10, 0) | \ + PIN_AFIO_AF(GPIOH_PIN11, 0) | \ + PIN_AFIO_AF(GPIOH_PIN12, 0) | \ + PIN_AFIO_AF(GPIOH_PIN13, 0) | \ + PIN_AFIO_AF(GPIOH_PIN14, 0) | \ + PIN_AFIO_AF(GPIOH_PIN15, 0)) + + +/* + * USB bus activation macro, required by the USB driver. + */ +// #define usb_lld_connect_bus(usbp) +#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) +// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) +/* + * USB bus de-activation macro, required by the USB driver. + */ +// #define usb_lld_disconnect_bus(usbp) +#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)) +// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk new file mode 100644 index 000000000..43377629a --- /dev/null +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/clueboard/60/bootloader_defs.h b/keyboards/clueboard/60/bootloader_defs.h new file mode 100644 index 000000000..3b0e9d20a --- /dev/null +++ b/keyboards/clueboard/60/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/clueboard/60/chconf.h b/keyboards/clueboard/60/chconf.h new file mode 100644 index 000000000..5a9b83310 --- /dev/null +++ b/keyboards/clueboard/60/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/clueboard/60/clueboard_60.c b/keyboards/clueboard/60/clueboard_60.c new file mode 100644 index 000000000..a0b74db72 --- /dev/null +++ b/keyboards/clueboard/60/clueboard_60.c @@ -0,0 +1,24 @@ +/* Copyright 2017 skully + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "clueboard_60.h" + +void matrix_init_kb(void) { + +} + +void matrix_scan_kb(void) { + +} diff --git a/keyboards/clueboard/60/clueboard_60.h b/keyboards/clueboard/60/clueboard_60.h new file mode 100644 index 000000000..ffff18f9e --- /dev/null +++ b/keyboards/clueboard/60/clueboard_60.h @@ -0,0 +1,105 @@ +/* Copyright 2017 skully + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef CLUEBOARD60_H +#define CLUEBOARD60_H + +#include "quantum.h" + +/* + * These are shortcuts to help you work with the various layout options. If your + * keymap works with one of the LAYOUT_...() macros you are encouraged to use that + * and to contribute your keymap to the corresponding layout in + * `qmk_firmware/layouts/community`. + */ + +/* The fully-featured KEYMAP() that has every single key available in the matrix. + */ +#define KEYMAP(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e, }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ +} + +/* A layout that matches the Apple Extended Keyboard's main area. No split keys, + * 3 mods on either side of the spacebar. + */ +#define KEYMAP_AEK(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k47, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, KC_NO, k2e, }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k4b, k4c, KC_NO, k4e, }, \ +} + +/* Standard 60% ANSI layout */ +#define LAYOUT_60_ansi(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, KC_NO, k2e, }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ +} + +/* Standard 60% ISO layout */ +#define LAYOUT_60_iso(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, KC_NO, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e, }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ +} + +/* Split Backspace and Right Shift ANSI layout. */ +#define LAYOUT_60_ansi_split_bs_rshift(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, KC_NO, k2e, }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ +} +#endif diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h new file mode 100644 index 000000000..333698a08 --- /dev/null +++ b/keyboards/clueboard/60/config.h @@ -0,0 +1,133 @@ +/* + * Copyright 2017 skully + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_H +#define CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2350 +#define DEVICE_VER 0x0001 +#define MANUFACTURER "Clueboard" +#define USBSTR_MANUFACTURER 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00' +#define PRODUCT "Clueboard60" +#define USBSTR_PRODUCT 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', ' ', '\x00', '6', '\x00', '0', '\x00', '%', '\x00' +#define DESCRIPTION "Clueboard 60%" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +/* Note: These are not used for arm boards. They're here purely as documentation. + * #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 } + * #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } + * #define UNUSED_PINS + */ + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 + +/* Prevent modifiers from being stuck on after layer changes. */ +#define PREVENT_STUCK_MODIFIERS + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif + + /* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 diff --git a/keyboards/clueboard/60/halconf.h b/keyboards/clueboard/60/halconf.h new file mode 100644 index 000000000..254470cbd --- /dev/null +++ b/keyboards/clueboard/60/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/clueboard/60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c new file mode 100644 index 000000000..e662057f0 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +#include "clueboard_60.h" + +#define _______ KC_TRNS + +enum keyboard_layers { + _BL, + _FL, + _CL +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [_BL] = KEYMAP( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), + [_FL] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FL), _______), + [_CL] = KEYMAP( + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FL), _______) +}; diff --git a/keyboards/clueboard/60/keymaps/default/readme.md b/keyboards/clueboard/60/keymaps/default/readme.md new file mode 100644 index 000000000..32d4bfba6 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for clueboard 60% diff --git a/keyboards/clueboard/60/keymaps/default_aek/keymap.c b/keyboards/clueboard/60/keymaps/default_aek/keymap.c new file mode 100644 index 000000000..d2d3db772 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/default_aek/keymap.c @@ -0,0 +1,43 @@ +#include "clueboard_60.h" + +#define _______ KC_TRNS + +enum keyboard_layers { + _BL, + _FL, + _CL +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BkSp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Capslk| A| S| D| F| G| H| J| K| L| ;| '| Enter| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [_BL] = KEYMAP_AEK( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL), + [_FL] = KEYMAP_AEK( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______, _______, _______, _______, MO(_FL), _______), + [_CL] = KEYMAP_AEK( + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______, _______, _______, _______, MO(_FL), _______) +}; diff --git a/keyboards/clueboard/60/keymaps/default_aek/readme.md b/keyboards/clueboard/60/keymaps/default_aek/readme.md new file mode 100644 index 000000000..cdec24160 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/default_aek/readme.md @@ -0,0 +1 @@ +# The default keymap for clueboard 60%, optimized for the AEK layout. diff --git a/keyboards/clueboard/60/led.c b/keyboards/clueboard/60/led.c new file mode 100644 index 000000000..fdf244ad5 --- /dev/null +++ b/keyboards/clueboard/60/led.c @@ -0,0 +1,58 @@ +/* + * Copyright 2017 skully + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +#include "hal.h" +#include "backlight.h" +#include "led.h" +#include "printf.h" + +void backlight_init_ports(void) { + printf("backlight_init_ports()\n"); + #ifdef BACKLIGHT_ENABLE + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPad(GPIOB, 8); + #endif +} + +void backlight_set(uint8_t level) { + printf("backlight_set(%d)\n", level); + #ifdef BACKLIGHT_ENABLE + if (level == 0) { + // Turn backlight off + palSetPad(GPIOB, 8); + } else { + // Turn backlight on + palClearPad(GPIOB, 8); + } + #endif +} + +void led_init_ports() { + printf("led_init_ports()\n"); + palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); +} + +void led_set_kb(uint8_t usb_led) { + printf("led_init_ports()\n"); + if (usb_led & (1< +#include +#include +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "printf.h" +#include "backlight.h" +#include "matrix.h" + + +/* Clueboard 60% + * + * Column pins are input with internal pull-down. + * Row pins are output and strobe with high. + * Key is high or 1 when it turns on. + * + * col: { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } + * row: { PB0, PB1, PB2, PA15, PA10 } + */ +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_COLS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +void matrix_init(void) { + printf("matrix init\n"); + //debug_matrix = true; + + /* Column(sense) */ + palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 15, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 9, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 15, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 14, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); + + /* Row(strobe) */ + palSetPadMode(GPIOB, 0, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOB, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOB, 2, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); + + memset(matrix, 0, MATRIX_ROWS); + memset(matrix_debouncing, 0, MATRIX_COLS); + + /* Setup capslock */ + // palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); + // palClearPad(GPIOB, 7); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + for (int col = 0; col < MATRIX_COLS; col++) { + matrix_row_t data = 0; + + // strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } + switch (col) { + case 0: palSetPad(GPIOA, 2); break; + case 1: palSetPad(GPIOA, 3); break; + case 2: palSetPad(GPIOA, 6); break; + case 3: palSetPad(GPIOB, 14); break; + case 4: palSetPad(GPIOB, 15); break; + case 5: palSetPad(GPIOA, 8); break; + case 6: palSetPad(GPIOA, 9); break; + case 7: palSetPad(GPIOA, 7); break; + case 8: palSetPad(GPIOB, 3); break; + case 9: palSetPad(GPIOB, 4); break; + case 10: palSetPad(GPIOC, 15); break; + case 11: palSetPad(GPIOC, 14); break; + case 12: palSetPad(GPIOC, 13); break; + case 13: palSetPad(GPIOB, 5); break; + case 14: palSetPad(GPIOB, 6); break; + } + + // need wait to settle pin state + wait_us(20); + + // read row data { PB0, PB1, PB2, PA15, PA10 } + data = ( + (palReadPad(GPIOB, 0) << 0 ) | + (palReadPad(GPIOB, 1) << 1 ) | + (palReadPad(GPIOB, 2) << 2 ) | + (palReadPad(GPIOA, 15) << 3 ) | + (palReadPad(GPIOA, 10) << 4 ) + ); + + // unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } + switch (col) { + case 0: palClearPad(GPIOA, 2); break; + case 1: palClearPad(GPIOA, 3); break; + case 2: palClearPad(GPIOA, 6); break; + case 3: palClearPad(GPIOB, 14); break; + case 4: palClearPad(GPIOB, 15); break; + case 5: palClearPad(GPIOA, 8); break; + case 6: palClearPad(GPIOA, 9); break; + case 7: palClearPad(GPIOA, 7); break; + case 8: palClearPad(GPIOB, 3); break; + case 9: palClearPad(GPIOB, 4); break; + case 10: palClearPad(GPIOC, 15); break; + case 11: palClearPad(GPIOC, 14); break; + case 12: palClearPad(GPIOC, 13); break; + case 13: palClearPad(GPIOB, 5); break; + case 14: palClearPad(GPIOB, 6); break; + } + + if (matrix_debouncing[col] != data) { + matrix_debouncing[col] = data; + debouncing = true; + debouncing_time = timer_read(); + } + } + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix[row] = 0; + for (int col = 0; col < MATRIX_COLS; col++) { + matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); + } + } + debouncing = false; + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = yes # Custom matrix file +#AUDIO_ENABLE = yes +# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/clueboard/66/clueboard_66.c b/keyboards/clueboard/66/clueboard_66.c new file mode 100644 index 000000000..1e000e62d --- /dev/null +++ b/keyboards/clueboard/66/clueboard_66.c @@ -0,0 +1 @@ +#include "clueboard_66.h" diff --git a/keyboards/clueboard/66/clueboard_66.h b/keyboards/clueboard/66/clueboard_66.h new file mode 100644 index 000000000..c8989983d --- /dev/null +++ b/keyboards/clueboard/66/clueboard_66.h @@ -0,0 +1,16 @@ +#ifndef CLUEBOARD_H +#define CLUEBOARD_H + +#include "quantum.h" + +#ifdef KEYBOARD_clueboard_66_rev1 + #include "rev1.h" +#endif +#ifdef KEYBOARD_clueboard_66_rev2 + #include "rev2.h" +#endif +#ifdef KEYBOARD_clueboard_66_rev3 + #include "rev3.h" +#endif + +#endif diff --git a/keyboards/clueboard/66/config.h b/keyboards/clueboard/66/config.h new file mode 100644 index 000000000..dff5c96d0 --- /dev/null +++ b/keyboards/clueboard/66/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CLUEBOARD_66_CONFIG_H +#define CLUEBOARD_66_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard +#define DESCRIPTION QMK keyboard firmware for Clueboard + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/Makefile b/keyboards/clueboard/66/keymaps/bloodlvst/Makefile new file mode 100644 index 000000000..b1c2f32f6 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/bloodlvst/Makefile @@ -0,0 +1,2 @@ +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = no diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/config.h b/keyboards/clueboard/66/keymaps/bloodlvst/config.h new file mode 100644 index 000000000..320401dbd --- /dev/null +++ b/keyboards/clueboard/66/keymaps/bloodlvst/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS +#define DISABLE_SPACE_CADET_ROLLOVER +#endif diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c new file mode 100644 index 000000000..bc50afa2f --- /dev/null +++ b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + 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_INS, KC_DEL, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, \ + KC_LCTL, KC_LGUI, MO(_FL), KC_LALT, KC_BSPC,KC_SPC, KC_RALT, KC_APP, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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_HOME, KC_END, KC_VOLU, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, \ + _______, KC_MYCM, MO(_FL), _______, _______,_______, _______, KC_CALC, MO(_FL), _______, KC_MPRV, KC_MSTP, KC_MNXT), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, \ + _______, _______, MO(_FL), _______, RGB_SAD,RGB_SAI, _______, _______, MO(_FL), _______, _______, KC_SLEP, _______), +}; diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/readme.md b/keyboards/clueboard/66/keymaps/bloodlvst/readme.md new file mode 100644 index 000000000..ee287ca47 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/bloodlvst/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/rules.mk b/keyboards/clueboard/66/keymaps/bloodlvst/rules.mk new file mode 100644 index 000000000..b1c2f32f6 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/bloodlvst/rules.mk @@ -0,0 +1,2 @@ +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = no diff --git a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c new file mode 100644 index 000000000..78eb43390 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/caps_fn/readme.md b/keyboards/clueboard/66/keymaps/caps_fn/readme.md new file mode 100644 index 000000000..47a530a80 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/caps_fn/readme.md @@ -0,0 +1,6 @@ +![Clueboard Layout Image](http://i.imgur.com/kGADucy.png) + +# Caps Fn Layout + +This is the default layout except that Caps Lock acts like Caps Lock when +tapped but Fn when held. diff --git a/keyboards/clueboard/66/keymaps/colemak/keymap.c b/keyboards/clueboard/66/keymaps/colemak/keymap.c new file mode 100644 index 000000000..b2921cca2 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/colemak/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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_CAPS, KC_VOLU, \ + _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, \ + KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______,_______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/default/keymap.c b/keyboards/clueboard/66/keymaps/default/keymap.c new file mode 100644 index 000000000..ad623c548 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \ + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ + _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ + _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/default/readme.md b/keyboards/clueboard/66/keymaps/default/readme.md new file mode 100644 index 000000000..019131aeb --- /dev/null +++ b/keyboards/clueboard/66/keymaps/default/readme.md @@ -0,0 +1,8 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/jokrik/keymap.c b/keyboards/clueboard/66/keymaps/jokrik/keymap.c new file mode 100644 index 000000000..dd38e904c --- /dev/null +++ b/keyboards/clueboard/66/keymaps/jokrik/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + 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, KC_PSCR, \ + 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, KC_PAUS, \ + 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_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC,KC_SPC, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/jokrik/readme.md b/keyboards/clueboard/66/keymaps/jokrik/readme.md new file mode 100644 index 000000000..a845e65f1 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/jokrik/readme.md @@ -0,0 +1,2 @@ +# Jokrik's Clueboard Layout + diff --git a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c new file mode 100644 index 000000000..8c3568e59 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \ + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RGUI,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ + _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ + _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/mac_optimized/readme.md b/keyboards/clueboard/66/keymaps/mac_optimized/readme.md new file mode 100644 index 000000000..282da369d --- /dev/null +++ b/keyboards/clueboard/66/keymaps/mac_optimized/readme.md @@ -0,0 +1,6 @@ +![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png) + +# Default Clueboard Layout for Mac + +This is the default Clueboard layout with Alt and GUI switched to match Mac +conventions. diff --git a/keyboards/clueboard/66/keymaps/magicmonty/Makefile b/keyboards/clueboard/66/keymaps/magicmonty/Makefile new file mode 100644 index 000000000..289018f34 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/magicmonty/Makefile @@ -0,0 +1,9 @@ + +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + +MIDI_ENABLE = yes + +# if MIDI_ENABLE is set to yes, then CONSOLE_ENABLE has to be disabled, because of the firmware size +CONSOLE_ENABLE = false +COMMAND_ENABLE = no diff --git a/keyboards/clueboard/66/keymaps/magicmonty/config.h b/keyboards/clueboard/66/keymaps/magicmonty/config.h new file mode 100644 index 000000000..d933fa997 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/magicmonty/config.h @@ -0,0 +1,40 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on + #define MIDI_BASIC +*/ + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +#define MIDI_TONE_KEYCODE_OCTAVES 2 + +/* + Setting the modified Space Cadet Parens for German layout + + Default is + #define LSPO_KEY KC_9 + #define RSPC_KEY KC_0 +*/ +#define LSPO_KEY KC_8 +#define RSPC_KEY KC_9 +#define PERMISSIVE_HOLD + +#endif diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c new file mode 100644 index 000000000..6df7d7869 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -0,0 +1,230 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS +#define xxxxxxx KC_NO + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 // BASE Layer +#define _FL 1 // Function Layer +#define _ME 2 // Media Layer +#define _CL 3 // Control Layer +#define _ML 4 // Mouse Layer +#if defined(MIDI_ENABLE) + #define _MI 5 // MIDI Layer + #define TO_MIDI TO(_MI) +#else + #define TO_MIDI _______ +#endif + +// go back to base layer +#define TO_BASE TO(_BL) + +// switch to function layer while helde +#define MO_FUNC MO(_FL) + +// switch to media layer while held +#define MEDIA MO(_ME) + +// switch to Control layer while helde +#define MO_CTL MO(_CL) + +// switch to mouse layer if held, else space +#define L_MOUSE LT(_ML, KC_SPC) + +// Function key when held, else ESC +#define ESC_FUN LT(_FL, KC_ESC) + +// Hyper (CTRL+ALT+SHIFT+SUPER) when held, TAB when tapped +#define HPR_TAB ALL_T(KC_TAB) + +// CTRL when held, ESC when tapped +#define CTL_ESC CTL_T(KC_ESC) + +// Reset RGB mode to layer signalling +#define RGB_RST F(0) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) */ + [_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_INS, \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + ESC_FUN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT,_______, L_MOUSE, L_MOUSE, _______, KC_RALT, KC_RCTL, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function layer */ + [_FL] = KEYMAP( + 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, _______, _______, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO_CTL, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, \ + KC_LSPO, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, TO_MIDI, _______, KC_RSPC, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, MO_FUNC, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _ME: Media layer */ + [_ME] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT), + + /* Keymap _CL: Control layer */ + [_CL] = KEYMAP( + _______, RGB_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO_CTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), + + /* Keymap _ML: Mouse layer */ + [_ML] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_BTN2, KC_BTN3, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, \ + _______, _______, _______, _______, L_MOUSE, L_MOUSE, _______, KC_BTN1, KC_BTN3, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R), + +#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) + /* Keymap _MI: MIDI layer (Advanced)*/ + [_MI] = KEYMAP( + TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, \ + xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, \ + MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, xxxxxxx, \ + MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, \ + xxxxxxx, xxxxxxx, xxxxxxx,xxxxxxx, MI_ALLOFF, MI_ALLOFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), +#elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) + /* Keymap _MI: MIDI layer (Basic)*/ + [_MI] = KEYMAP( + TO_BASE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ + xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ + xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ + xxxxxxx, xxxxxxx, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ + xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), +#endif +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case 0: + if (record->event.pressed) { + rgblight_mode(1); + rgblight_sethsv(206, 255, 255); + } + } +} + +enum layer_id { + LAYER_BASE, + LAYER_FUNCTION, + LAYER_MEDIA, + LAYER_CONTROL, + LAYER_MOUSE, +#if defined(MIDI_ENABLE) + LAYER_MIDI +#endif +}; + +void clueboard_set_led(uint8_t id, uint8_t val) { + switch (id) { + case LAYER_BASE: + rgblight_sethsv_noeeprom(0, 0, val); + break; + case LAYER_FUNCTION: + rgblight_sethsv_noeeprom(46, 255, val); + break; + case LAYER_MEDIA: + rgblight_sethsv_noeeprom(86, 255, val); + break; + case LAYER_CONTROL: + rgblight_sethsv_noeeprom(346, 255, val); + break; + case LAYER_MOUSE: + rgblight_sethsv_noeeprom(206, 255, val); + break; +#if defined(MIDI_ENABLE) + case LAYER_MIDI: + rgblight_sethsv_noeeprom(316, 255, val); + break; +#endif + } +}; + +const uint16_t oct_hues[10] = { + 0, + 30, + 60, + 90, + 120, + 150, + 180, + 210, + 240, + 300 +}; + +#define MAX_OCT 9 + +void clueboard_set_midi_led(uint8_t base_oct, uint8_t val) +{ + uint8_t sat = 255; + + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + sethsv(oct_hues[base_oct], sat, val, (LED_TYPE *)&led[i]); + } + + uint8_t next_oct = base_oct < MAX_OCT ? base_oct + 1 : base_oct; + + uint16_t next_hue = base_oct < MAX_OCT ? oct_hues[next_oct] : 0; + uint8_t next_val = base_oct < MAX_OCT ? val : 0; + uint8_t next_sat = base_oct < MAX_OCT ? sat : 0; + + + for (uint8_t i = 0; i < 3; i++) { + sethsv(next_hue, next_sat, next_val, (LED_TYPE *)&led[i]); + } + + for (uint8_t i = 11; i < 14; i++) { + sethsv(next_hue, next_sat, next_val, (LED_TYPE *)&led[i]); + } + + rgblight_set(); +} + +void matrix_scan_user(void) { + rgblight_config_t rgblight_config; + rgblight_config.raw = eeconfig_read_rgblight(); + + if (!rgblight_config.enable || rgblight_config.mode != 1) { return; } + + uint32_t layer = layer_state; + uint8_t val = rgblight_config.val; + + if (layer & (1<<_FL)) { + if (layer & (1<<_ME)) { + clueboard_set_led(LAYER_MEDIA, val); + } else if (layer & (1<<_CL)) { + clueboard_set_led(LAYER_CONTROL, val); + } else { + clueboard_set_led(LAYER_FUNCTION, val); + } + } else if (layer & (1<<_ML)) { + clueboard_set_led(LAYER_MOUSE, val); +#if defined(MIDI_ENABLE) + } else if (layer & (1<<_MI)) { + clueboard_set_midi_led(midi_config.octave, val); +#endif + } else { + clueboard_set_led(LAYER_BASE, val); + } +}; diff --git a/keyboards/clueboard/66/keymaps/magicmonty/readme.md b/keyboards/clueboard/66/keymaps/magicmonty/readme.md new file mode 100644 index 000000000..e24212d04 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/magicmonty/readme.md @@ -0,0 +1,53 @@ +# Layout of @magicmonty + +[Keyboard Layout Editor File] + +![Clueboard Layout Image](http://i.imgur.com/eEwjLEj.png) +My ClueBoard Layout as of 2017/06/30 + + +This layout is a combination of the `mouse_keys` and the `win_optimized` layouts. +This layout is optimized for an ISO layout. +The CapsLock is disabled and works as ESC when tapped and FN when held. +The `TAB` key works as `TAB` when tapped, and [HYPER] (`CTRL` + `ALT` + `SHIFT` + `CMD`) when held. + +## Mouse Layer + +When you hold down the spacebar the arrow keys will move your mouse cursor. +You can click using the 3 mods to the left of the arrow keys, or the 3 keys under your primary fingers on the home row. +The Left, Down, Up and Right for the mouse movement are also VIM-Like on the HJKL keys + +## MIDI layer + +The MIDI layer is permanently enabled by pressing `FN` + `/`. +It can be exited with the `ESC`-Key + +## Space Cadet(ish) Shift Parentheses + +If the function layer is active, the `SHIFT`-Keys are configured like the [Space Cadet Shift Parentheses] +as opened (left `SHIFT`) and closed (right `SHIFT`) parentheses if tapped and `SHIFT` if held. + +## Media layer + +The media layer with Volume/Play controls, can be accessed via `FN` + `m` + +## Control layer + +The control layer is accessed via `FN` + `s`. +Here one can control the behavior of the RGB underlight. +`FN` + `s` + `1` resets the RGB underlight to the Layer signalling mode + +## Layer signalling through underlight + +The different layers are signalled throug setting of the underlight: + +- Base layer: White +- Function layer: Yellow +- Media layer: Green +- Mouse layer: Blue +- Control layer: Red +- Midi layer: Purple + +[HYPER]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ +[Space Cadet Shift Parentheses]: http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#shift-parentheses +[Keyboard Layout Editor File]: http://www.keyboard-layout-editor.com/#/gists/f869b8789242a712e0f46eabbd550056 diff --git a/keyboards/clueboard/66/keymaps/magicmonty/rules.mk b/keyboards/clueboard/66/keymaps/magicmonty/rules.mk new file mode 100644 index 000000000..289018f34 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/magicmonty/rules.mk @@ -0,0 +1,9 @@ + +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + +MIDI_ENABLE = yes + +# if MIDI_ENABLE is set to yes, then CONSOLE_ENABLE has to be disabled, because of the firmware size +CONSOLE_ENABLE = false +COMMAND_ENABLE = no diff --git a/keyboards/clueboard/66/keymaps/maximised/keymap.c b/keyboards/clueboard/66/keymaps/maximised/keymap.c new file mode 100644 index 000000000..260f97477 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/maximised/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + 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_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + MO(_FL), 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(_FL), KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ + _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Reset/Underlight layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/maximised/readme.md b/keyboards/clueboard/66/keymaps/maximised/readme.md new file mode 100644 index 000000000..fc82e6879 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/maximised/readme.md @@ -0,0 +1,5 @@ +![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png) + +# Maximised Clueboard Layout + +This layout is intended for a board with one or both shifts split. The outside key on the split shift is an Fn, while the inside is shift. The bottom row has all the mods on both sides, optimised for a Mac. diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/Makefile b/keyboards/clueboard/66/keymaps/mouse_keys/Makefile new file mode 100644 index 000000000..6c605daec --- /dev/null +++ b/keyboards/clueboard/66/keymaps/mouse_keys/Makefile @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c new file mode 100644 index 000000000..15e068aa1 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c @@ -0,0 +1,51 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 +#define _ML 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), + + /* Keymap _ML: Mouse layer + */ + [_ML] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ + _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ + _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), +}; diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/readme.md b/keyboards/clueboard/66/keymaps/mouse_keys/readme.md new file mode 100644 index 000000000..7fb038205 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/mouse_keys/readme.md @@ -0,0 +1,7 @@ +![Clueboard Layout Image](layout.png) + +# MouseKeys Layout + +This layout adds a mouse layer. When you hold down the spacebar the arrow keys +will move your mouse cursor. You can click using the 3 mods to the left of the +arrow keys, or the 3 keys under your primary fingers on the home row. diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk b/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk new file mode 100644 index 000000000..6c605daec --- /dev/null +++ b/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/66/keymaps/serubin/Makefile b/keyboards/clueboard/66/keymaps/serubin/Makefile new file mode 100644 index 000000000..ba997f869 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/serubin/Makefile @@ -0,0 +1,4 @@ + +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + diff --git a/keyboards/clueboard/66/keymaps/serubin/keymap.c b/keyboards/clueboard/66/keymaps/serubin/keymap.c new file mode 100644 index 000000000..112670d66 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/serubin/keymap.c @@ -0,0 +1,52 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _ME 2 +#define _CL 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GRV, 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_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_HOME, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END), + +/* Keymap _FL: Function Layer + */ +[_ME] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \ + _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT), + + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/serubin/readme.md b/keyboards/clueboard/66/keymaps/serubin/readme.md new file mode 100644 index 000000000..78eef5352 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/serubin/readme.md @@ -0,0 +1,14 @@ +# Serubin's Clueboard Layout + +This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim. + +#### Base Layer +![Base Layout Image](http://i.imgur.com/qL78n1y.png) + +#### Fn Layer +![Fn Layout Image](http://i.imgur.com/QuwxePw.png) + +#### Media Layer +![Media Layer Image](http://i.imgur.com/oOfWXMf.png) + + diff --git a/keyboards/clueboard/66/keymaps/serubin/rules.mk b/keyboards/clueboard/66/keymaps/serubin/rules.mk new file mode 100644 index 000000000..ba997f869 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/serubin/rules.mk @@ -0,0 +1,4 @@ + +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + diff --git a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c new file mode 100644 index 000000000..0d57e38a1 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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, S(KC_GRV), KC_DEL, BL_STEP, \ + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/shift_fn/readme.md b/keyboards/clueboard/66/keymaps/shift_fn/readme.md new file mode 100644 index 000000000..4bd920ad4 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/shift_fn/readme.md @@ -0,0 +1,6 @@ +# Shift Fn Clueboard Layout + +This is an experimental layout. It makes the left shift key a dual roll key. +For most keys it acts as a shift key, but for some keys it activates an +alternate function instead. Primarily I use this to access the F-keys under +the number rows. diff --git a/keyboards/clueboard/66/keymaps/skully/keymap.c b/keyboards/clueboard/66/keymaps/skully/keymap.c new file mode 100644 index 000000000..2e23948b2 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/skully/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + 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_NUHS, KC_ENT, \ + MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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, S(KC_GRV), KC_DEL, BL_STEP, \ + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ + KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/skully/readme.md b/keyboards/clueboard/66/keymaps/skully/readme.md new file mode 100644 index 000000000..b9ad1b09a --- /dev/null +++ b/keyboards/clueboard/66/keymaps/skully/readme.md @@ -0,0 +1,11 @@ +![Clueboard Layout Image](http://i.imgur.com/VaoGn3M.png) + +# skullY's Clueboard Layout + +This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing. + +I've made the following changes from the default layout: + +* shift_fn on left shift +* Change capslock to control +* Swap Alt and Cmd diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c new file mode 100644 index 000000000..c61b32f8b --- /dev/null +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -0,0 +1,136 @@ +#include "clueboard_66.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _FL 3 +#define _CL 4 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Helpful defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWERTY: Base Layer (Default Layer) + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |CtlEsc| A| S| D| F| G| H| J| K| L| ;| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \ + HPR_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, KC_PGDN, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _COLEMAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |CtlEsc| A| R| S| T| D| H| N| E| I| O| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _DVORAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |CtlEsc| A| O| E| U| I| D| H| T| N| S| -| | Ent| + * |--------------------------------------------------------------. + * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \ + HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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, _______, _______, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/clueboard/66/keymaps/smt/readme.md b/keyboards/clueboard/66/keymaps/smt/readme.md new file mode 100644 index 000000000..7fc0f0248 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/smt/readme.md @@ -0,0 +1,21 @@ +# smt Clueboard Layout (HHKB variant) + +![Clueboard Layout Image](http://i.imgur.com/Ll5gGte.png) + +This is smt's HHKB variant layout, based on the default layout that comes +flashed on every Clueboard. The primary differences from the default are: + +- The Backspace key is moved down into the traditional `\` position +- `\` and `` ` `` are assigned to the "split-backspace" positions +- The right Shift is split to allow for a Fn key to its right +- The modifiers on the right side now mirror the left side (`Alt`/`Super`/`Ctrl`) + +For the most part, it's a straightforward and easy to follow layout. There +are a few special keys: + +- The Esc key sends `Esc` when tapped, `` ` `` when `Alt`/`Super`/`Ctrl`/`Fn` is held, or `~` when `Shift` is held +- The Tab key sends `Tab` when tapped, or `Super+Ctrl+Alt+Shift` (a.k.a. [Hyper]) when held +- The key traditionally in the Caps-Lock position has been re-mapped to send `Esc` when tapped, or `Ctrl` when held +- The left Shift key sends `Enter` when tapped, or `Shift` when held + +[Hyper]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ diff --git a/keyboards/clueboard/66/keymaps/tetris/Makefile b/keyboards/clueboard/66/keymaps/tetris/Makefile new file mode 100644 index 000000000..461353129 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/tetris/Makefile @@ -0,0 +1 @@ +SRC = tetris_text.c diff --git a/keyboards/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c new file mode 100644 index 000000000..4bf2465a9 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c @@ -0,0 +1,209 @@ +#include "clueboard_66.h" +#include "tetris_text.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() + [1] = ACTION_FUNCTION(1) +}; + +static uint8_t tetris_key_presses = 0; +static uint16_t tetris_timer = 0; +static uint8_t tetris_running = 0; +static int tetris_keypress = 0; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + static bool mod_flag; + + switch (id) { + case 0: + // clueboard specific hook to make escape quite tetris + if (tetris_running) { + tetris_running = 0; + return; + } + + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + mod_flag = true; + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mod_flag) { + mod_flag = false; + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + case 1: + if (record->event.pressed) { + tetris_running = 1; + tetris_timer = 0; + tetris_keypress = 0; + // set randomness using total number of key presses + tetris_start(tetris_key_presses); + } + break; + } +} + +/* + * Set up tetris + */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + tetris_key_presses++; + } + + if (tetris_running && record->event.pressed) { + tetris_keypress = 0; + switch (keycode) { + case KC_UP: tetris_keypress = 1; break; + case KC_LEFT: tetris_keypress = 2; break; + case KC_DOWN: tetris_keypress = 3; break; + case KC_RIGHT: tetris_keypress = 4; break; + // Make ESC stop tetris (on keyboards other than clueboard) + // case KC_ESC: tetris_running = 0; return false; + } + if (tetris_keypress != 0) { + return false; + } + } + + return true; +} + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + if (tetris_running) { + tetris_timer++; + if (tetris_timer > 1000) { + // every 1000 times this is run is about 100 ms. + if (!tetris_tick(100)) { + // game over + tetris_running = 0; + } + tetris_timer = 0; + } + } +} + +void send_keycode(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void send_keycode_shift(uint16_t keycode) { + register_code(KC_LSFT); + register_code(keycode); + unregister_code(keycode); + unregister_code(KC_LSFT); +} + +void tetris_send_up(void) { + send_keycode(KC_UP); +} +void tetris_send_left(void) { + send_keycode(KC_LEFT); +} +void tetris_send_down(void) { + send_keycode(KC_DOWN); +} +void tetris_send_right(void) { + send_keycode(KC_RGHT); +} +void tetris_send_backspace(void) { + send_keycode(KC_BSPC); +} +void tetris_send_delete(void) { + send_keycode(KC_DEL); +} + +void tetris_send_string(const char *s) { + for (int i = 0; s[i] != 0; i++) { + if (s[i] >= 'a' && s[i] <= 'z') { + send_keycode(KC_A + (s[i] - 'a')); + } else if (s[i] >= 'A' && s[i] <= 'Z') { + send_keycode_shift(KC_A + (s[i] - 'A')); + } else if (s[i] >= '1' && s[i] <= '9') { + send_keycode(KC_1 + (s[i] - '1')); + } else { + switch (s[i]) { + case ' ': send_keycode(KC_SPACE); break; + case '.': send_keycode(KC_DOT); break; + case '0': send_keycode(KC_0); break; + } + } + } +} + +void tetris_send_newline(void) { + send_keycode(KC_ENT); +} + +int tetris_get_keypress(void) { + int out = tetris_keypress; + tetris_keypress = 0; + return out; +} diff --git a/keyboards/clueboard/66/keymaps/tetris/readme.md b/keyboards/clueboard/66/keymaps/tetris/readme.md new file mode 100644 index 000000000..20e97fb19 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/tetris/readme.md @@ -0,0 +1,33 @@ +Default layout but with a tetris game +===================================== +Tetris works by outputting key-presses to make ascii-art in a regular text editor. +It reads key presses to rotate and move the bricks like a regular tetris game. + +Example +======= +![tetris](https://raw.githubusercontent.com/danamlund/meckb_tetris/master/tetris.gif) + +Usage +===== +1) Open a default text editor +2) Press the tetris button (Fn + t) +3) Play tetris + +It makes ascii-art by sending keycodes: left, right, up, down, qwerty characters, and numbers. + +Problems +======== +Drawing ascii-art is too slow to make a pleasant playing experience. +While drawing ascii-art, the keyboard does not record key-presses, so its pretty unresponsive. + +Adds 5000 bytes to the hex file. + +Implement in other keyboards +============================ + - Copy-paste the files tetris_text.c and tetrix_text.h to your keymap folder. + - Add/update your-keyboard/your-keymap/Makefile to include ``SRC = tetris_text.c`` + - Copy-paste the tetris-related code from this keymap.c to yours. + - Set a key to trigger F(1) to start tetris mode. + - Its also a good idea to set a key to stop tetris, here its escape. + +You can find a simple tetris keyboard definition at diff --git a/keyboards/clueboard/66/keymaps/tetris/rules.mk b/keyboards/clueboard/66/keymaps/tetris/rules.mk new file mode 100644 index 000000000..461353129 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/tetris/rules.mk @@ -0,0 +1 @@ +SRC = tetris_text.c diff --git a/keyboards/clueboard/66/keymaps/tetris/tetris_text.c b/keyboards/clueboard/66/keymaps/tetris/tetris_text.c new file mode 100644 index 000000000..1376ead00 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/tetris/tetris_text.c @@ -0,0 +1,505 @@ +/* Copyright 2017 Dan Amlund Thomsen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include +#include + +#include "tetris_text.h" + +static char empty_piece[7][7] = { { 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 } }; + +static char temp_piece[7][7]; + +static int curx = 0; +static int cury = 0; + +static void clear_piece(char piece[7][7]) { + for (int y = 0; y < 7; y++) { + for (int x = 0; x < 7; x++) { + piece[x][y] = 0; + } + } +} + +static void copy_piece_from_to(char from[7][7], char to[7][7]) { + for (int y = 0; y < 7; y++) { + for (int x = 0; x < 7; x++) { + to[x][y] = from[x][y]; + } + } +} + +static void rotate_piece(char piece[7][7]) { + // transpose + for (int y = 0; y < 7; y++) { + for (int x = y + 1; x < 7; x++) { + char tmp = piece[y][x]; + piece[y][x] = piece[x][y]; + piece[x][y] = tmp; + } + } + + // reverse rows + for (int y = 0; y < 7; y++) { + for (int x = 0; x < 3; x++) { + char tmp = piece[y][6 - x]; + piece[y][6 - x] = piece[y][x]; + piece[y][x] = tmp; + } + } +} + +static char get_shape_char(int shape) { + switch (shape) { + case 0: return 'I'; + case 1: return 'J'; + case 2: return 'L'; + case 3: return 'O'; + case 4: return 'S'; + case 5: return 'T'; + case 6: return 'Z'; + } + return 'Q'; +} + +static void set_piece(char piece[7][7], int shape, int rotation) { + clear_piece(piece); + switch (shape) { + case 0: + if (rotation % 2 == 0) { + // xxXx + piece[3][1] = 1; + piece[3][2] = 1; + piece[3][3] = 1; + piece[3][4] = 1; + } else { + // x + // x + // X + // x + piece[1][3] = 1; + piece[2][3] = 1; + piece[3][3] = 1; + piece[4][3] = 1; + } + break; + case 1: + // xXx + // x + piece[3][2] = 1; + piece[3][3] = 1; + piece[3][4] = 1; + piece[4][4] = 1; + for (int i = 0; i < rotation; i++) { + rotate_piece(piece); + } + break; + case 2: + // xXx + // x + piece[3][2] = 1; + piece[3][3] = 1; + piece[3][4] = 1; + piece[4][2] = 1; + for (int i = 0; i < rotation; i++) { + rotate_piece(piece); + } + break; + case 3: + // xX + // xx + piece[3][2] = 1; + piece[3][3] = 1; + piece[4][2] = 1; + piece[4][3] = 1; + break; + case 4: + if (rotation % 2 == 0) { + // xX + // xx + piece[3][2] = 1; + piece[3][3] = 1; + piece[4][3] = 1; + piece[4][4] = 1; + } else { + // x + // xX + // x + piece[2][3] = 1; + piece[3][2] = 1; + piece[3][3] = 1; + piece[4][2] = 1; + } + break; + case 5: + // xXx + // x + piece[3][2] = 1; + piece[3][3] = 1; + piece[3][4] = 1; + piece[4][3] = 1; + for (int i = 0; i < rotation; i++) { + rotate_piece(piece); + } + break; + case 6: + if (rotation % 2 == 0) { + // Xx + // xx + piece[3][3] = 1; + piece[3][4] = 1; + piece[4][2] = 1; + piece[4][3] = 1; + } else { + // x + // Xx + // x + piece[2][3] = 1; + piece[3][3] = 1; + piece[3][4] = 1; + piece[4][4] = 1; + } + break; + } +} + +static void send_deletes(int deletes) { + for (int i = 0; i < deletes; i++) { + tetris_send_delete(); + } +} + +static void send_backspaces(int backspaces) { + for (int i = 0; i < backspaces; i++) { + tetris_send_backspace(); + curx--; + } +} + +static void send_goto_xy(int x, int y) { + while (curx < x) { + tetris_send_right(); + curx++; + } + while (curx > x) { + tetris_send_left(); + curx--; + } + while (cury < y) { + tetris_send_down(); + cury++; + } + while (cury > y) { + tetris_send_up(); + cury--; + } +} + +static void draw_row(char c, const char oldrow[7], const char newrow[7], int x, int y) { + char str[2] = { c, 0 }; + char row_is_del[7] = { 0 }; + int first = -1; + int last = -1; + for (int px = 0; px < 7; px++) { + if (oldrow[px] && !newrow[px]) { + row_is_del[px] = 1; + } + if (newrow[px] || oldrow[px]) { + if (first == -1) first = px; + last = px; + } + } + + if (first >= 0) { + if (curx > x + last + 1) { + send_goto_xy(x + last + 1, cury); + } + if (curx < x + first) { + send_goto_xy(x + first, cury); + } + send_goto_xy(curx, y); + send_deletes((x + last + 1) - curx); + send_backspaces(curx - (x + first)); + for (int i = first; i <= last; i++) { + if (row_is_del[i]) { + tetris_send_string("."); + } else { + tetris_send_string(str); + } + curx++; + } + } +} + +static void move_piece_from_to(char from[7][7], char to[7][7], int xadd, int yadd) { + for (int y = 0; y < 7; y++) { + for (int x = 0; x < 7; x++) { + if (x + xadd >= 0 && x + xadd < 7 && y + yadd >= 0 && y + yadd < 7) { + to[y][x] = from[y + yadd][x + xadd]; + } else { + to[y][x] = 0; + } + } + } +} + +static void draw_piece(char c, int x, int y, char oldpiece[7][7], char piece[7][7]) { + for (int py = 0; py < 7; py++) { + draw_row(c, oldpiece[py], piece[py], x, y + py); + } +} + +static void draw_piece_moved(char c, int x, int y, char piece[7][7], int oldxadd, int oldyadd) { + move_piece_from_to(piece, temp_piece, oldxadd, oldyadd); + draw_piece(c, x, y, temp_piece, piece); +} + +static int is_piece_hitting(char board[20][10], char piece[7][7], int x, int y) { + for (int py = 0; py < 7; py++) { + for (int px = 0; px < 7; px++) { + if (piece[py][px] && + (px + x >= 10 || px + x < 0 + || py + y >= 20 || py + y < 0 + || board[py + y][px + x])) { + return 1; + } + } + } + return 0; +} + +static void add_piece_to_board(char piece[7][7], char board[20][10], int x, int y) { + for (int py = 0; py < 7; py++) { + for (int px = 0; px < 7; px++) { + if (piece[py][px]) { + board[py + y][px + x] = piece[py][px]; + } + } + } +} + +static void draw_board_line(void) { + //send_string("l l"); + tetris_send_string("l..........l"); + tetris_send_newline(); +} +static void init(void) { + for (int i = 0; i < 20; i++) { + draw_board_line(); + } + tetris_send_string("doooooooooob"); + curx = 12; + cury = 20; +} + +static int get_piece_min_y(char piece[7][7]) { + for (int y = 0; y < 7; y++) { + for (int x = 0; x < 7; x++) { + if (piece[y][x]) + return y; + } + } + return 0; +} + +static int clear_lines(char board[20][10]) { + int cleared_lines = 0; + for (int y = 19; y >= 0; y--) { + char isfull = 1; + for (int x = 0; x < 10; x++) { + if (!board[y][x]) { + isfull = 0; + } + } + if (isfull) { + // delete clear line + send_goto_xy(12, y); + send_backspaces(12); // delete line contents + // delete newline + tetris_send_backspace(); + cury--; + curx = 12; + cleared_lines++; + } else { + if (cleared_lines > 0) { + // move cleared lines down on board + for (int x = 0; x < 10; x++) { + board[y + cleared_lines][x] = board[y][x]; + } + } + } + } + // clear cleared top lines + for (int y = 0; y < cleared_lines; y++) { + for (int x = 0; x < 10; x++) { + board[y][x] = 0; + } + } + if (cleared_lines > 0) { + send_goto_xy(0, 0); + for (int i = 0; i < cleared_lines; i++) { + draw_board_line(); + curx = 0; + cury++; + } + } + return cleared_lines; +} + +static uint8_t myrandom(uint8_t seed) { + uint8_t out = seed >> 1; + if (seed & 1) { + out = out ^ 0xB8; + } + return out; +} + +static char piece[7][7]; +static char board[20][10]; +static uint8_t r; +static int score; +static int x; +static int y; +static int shape; +static int rotation; +static int time; +static int next_down; +static int down_delay; +static int first_run; +static int game_over; + +void tetris_start(uint8_t seed) { + for (int y = 0; y < 20; y++) { + for (int x = 0; x < 10; x++) { + board[y][x] = 0; + } + } + + clear_piece(piece); + + init(); + + game_over = 0; + + r = seed; + score = 0; + + copy_piece_from_to(empty_piece, piece); + x = 0; + y = 0; + shape = 0; + rotation = 0; + time = 0; + next_down = 0; + down_delay = -1; + first_run = 1; +} + +int tetris_tick(int ms_since_previous_tick) { + if (game_over) { + return 0; + } + + time += ms_since_previous_tick; + + if (first_run || time > next_down) { + if (first_run || is_piece_hitting(board, piece, x, y + 1)) { + first_run = 0; + add_piece_to_board(piece, board, x, y); + + score += clear_lines(board); + + down_delay = 500 - score * 10; + if (down_delay < 100) { + down_delay = 100; + } + + rotation = 0; + shape = r % 7; + r = myrandom(r); + set_piece(piece, shape, rotation); + + x = 1; + y = - get_piece_min_y(piece); + draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 0, 0); + + if (is_piece_hitting(board, piece, x, y)) { + game_over = 1; + send_goto_xy(12, 10); + tetris_send_string(" game over"); + tetris_send_down(); + tetris_send_string(" score "); + char tmp[10]; + sprintf(tmp, "%d", score); + tetris_send_string(tmp); + return 0; + } + } else { + y++; + draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 0, +1); + } + next_down = time + down_delay; + } else { + + switch (tetris_get_keypress()) { + case 1: { // up + int oldrotation = rotation; + rotation = (rotation + 1) % 4; + copy_piece_from_to(piece, temp_piece); + set_piece(piece, shape, rotation); + if (is_piece_hitting(board, piece, x, y)) { + rotation = oldrotation; + set_piece(piece, shape, rotation); + } else { + draw_piece(get_shape_char(shape), 1 + x, y, temp_piece, piece); + } + break; + } + case 2: // left + if (!is_piece_hitting(board, piece, x - 1, y)) { + x--; + draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, -1, 0); + } + break; + case 3: {// down + int starty = y; + while (!is_piece_hitting(board, piece, x, y + 1)) { + y++; + } + + draw_piece(get_shape_char(shape), x + 1, starty, piece, empty_piece); + draw_piece(get_shape_char(shape), x + 1, y, empty_piece, piece); + + next_down = time + down_delay; + break; + } + case 4: // right + if (!is_piece_hitting(board, piece, x + 1, y)) { + x++; + draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 1, 0); + } + break; + } + } + return 1; +} diff --git a/keyboards/clueboard/66/keymaps/tetris/tetris_text.h b/keyboards/clueboard/66/keymaps/tetris/tetris_text.h new file mode 100644 index 000000000..25b4177e0 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/tetris/tetris_text.h @@ -0,0 +1,45 @@ +/* Copyright 2017 Dan Amlund Thomsen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef TETRIS_TEXT_H +#define TETRIS_TEXT_H + +//// to implement +void tetris_send_up(void); +void tetris_send_left(void); +void tetris_send_down(void); +void tetris_send_right(void); + +void tetris_send_backspace(void); +void tetris_send_delete(void); + +void tetris_send_string(const char *s); + +void tetris_send_newline(void); + +// return = meaning +// 0 = no keys pressed +// 1 = up +// 2 = left +// 3 = down +// 4 = right +int tetris_get_keypress(void); + +//// to call +void tetris_start(uint8_t seed); +// returns 0 when game is over +int tetris_tick(int ms_since_previous_tick); + +#endif diff --git a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c new file mode 100644 index 000000000..dab959bdc --- /dev/null +++ b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + 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_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_INS, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/unix_optimized/readme.md b/keyboards/clueboard/66/keymaps/unix_optimized/readme.md new file mode 100644 index 000000000..9e6d0e902 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/unix_optimized/readme.md @@ -0,0 +1,6 @@ +![Clueboard Layout Image](http://i.imgur.com/BnWlOht.png) + +# Default Clueboard Layout + +This is the default layout except that Caps Lock has been changed to Control +and Insert and Delete have been put into the Fn layer. diff --git a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c new file mode 100644 index 000000000..fb83aaa24 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard_66.h" + +// Helpful defines +#define _______ KC_TRNS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/win_optimized/readme.md b/keyboards/clueboard/66/keymaps/win_optimized/readme.md new file mode 100644 index 000000000..703a37be0 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/win_optimized/readme.md @@ -0,0 +1,8 @@ +![Clueboard Layout Image](http://i.imgur.com/fsqOqZo.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/xyverz/Makefile b/keyboards/clueboard/66/keymaps/xyverz/Makefile new file mode 100644 index 000000000..950dadf84 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/xyverz/Makefile @@ -0,0 +1,49 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk in +# the appropriate keymap folder that will get included automatically +# +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c new file mode 100644 index 000000000..b725b11dd --- /dev/null +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -0,0 +1,78 @@ +// Xyverz' keymap. +// It's based on the default keymap, but Dvorak! + +#include "clueboard_66.h" + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 +#define _RS 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,--------------------------------------------------------------------------. ,----. + * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP| + * |--------------------------------------------------------------------------| |----| + * | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN| + * |--------------------------------------------------------------------------| `----' + * |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent| + * |-----------------------------------------------------------------------------. + * |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP| + * |------------------------------------------------------------------------|----|----. + * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| + * `----------------------------------------------------------------------------------' + */ +[_BL] = KEYMAP( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ + LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + * ,--------------------------------------------------------------------------. ,----. + * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| + * |--------------------------------------------------------------------------| |----| + * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| + * |--------------------------------------------------------------------------| `----' + * | | | _RS| | | | | | | | | | | | + * |-----------------------------------------------------------------------------. + * | | | | | | | | | | | | | | |PGUP| + * |------------------------------------------------------------------------|----|----. + * | | | | | | | | | | _FL|HOME|PGDN| END| + * `----------------------------------------------------------------------------------' + */ +[_FL] = KEYMAP( + 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_TRNS, KC_DEL, BL_STEP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), + + /* Keymap _RS: Reset layer + * ,--------------------------------------------------------------------------. ,----. + * | | | | | | | | | | | | | | | RGB| |VAL+| + * |--------------------------------------------------------------------------| |----| + * | | | | |RESET| | | | | | | | | | |VAL-| + * |--------------------------------------------------------------------------| `----' + * | | | _RS| | | | | | | | | | | | + * |-----------------------------------------------------------------------------. + * | | | | | | | | | | | | | | |SAT+| + * |------------------------------------------------------------------------|----|----. + * | | | | | | | | | | _FL|HUE-|SAT-|HUE+| + * `----------------------------------------------------------------------------------' + */ +[_RS] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ + KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), +}; + diff --git a/keyboards/clueboard/66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk new file mode 100644 index 000000000..950dadf84 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/xyverz/rules.mk @@ -0,0 +1,49 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk in +# the appropriate keymap folder that will get included automatically +# +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/clueboard/66/readme.md b/keyboards/clueboard/66/readme.md new file mode 100644 index 000000000..ad14ae9d6 --- /dev/null +++ b/keyboards/clueboard/66/readme.md @@ -0,0 +1,18 @@ +# Clueboard 66% + +![Clueboard](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/5867eeaad2b857fd0d196f4b/1494021396651/IMGP4201.jpg?format=1500w) + +A fully customizable 66% keyboard. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Clueboard 66% PCB + * rev1 (1.0) + * rev2 (2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) + * rev3 (2.7) +* Hardware Availability: [clueboard.co](https://clueboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make clueboard/66:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/66/rev1/config.h b/keyboards/clueboard/66/rev1/config.h new file mode 100644 index 000000000..210718d56 --- /dev/null +++ b/keyboards/clueboard/66/rev1/config.h @@ -0,0 +1,36 @@ +#ifndef CLUEBOARD_66_REV1_CONFIG_H +#define CLUEBOARD_66_REV1_CONFIG_H + +#include "config_common.h" + +#define PRODUCT_ID 0x2301 +#define DEVICE_VER 0x0003 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right +/* Column pin configuration +* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +* pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1 +*/ +#define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 } +/* Row pin configuration +* row: 0 1 2 3 4 +* pin: D1 D0 D2 D5 D3 +*/ +#define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 } +#define UNUSED_PINS + +/* Underlight configuration + */ +#define RGB_DI_PIN B2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +#endif diff --git a/keyboards/clueboard/66/rev1/rev1.c b/keyboards/clueboard/66/rev1/rev1.c new file mode 100644 index 000000000..90fc6956c --- /dev/null +++ b/keyboards/clueboard/66/rev1/rev1.c @@ -0,0 +1,17 @@ +#include "rev1.h" + +void led_init_ports() { + // * Set our LED pins as output + DDRF |= (1<<0); +} + +void led_set_kb(uint8_t usb_led) { + DDRF |= (1<<0); + if (usb_led & (1< +#include "backlight.h" +#include "print.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< +#include "backlight.h" +#include "print.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2330 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT ATMEGA32U4 Firmware Dev Kit +#define DESCRIPTION A small board to help you hack on QMK. + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F5, F4, B4 } +#define MATRIX_COL_PINS { F1, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 20 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 6 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* Underlight configuration + */ +#define RGB_DI_PIN E6 +//#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/clueboard/card/keymaps/default/config.h b/keyboards/clueboard/card/keymaps/default/config.h new file mode 100644 index 000000000..8893d122e --- /dev/null +++ b/keyboards/clueboard/card/keymaps/default/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c new file mode 100644 index 000000000..cd87750a8 --- /dev/null +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include "cluecard.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + RGB_TOG, RGB_SAI, RGB_VAI, \ + RGB_HUD, RGB_HUI, \ + RGB_MOD, RGB_SAD, RGB_VAD, \ + BL_STEP, \ + F(0), F(1), F(2) \ + ) +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), + [1] = ACTION_FUNCTION(1), + [2] = ACTION_FUNCTION(2) +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch (id) { + case 0: + PLAY_SONG(tone_startup); + break; + case 1: + PLAY_SONG(music_scale); + break; + case 2: + PLAY_SONG(tone_goodbye); + break; + } + } +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} diff --git a/keyboards/clueboard/card/keymaps/default/readme.md b/keyboards/clueboard/card/keymaps/default/readme.md new file mode 100644 index 000000000..53ba90253 --- /dev/null +++ b/keyboards/clueboard/card/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for cluecard + +Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness buttons. You can of course also turn them on and off with the on/off button. diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk new file mode 100644 index 000000000..8ee841da0 --- /dev/null +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/config.h b/keyboards/clueboard/card/keymaps/rgb_effects/config.h new file mode 100644 index 000000000..c6c9342c8 --- /dev/null +++ b/keyboards/clueboard/card/keymaps/rgb_effects/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 + +#endif diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c new file mode 100644 index 000000000..74c95ce8a --- /dev/null +++ b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c @@ -0,0 +1,28 @@ +#include "cluecard.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + RGB_TOG, RGB_SAI, RGB_VAI, \ + RGB_HUD, RGB_HUI, \ + RGB_MOD, RGB_SAD, RGB_VAD, \ + BL_STEP, \ + KC_NO, KC_NO, KC_NO \ + ) +}; + +const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85}; +const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/readme.md b/keyboards/clueboard/card/keymaps/rgb_effects/readme.md new file mode 100644 index 000000000..f99dcebf0 --- /dev/null +++ b/keyboards/clueboard/card/keymaps/rgb_effects/readme.md @@ -0,0 +1,5 @@ +# RGB effect test keymap for cluecard + +This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check the `rgblight.c` file. + +The hue, saturation and brightness buttons will work depending on which effect is active. diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk new file mode 100644 index 000000000..00670c0cf --- /dev/null +++ b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/clueboard/card/readme.md b/keyboards/clueboard/card/readme.md new file mode 100644 index 000000000..27089d465 --- /dev/null +++ b/keyboards/clueboard/card/readme.md @@ -0,0 +1,13 @@ +# Cluecard + +A simple QMK dev kit. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Cluecard 1.0 +* Hardware Availability: Special gift from [skullydazed](https://github.com/skullydazed) + +Make example for this keyboard (after setting up your build environment): + + make clueboard/card:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk new file mode 100644 index 000000000..2117c8127 --- /dev/null +++ b/keyboards/clueboard/card/rules.mk @@ -0,0 +1,70 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md new file mode 100644 index 000000000..5dfa1e353 --- /dev/null +++ b/keyboards/clueboard/readme.md @@ -0,0 +1,13 @@ +# Clueboard + +![Clueboard Logo](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/59c9703318b27d1ab34f40df/1508257572555/) + +Clueboard makes fully customizable custom keyboards in a variety of formfactors. Inside this directory you'll find support for the entire line of Clueboard products. + +* Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: + * [`17`](17/): Clueboard "Cluepad" PCB + * [`60`](60/): Clueboard 60% PCB + * [`66`](66/): Clueboard 66% PCB + * [`card`](card/): Special Cluecard PCB +* Hardware Availability: [clueboard.co](https://clueboard.co/) diff --git a/keyboards/clueboard_17/clueboard_17.c b/keyboards/clueboard_17/clueboard_17.c deleted file mode 100644 index 04cc81217..000000000 --- a/keyboards/clueboard_17/clueboard_17.c +++ /dev/null @@ -1,60 +0,0 @@ -#include "clueboard_17.h" - -int pwm_level; - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<> 8; - OCR4A = 0xFF & pwm_level; -} diff --git a/keyboards/clueboard_17/clueboard_17.h b/keyboards/clueboard_17/clueboard_17.h deleted file mode 100644 index 5e4a5999e..000000000 --- a/keyboards/clueboard_17/clueboard_17.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef CLUEPAD_H -#define CLUEPAD_H - -#include "quantum.h" - - -/* Cluepad matrix layout - * .-------------------. - * |NLCK| /| *| -| - * |-------------------| - * | 7| 8| 9| | - * |--------------| | - * | 4| 5| 6| +| - * |-------------------| - * | 1| 2| 3| | - * |--------------| | - * | 0| .| Ent| - * '-------------------' - */ -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k33, \ - k40, k42 \ -) { \ - { k00, k01, k02, k03, }, \ - { k10, k11, k12, k13, }, \ - { k20, k21, k22, KC_NO, }, \ - { k30, k31, k32, k33, }, \ - { k40, KC_NO, k42, KC_NO } \ -} - -#endif diff --git a/keyboards/clueboard_17/config.h b/keyboards/clueboard_17/config.h deleted file mode 100644 index bd64dfd27..000000000 --- a/keyboards/clueboard_17/config.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xC1ED -#define PRODUCT_ID 0x2312 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Clueboard -#define PRODUCT Cluepad with RGB Underlighting -#define DESCRIPTION QMK keyboard firmware for Cluepad - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 4 - -// ROWS: Top to bottom, COLS: Left to right -/* Row pin configuration -* row: 0 1 2 3 4 -* pin: -*/ -#define MATRIX_ROW_PINS { B0, D3, D5, D4, D6 } -/* Column pin configuration - * col: 0 1 2 3 - * pin: F4 E6 B1 D2 - */ -#define MATRIX_COL_PINS { F4, E6, B1, D2 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Number of backlighting levels */ -#define BACKLIGHT_LEVELS 3 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* Underlight configuration - */ -#define RGB_DI_PIN F6 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* Debug forcibly enabled */ -#define ALWAYS_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/clueboard_17/keymaps/default/keymap.c b/keyboards/clueboard_17/keymaps/default/keymap.c deleted file mode 100644 index 7a0d51851..000000000 --- a/keyboards/clueboard_17/keymaps/default/keymap.c +++ /dev/null @@ -1,65 +0,0 @@ -#include "clueboard_17.h" - -#include "backlight.h" - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _RS 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * .-------------------. - * |NL F| /| *| -| - * |-------------------| - * | 7| 8| 9| | - * |--------------| | - * | 4| 5| 6| +| - * |-------------------| - * | 1| 2| 3| | - * |--------------| | - * | 0| .| Ent| - * '-------------------' - */ -[_BL] = KEYMAP( - LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, KC_PPLS, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, KC_PDOT), - - /* Keymap _FL: Function Layer - * .-------------------. - * |NL F| | | Fn0| - * |-------------------| - * | | Fn4| | | - * |--------------| | - * | Fn3|BL_S| Fn2| Fn6| - * |-------------------| - * | | Fn5| | | - * |--------------| | - * | Fn1| | Fn7| - * '-------------------' - */ -[_FL] = KEYMAP( - LT(_FL, KC_NLCK), KC_TRNS, KC_TRNS, RGB_TOG, \ - KC_TRNS, RGB_SAI, KC_TRNS, RGB_VAI, \ - RGB_HUD, BL_STEP, RGB_HUI, \ - KC_TRNS, RGB_SAD, KC_TRNS, RGB_VAD, \ - RGB_MOD, KC_TRNS) -}; - -/*enum function_id { -};*/ - -const uint16_t PROGMEM fn_actions[] = { -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - } -} - diff --git a/keyboards/clueboard_17/readme.md b/keyboards/clueboard_17/readme.md deleted file mode 100644 index f3590fdbb..000000000 --- a/keyboards/clueboard_17/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Cluepad - -![Cluepad](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w) - -A basic 17 key numpad PCB. - -* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) -* Hardware Supported: Cluepad PCB 1.0 -* Hardware Availability: [clueboard.co](https://clueboard.co/) - -Make example for this keyboard (after setting up your build environment): - - make clueboard_17:default - -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard_17/rules.mk b/keyboards/clueboard_17/rules.mk deleted file mode 100644 index 264aba044..000000000 --- a/keyboards/clueboard_17/rules.mk +++ /dev/null @@ -1,65 +0,0 @@ - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -# CONSOLE_ENABLE = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable numpad's backlight functionality -RGBLIGHT_ENABLE = yes -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file diff --git a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 897f20a88..000000000 --- a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -#if HAL_USE_PAL || defined(__DOXYGEN__) -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -const PALConfig pal_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} -#endif -}; -#endif - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) { -} diff --git a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index 145d569f0..000000000 --- a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Clueboard 60% Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Clueboard 60 PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_INPUT(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ - PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ - PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ - PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ - PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ - PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ - PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ - PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_USB_DM) | \ - PIN_ODR_HIGH(GPIOA_USB_DP) | \ - PIN_ODR_HIGH(GPIOA_SWDIO) | \ - PIN_ODR_HIGH(GPIOA_SWCLK) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 0) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(GPIOB_PIN7) | \ - PIN_MODE_INPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_HIGH(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD11 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (input floating). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a..000000000 --- a/keyboards/clueboard_60/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/clueboard_60/bootloader_defs.h b/keyboards/clueboard_60/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a..000000000 --- a/keyboards/clueboard_60/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/clueboard_60/chconf.h b/keyboards/clueboard_60/chconf.h deleted file mode 100644 index 5a9b83310..000000000 --- a/keyboards/clueboard_60/chconf.h +++ /dev/null @@ -1,520 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#define CH_CFG_ST_RESOLUTION 32 - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#define CH_CFG_ST_FREQUENCY 10000 - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#define CH_CFG_ST_TIMEDELTA 2 - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#define CH_CFG_TIME_QUANTUM 0 - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#define CH_CFG_MEMCORE_SIZE 0 - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#define CH_CFG_NO_IDLE_THREAD FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#define CH_CFG_OPTIMIZE_SPEED TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_TM TRUE - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_REGISTRY TRUE - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_WAITEXIT TRUE - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_SEMAPHORES TRUE - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MUTEXES TRUE - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_CONDVARS TRUE - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_EVENTS TRUE - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MESSAGES TRUE - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#define CH_CFG_USE_MESSAGES_PRIORITY TRUE - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMCORE TRUE - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#define CH_CFG_USE_HEAP TRUE - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMPOOLS TRUE - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#define CH_CFG_USE_DYNAMIC TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_STATISTICS FALSE - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_SYSTEM_STATE_CHECK FALSE - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_CHECKS FALSE - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_ASSERTS FALSE - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_BUFFER_SIZE 128 - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. - * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#define CH_DBG_ENABLE_STACK_CHECK TRUE - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_FILL_THREADS FALSE - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. - * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#define CH_DBG_THREADS_PROFILING FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. - * - * @note It is invoked from within @p chThdInit() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. - */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} - -/** @} */ - -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ - -#endif /* CHCONF_H */ - -/** @} */ diff --git a/keyboards/clueboard_60/clueboard_60.c b/keyboards/clueboard_60/clueboard_60.c deleted file mode 100644 index a0b74db72..000000000 --- a/keyboards/clueboard_60/clueboard_60.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2017 skully - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "clueboard_60.h" - -void matrix_init_kb(void) { - -} - -void matrix_scan_kb(void) { - -} diff --git a/keyboards/clueboard_60/clueboard_60.h b/keyboards/clueboard_60/clueboard_60.h deleted file mode 100644 index ffff18f9e..000000000 --- a/keyboards/clueboard_60/clueboard_60.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright 2017 skully - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef CLUEBOARD60_H -#define CLUEBOARD60_H - -#include "quantum.h" - -/* - * These are shortcuts to help you work with the various layout options. If your - * keymap works with one of the LAYOUT_...() macros you are encouraged to use that - * and to contribute your keymap to the corresponding layout in - * `qmk_firmware/layouts/community`. - */ - -/* The fully-featured KEYMAP() that has every single key available in the matrix. - */ -#define KEYMAP(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ - k40, k41, k42, k47, k4a, k4b, k4c, k4e \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e, }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ -} - -/* A layout that matches the Apple Extended Keyboard's main area. No split keys, - * 3 mods on either side of the spacebar. - */ -#define KEYMAP_AEK(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k47, k4b, k4c, k4e \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, KC_NO, k2e, }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO, }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k4b, k4c, KC_NO, k4e, }, \ -} - -/* Standard 60% ANSI layout */ -#define LAYOUT_60_ansi(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k47, k4a, k4b, k4c, k4e \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, KC_NO, k2e, }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO, }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ -} - -/* Standard 60% ISO layout */ -#define LAYOUT_60_iso(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k47, k4a, k4b, k4c, k4e \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, KC_NO, }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e, }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO, }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ -} - -/* Split Backspace and Right Shift ANSI layout. */ -#define LAYOUT_60_ansi_split_bs_rshift(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ - k40, k41, k42, k47, k4a, k4b, k4c, k4e \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, KC_NO, k2e, }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ -} -#endif diff --git a/keyboards/clueboard_60/config.h b/keyboards/clueboard_60/config.h deleted file mode 100644 index 333698a08..000000000 --- a/keyboards/clueboard_60/config.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2017 skully - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xC1ED -#define PRODUCT_ID 0x2350 -#define DEVICE_VER 0x0001 -#define MANUFACTURER "Clueboard" -#define USBSTR_MANUFACTURER 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00' -#define PRODUCT "Clueboard60" -#define USBSTR_PRODUCT 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', ' ', '\x00', '6', '\x00', '0', '\x00', '%', '\x00' -#define DESCRIPTION "Clueboard 60%" - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -/* Note: These are not used for arm boards. They're here purely as documentation. - * #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 } - * #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } - * #define UNUSED_PINS - */ - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 - -/* Prevent modifiers from being stuck on after layer changes. */ -#define PREVENT_STUCK_MODIFIERS - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif - - /* Backlight configuration - */ -#define BACKLIGHT_LEVELS 1 diff --git a/keyboards/clueboard_60/halconf.h b/keyboards/clueboard_60/halconf.h deleted file mode 100644 index 254470cbd..000000000 --- a/keyboards/clueboard_60/halconf.h +++ /dev/null @@ -1,388 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. - * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef HALCONF_H -#define HALCONF_H - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC TRUE -#endif - -/** - * @brief Enables the EXT subsystem. - */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the QSPI subsystem. - */ -#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) -#define HAL_USE_QSPI FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB TRUE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 16 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/** - * @brief Serial over USB number of buffers. - * @note The default is 2 buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* UART driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE -#endif - -/** - * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -#endif /* HALCONF_H */ - -/** @} */ diff --git a/keyboards/clueboard_60/keymaps/default/keymap.c b/keyboards/clueboard_60/keymaps/default/keymap.c deleted file mode 100644 index e662057f0..000000000 --- a/keyboards/clueboard_60/keymaps/default/keymap.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "clueboard_60.h" - -#define _______ KC_TRNS - -enum keyboard_layers { - _BL, - _FL, - _CL -}; - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * |-----------------------------------------------------------' - * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | - * `-----------------------------------------------------------' - */ - [_BL] = KEYMAP( - KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC,\ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), - [_FL] = KEYMAP( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,\ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FL), _______), - [_CL] = KEYMAP( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ - _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FL), _______) -}; diff --git a/keyboards/clueboard_60/keymaps/default/readme.md b/keyboards/clueboard_60/keymaps/default/readme.md deleted file mode 100644 index 32d4bfba6..000000000 --- a/keyboards/clueboard_60/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for clueboard 60% diff --git a/keyboards/clueboard_60/keymaps/default_aek/keymap.c b/keyboards/clueboard_60/keymaps/default_aek/keymap.c deleted file mode 100644 index d2d3db772..000000000 --- a/keyboards/clueboard_60/keymaps/default_aek/keymap.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "clueboard_60.h" - -#define _______ KC_TRNS - -enum keyboard_layers { - _BL, - _FL, - _CL -}; - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BkSp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| - * |-----------------------------------------------------------| - * |Capslk| A| S| D| F| G| H| J| K| L| ;| '| Enter| - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| - * |-----------------------------------------------------------' - * |Ctrl |Gui|Alt | Space |Alt|Fn |Ctrl | - * `-----------------------------------------------------------' - */ - [_BL] = KEYMAP_AEK( - KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS,\ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL), - [_FL] = KEYMAP_AEK( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ - _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______, _______, _______, _______, MO(_FL), _______), - [_CL] = KEYMAP_AEK( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______,\ - _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______, _______, _______, _______, MO(_FL), _______) -}; diff --git a/keyboards/clueboard_60/keymaps/default_aek/readme.md b/keyboards/clueboard_60/keymaps/default_aek/readme.md deleted file mode 100644 index cdec24160..000000000 --- a/keyboards/clueboard_60/keymaps/default_aek/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for clueboard 60%, optimized for the AEK layout. diff --git a/keyboards/clueboard_60/led.c b/keyboards/clueboard_60/led.c deleted file mode 100644 index fdf244ad5..000000000 --- a/keyboards/clueboard_60/led.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2017 skully - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -#include "hal.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -void backlight_init_ports(void) { - printf("backlight_init_ports()\n"); - #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(GPIOB, 8); - #endif -} - -void backlight_set(uint8_t level) { - printf("backlight_set(%d)\n", level); - #ifdef BACKLIGHT_ENABLE - if (level == 0) { - // Turn backlight off - palSetPad(GPIOB, 8); - } else { - // Turn backlight on - palClearPad(GPIOB, 8); - } - #endif -} - -void led_init_ports() { - printf("led_init_ports()\n"); - palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); -} - -void led_set_kb(uint8_t usb_led) { - printf("led_init_ports()\n"); - if (usb_led & (1< -#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "printf.h" -#include "backlight.h" -#include "matrix.h" - - -/* Clueboard 60% - * - * Column pins are input with internal pull-down. - * Row pins are output and strobe with high. - * Key is high or 1 when it turns on. - * - * col: { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } - * row: { PB0, PB1, PB2, PA15, PA10 } - */ -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_COLS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void matrix_init(void) { - printf("matrix init\n"); - //debug_matrix = true; - - /* Column(sense) */ - palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 15, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 9, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 15, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 14, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); - - /* Row(strobe) */ - palSetPadMode(GPIOB, 0, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOB, 1, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOB, 2, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); - - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, MATRIX_COLS); - - /* Setup capslock */ - // palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); - // palClearPad(GPIOB, 7); - - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) { - for (int col = 0; col < MATRIX_COLS; col++) { - matrix_row_t data = 0; - - // strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } - switch (col) { - case 0: palSetPad(GPIOA, 2); break; - case 1: palSetPad(GPIOA, 3); break; - case 2: palSetPad(GPIOA, 6); break; - case 3: palSetPad(GPIOB, 14); break; - case 4: palSetPad(GPIOB, 15); break; - case 5: palSetPad(GPIOA, 8); break; - case 6: palSetPad(GPIOA, 9); break; - case 7: palSetPad(GPIOA, 7); break; - case 8: palSetPad(GPIOB, 3); break; - case 9: palSetPad(GPIOB, 4); break; - case 10: palSetPad(GPIOC, 15); break; - case 11: palSetPad(GPIOC, 14); break; - case 12: palSetPad(GPIOC, 13); break; - case 13: palSetPad(GPIOB, 5); break; - case 14: palSetPad(GPIOB, 6); break; - } - - // need wait to settle pin state - wait_us(20); - - // read row data { PB0, PB1, PB2, PA15, PA10 } - data = ( - (palReadPad(GPIOB, 0) << 0 ) | - (palReadPad(GPIOB, 1) << 1 ) | - (palReadPad(GPIOB, 2) << 2 ) | - (palReadPad(GPIOA, 15) << 3 ) | - (palReadPad(GPIOA, 10) << 4 ) - ); - - // unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } - switch (col) { - case 0: palClearPad(GPIOA, 2); break; - case 1: palClearPad(GPIOA, 3); break; - case 2: palClearPad(GPIOA, 6); break; - case 3: palClearPad(GPIOB, 14); break; - case 4: palClearPad(GPIOB, 15); break; - case 5: palClearPad(GPIOA, 8); break; - case 6: palClearPad(GPIOA, 9); break; - case 7: palClearPad(GPIOA, 7); break; - case 8: palClearPad(GPIOB, 3); break; - case 9: palClearPad(GPIOB, 4); break; - case 10: palClearPad(GPIOC, 15); break; - case 11: palClearPad(GPIOC, 14); break; - case 12: palClearPad(GPIOC, 13); break; - case 13: palClearPad(GPIOB, 5); break; - case 14: palClearPad(GPIOB, 6); break; - } - - if (matrix_debouncing[col] != data) { - matrix_debouncing[col] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = 0; - for (int col = 0; col < MATRIX_COLS; col++) { - matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); - } - } - debouncing = false; - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = yes # Custom matrix file -#AUDIO_ENABLE = yes -# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/clueboard_66/clueboard_66.c b/keyboards/clueboard_66/clueboard_66.c deleted file mode 100644 index 1e000e62d..000000000 --- a/keyboards/clueboard_66/clueboard_66.c +++ /dev/null @@ -1 +0,0 @@ -#include "clueboard_66.h" diff --git a/keyboards/clueboard_66/clueboard_66.h b/keyboards/clueboard_66/clueboard_66.h deleted file mode 100644 index c8989983d..000000000 --- a/keyboards/clueboard_66/clueboard_66.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef CLUEBOARD_H -#define CLUEBOARD_H - -#include "quantum.h" - -#ifdef KEYBOARD_clueboard_66_rev1 - #include "rev1.h" -#endif -#ifdef KEYBOARD_clueboard_66_rev2 - #include "rev2.h" -#endif -#ifdef KEYBOARD_clueboard_66_rev3 - #include "rev3.h" -#endif - -#endif diff --git a/keyboards/clueboard_66/config.h b/keyboards/clueboard_66/config.h deleted file mode 100644 index eaf3e073f..000000000 --- a/keyboards/clueboard_66/config.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xC1ED -#define MANUFACTURER Clueboard -#define PRODUCT Clueboard -#define DESCRIPTION QMK keyboard firmware for Clueboard - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/Makefile b/keyboards/clueboard_66/keymaps/bloodlvst/Makefile deleted file mode 100644 index b1c2f32f6..000000000 --- a/keyboards/clueboard_66/keymaps/bloodlvst/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -EXTRAKEY_ENABLE = yes -COMMAND_ENABLE = no diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/config.h b/keyboards/clueboard_66/keymaps/bloodlvst/config.h deleted file mode 100644 index 320401dbd..000000000 --- a/keyboards/clueboard_66/keymaps/bloodlvst/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#define PREVENT_STUCK_MODIFIERS -#define DISABLE_SPACE_CADET_ROLLOVER -#endif diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard_66/keymaps/bloodlvst/keymap.c deleted file mode 100644 index bc50afa2f..000000000 --- a/keyboards/clueboard_66/keymaps/bloodlvst/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - 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_INS, KC_DEL, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, \ - KC_LCTL, KC_LGUI, MO(_FL), KC_LALT, KC_BSPC,KC_SPC, KC_RALT, KC_APP, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - 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_HOME, KC_END, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, \ - _______, KC_MYCM, MO(_FL), _______, _______,_______, _______, KC_CALC, MO(_FL), _______, KC_MPRV, KC_MSTP, KC_MNXT), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, \ - _______, _______, MO(_FL), _______, RGB_SAD,RGB_SAI, _______, _______, MO(_FL), _______, _______, KC_SLEP, _______), -}; diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/readme.md b/keyboards/clueboard_66/keymaps/bloodlvst/readme.md deleted file mode 100644 index ee287ca47..000000000 --- a/keyboards/clueboard_66/keymaps/bloodlvst/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -``` - ___ _____ _ _ _ __ __ _ __ -|__ \ / ____| | | | | | / / / /(_) / / - ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / - |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / - |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ - (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) -``` - -![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) - -# Default Clueboard Layout - -This is the default layout that comes flashed on every Clueboard. For the most -part it's a straightforward and easy to follow layout. The only unusual key is -the key in the upper left, which sends Escape normally, but Grave when any of -the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard_66/keymaps/bloodlvst/rules.mk b/keyboards/clueboard_66/keymaps/bloodlvst/rules.mk deleted file mode 100644 index b1c2f32f6..000000000 --- a/keyboards/clueboard_66/keymaps/bloodlvst/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -EXTRAKEY_ENABLE = yes -COMMAND_ENABLE = no diff --git a/keyboards/clueboard_66/keymaps/caps_fn/keymap.c b/keyboards/clueboard_66/keymaps/caps_fn/keymap.c deleted file mode 100644 index 78eb43390..000000000 --- a/keyboards/clueboard_66/keymaps/caps_fn/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/caps_fn/readme.md b/keyboards/clueboard_66/keymaps/caps_fn/readme.md deleted file mode 100644 index 47a530a80..000000000 --- a/keyboards/clueboard_66/keymaps/caps_fn/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/kGADucy.png) - -# Caps Fn Layout - -This is the default layout except that Caps Lock acts like Caps Lock when -tapped but Fn when held. diff --git a/keyboards/clueboard_66/keymaps/colemak/keymap.c b/keyboards/clueboard_66/keymaps/colemak/keymap.c deleted file mode 100644 index b2921cca2..000000000 --- a/keyboards/clueboard_66/keymaps/colemak/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - 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_CAPS, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, \ - KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______,_______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/default/keymap.c b/keyboards/clueboard_66/keymaps/default/keymap.c deleted file mode 100644 index ad623c548..000000000 --- a/keyboards/clueboard_66/keymaps/default/keymap.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ - KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \ - KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ - _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ - _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/default/readme.md b/keyboards/clueboard_66/keymaps/default/readme.md deleted file mode 100644 index 019131aeb..000000000 --- a/keyboards/clueboard_66/keymaps/default/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) - -# Default Clueboard Layout - -This is the default layout that comes flashed on every Clueboard. For the most -part it's a straightforward and easy to follow layout. The only unusual key is -the key in the upper left, which sends Escape normally, but Grave when any of -the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard_66/keymaps/jokrik/keymap.c b/keyboards/clueboard_66/keymaps/jokrik/keymap.c deleted file mode 100644 index dd38e904c..000000000 --- a/keyboards/clueboard_66/keymaps/jokrik/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - 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, KC_PSCR, \ - 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, KC_PAUS, \ - 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_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC,KC_SPC, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - 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, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/jokrik/readme.md b/keyboards/clueboard_66/keymaps/jokrik/readme.md deleted file mode 100644 index a845e65f1..000000000 --- a/keyboards/clueboard_66/keymaps/jokrik/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# Jokrik's Clueboard Layout - diff --git a/keyboards/clueboard_66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard_66/keymaps/mac_optimized/keymap.c deleted file mode 100644 index 8c3568e59..000000000 --- a/keyboards/clueboard_66/keymaps/mac_optimized/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ - KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \ - KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RGUI,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ - _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ - _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/mac_optimized/readme.md b/keyboards/clueboard_66/keymaps/mac_optimized/readme.md deleted file mode 100644 index 282da369d..000000000 --- a/keyboards/clueboard_66/keymaps/mac_optimized/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png) - -# Default Clueboard Layout for Mac - -This is the default Clueboard layout with Alt and GUI switched to match Mac -conventions. diff --git a/keyboards/clueboard_66/keymaps/magicmonty/Makefile b/keyboards/clueboard_66/keymaps/magicmonty/Makefile deleted file mode 100644 index 289018f34..000000000 --- a/keyboards/clueboard_66/keymaps/magicmonty/Makefile +++ /dev/null @@ -1,9 +0,0 @@ - -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes - -MIDI_ENABLE = yes - -# if MIDI_ENABLE is set to yes, then CONSOLE_ENABLE has to be disabled, because of the firmware size -CONSOLE_ENABLE = false -COMMAND_ENABLE = no diff --git a/keyboards/clueboard_66/keymaps/magicmonty/config.h b/keyboards/clueboard_66/keymaps/magicmonty/config.h deleted file mode 100644 index d933fa997..000000000 --- a/keyboards/clueboard_66/keymaps/magicmonty/config.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on - #define MIDI_BASIC -*/ - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -#define MIDI_TONE_KEYCODE_OCTAVES 2 - -/* - Setting the modified Space Cadet Parens for German layout - - Default is - #define LSPO_KEY KC_9 - #define RSPC_KEY KC_0 -*/ -#define LSPO_KEY KC_8 -#define RSPC_KEY KC_9 -#define PERMISSIVE_HOLD - -#endif diff --git a/keyboards/clueboard_66/keymaps/magicmonty/keymap.c b/keyboards/clueboard_66/keymaps/magicmonty/keymap.c deleted file mode 100644 index 6df7d7869..000000000 --- a/keyboards/clueboard_66/keymaps/magicmonty/keymap.c +++ /dev/null @@ -1,230 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS -#define xxxxxxx KC_NO - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 // BASE Layer -#define _FL 1 // Function Layer -#define _ME 2 // Media Layer -#define _CL 3 // Control Layer -#define _ML 4 // Mouse Layer -#if defined(MIDI_ENABLE) - #define _MI 5 // MIDI Layer - #define TO_MIDI TO(_MI) -#else - #define TO_MIDI _______ -#endif - -// go back to base layer -#define TO_BASE TO(_BL) - -// switch to function layer while helde -#define MO_FUNC MO(_FL) - -// switch to media layer while held -#define MEDIA MO(_ME) - -// switch to Control layer while helde -#define MO_CTL MO(_CL) - -// switch to mouse layer if held, else space -#define L_MOUSE LT(_ML, KC_SPC) - -// Function key when held, else ESC -#define ESC_FUN LT(_FL, KC_ESC) - -// Hyper (CTRL+ALT+SHIFT+SUPER) when held, TAB when tapped -#define HPR_TAB ALL_T(KC_TAB) - -// CTRL when held, ESC when tapped -#define CTL_ESC CTL_T(KC_ESC) - -// Reset RGB mode to layer signalling -#define RGB_RST F(0) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) */ - [_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_INS, \ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ - ESC_FUN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT,_______, L_MOUSE, L_MOUSE, _______, KC_RALT, KC_RCTL, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function layer */ - [_FL] = KEYMAP( - 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, _______, _______, BL_STEP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO_CTL, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, \ - KC_LSPO, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, TO_MIDI, _______, KC_RSPC, KC_PGUP, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, MO_FUNC, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _ME: Media layer */ - [_ME] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT), - - /* Keymap _CL: Control layer */ - [_CL] = KEYMAP( - _______, RGB_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO_CTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ - _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), - - /* Keymap _ML: Mouse layer */ - [_ML] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, KC_BTN2, KC_BTN3, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, \ - _______, _______, _______, _______, L_MOUSE, L_MOUSE, _______, KC_BTN1, KC_BTN3, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R), - -#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) - /* Keymap _MI: MIDI layer (Advanced)*/ - [_MI] = KEYMAP( - TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, \ - MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, xxxxxxx, \ - MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, \ - xxxxxxx, xxxxxxx, xxxxxxx,xxxxxxx, MI_ALLOFF, MI_ALLOFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), -#elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) - /* Keymap _MI: MIDI layer (Basic)*/ - [_MI] = KEYMAP( - TO_BASE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), -#endif -}; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - rgblight_mode(1); - rgblight_sethsv(206, 255, 255); - } - } -} - -enum layer_id { - LAYER_BASE, - LAYER_FUNCTION, - LAYER_MEDIA, - LAYER_CONTROL, - LAYER_MOUSE, -#if defined(MIDI_ENABLE) - LAYER_MIDI -#endif -}; - -void clueboard_set_led(uint8_t id, uint8_t val) { - switch (id) { - case LAYER_BASE: - rgblight_sethsv_noeeprom(0, 0, val); - break; - case LAYER_FUNCTION: - rgblight_sethsv_noeeprom(46, 255, val); - break; - case LAYER_MEDIA: - rgblight_sethsv_noeeprom(86, 255, val); - break; - case LAYER_CONTROL: - rgblight_sethsv_noeeprom(346, 255, val); - break; - case LAYER_MOUSE: - rgblight_sethsv_noeeprom(206, 255, val); - break; -#if defined(MIDI_ENABLE) - case LAYER_MIDI: - rgblight_sethsv_noeeprom(316, 255, val); - break; -#endif - } -}; - -const uint16_t oct_hues[10] = { - 0, - 30, - 60, - 90, - 120, - 150, - 180, - 210, - 240, - 300 -}; - -#define MAX_OCT 9 - -void clueboard_set_midi_led(uint8_t base_oct, uint8_t val) -{ - uint8_t sat = 255; - - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - sethsv(oct_hues[base_oct], sat, val, (LED_TYPE *)&led[i]); - } - - uint8_t next_oct = base_oct < MAX_OCT ? base_oct + 1 : base_oct; - - uint16_t next_hue = base_oct < MAX_OCT ? oct_hues[next_oct] : 0; - uint8_t next_val = base_oct < MAX_OCT ? val : 0; - uint8_t next_sat = base_oct < MAX_OCT ? sat : 0; - - - for (uint8_t i = 0; i < 3; i++) { - sethsv(next_hue, next_sat, next_val, (LED_TYPE *)&led[i]); - } - - for (uint8_t i = 11; i < 14; i++) { - sethsv(next_hue, next_sat, next_val, (LED_TYPE *)&led[i]); - } - - rgblight_set(); -} - -void matrix_scan_user(void) { - rgblight_config_t rgblight_config; - rgblight_config.raw = eeconfig_read_rgblight(); - - if (!rgblight_config.enable || rgblight_config.mode != 1) { return; } - - uint32_t layer = layer_state; - uint8_t val = rgblight_config.val; - - if (layer & (1<<_FL)) { - if (layer & (1<<_ME)) { - clueboard_set_led(LAYER_MEDIA, val); - } else if (layer & (1<<_CL)) { - clueboard_set_led(LAYER_CONTROL, val); - } else { - clueboard_set_led(LAYER_FUNCTION, val); - } - } else if (layer & (1<<_ML)) { - clueboard_set_led(LAYER_MOUSE, val); -#if defined(MIDI_ENABLE) - } else if (layer & (1<<_MI)) { - clueboard_set_midi_led(midi_config.octave, val); -#endif - } else { - clueboard_set_led(LAYER_BASE, val); - } -}; diff --git a/keyboards/clueboard_66/keymaps/magicmonty/readme.md b/keyboards/clueboard_66/keymaps/magicmonty/readme.md deleted file mode 100644 index e24212d04..000000000 --- a/keyboards/clueboard_66/keymaps/magicmonty/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# Layout of @magicmonty - -[Keyboard Layout Editor File] - -![Clueboard Layout Image](http://i.imgur.com/eEwjLEj.png) -My ClueBoard Layout as of 2017/06/30 - - -This layout is a combination of the `mouse_keys` and the `win_optimized` layouts. -This layout is optimized for an ISO layout. -The CapsLock is disabled and works as ESC when tapped and FN when held. -The `TAB` key works as `TAB` when tapped, and [HYPER] (`CTRL` + `ALT` + `SHIFT` + `CMD`) when held. - -## Mouse Layer - -When you hold down the spacebar the arrow keys will move your mouse cursor. -You can click using the 3 mods to the left of the arrow keys, or the 3 keys under your primary fingers on the home row. -The Left, Down, Up and Right for the mouse movement are also VIM-Like on the HJKL keys - -## MIDI layer - -The MIDI layer is permanently enabled by pressing `FN` + `/`. -It can be exited with the `ESC`-Key - -## Space Cadet(ish) Shift Parentheses - -If the function layer is active, the `SHIFT`-Keys are configured like the [Space Cadet Shift Parentheses] -as opened (left `SHIFT`) and closed (right `SHIFT`) parentheses if tapped and `SHIFT` if held. - -## Media layer - -The media layer with Volume/Play controls, can be accessed via `FN` + `m` - -## Control layer - -The control layer is accessed via `FN` + `s`. -Here one can control the behavior of the RGB underlight. -`FN` + `s` + `1` resets the RGB underlight to the Layer signalling mode - -## Layer signalling through underlight - -The different layers are signalled throug setting of the underlight: - -- Base layer: White -- Function layer: Yellow -- Media layer: Green -- Mouse layer: Blue -- Control layer: Red -- Midi layer: Purple - -[HYPER]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ -[Space Cadet Shift Parentheses]: http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#shift-parentheses -[Keyboard Layout Editor File]: http://www.keyboard-layout-editor.com/#/gists/f869b8789242a712e0f46eabbd550056 diff --git a/keyboards/clueboard_66/keymaps/magicmonty/rules.mk b/keyboards/clueboard_66/keymaps/magicmonty/rules.mk deleted file mode 100644 index 289018f34..000000000 --- a/keyboards/clueboard_66/keymaps/magicmonty/rules.mk +++ /dev/null @@ -1,9 +0,0 @@ - -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes - -MIDI_ENABLE = yes - -# if MIDI_ENABLE is set to yes, then CONSOLE_ENABLE has to be disabled, because of the firmware size -CONSOLE_ENABLE = false -COMMAND_ENABLE = no diff --git a/keyboards/clueboard_66/keymaps/maximised/keymap.c b/keyboards/clueboard_66/keymaps/maximised/keymap.c deleted file mode 100644 index 260f97477..000000000 --- a/keyboards/clueboard_66/keymaps/maximised/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - MO(_FL), 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(_FL), KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ - _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Reset/Underlight layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/maximised/readme.md b/keyboards/clueboard_66/keymaps/maximised/readme.md deleted file mode 100644 index fc82e6879..000000000 --- a/keyboards/clueboard_66/keymaps/maximised/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png) - -# Maximised Clueboard Layout - -This layout is intended for a board with one or both shifts split. The outside key on the split shift is an Fn, while the inside is shift. The bottom row has all the mods on both sides, optimised for a Mac. diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/Makefile b/keyboards/clueboard_66/keymaps/mouse_keys/Makefile deleted file mode 100644 index 6c605daec..000000000 --- a/keyboards/clueboard_66/keymaps/mouse_keys/Makefile +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard_66/keymaps/mouse_keys/keymap.c deleted file mode 100644 index 15e068aa1..000000000 --- a/keyboards/clueboard_66/keymaps/mouse_keys/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 -#define _ML 3 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), - - /* Keymap _ML: Mouse layer - */ - [_ML] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ - _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ - _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), -}; diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/readme.md b/keyboards/clueboard_66/keymaps/mouse_keys/readme.md deleted file mode 100644 index 7fb038205..000000000 --- a/keyboards/clueboard_66/keymaps/mouse_keys/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -![Clueboard Layout Image](layout.png) - -# MouseKeys Layout - -This layout adds a mouse layer. When you hold down the spacebar the arrow keys -will move your mouse cursor. You can click using the 3 mods to the left of the -arrow keys, or the 3 keys under your primary fingers on the home row. diff --git a/keyboards/clueboard_66/keymaps/mouse_keys/rules.mk b/keyboards/clueboard_66/keymaps/mouse_keys/rules.mk deleted file mode 100644 index 6c605daec..000000000 --- a/keyboards/clueboard_66/keymaps/mouse_keys/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard_66/keymaps/serubin/Makefile b/keyboards/clueboard_66/keymaps/serubin/Makefile deleted file mode 100644 index ba997f869..000000000 --- a/keyboards/clueboard_66/keymaps/serubin/Makefile +++ /dev/null @@ -1,4 +0,0 @@ - -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes - diff --git a/keyboards/clueboard_66/keymaps/serubin/keymap.c b/keyboards/clueboard_66/keymaps/serubin/keymap.c deleted file mode 100644 index 112670d66..000000000 --- a/keyboards/clueboard_66/keymaps/serubin/keymap.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _ME 2 -#define _CL 3 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GRV, 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_HOME, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END), - -/* Keymap _FL: Function Layer - */ -[_ME] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \ - _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT), - - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/serubin/readme.md b/keyboards/clueboard_66/keymaps/serubin/readme.md deleted file mode 100644 index 78eef5352..000000000 --- a/keyboards/clueboard_66/keymaps/serubin/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# Serubin's Clueboard Layout - -This is the layout based on the clueboard default, modified for development on Mac, PC, and Windows. This layout also handles media and volume keys on all the previously listed platforms. Most importantly, Capslock has been replaced by a dual function Esc/Ctrl key. This is particularly handy for use in Vim. - -#### Base Layer -![Base Layout Image](http://i.imgur.com/qL78n1y.png) - -#### Fn Layer -![Fn Layout Image](http://i.imgur.com/QuwxePw.png) - -#### Media Layer -![Media Layer Image](http://i.imgur.com/oOfWXMf.png) - - diff --git a/keyboards/clueboard_66/keymaps/serubin/rules.mk b/keyboards/clueboard_66/keymaps/serubin/rules.mk deleted file mode 100644 index ba997f869..000000000 --- a/keyboards/clueboard_66/keymaps/serubin/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ - -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes - diff --git a/keyboards/clueboard_66/keymaps/shift_fn/keymap.c b/keyboards/clueboard_66/keymaps/shift_fn/keymap.c deleted file mode 100644 index 0d57e38a1..000000000 --- a/keyboards/clueboard_66/keymaps/shift_fn/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - 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, S(KC_GRV), KC_DEL, BL_STEP, \ - S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ - S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ - MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/shift_fn/readme.md b/keyboards/clueboard_66/keymaps/shift_fn/readme.md deleted file mode 100644 index 4bd920ad4..000000000 --- a/keyboards/clueboard_66/keymaps/shift_fn/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# Shift Fn Clueboard Layout - -This is an experimental layout. It makes the left shift key a dual roll key. -For most keys it acts as a shift key, but for some keys it activates an -alternate function instead. Primarily I use this to access the F-keys under -the number rows. diff --git a/keyboards/clueboard_66/keymaps/skully/keymap.c b/keyboards/clueboard_66/keymaps/skully/keymap.c deleted file mode 100644 index 2e23948b2..000000000 --- a/keyboards/clueboard_66/keymaps/skully/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_NUHS, KC_ENT, \ - MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - 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, S(KC_GRV), KC_DEL, BL_STEP, \ - S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ - S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ - MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/skully/readme.md b/keyboards/clueboard_66/keymaps/skully/readme.md deleted file mode 100644 index b9ad1b09a..000000000 --- a/keyboards/clueboard_66/keymaps/skully/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/VaoGn3M.png) - -# skullY's Clueboard Layout - -This layout is what I (@skullydazed) use on my personal Clueboards. I mostly use it for programming, CAD, and general typing. - -I've made the following changes from the default layout: - -* shift_fn on left shift -* Change capslock to control -* Swap Alt and Cmd diff --git a/keyboards/clueboard_66/keymaps/smt/keymap.c b/keyboards/clueboard_66/keymaps/smt/keymap.c deleted file mode 100644 index c61b32f8b..000000000 --- a/keyboards/clueboard_66/keymaps/smt/keymap.c +++ /dev/null @@ -1,136 +0,0 @@ -#include "clueboard_66.h" - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _FL 3 -#define _CL 4 - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK -}; - -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _QWERTY: Base Layer (Default Layer) - * ,-----------------------------------------------------------. ,---. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| - * |-----------------------------------------------------------| |---| - * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| BS| |PgD| - * |-----------------------------------------------------------| `---' - * |CtlEsc| A| S| D| F| G| H| J| K| L| ;| '| | Ent| - * |--------------------------------------------------------------. - * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| - * |------------------------------------------------------------------. - * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| - * `------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \ - HPR_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, KC_PGDN, \ - CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _COLEMAK: Base Layer - * ,-----------------------------------------------------------. ,---. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| - * |-----------------------------------------------------------| |---| - * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| - * |-----------------------------------------------------------| `---' - * |CtlEsc| A| R| S| T| D| H| N| E| I| O| '| | Ent| - * |--------------------------------------------------------------. - * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| - * |------------------------------------------------------------------. - * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| - * `------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \ - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \ - CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _DVORAK: Base Layer - * ,-----------------------------------------------------------. ,---. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| - * |-----------------------------------------------------------| |---| - * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| - * |-----------------------------------------------------------| `---' - * |CtlEsc| A| O| E| U| I| D| H| T| N| S| -| | Ent| - * |--------------------------------------------------------------. - * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| - * |------------------------------------------------------------------. - * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| - * `------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \ - HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - 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, _______, _______, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - } - return true; -} diff --git a/keyboards/clueboard_66/keymaps/smt/readme.md b/keyboards/clueboard_66/keymaps/smt/readme.md deleted file mode 100644 index 7fc0f0248..000000000 --- a/keyboards/clueboard_66/keymaps/smt/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# smt Clueboard Layout (HHKB variant) - -![Clueboard Layout Image](http://i.imgur.com/Ll5gGte.png) - -This is smt's HHKB variant layout, based on the default layout that comes -flashed on every Clueboard. The primary differences from the default are: - -- The Backspace key is moved down into the traditional `\` position -- `\` and `` ` `` are assigned to the "split-backspace" positions -- The right Shift is split to allow for a Fn key to its right -- The modifiers on the right side now mirror the left side (`Alt`/`Super`/`Ctrl`) - -For the most part, it's a straightforward and easy to follow layout. There -are a few special keys: - -- The Esc key sends `Esc` when tapped, `` ` `` when `Alt`/`Super`/`Ctrl`/`Fn` is held, or `~` when `Shift` is held -- The Tab key sends `Tab` when tapped, or `Super+Ctrl+Alt+Shift` (a.k.a. [Hyper]) when held -- The key traditionally in the Caps-Lock position has been re-mapped to send `Esc` when tapped, or `Ctrl` when held -- The left Shift key sends `Enter` when tapped, or `Shift` when held - -[Hyper]: http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ diff --git a/keyboards/clueboard_66/keymaps/tetris/Makefile b/keyboards/clueboard_66/keymaps/tetris/Makefile deleted file mode 100644 index 461353129..000000000 --- a/keyboards/clueboard_66/keymaps/tetris/Makefile +++ /dev/null @@ -1 +0,0 @@ -SRC = tetris_text.c diff --git a/keyboards/clueboard_66/keymaps/tetris/keymap.c b/keyboards/clueboard_66/keymaps/tetris/keymap.c deleted file mode 100644 index 4bf2465a9..000000000 --- a/keyboards/clueboard_66/keymaps/tetris/keymap.c +++ /dev/null @@ -1,209 +0,0 @@ -#include "clueboard_66.h" -#include "tetris_text.h" - -// Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() - [1] = ACTION_FUNCTION(1) -}; - -static uint8_t tetris_key_presses = 0; -static uint16_t tetris_timer = 0; -static uint8_t tetris_running = 0; -static int tetris_keypress = 0; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - // clueboard specific hook to make escape quite tetris - if (tetris_running) { - tetris_running = 0; - return; - } - - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - case 1: - if (record->event.pressed) { - tetris_running = 1; - tetris_timer = 0; - tetris_keypress = 0; - // set randomness using total number of key presses - tetris_start(tetris_key_presses); - } - break; - } -} - -/* - * Set up tetris - */ - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - tetris_key_presses++; - } - - if (tetris_running && record->event.pressed) { - tetris_keypress = 0; - switch (keycode) { - case KC_UP: tetris_keypress = 1; break; - case KC_LEFT: tetris_keypress = 2; break; - case KC_DOWN: tetris_keypress = 3; break; - case KC_RIGHT: tetris_keypress = 4; break; - // Make ESC stop tetris (on keyboards other than clueboard) - // case KC_ESC: tetris_running = 0; return false; - } - if (tetris_keypress != 0) { - return false; - } - } - - return true; -} - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - if (tetris_running) { - tetris_timer++; - if (tetris_timer > 1000) { - // every 1000 times this is run is about 100 ms. - if (!tetris_tick(100)) { - // game over - tetris_running = 0; - } - tetris_timer = 0; - } - } -} - -void send_keycode(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - -void send_keycode_shift(uint16_t keycode) { - register_code(KC_LSFT); - register_code(keycode); - unregister_code(keycode); - unregister_code(KC_LSFT); -} - -void tetris_send_up(void) { - send_keycode(KC_UP); -} -void tetris_send_left(void) { - send_keycode(KC_LEFT); -} -void tetris_send_down(void) { - send_keycode(KC_DOWN); -} -void tetris_send_right(void) { - send_keycode(KC_RGHT); -} -void tetris_send_backspace(void) { - send_keycode(KC_BSPC); -} -void tetris_send_delete(void) { - send_keycode(KC_DEL); -} - -void tetris_send_string(const char *s) { - for (int i = 0; s[i] != 0; i++) { - if (s[i] >= 'a' && s[i] <= 'z') { - send_keycode(KC_A + (s[i] - 'a')); - } else if (s[i] >= 'A' && s[i] <= 'Z') { - send_keycode_shift(KC_A + (s[i] - 'A')); - } else if (s[i] >= '1' && s[i] <= '9') { - send_keycode(KC_1 + (s[i] - '1')); - } else { - switch (s[i]) { - case ' ': send_keycode(KC_SPACE); break; - case '.': send_keycode(KC_DOT); break; - case '0': send_keycode(KC_0); break; - } - } - } -} - -void tetris_send_newline(void) { - send_keycode(KC_ENT); -} - -int tetris_get_keypress(void) { - int out = tetris_keypress; - tetris_keypress = 0; - return out; -} diff --git a/keyboards/clueboard_66/keymaps/tetris/readme.md b/keyboards/clueboard_66/keymaps/tetris/readme.md deleted file mode 100644 index 20e97fb19..000000000 --- a/keyboards/clueboard_66/keymaps/tetris/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -Default layout but with a tetris game -===================================== -Tetris works by outputting key-presses to make ascii-art in a regular text editor. -It reads key presses to rotate and move the bricks like a regular tetris game. - -Example -======= -![tetris](https://raw.githubusercontent.com/danamlund/meckb_tetris/master/tetris.gif) - -Usage -===== -1) Open a default text editor -2) Press the tetris button (Fn + t) -3) Play tetris - -It makes ascii-art by sending keycodes: left, right, up, down, qwerty characters, and numbers. - -Problems -======== -Drawing ascii-art is too slow to make a pleasant playing experience. -While drawing ascii-art, the keyboard does not record key-presses, so its pretty unresponsive. - -Adds 5000 bytes to the hex file. - -Implement in other keyboards -============================ - - Copy-paste the files tetris_text.c and tetrix_text.h to your keymap folder. - - Add/update your-keyboard/your-keymap/Makefile to include ``SRC = tetris_text.c`` - - Copy-paste the tetris-related code from this keymap.c to yours. - - Set a key to trigger F(1) to start tetris mode. - - Its also a good idea to set a key to stop tetris, here its escape. - -You can find a simple tetris keyboard definition at diff --git a/keyboards/clueboard_66/keymaps/tetris/rules.mk b/keyboards/clueboard_66/keymaps/tetris/rules.mk deleted file mode 100644 index 461353129..000000000 --- a/keyboards/clueboard_66/keymaps/tetris/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC = tetris_text.c diff --git a/keyboards/clueboard_66/keymaps/tetris/tetris_text.c b/keyboards/clueboard_66/keymaps/tetris/tetris_text.c deleted file mode 100644 index 1376ead00..000000000 --- a/keyboards/clueboard_66/keymaps/tetris/tetris_text.c +++ /dev/null @@ -1,505 +0,0 @@ -/* Copyright 2017 Dan Amlund Thomsen - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include -#include -#include - -#include "tetris_text.h" - -static char empty_piece[7][7] = { { 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0 } }; - -static char temp_piece[7][7]; - -static int curx = 0; -static int cury = 0; - -static void clear_piece(char piece[7][7]) { - for (int y = 0; y < 7; y++) { - for (int x = 0; x < 7; x++) { - piece[x][y] = 0; - } - } -} - -static void copy_piece_from_to(char from[7][7], char to[7][7]) { - for (int y = 0; y < 7; y++) { - for (int x = 0; x < 7; x++) { - to[x][y] = from[x][y]; - } - } -} - -static void rotate_piece(char piece[7][7]) { - // transpose - for (int y = 0; y < 7; y++) { - for (int x = y + 1; x < 7; x++) { - char tmp = piece[y][x]; - piece[y][x] = piece[x][y]; - piece[x][y] = tmp; - } - } - - // reverse rows - for (int y = 0; y < 7; y++) { - for (int x = 0; x < 3; x++) { - char tmp = piece[y][6 - x]; - piece[y][6 - x] = piece[y][x]; - piece[y][x] = tmp; - } - } -} - -static char get_shape_char(int shape) { - switch (shape) { - case 0: return 'I'; - case 1: return 'J'; - case 2: return 'L'; - case 3: return 'O'; - case 4: return 'S'; - case 5: return 'T'; - case 6: return 'Z'; - } - return 'Q'; -} - -static void set_piece(char piece[7][7], int shape, int rotation) { - clear_piece(piece); - switch (shape) { - case 0: - if (rotation % 2 == 0) { - // xxXx - piece[3][1] = 1; - piece[3][2] = 1; - piece[3][3] = 1; - piece[3][4] = 1; - } else { - // x - // x - // X - // x - piece[1][3] = 1; - piece[2][3] = 1; - piece[3][3] = 1; - piece[4][3] = 1; - } - break; - case 1: - // xXx - // x - piece[3][2] = 1; - piece[3][3] = 1; - piece[3][4] = 1; - piece[4][4] = 1; - for (int i = 0; i < rotation; i++) { - rotate_piece(piece); - } - break; - case 2: - // xXx - // x - piece[3][2] = 1; - piece[3][3] = 1; - piece[3][4] = 1; - piece[4][2] = 1; - for (int i = 0; i < rotation; i++) { - rotate_piece(piece); - } - break; - case 3: - // xX - // xx - piece[3][2] = 1; - piece[3][3] = 1; - piece[4][2] = 1; - piece[4][3] = 1; - break; - case 4: - if (rotation % 2 == 0) { - // xX - // xx - piece[3][2] = 1; - piece[3][3] = 1; - piece[4][3] = 1; - piece[4][4] = 1; - } else { - // x - // xX - // x - piece[2][3] = 1; - piece[3][2] = 1; - piece[3][3] = 1; - piece[4][2] = 1; - } - break; - case 5: - // xXx - // x - piece[3][2] = 1; - piece[3][3] = 1; - piece[3][4] = 1; - piece[4][3] = 1; - for (int i = 0; i < rotation; i++) { - rotate_piece(piece); - } - break; - case 6: - if (rotation % 2 == 0) { - // Xx - // xx - piece[3][3] = 1; - piece[3][4] = 1; - piece[4][2] = 1; - piece[4][3] = 1; - } else { - // x - // Xx - // x - piece[2][3] = 1; - piece[3][3] = 1; - piece[3][4] = 1; - piece[4][4] = 1; - } - break; - } -} - -static void send_deletes(int deletes) { - for (int i = 0; i < deletes; i++) { - tetris_send_delete(); - } -} - -static void send_backspaces(int backspaces) { - for (int i = 0; i < backspaces; i++) { - tetris_send_backspace(); - curx--; - } -} - -static void send_goto_xy(int x, int y) { - while (curx < x) { - tetris_send_right(); - curx++; - } - while (curx > x) { - tetris_send_left(); - curx--; - } - while (cury < y) { - tetris_send_down(); - cury++; - } - while (cury > y) { - tetris_send_up(); - cury--; - } -} - -static void draw_row(char c, const char oldrow[7], const char newrow[7], int x, int y) { - char str[2] = { c, 0 }; - char row_is_del[7] = { 0 }; - int first = -1; - int last = -1; - for (int px = 0; px < 7; px++) { - if (oldrow[px] && !newrow[px]) { - row_is_del[px] = 1; - } - if (newrow[px] || oldrow[px]) { - if (first == -1) first = px; - last = px; - } - } - - if (first >= 0) { - if (curx > x + last + 1) { - send_goto_xy(x + last + 1, cury); - } - if (curx < x + first) { - send_goto_xy(x + first, cury); - } - send_goto_xy(curx, y); - send_deletes((x + last + 1) - curx); - send_backspaces(curx - (x + first)); - for (int i = first; i <= last; i++) { - if (row_is_del[i]) { - tetris_send_string("."); - } else { - tetris_send_string(str); - } - curx++; - } - } -} - -static void move_piece_from_to(char from[7][7], char to[7][7], int xadd, int yadd) { - for (int y = 0; y < 7; y++) { - for (int x = 0; x < 7; x++) { - if (x + xadd >= 0 && x + xadd < 7 && y + yadd >= 0 && y + yadd < 7) { - to[y][x] = from[y + yadd][x + xadd]; - } else { - to[y][x] = 0; - } - } - } -} - -static void draw_piece(char c, int x, int y, char oldpiece[7][7], char piece[7][7]) { - for (int py = 0; py < 7; py++) { - draw_row(c, oldpiece[py], piece[py], x, y + py); - } -} - -static void draw_piece_moved(char c, int x, int y, char piece[7][7], int oldxadd, int oldyadd) { - move_piece_from_to(piece, temp_piece, oldxadd, oldyadd); - draw_piece(c, x, y, temp_piece, piece); -} - -static int is_piece_hitting(char board[20][10], char piece[7][7], int x, int y) { - for (int py = 0; py < 7; py++) { - for (int px = 0; px < 7; px++) { - if (piece[py][px] && - (px + x >= 10 || px + x < 0 - || py + y >= 20 || py + y < 0 - || board[py + y][px + x])) { - return 1; - } - } - } - return 0; -} - -static void add_piece_to_board(char piece[7][7], char board[20][10], int x, int y) { - for (int py = 0; py < 7; py++) { - for (int px = 0; px < 7; px++) { - if (piece[py][px]) { - board[py + y][px + x] = piece[py][px]; - } - } - } -} - -static void draw_board_line(void) { - //send_string("l l"); - tetris_send_string("l..........l"); - tetris_send_newline(); -} -static void init(void) { - for (int i = 0; i < 20; i++) { - draw_board_line(); - } - tetris_send_string("doooooooooob"); - curx = 12; - cury = 20; -} - -static int get_piece_min_y(char piece[7][7]) { - for (int y = 0; y < 7; y++) { - for (int x = 0; x < 7; x++) { - if (piece[y][x]) - return y; - } - } - return 0; -} - -static int clear_lines(char board[20][10]) { - int cleared_lines = 0; - for (int y = 19; y >= 0; y--) { - char isfull = 1; - for (int x = 0; x < 10; x++) { - if (!board[y][x]) { - isfull = 0; - } - } - if (isfull) { - // delete clear line - send_goto_xy(12, y); - send_backspaces(12); // delete line contents - // delete newline - tetris_send_backspace(); - cury--; - curx = 12; - cleared_lines++; - } else { - if (cleared_lines > 0) { - // move cleared lines down on board - for (int x = 0; x < 10; x++) { - board[y + cleared_lines][x] = board[y][x]; - } - } - } - } - // clear cleared top lines - for (int y = 0; y < cleared_lines; y++) { - for (int x = 0; x < 10; x++) { - board[y][x] = 0; - } - } - if (cleared_lines > 0) { - send_goto_xy(0, 0); - for (int i = 0; i < cleared_lines; i++) { - draw_board_line(); - curx = 0; - cury++; - } - } - return cleared_lines; -} - -static uint8_t myrandom(uint8_t seed) { - uint8_t out = seed >> 1; - if (seed & 1) { - out = out ^ 0xB8; - } - return out; -} - -static char piece[7][7]; -static char board[20][10]; -static uint8_t r; -static int score; -static int x; -static int y; -static int shape; -static int rotation; -static int time; -static int next_down; -static int down_delay; -static int first_run; -static int game_over; - -void tetris_start(uint8_t seed) { - for (int y = 0; y < 20; y++) { - for (int x = 0; x < 10; x++) { - board[y][x] = 0; - } - } - - clear_piece(piece); - - init(); - - game_over = 0; - - r = seed; - score = 0; - - copy_piece_from_to(empty_piece, piece); - x = 0; - y = 0; - shape = 0; - rotation = 0; - time = 0; - next_down = 0; - down_delay = -1; - first_run = 1; -} - -int tetris_tick(int ms_since_previous_tick) { - if (game_over) { - return 0; - } - - time += ms_since_previous_tick; - - if (first_run || time > next_down) { - if (first_run || is_piece_hitting(board, piece, x, y + 1)) { - first_run = 0; - add_piece_to_board(piece, board, x, y); - - score += clear_lines(board); - - down_delay = 500 - score * 10; - if (down_delay < 100) { - down_delay = 100; - } - - rotation = 0; - shape = r % 7; - r = myrandom(r); - set_piece(piece, shape, rotation); - - x = 1; - y = - get_piece_min_y(piece); - draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 0, 0); - - if (is_piece_hitting(board, piece, x, y)) { - game_over = 1; - send_goto_xy(12, 10); - tetris_send_string(" game over"); - tetris_send_down(); - tetris_send_string(" score "); - char tmp[10]; - sprintf(tmp, "%d", score); - tetris_send_string(tmp); - return 0; - } - } else { - y++; - draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 0, +1); - } - next_down = time + down_delay; - } else { - - switch (tetris_get_keypress()) { - case 1: { // up - int oldrotation = rotation; - rotation = (rotation + 1) % 4; - copy_piece_from_to(piece, temp_piece); - set_piece(piece, shape, rotation); - if (is_piece_hitting(board, piece, x, y)) { - rotation = oldrotation; - set_piece(piece, shape, rotation); - } else { - draw_piece(get_shape_char(shape), 1 + x, y, temp_piece, piece); - } - break; - } - case 2: // left - if (!is_piece_hitting(board, piece, x - 1, y)) { - x--; - draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, -1, 0); - } - break; - case 3: {// down - int starty = y; - while (!is_piece_hitting(board, piece, x, y + 1)) { - y++; - } - - draw_piece(get_shape_char(shape), x + 1, starty, piece, empty_piece); - draw_piece(get_shape_char(shape), x + 1, y, empty_piece, piece); - - next_down = time + down_delay; - break; - } - case 4: // right - if (!is_piece_hitting(board, piece, x + 1, y)) { - x++; - draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 1, 0); - } - break; - } - } - return 1; -} diff --git a/keyboards/clueboard_66/keymaps/tetris/tetris_text.h b/keyboards/clueboard_66/keymaps/tetris/tetris_text.h deleted file mode 100644 index 25b4177e0..000000000 --- a/keyboards/clueboard_66/keymaps/tetris/tetris_text.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright 2017 Dan Amlund Thomsen - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#ifndef TETRIS_TEXT_H -#define TETRIS_TEXT_H - -//// to implement -void tetris_send_up(void); -void tetris_send_left(void); -void tetris_send_down(void); -void tetris_send_right(void); - -void tetris_send_backspace(void); -void tetris_send_delete(void); - -void tetris_send_string(const char *s); - -void tetris_send_newline(void); - -// return = meaning -// 0 = no keys pressed -// 1 = up -// 2 = left -// 3 = down -// 4 = right -int tetris_get_keypress(void); - -//// to call -void tetris_start(uint8_t seed); -// returns 0 when game is over -int tetris_tick(int ms_since_previous_tick); - -#endif diff --git a/keyboards/clueboard_66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard_66/keymaps/unix_optimized/keymap.c deleted file mode 100644 index dab959bdc..000000000 --- a/keyboards/clueboard_66/keymaps/unix_optimized/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - 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_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_INS, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/unix_optimized/readme.md b/keyboards/clueboard_66/keymaps/unix_optimized/readme.md deleted file mode 100644 index 9e6d0e902..000000000 --- a/keyboards/clueboard_66/keymaps/unix_optimized/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/BnWlOht.png) - -# Default Clueboard Layout - -This is the default layout except that Caps Lock has been changed to Control -and Insert and Delete have been put into the Fn layer. diff --git a/keyboards/clueboard_66/keymaps/win_optimized/keymap.c b/keyboards/clueboard_66/keymaps/win_optimized/keymap.c deleted file mode 100644 index fb83aaa24..000000000 --- a/keyboards/clueboard_66/keymaps/win_optimized/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "clueboard_66.h" - -// Helpful defines -#define _______ KC_TRNS - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _CL 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: Base Layer (Default Layer) - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_INS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _CL: Control layer - */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), -}; diff --git a/keyboards/clueboard_66/keymaps/win_optimized/readme.md b/keyboards/clueboard_66/keymaps/win_optimized/readme.md deleted file mode 100644 index 703a37be0..000000000 --- a/keyboards/clueboard_66/keymaps/win_optimized/readme.md +++ /dev/null @@ -1,8 +0,0 @@ -![Clueboard Layout Image](http://i.imgur.com/fsqOqZo.png) - -# Default Clueboard Layout - -This is the default layout that comes flashed on every Clueboard. For the most -part it's a straightforward and easy to follow layout. The only unusual key is -the key in the upper left, which sends Escape normally, but Grave when any of -the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard_66/keymaps/xyverz/Makefile b/keyboards/clueboard_66/keymaps/xyverz/Makefile deleted file mode 100644 index 950dadf84..000000000 --- a/keyboards/clueboard_66/keymaps/xyverz/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Build Options -# change to "no" to disable the options, or define them in the makefile.mk in -# the appropriate keymap folder that will get included automatically -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/clueboard_66/keymaps/xyverz/keymap.c b/keyboards/clueboard_66/keymaps/xyverz/keymap.c deleted file mode 100644 index b725b11dd..000000000 --- a/keyboards/clueboard_66/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,78 +0,0 @@ -// Xyverz' keymap. -// It's based on the default keymap, but Dvorak! - -#include "clueboard_66.h" - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _RS 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' - */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ - LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' - */ -[_FL] = KEYMAP( - 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_TRNS, KC_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | RGB| |VAL+| - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | |VAL-| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |SAT+| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HUE-|SAT-|HUE+| - * `----------------------------------------------------------------------------------' - */ -[_RS] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), -}; - diff --git a/keyboards/clueboard_66/keymaps/xyverz/rules.mk b/keyboards/clueboard_66/keymaps/xyverz/rules.mk deleted file mode 100644 index 950dadf84..000000000 --- a/keyboards/clueboard_66/keymaps/xyverz/rules.mk +++ /dev/null @@ -1,49 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Build Options -# change to "no" to disable the options, or define them in the makefile.mk in -# the appropriate keymap folder that will get included automatically -# -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/clueboard_66/readme.md b/keyboards/clueboard_66/readme.md deleted file mode 100644 index c2423096e..000000000 --- a/keyboards/clueboard_66/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# Clueboard 66% - -![Clueboard](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/5867eeaad2b857fd0d196f4b/1494021396651/IMGP4201.jpg?format=1500w) - -A fully customizable 66% keyboard. - -* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) -* Hardware Supported: Clueboard 66% PCB - * rev1 (1.0) - * rev2 (2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) - * rev3 (2.7) -* Hardware Availability: [clueboard.co](https://clueboard.co/) - -Make example for this keyboard (after setting up your build environment): - - make clueboard/rev3:default - -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard_66/rev1/config.h b/keyboards/clueboard_66/rev1/config.h deleted file mode 100644 index 519e4d3ec..000000000 --- a/keyboards/clueboard_66/rev1/config.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H - -#include "config_common.h" - -#define PRODUCT_ID 0x2301 -#define DEVICE_VER 0x0003 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 16 - -// ROWS: Top to bottom, COLS: Left to right -/* Column pin configuration -* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -* pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1 -*/ -#define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 } -/* Row pin configuration -* row: 0 1 2 3 4 -* pin: D1 D0 D2 D5 D3 -*/ -#define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 } -#define UNUSED_PINS - -/* Underlight configuration - */ -#define RGB_DI_PIN B2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - - -#endif \ No newline at end of file diff --git a/keyboards/clueboard_66/rev1/rev1.c b/keyboards/clueboard_66/rev1/rev1.c deleted file mode 100644 index 90fc6956c..000000000 --- a/keyboards/clueboard_66/rev1/rev1.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "rev1.h" - -void led_init_ports() { - // * Set our LED pins as output - DDRF |= (1<<0); -} - -void led_set_kb(uint8_t usb_led) { - DDRF |= (1<<0); - if (usb_led & (1< -#include "backlight.h" -#include "print.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< -#include "backlight.h" -#include "print.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xC1ED -#define PRODUCT_ID 0x2330 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Clueboard -#define PRODUCT ATMEGA32U4 Firmware Dev Kit -#define DESCRIPTION A small board to help you hack on QMK. - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 3 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { F0, F5, F4, B4 } -#define MATRIX_COL_PINS { F1, F7, F6 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 20 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 6 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* Underlight configuration - */ -#define RGB_DI_PIN E6 -//#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/cluecard/keymaps/default/config.h b/keyboards/cluecard/keymaps/default/config.h deleted file mode 100644 index 8893d122e..000000000 --- a/keyboards/cluecard/keymaps/default/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -// place overrides here - -#endif diff --git a/keyboards/cluecard/keymaps/default/keymap.c b/keyboards/cluecard/keymaps/default/keymap.c deleted file mode 100644 index cd87750a8..000000000 --- a/keyboards/cluecard/keymaps/default/keymap.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "cluecard.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - RGB_TOG, RGB_SAI, RGB_VAI, \ - RGB_HUD, RGB_HUI, \ - RGB_MOD, RGB_SAD, RGB_VAD, \ - BL_STEP, \ - F(0), F(1), F(2) \ - ) -}; - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), - [1] = ACTION_FUNCTION(1), - [2] = ACTION_FUNCTION(2) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch (id) { - case 0: - PLAY_SONG(tone_startup); - break; - case 1: - PLAY_SONG(music_scale); - break; - case 2: - PLAY_SONG(tone_goodbye); - break; - } - } -}; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { -} diff --git a/keyboards/cluecard/keymaps/default/readme.md b/keyboards/cluecard/keymaps/default/readme.md deleted file mode 100644 index fa4e8ccad..000000000 --- a/keyboards/cluecard/keymaps/default/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# The default keymap for cluecard - -Note that this keymap has audio enabled, so the RGB mode button does not go through the different effects. -So the LEDs will still show a static light, that is configurable with the hue, staturation and brightness -buttons. You can of course also turn them on and off with the on/off button. diff --git a/keyboards/cluecard/keymaps/default/rules.mk b/keyboards/cluecard/keymaps/default/rules.mk deleted file mode 100644 index 8ee841da0..000000000 --- a/keyboards/cluecard/keymaps/default/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/cluecard/keymaps/rgb_effects/config.h b/keyboards/cluecard/keymaps/rgb_effects/config.h deleted file mode 100644 index c6c9342c8..000000000 --- a/keyboards/cluecard/keymaps/rgb_effects/config.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -// place overrides here -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 - -#endif diff --git a/keyboards/cluecard/keymaps/rgb_effects/keymap.c b/keyboards/cluecard/keymaps/rgb_effects/keymap.c deleted file mode 100644 index 74c95ce8a..000000000 --- a/keyboards/cluecard/keymaps/rgb_effects/keymap.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "cluecard.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - RGB_TOG, RGB_SAI, RGB_VAI, \ - RGB_HUD, RGB_HUI, \ - RGB_MOD, RGB_SAD, RGB_VAD, \ - BL_STEP, \ - KC_NO, KC_NO, KC_NO \ - ) -}; - -const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {255, 170, 85}; -const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 170, 85}; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { - -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { -} diff --git a/keyboards/cluecard/keymaps/rgb_effects/readme.md b/keyboards/cluecard/keymaps/rgb_effects/readme.md deleted file mode 100644 index 949cac394..000000000 --- a/keyboards/cluecard/keymaps/rgb_effects/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# RGB effect test keymap for cluecard - -This keymap is made for testing the RGB effects. Audio is disabled and the mode buttons goes through each -effect. If you run HID-listen you will be able to see which effect is active. For a list of effects, check -the `rgblight.c` file. - -The hue, saturation and brightness buttons will work depending on which effect is active. diff --git a/keyboards/cluecard/keymaps/rgb_effects/rules.mk b/keyboards/cluecard/keymaps/rgb_effects/rules.mk deleted file mode 100644 index 00670c0cf..000000000 --- a/keyboards/cluecard/keymaps/rgb_effects/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/cluecard/readme.md b/keyboards/cluecard/readme.md deleted file mode 100644 index 589eb57f3..000000000 --- a/keyboards/cluecard/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# Cluecard - -A simple QMK dev kit. - -* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) -* Hardware Supported: Cluecard 1.0 -* Hardware Availability: Special gift from [skullydazed](https://github.com/skullydazed) - -Make example for this keyboard (after setting up your build environment): - - make cluecard:default - -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/cluecard/rules.mk b/keyboards/cluecard/rules.mk deleted file mode 100644 index 2117c8127..000000000 --- a/keyboards/cluecard/rules.mk +++ /dev/null @@ -1,70 +0,0 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6