Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58101cbb73 | ||
|
|
512261b343 | ||
|
|
3db41817e0 | ||
|
|
8eeab1112a | ||
|
|
988bfffca2 | ||
|
|
8ff72d9517 | ||
|
|
4445e0a459 | ||
|
|
3ed1223678 | ||
|
|
d257a98cb8 | ||
|
|
f8002828ca | ||
|
|
26f53d38d9 | ||
|
|
f96085af38 | ||
|
|
e46cc2db8c | ||
|
|
c3b168e6fd | ||
|
|
62c1bcba71 | ||
|
|
057c7d0ffe | ||
|
|
1d3271999a | ||
|
|
409c610543 | ||
|
|
348266bd5b | ||
|
|
eb1f99c5f9 | ||
|
|
4eed0331bf | ||
|
|
66177aa5e0 | ||
|
|
ac0947c9e8 | ||
|
|
806cd392e7 | ||
|
|
9241d11dc5 | ||
|
|
31aadc8725 | ||
|
|
014ad1d747 | ||
|
|
1a77abfe64 | ||
|
|
667b29b77c | ||
|
|
7740470a94 | ||
|
|
eaf32621aa | ||
|
|
f318d6fffc | ||
|
|
177666cbc8 |
No files matched your search
+10
@@ -252,6 +252,16 @@ This command lists all the keyboards currently defined in `qmk_firmware`
|
|||||||
qmk list-keyboards
|
qmk list-keyboards
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk list-keymaps`
|
||||||
|
|
||||||
|
This command lists all the keymaps for a specified keyboard (and revision).
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk list-keymaps -kb planck/ez
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk new-keymap`
|
## `qmk new-keymap`
|
||||||
|
|
||||||
This command creates a new keymap based on a keyboard's existing default keymap.
|
This command creates a new keymap based on a keyboard's existing default keymap.
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Early initialization code.
|
||||||
|
* @details This initialization must be performed just after stack setup
|
||||||
|
* and before any other initialization.
|
||||||
|
*/
|
||||||
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
|
stm32_clock_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#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) {}
|
||||||
@@ -0,0 +1,386 @@
|
|||||||
|
/*
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup for Generic STM32_F072 Board
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board identifier.
|
||||||
|
*/
|
||||||
|
#define BOARD_GENERIC_STM32_F072XB
|
||||||
|
#define BOARD_NAME "STM32_F072"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board oscillators-related settings.
|
||||||
|
* NOTE: LSE not fitted.
|
||||||
|
* NOTE: HSE not fitted.
|
||||||
|
*/
|
||||||
|
#if !defined(STM32_LSECLK)
|
||||||
|
# define STM32_LSECLK 0U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_LSEDRV (3U << 3U)
|
||||||
|
|
||||||
|
#if !defined(STM32_HSECLK)
|
||||||
|
# define STM32_HSECLK 0U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_HSE_BYPASS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCU type as defined in the ST header.
|
||||||
|
*/
|
||||||
|
#define STM32F072xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO pins assignments.
|
||||||
|
*/
|
||||||
|
#define GPIOA_BUTTON 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_SPI2_SCK 13U
|
||||||
|
#define GPIOB_SPI2_MISO 14U
|
||||||
|
#define GPIOB_SPI2_MOSI 15U
|
||||||
|
|
||||||
|
#define GPIOC_MEMS_CS 0U
|
||||||
|
#define GPIOC_PIN1 1U
|
||||||
|
#define GPIOC_PIN2 2U
|
||||||
|
#define GPIOC_PIN3 3U
|
||||||
|
#define GPIOC_PIN4 4U
|
||||||
|
#define GPIOC_PIN5 5U
|
||||||
|
#define GPIOC_LED_RED 6U
|
||||||
|
#define GPIOC_LED_BLUE 7U
|
||||||
|
#define GPIOC_LED_ORANGE 8U
|
||||||
|
#define GPIOC_LED_GREEN 9U
|
||||||
|
#define GPIOC_PIN10 10U
|
||||||
|
#define GPIOC_PIN11 11U
|
||||||
|
#define GPIOC_PIN12 12U
|
||||||
|
#define GPIOC_PIN13 13U
|
||||||
|
#define GPIOC_OSC32_IN 14U
|
||||||
|
#define GPIOC_OSC32_OUT 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_OSC_IN 0U
|
||||||
|
#define GPIOF_OSC_OUT 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO lines assignments.
|
||||||
|
*/
|
||||||
|
#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
|
||||||
|
#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_SPI2_SCK PAL_LINE(GPIOB, 13U)
|
||||||
|
#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
|
||||||
|
#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
|
||||||
|
|
||||||
|
#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
|
||||||
|
#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
|
||||||
|
#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
|
||||||
|
#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
|
||||||
|
#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
|
||||||
|
#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
|
||||||
|
#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
|
||||||
|
|
||||||
|
#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
|
||||||
|
#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 - BUTTON (input floating).
|
||||||
|
* PA1 - PIN1 (input pullup).
|
||||||
|
* PA2 - PIN2 (input pullup).
|
||||||
|
* PA3 - PIN3 (input pullup).
|
||||||
|
* PA4 - PIN4 (input pullup).
|
||||||
|
* PA5 - PIN5 (input pullup).
|
||||||
|
* PA6 - PIN6 (input pullup).
|
||||||
|
* PA7 - PIN7 (input pullup).
|
||||||
|
* PA8 - PIN8 (input pullup).
|
||||||
|
* PA9 - PIN9 (input pullup).
|
||||||
|
* PA10 - PIN10 (input pullup).
|
||||||
|
* PA11 - USB_DM (input floating).
|
||||||
|
* PA12 - USB_DP (input floating).
|
||||||
|
* PA13 - SWDIO (alternate 0).
|
||||||
|
* PA14 - SWCLK (alternate 0).
|
||||||
|
* PA15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | 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_INPUT(GPIOA_USB_DM) | PIN_MODE_INPUT(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_BUTTON) | 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_BUTTON) | 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_VERYLOW(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | PIN_PUPDR_PULLUP(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_PULLUP(GPIOA_PIN4) | PIN_PUPDR_PULLUP(GPIOA_PIN5) | PIN_PUPDR_PULLUP(GPIOA_PIN6) | PIN_PUPDR_PULLUP(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_BUTTON) | 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_BUTTON, 0U) | PIN_AFIO_AF(GPIOA_PIN1, 0U) | PIN_AFIO_AF(GPIOA_PIN2, 0U) | PIN_AFIO_AF(GPIOA_PIN3, 0U) | PIN_AFIO_AF(GPIOA_PIN4, 0U) | PIN_AFIO_AF(GPIOA_PIN5, 0U) | PIN_AFIO_AF(GPIOA_PIN6, 0U) | PIN_AFIO_AF(GPIOA_PIN7, 0U))
|
||||||
|
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | PIN_AFIO_AF(GPIOA_PIN9, 0U) | PIN_AFIO_AF(GPIOA_PIN10, 0U) | PIN_AFIO_AF(GPIOA_USB_DM, 0U) | PIN_AFIO_AF(GPIOA_USB_DP, 0U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOB setup:
|
||||||
|
*
|
||||||
|
* PB0 - PIN0 (input pullup).
|
||||||
|
* PB1 - PIN1 (input pullup).
|
||||||
|
* PB2 - PIN2 (input pullup).
|
||||||
|
* PB3 - PIN3 (input pullup).
|
||||||
|
* PB4 - PIN4 (input pullup).
|
||||||
|
* PB5 - PIN5 (input pullup).
|
||||||
|
* PB6 - PIN6 (input pullup).
|
||||||
|
* PB7 - PIN7 (input pullup).
|
||||||
|
* PB8 - PIN8 (input pullup).
|
||||||
|
* PB9 - PIN9 (input pullup).
|
||||||
|
* PB10 - PIN10 (input pullup).
|
||||||
|
* PB11 - PIN11 (input pullup).
|
||||||
|
* PB12 - PIN12 (input pullup).
|
||||||
|
* PB13 - SPI2_SCK (alternate 0).
|
||||||
|
* PB14 - SPI2_MISO (alternate 0).
|
||||||
|
* PB15 - SPI2_MOSI (alternate 0).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_INPUT(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_INPUT(GPIOB_PIN6) | PIN_MODE_INPUT(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_ALTERNATE(GPIOB_SPI2_SCK) | PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
|
||||||
|
#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_PUSHPULL(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_SPI2_SCK) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_HIGH(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_VERYLOW(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_SPI2_SCK) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_PULLUP(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_FLOATING(GPIOB_SPI2_SCK) | PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
|
||||||
|
#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_SPI2_SCK) | PIN_ODR_HIGH(GPIOB_SPI2_MISO) | PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_PIN3, 0U) | PIN_AFIO_AF(GPIOB_PIN4, 0U) | PIN_AFIO_AF(GPIOB_PIN5, 0U) | PIN_AFIO_AF(GPIOB_PIN6, 0U) | PIN_AFIO_AF(GPIOB_PIN7, 0U))
|
||||||
|
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | PIN_AFIO_AF(GPIOB_PIN9, 0U) | PIN_AFIO_AF(GPIOB_PIN10, 0U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOC setup:
|
||||||
|
*
|
||||||
|
* PC0 - MEMS_CS (output pushpull maximum).
|
||||||
|
* PC1 - PIN1 (input pullup).
|
||||||
|
* PC2 - PIN2 (input pullup).
|
||||||
|
* PC3 - PIN3 (input pullup).
|
||||||
|
* PC4 - PIN4 (input pullup).
|
||||||
|
* PC5 - PIN5 (input pullup).
|
||||||
|
* PC6 - LED_RED (output pushpull maximum).
|
||||||
|
* PC7 - LED_BLUE (output pushpull maximum).
|
||||||
|
* PC8 - LED_ORANGE (output pushpull maximum).
|
||||||
|
* PC9 - LED_GREEN (output pushpull maximum).
|
||||||
|
* PC10 - PIN10 (input pullup).
|
||||||
|
* PC11 - PIN11 (input pullup).
|
||||||
|
* PC12 - PIN12 (input pullup).
|
||||||
|
* PC13 - PIN13 (input pullup).
|
||||||
|
* PC14 - OSC32_IN (input floating).
|
||||||
|
* PC15 - OSC32_OUT (input floating).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | 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_OUTPUT(GPIOC_LED_RED) | PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | 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_LED_RED) | PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | 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_HIGH(GPIOC_LED_RED) | PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | 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_FLOATING(GPIOC_LED_RED) | PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | 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_LOW(GPIOC_LED_RED) | PIN_ODR_LOW(GPIOC_LED_BLUE) | PIN_ODR_LOW(GPIOC_LED_ORANGE) | PIN_ODR_LOW(GPIOC_LED_GREEN) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | PIN_AFIO_AF(GPIOC_PIN1, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_PIN3, 0U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_LED_RED, 0U) | PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
|
||||||
|
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | PIN_AFIO_AF(GPIOC_PIN10, 0U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_PIN12, 0U) | PIN_AFIO_AF(GPIOC_PIN13, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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).
|
||||||
|
* PD10 - 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, 0U) | PIN_AFIO_AF(GPIOD_PIN1, 0U) | PIN_AFIO_AF(GPIOD_PIN2, 0U) | PIN_AFIO_AF(GPIOD_PIN3, 0U) | PIN_AFIO_AF(GPIOD_PIN4, 0U) | PIN_AFIO_AF(GPIOD_PIN5, 0U) | PIN_AFIO_AF(GPIOD_PIN6, 0U) | PIN_AFIO_AF(GPIOD_PIN7, 0U))
|
||||||
|
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | PIN_AFIO_AF(GPIOD_PIN9, 0U) | PIN_AFIO_AF(GPIOD_PIN10, 0U) | PIN_AFIO_AF(GPIOD_PIN11, 0U) | PIN_AFIO_AF(GPIOD_PIN12, 0U) | PIN_AFIO_AF(GPIOD_PIN13, 0U) | PIN_AFIO_AF(GPIOD_PIN14, 0U) | PIN_AFIO_AF(GPIOD_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOE setup:
|
||||||
|
*
|
||||||
|
* PE0 - PIN0 (input pullup).
|
||||||
|
* PE1 - PIN1 (input pullup).
|
||||||
|
* PE2 - PIN2 (input pullup).
|
||||||
|
* PE3 - PIN3 (input pullup).
|
||||||
|
* PE4 - PIN4 (input pullup).
|
||||||
|
* PE5 - PIN5 (input pullup).
|
||||||
|
* PE6 - PIN6 (input pullup).
|
||||||
|
* PE7 - PIN7 (input pullup).
|
||||||
|
* PE8 - PIN8 (input pullup).
|
||||||
|
* PE9 - PIN9 (input pullup).
|
||||||
|
* PE10 - PIN10 (input pullup).
|
||||||
|
* PE11 - PIN11 (input pullup).
|
||||||
|
* PE12 - PIN12 (input pullup).
|
||||||
|
* PE13 - PIN13 (input pullup).
|
||||||
|
* PE14 - PIN14 (input pullup).
|
||||||
|
* PE15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_INPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_INPUT(GPIOE_PIN8) | PIN_MODE_INPUT(GPIOE_PIN9) | PIN_MODE_INPUT(GPIOE_PIN10) | PIN_MODE_INPUT(GPIOE_PIN11) | PIN_MODE_INPUT(GPIOE_PIN12) | PIN_MODE_INPUT(GPIOE_PIN13) | PIN_MODE_INPUT(GPIOE_PIN14) | PIN_MODE_INPUT(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_VERYLOW(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_VERYLOW(GPIOE_PIN8) | PIN_OSPEED_VERYLOW(GPIOE_PIN9) | PIN_OSPEED_VERYLOW(GPIOE_PIN10) | PIN_OSPEED_VERYLOW(GPIOE_PIN11) | PIN_OSPEED_VERYLOW(GPIOE_PIN12) | PIN_OSPEED_VERYLOW(GPIOE_PIN13) | PIN_OSPEED_VERYLOW(GPIOE_PIN14) | PIN_OSPEED_VERYLOW(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_PULLUP(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_PULLUP(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_PULLUP(GPIOE_PIN13) | PIN_PUPDR_PULLUP(GPIOE_PIN14) | PIN_PUPDR_PULLUP(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_HIGH(GPIOE_PIN8) | PIN_ODR_HIGH(GPIOE_PIN9) | PIN_ODR_HIGH(GPIOE_PIN10) | PIN_ODR_HIGH(GPIOE_PIN11) | PIN_ODR_HIGH(GPIOE_PIN12) | PIN_ODR_HIGH(GPIOE_PIN13) | PIN_ODR_HIGH(GPIOE_PIN14) | PIN_ODR_HIGH(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | PIN_AFIO_AF(GPIOE_PIN1, 0U) | PIN_AFIO_AF(GPIOE_PIN2, 0U) | PIN_AFIO_AF(GPIOE_PIN3, 0U) | PIN_AFIO_AF(GPIOE_PIN4, 0U) | PIN_AFIO_AF(GPIOE_PIN5, 0U) | PIN_AFIO_AF(GPIOE_PIN6, 0U) | PIN_AFIO_AF(GPIOE_PIN7, 0U))
|
||||||
|
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | PIN_AFIO_AF(GPIOE_PIN9, 0U) | PIN_AFIO_AF(GPIOE_PIN10, 0U) | PIN_AFIO_AF(GPIOE_PIN11, 0U) | PIN_AFIO_AF(GPIOE_PIN12, 0U) | PIN_AFIO_AF(GPIOE_PIN13, 0U) | PIN_AFIO_AF(GPIOE_PIN14, 0U) | PIN_AFIO_AF(GPIOE_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOF setup:
|
||||||
|
*
|
||||||
|
* PF0 - OSC_IN (input floating).
|
||||||
|
* PF1 - OSC_OUT (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_OSC_IN) | PIN_MODE_INPUT(GPIOF_OSC_OUT) | 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_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | 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_VERYLOW(GPIOF_OSC_IN) | PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | 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_OSC_IN) | PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | 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_OSC_IN) | PIN_ODR_HIGH(GPIOF_OSC_OUT) | 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_OSC_IN, 0U) | PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOF_PIN2, 0U) | PIN_AFIO_AF(GPIOF_PIN3, 0U) | PIN_AFIO_AF(GPIOF_PIN4, 0U) | PIN_AFIO_AF(GPIOF_PIN5, 0U) | PIN_AFIO_AF(GPIOF_PIN6, 0U) | PIN_AFIO_AF(GPIOF_PIN7, 0U))
|
||||||
|
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | PIN_AFIO_AF(GPIOF_PIN9, 0U) | PIN_AFIO_AF(GPIOF_PIN10, 0U) | PIN_AFIO_AF(GPIOF_PIN11, 0U) | PIN_AFIO_AF(GPIOF_PIN12, 0U) | PIN_AFIO_AF(GPIOF_PIN13, 0U) | PIN_AFIO_AF(GPIOF_PIN14, 0U) | PIN_AFIO_AF(GPIOF_PIN15, 0U))
|
||||||
|
|
||||||
|
#if !defined(_FROM_ASM_)
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
# endif
|
||||||
|
void boardInit(void);
|
||||||
|
# ifdef __cplusplus
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif /* _FROM_ASM_ */
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB
|
||||||
File renamed without changes.
@@ -0,0 +1,703 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- STM32F0xx board Template -->
|
||||||
|
<board
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd">
|
||||||
|
<configuration_settings>
|
||||||
|
<templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path>
|
||||||
|
<output_path>..</output_path>
|
||||||
|
<hal_version>3.0.x</hal_version>
|
||||||
|
</configuration_settings>
|
||||||
|
<board_name>ST STM32F072B-Discovery</board_name>
|
||||||
|
<board_id>ST_STM32F072B_DISCOVERY</board_id>
|
||||||
|
<board_functions></board_functions>
|
||||||
|
<subtype>STM32F072xB</subtype>
|
||||||
|
<clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0"
|
||||||
|
LSEBypass="false" LSEDrive="3 High Drive (default)" />
|
||||||
|
<ports>
|
||||||
|
<GPIOA>
|
||||||
|
<pin0
|
||||||
|
ID="BUTTON"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID="USB_DM"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID="USB_DP"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SWDIO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SWCLK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullDown"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOA>
|
||||||
|
<GPIOB>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SPI2_SCK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SPI2_MISO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="SPI2_MOSI"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOB>
|
||||||
|
<GPIOC>
|
||||||
|
<pin0
|
||||||
|
ID="MEMS_CS"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID="LED_RED"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID="LED_BLUE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID="LED_ORANGE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" ></pin8>
|
||||||
|
<pin9
|
||||||
|
ID="LED_GREEN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="OSC32_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="OSC32_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOC>
|
||||||
|
<GPIOD>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOD>
|
||||||
|
<GPIOE>
|
||||||
|
<pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
</GPIOE>
|
||||||
|
<GPIOF>
|
||||||
|
<pin0
|
||||||
|
ID="OSC_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID="OSC_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOF>
|
||||||
|
</ports>
|
||||||
|
</board>
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x3430 // "40"
|
||||||
#define PRODUCT_ID 0x0A0C
|
#define PRODUCT_ID 0x4C55 // "LU"
|
||||||
#define DEVICE_VER 0x1001
|
#define DEVICE_VER 0x1001
|
||||||
#define MANUFACTURER di0ib
|
#define MANUFACTURER di0ib
|
||||||
#define PRODUCT Luddite
|
#define PRODUCT Luddite
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_60_ansi(
|
||||||
|
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_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,
|
||||||
|
LT(1,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, MT(MOD_RSFT,KC_UP),
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT , KC_SPC, KC_RALT, LT(1,KC_LEFT), LT(2,KC_DOWN), MT(MOD_RCTL,KC_RGHT)
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_60_ansi(
|
||||||
|
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_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_END, KC_TRNS,
|
||||||
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS,
|
||||||
|
KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_INS, KC_DEL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MENU, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_60_ansi(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_INC, BL_DEC, KC_TRNS,
|
||||||
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||||
|
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, 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_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_60_ansi(
|
||||||
|
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_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_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -37,3 +37,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
|
||||||
|
LAYOUTS = tkl_ansi
|
||||||
@@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4753
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x3000
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Gray Studio
|
#define MANUFACTURER Graystudio
|
||||||
#define PRODUCT Space65
|
#define PRODUCT Space65
|
||||||
#define DESCRIPTION 65% custom keyboard
|
#define DESCRIPTION Graystudio Space65
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/* Copyright 2020 Rys Sommefeldt
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
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_BSPC, KC_DEL,
|
||||||
|
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_HOME,
|
||||||
|
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_PGUP,
|
||||||
|
KC_LSFT, 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_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT(
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[2] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[3] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
@@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4753
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x4001
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Gray Studio
|
#define MANUFACTURER Graystudio
|
||||||
#define PRODUCT THINK6.5
|
#define PRODUCT Think6.5° Hotswap
|
||||||
#define DESCRIPTION 65% 6.5 degree custom keyboard
|
#define DESCRIPTION Graystudio Think6.5 Hotswap
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/* Copyright 2019 Rys Sommefeldt
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_65_ansi_blocker(
|
||||||
|
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_DEL,
|
||||||
|
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_HOME,
|
||||||
|
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_PGUP,
|
||||||
|
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_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_65_ansi_blocker(
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[2] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[3] = LAYOUT_65_ansi_blocker(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
@@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4753
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x4000
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER Gray Studio
|
#define MANUFACTURER Graystudio
|
||||||
#define PRODUCT THINK6.5
|
#define PRODUCT Think6.5°
|
||||||
#define DESCRIPTION 65% 6.5 degree custom keyboard
|
#define DESCRIPTION Graystudio Think6.5
|
||||||
|
|
||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/* Copyright 2019 Rys Sommefeldt
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
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_BSPC, KC_DEL,
|
||||||
|
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_HOME,
|
||||||
|
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_PGUP,
|
||||||
|
KC_LSFT, KC_NO, 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_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
@@ -6,12 +6,9 @@
|
|||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
M_EXAMPLE1 = SAFE_RANGE,
|
M_EXAMPLE1 = SAFE_RANGE,
|
||||||
M_EXAMPLE2,
|
M_EXAMPLE2
|
||||||
DYNAMIC_MACRO_RANGE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "dynamic_macro.h"
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* QWERTY
|
/* QWERTY
|
||||||
@@ -33,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[_QW] = LAYOUT( /* QWERTY */
|
[_QW] = LAYOUT( /* QWERTY */
|
||||||
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______,DYN_MACRO_PLAY1,DYN_MACRO_PLAY2,DYN_REC_STOP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE,
|
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE,
|
||||||
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_PGUP, KC_END , KC_INS , KC_NLCK,
|
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_PGUP, KC_END , KC_INS , KC_NLCK,
|
||||||
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_BSPC, KC_PGDN, KC_PSLS, KC_PAST, KC_PMNS,
|
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_BSPC, KC_PGDN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
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_P7 , KC_P8 , KC_P9 , KC_PPLS,
|
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_P7 , KC_P8 , KC_P9 , KC_PPLS,
|
||||||
@@ -61,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[_FN] = LAYOUT( /* Function */
|
[_FN] = LAYOUT( /* Function */
|
||||||
RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 ,DYN_REC_START1,DYN_REC_START2,DYN_REC_STOP, _______, _______, _______, MO(_FN), DEBUG,
|
RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 , DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, MO(_FN), DEBUG,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
@@ -72,9 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (!process_record_dynamic_macro(keycode, record)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
switch(keycode) {
|
switch(keycode) {
|
||||||
case M_EXAMPLE1:
|
case M_EXAMPLE1:
|
||||||
|
|||||||
@@ -29,3 +29,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
ENCODER_ENABLE = yes # Add rotary encoder support
|
ENCODER_ENABLE = yes # Add rotary encoder support
|
||||||
|
DYNAMIC_MACRO_ENABLE = yes
|
||||||
@@ -20,3 +20,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
|||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
DEFAULT_FOLDER = handwired/onekey/promicro
|
DEFAULT_FOLDER = handwired/onekey/promicro
|
||||||
|
LAYOUTS = ortho_1x1
|
||||||
@@ -24,9 +24,7 @@ enum custom_keycodes {
|
|||||||
PAIR_PR,
|
PAIR_PR,
|
||||||
PAIR_BR,
|
PAIR_BR,
|
||||||
PAIR_CB,
|
PAIR_CB,
|
||||||
LAMBDA,
|
LAMBDA
|
||||||
DYNAMIC_MACRO_RANGE,
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Tap Dance initializer.
|
// Tap Dance initializer.
|
||||||
@@ -36,8 +34,6 @@ enum {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "dynamic_macro.h"
|
|
||||||
|
|
||||||
// Tap dance actions - double tap for Caps Lock.
|
// Tap dance actions - double tap for Caps Lock.
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
|
||||||
@@ -71,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[0] = LAYOUT( \
|
[0] = LAYOUT( \
|
||||||
PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \
|
PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DM_PLY1, DM_PLY2, \
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_MINS, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
|
||||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
@@ -105,8 +101,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[1] = LAYOUT( \
|
[1] = LAYOUT( \
|
||||||
LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \
|
LAMBDA, _______, _______, _______, _______, DM_REC1, DM_REC2, \
|
||||||
DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \
|
DM_RSTP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \
|
||||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \
|
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \
|
||||||
KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \
|
KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \
|
||||||
_______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \
|
_______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \
|
||||||
@@ -160,11 +156,6 @@ void matrix_scan_user(void) {
|
|||||||
//
|
//
|
||||||
// Customize to your heart's content!
|
// Customize to your heart's content!
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
if (!process_record_dynamic_macro(keycode, record)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
|
|
||||||
case PAIR_PR:
|
case PAIR_PR:
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
|||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
|
DYNAMIC_MACRO_ENABLE = yes
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Just60",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "thinxer",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc/`", "x":0, "y":0},
|
||||||
|
{"label":"1", "x":1, "y":0},
|
||||||
|
{"label":"2", "x":2, "y":0},
|
||||||
|
{"label":"3", "x":3, "y":0},
|
||||||
|
{"label":"4", "x":4, "y":0},
|
||||||
|
{"label":"5", "x":5, "y":0},
|
||||||
|
{"label":"6", "x":6, "y":0},
|
||||||
|
{"label":"7", "x":7, "y":0},
|
||||||
|
{"label":"8", "x":8, "y":0},
|
||||||
|
{"label":"9", "x":9, "y":0},
|
||||||
|
{"label":"0", "x":10, "y":0},
|
||||||
|
{"label":"-", "x":11, "y":0},
|
||||||
|
{"label":"=", "x":12, "y":0},
|
||||||
|
{"label":"Backspace", "x":13, "y":0, "w":2},
|
||||||
|
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":1},
|
||||||
|
{"label":"W", "x":2.5, "y":1},
|
||||||
|
{"label":"E", "x":3.5, "y":1},
|
||||||
|
{"label":"R", "x":4.5, "y":1},
|
||||||
|
{"label":"T", "x":5.5, "y":1},
|
||||||
|
{"label":"Y", "x":6.5, "y":1},
|
||||||
|
{"label":"U", "x":7.5, "y":1},
|
||||||
|
{"label":"I", "x":8.5, "y":1},
|
||||||
|
{"label":"O", "x":9.5, "y":1},
|
||||||
|
{"label":"P", "x":10.5, "y":1},
|
||||||
|
{"label":"[", "x":11.5, "y":1},
|
||||||
|
{"label":"]", "x":12.5, "y":1},
|
||||||
|
{"label":"\\", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"Fn", "x":0, "y":2, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":2},
|
||||||
|
{"label":"S", "x":2.75, "y":2},
|
||||||
|
{"label":"D", "x":3.75, "y":2},
|
||||||
|
{"label":"F", "x":4.75, "y":2},
|
||||||
|
{"label":"G", "x":5.75, "y":2},
|
||||||
|
{"label":"H", "x":6.75, "y":2},
|
||||||
|
{"label":"J", "x":7.75, "y":2},
|
||||||
|
{"label":"K", "x":8.75, "y":2},
|
||||||
|
{"label":"L", "x":9.75, "y":2},
|
||||||
|
{"label":";", "x":10.75, "y":2},
|
||||||
|
{"label":"'", "x":11.75, "y":2},
|
||||||
|
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||||
|
{"label":"Shift", "x":0, "y":3, "w":2.25},
|
||||||
|
{"label":"Z", "x":2.25, "y":3},
|
||||||
|
{"label":"X", "x":3.25, "y":3},
|
||||||
|
{"label":"C", "x":4.25, "y":3},
|
||||||
|
{"label":"V", "x":5.25, "y":3},
|
||||||
|
{"label":"B", "x":6.25, "y":3},
|
||||||
|
{"label":"N", "x":7.25, "y":3},
|
||||||
|
{"label":"M", "x":8.25, "y":3},
|
||||||
|
{"label":",", "x":9.25, "y":3},
|
||||||
|
{"label":".", "x":10.25, "y":3},
|
||||||
|
{"label":"/", "x":11.25, "y":3},
|
||||||
|
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
|
||||||
|
{"label":"Ctrl", "x":0, "y":4, "w":1.75},
|
||||||
|
{"label":"Alt", "x":1.75, "y":4, "w":1.25},
|
||||||
|
{"label":"GUI", "x":3, "y":4, "w":1.25},
|
||||||
|
{"label":"Fn/Space", "x":4.25, "y":4, "w":1.25},
|
||||||
|
{"label":"Space", "x":5.5, "y":4, "w":3},
|
||||||
|
{"label":"GUI", "x":8.5, "y":4, "w":1.25},
|
||||||
|
{"label":"Alt", "x":9.75, "y":4, "w":1.25},
|
||||||
|
{"label":"Left", "x":11, "y":4},
|
||||||
|
{"label":"Down", "x":12, "y":4},
|
||||||
|
{"label":"Up", "x":13, "y":4},
|
||||||
|
{"label":"Right", "x":14, "y":4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2019 Jianfei Wang
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_FN,
|
||||||
|
_COMMAND
|
||||||
|
};
|
||||||
|
|
||||||
|
#define FN_SPC LT(_FN, KC_SPC)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
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,
|
||||||
|
MO(_FN), 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_LALT, KC_LGUI, FN_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
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_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, MO(_COMMAND),
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||||
|
),
|
||||||
|
[_COMMAND] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# thinxer keymap for Just60
|
||||||
|
|
||||||
|
This is a duplicate of the default keymap, but for a Just60 with the QMK DFU bootloader.
|
||||||
|
|
||||||
|
This layout is an ANSI layout with a Minila spacebar row.
|
||||||
|
|
||||||
|
```
|
||||||
|
+-------------------------------------------------------------------------+
|
||||||
|
| ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |
|
||||||
|
+-------------------------------------------------------------------------+
|
||||||
|
| TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||||
|
+-------------------------------------------------------------------------+
|
||||||
|
| FN | A | S | D | F | G | H | J | K | L | ; | ' | RETURN |
|
||||||
|
+-------------------------------------------------------------------------+
|
||||||
|
| LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT |
|
||||||
|
+-------------------------------------------------------------------------+
|
||||||
|
| LCMD | LALT | LGUI | FN | SPACE | RGUI | RALT | LEFT | DOWN | UP | RGHT |
|
||||||
|
+-------------------------------------------------------------------------+
|
||||||
|
```
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
BOOTLOADER = qmk-dfu
|
||||||
@@ -46,6 +46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Set 0 if debouncing isn't needed */
|
/* Set 0 if debouncing isn't needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B5
|
||||||
|
|
||||||
/* serial.c configuration for split keyboard */
|
/* serial.c configuration for split keyboard */
|
||||||
#define SOFT_SERIAL_PIN D0
|
#define SOFT_SERIAL_PIN D0
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PREONIC_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||||
|
SONG(COLEMAK_SOUND), \
|
||||||
|
SONG(DVORAK_SOUND) \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MUSIC_MASK (keycode != KC_NO)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,314 @@
|
|||||||
|
/* Copyright 2015-2017 Jack Humbert
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "muse.h"
|
||||||
|
|
||||||
|
// Tap and hold mods
|
||||||
|
// Enter into right shift
|
||||||
|
#define ENT_RSFT RSFT_T(KC_ENT)
|
||||||
|
|
||||||
|
enum preonic_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST
|
||||||
|
};
|
||||||
|
|
||||||
|
enum preonic_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt | PSCR |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_preonic_grid( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL, \
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ENT_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_PSCR, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt | PSCR |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = LAYOUT_preonic_grid( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \
|
||||||
|
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, ENT_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_PSCR, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt | PSCR |Lower | Space |Raise | Left | Down | Up |Right |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = LAYOUT_preonic_grid( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \
|
||||||
|
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, ENT_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_PSCR, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Home | End | Play |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Prev | Vol- | Vol+ | Next |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_preonic_grid( \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_HOME, KC_END, KC_MPLY, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Pg Up| Pg Dn| Play |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Prev | Vol- | Vol+ | Next |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_preonic_grid( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||||
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGUP, KC_PGDN, KC_MPLY, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | Reset| | | | | | | | | | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT_preonic_grid( \
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||||
|
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \
|
||||||
|
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||||
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
#ifdef __AVR__
|
||||||
|
writePinLow(E6);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
#ifdef __AVR__
|
||||||
|
writePinHigh(E6);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool muse_mode = false;
|
||||||
|
uint8_t last_muse_note = 0;
|
||||||
|
uint16_t muse_counter = 0;
|
||||||
|
uint8_t muse_offset = 70;
|
||||||
|
uint16_t muse_tempo = 50;
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (muse_mode) {
|
||||||
|
if (IS_LAYER_ON(_RAISE)) {
|
||||||
|
if (clockwise) {
|
||||||
|
muse_offset++;
|
||||||
|
} else {
|
||||||
|
muse_offset--;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
muse_tempo+=1;
|
||||||
|
} else {
|
||||||
|
muse_tempo-=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
register_code(KC_PGDN);
|
||||||
|
unregister_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
register_code(KC_PGUP);
|
||||||
|
unregister_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
if (active) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (active) {
|
||||||
|
muse_mode = true;
|
||||||
|
} else {
|
||||||
|
muse_mode = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
if (muse_mode) {
|
||||||
|
if (muse_counter == 0) {
|
||||||
|
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
||||||
|
if (muse_note != last_muse_note) {
|
||||||
|
stop_note(compute_freq_for_midi_note(last_muse_note));
|
||||||
|
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
||||||
|
last_muse_note = muse_note;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
muse_counter = (muse_counter + 1) % muse_tempo;
|
||||||
|
} else {
|
||||||
|
if (muse_counter) {
|
||||||
|
stop_all_notes();
|
||||||
|
muse_counter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RAISE:
|
||||||
|
case LOWER:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Keelhauler's Preonic layout
|
||||||
|
|
||||||
|
## Aims to provide a more seamless transition from a normal full-size keyboard and layout to the otholinear 50% layout of the preonic than the stock keymap.
|
||||||
|
|
||||||
|
## Includes some personal touches that I find more helpful than the stock keymaps.
|
||||||
|
|
||||||
|
### Base Keymap Improvements
|
||||||
|
|
||||||
|
FN key removed
|
||||||
|
Bottom left redesign from FN, CTRL, ALT, OS to CTRL, OS, ALT, PSCR
|
||||||
|
Enter functions as RShift when held, Enter when tapped
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
SRC += muse.c
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = STM32F072
|
MCU = STM32F072
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
MCU_LDSCRIPT = STM32F072_0x2000_bootloader
|
MCU_LDSCRIPT = STM32F072_0x2000_bootloader
|
||||||
|
|
||||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08002000:leave
|
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08002000:leave
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, \
|
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, \
|
||||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
};
|
};
|
||||||
@@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
||||||
_______, RGB_TOG, KC_UP, RGB_RMOD, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, \
|
_______, RGB_TOG, KC_UP, RGB_RMOD, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, \
|
||||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
|
KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
|
||||||
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
|
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, 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,
|
_______, 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,
|
||||||
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET,
|
_______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET,
|
||||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______,
|
BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, RESET, _______,
|
||||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______,
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______,
|
VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_PGUP, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END)
|
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END)
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
#undef TAPPING_TOGGLE
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
@@ -5,6 +5,9 @@
|
|||||||
// Timer to detect tap/hold on NEO_RMOD3 key
|
// Timer to detect tap/hold on NEO_RMOD3 key
|
||||||
static uint16_t neo3_timer;
|
static uint16_t neo3_timer;
|
||||||
// State bitmap to track which key(s) enabled NEO_3 layer
|
// State bitmap to track which key(s) enabled NEO_3 layer
|
||||||
|
// Bit 1 = LMOD state
|
||||||
|
// Bit 2 = RMOD state
|
||||||
|
// Bit 3 = Seen other keypress
|
||||||
static uint8_t neo3_state = 0;
|
static uint8_t neo3_state = 0;
|
||||||
// State bitmap to track key combo for CAPSLOCK
|
// State bitmap to track key combo for CAPSLOCK
|
||||||
static uint8_t capslock_state = 0;
|
static uint8_t capslock_state = 0;
|
||||||
@@ -453,6 +456,7 @@ void tap_with_modifiers(uint16_t keycode, uint8_t force_modifiers) {
|
|||||||
bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) {
|
||||||
uint8_t active_modifiers = get_mods();
|
uint8_t active_modifiers = get_mods();
|
||||||
uint8_t shifted = active_modifiers & MOD_MASK_SHIFT;
|
uint8_t shifted = active_modifiers & MOD_MASK_SHIFT;
|
||||||
|
uint8_t command = active_modifiers & MOD_MASK_GUI;
|
||||||
|
|
||||||
// Early return on key release
|
// Early return on key release
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
@@ -465,67 +469,81 @@ bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) {
|
|||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case NEO2_1:
|
case NEO2_1:
|
||||||
// degree symbol
|
// degree symbol
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_8) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
tap_code16(S(A(KC_8)));
|
||||||
break;
|
break;
|
||||||
case NEO2_2:
|
case NEO2_2:
|
||||||
// section symbol
|
// section symbol
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_6) SS_UP(X_LALT));
|
tap_code16(A(KC_6));
|
||||||
break;
|
break;
|
||||||
case NEO2_3:
|
case NEO2_3:
|
||||||
// There is no OSX key combination for the script small l character
|
if (command) {
|
||||||
|
tap_code16(S(G(KC_3)));
|
||||||
|
} else {
|
||||||
|
// There is no OSX key combination for the script small l character
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NEO2_4:
|
case NEO2_4:
|
||||||
// right angled quote
|
if (command) {
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_BSLASH) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
tap_code16(S(G(KC_4)));
|
||||||
|
} else {
|
||||||
|
tap_code16(S(A(KC_BSLASH)));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NEO2_5:
|
case NEO2_5:
|
||||||
// left angled quote
|
if (command) {
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_BSLASH) SS_UP(X_LALT));
|
tap_code16(S(G(KC_5)));
|
||||||
|
} else {
|
||||||
|
// left angled quote
|
||||||
|
tap_code16(A(KC_BSLASH));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NEO2_6:
|
case NEO2_6:
|
||||||
// dollar sign
|
// dollar sign
|
||||||
SEND_STRING(SS_DOWN(X_LSHIFT) SS_TAP(X_4) SS_UP(X_LSHIFT));
|
tap_code16(S(KC_4));
|
||||||
break;
|
break;
|
||||||
case NEO2_7:
|
case NEO2_7:
|
||||||
// euro sign
|
// euro sign
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_2) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
tap_code16(S(A(KC_2)));
|
||||||
break;
|
break;
|
||||||
case NEO2_8:
|
case NEO2_8:
|
||||||
// low9 double quote
|
// low9 double quote
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_W) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
tap_code16(S(A(KC_W)));
|
||||||
break;
|
break;
|
||||||
case NEO2_9:
|
case NEO2_9:
|
||||||
// left double quote
|
// left double quote
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_LBRACKET) SS_UP(X_LALT));
|
tap_code16(A(KC_LBRACKET));
|
||||||
break;
|
break;
|
||||||
case NEO2_0:
|
case NEO2_0:
|
||||||
// right double quote
|
// right double quote
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_LBRACKET) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
tap_code16(S(A(KC_LBRACKET)));
|
||||||
break;
|
break;
|
||||||
case NEO2_MINUS:
|
case NEO2_MINUS:
|
||||||
// em dash
|
// em dash
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_MINUS) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
tap_code16(S(A(KC_MINUS)));
|
||||||
break;
|
break;
|
||||||
case NEO2_COMMA:
|
case NEO2_COMMA:
|
||||||
// en dash
|
// en dash
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_MINUS) SS_UP(X_LALT));
|
tap_code16(A(KC_MINUS));
|
||||||
break;
|
break;
|
||||||
case NEO2_DOT:
|
case NEO2_DOT:
|
||||||
// bullet
|
// bullet
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_8) SS_UP(X_LALT));
|
tap_code16(A(KC_8));
|
||||||
break;
|
break;
|
||||||
case NEO2_SHARP_S:
|
case NEO2_SHARP_S:
|
||||||
// german sharp s
|
// german sharp s
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT));
|
tap_code16(S(KC_S));
|
||||||
break;
|
break;
|
||||||
case NEO2_UE:
|
case NEO2_UE:
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_U) SS_UP(X_LSHIFT));
|
tap_code16(A(KC_U));
|
||||||
|
tap_code16(S(KC_U));
|
||||||
break;
|
break;
|
||||||
case NEO2_OE:
|
case NEO2_OE:
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_O) SS_UP(X_LSHIFT));
|
tap_code16(A(KC_U));
|
||||||
|
tap_code16(S(KC_O));
|
||||||
break;
|
break;
|
||||||
case NEO2_AE:
|
case NEO2_AE:
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_A) SS_UP(X_LSHIFT));
|
tap_code16(A(KC_U));
|
||||||
|
tap_code16(S(KC_A));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
set_mods(active_modifiers);
|
set_mods(active_modifiers);
|
||||||
@@ -537,56 +555,59 @@ bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) {
|
|||||||
} else {
|
} else {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case NEO2_1:
|
case NEO2_1:
|
||||||
SEND_STRING(SS_TAP(X_1));
|
tap_code(KC_1);
|
||||||
break;
|
break;
|
||||||
case NEO2_2:
|
case NEO2_2:
|
||||||
SEND_STRING(SS_TAP(X_2));
|
tap_code(KC_2);
|
||||||
break;
|
break;
|
||||||
case NEO2_3:
|
case NEO2_3:
|
||||||
SEND_STRING(SS_TAP(X_3));
|
tap_code(KC_3);
|
||||||
break;
|
break;
|
||||||
case NEO2_4:
|
case NEO2_4:
|
||||||
SEND_STRING(SS_TAP(X_4));
|
tap_code(KC_4);
|
||||||
break;
|
break;
|
||||||
case NEO2_5:
|
case NEO2_5:
|
||||||
SEND_STRING(SS_TAP(X_5));
|
tap_code(KC_5);
|
||||||
break;
|
break;
|
||||||
case NEO2_6:
|
case NEO2_6:
|
||||||
SEND_STRING(SS_TAP(X_6));
|
tap_code(KC_6);
|
||||||
break;
|
break;
|
||||||
case NEO2_7:
|
case NEO2_7:
|
||||||
SEND_STRING(SS_TAP(X_7));
|
tap_code(KC_7);
|
||||||
break;
|
break;
|
||||||
case NEO2_8:
|
case NEO2_8:
|
||||||
SEND_STRING(SS_TAP(X_8));
|
tap_code(KC_8);
|
||||||
break;
|
break;
|
||||||
case NEO2_9:
|
case NEO2_9:
|
||||||
SEND_STRING(SS_TAP(X_9));
|
tap_code(KC_9);
|
||||||
break;
|
break;
|
||||||
case NEO2_0:
|
case NEO2_0:
|
||||||
SEND_STRING(SS_TAP(X_0));
|
tap_code(KC_0);
|
||||||
break;
|
break;
|
||||||
case NEO2_MINUS:
|
case NEO2_MINUS:
|
||||||
SEND_STRING(SS_TAP(X_MINUS));
|
tap_code(KC_MINUS);
|
||||||
break;
|
break;
|
||||||
case NEO2_COMMA:
|
case NEO2_COMMA:
|
||||||
SEND_STRING(SS_TAP(X_COMMA));
|
tap_code(KC_COMMA);
|
||||||
break;
|
break;
|
||||||
case NEO2_DOT:
|
case NEO2_DOT:
|
||||||
SEND_STRING(SS_TAP(X_DOT));
|
tap_code(KC_DOT);
|
||||||
break;
|
break;
|
||||||
case NEO2_SHARP_S:
|
case NEO2_SHARP_S:
|
||||||
// german sharp s
|
// german sharp s
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT));
|
tap_code16(A(KC_S));
|
||||||
break;
|
break;
|
||||||
case NEO2_UE:
|
case NEO2_UE:
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_U));
|
tap_code16(A(KC_U));
|
||||||
|
tap_code(KC_U);
|
||||||
break;
|
break;
|
||||||
case NEO2_OE:
|
case NEO2_OE:
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_O));
|
tap_code16(A(KC_U));
|
||||||
|
tap_code(KC_O);
|
||||||
break;
|
break;
|
||||||
case NEO2_AE:
|
case NEO2_AE:
|
||||||
SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_A));
|
tap_code16(A(KC_U));
|
||||||
|
tap_code(KC_A);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
@@ -619,7 +640,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
neo3_state |= (1 << 1);
|
neo3_state |= (1 << 1);
|
||||||
} else {
|
} else {
|
||||||
// Turn off NEO_3 layer unless it's enabled through NEO2_RMOD3 as well.
|
// Turn off NEO_3 layer unless it's enabled through NEO2_RMOD3 as well.
|
||||||
if ((neo3_state & ~(1 << 1)) == 0) {
|
if ((neo3_state & (1 << 2)) == 0) {
|
||||||
layer_off(NEO_3);
|
layer_off(NEO_3);
|
||||||
}
|
}
|
||||||
neo3_state &= ~(1 << 1);
|
neo3_state &= ~(1 << 1);
|
||||||
@@ -629,28 +650,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
neo3_timer = timer_read();
|
neo3_timer = timer_read();
|
||||||
neo3_state |= (1 << 2);
|
neo3_state |= (1 << 2);
|
||||||
|
// Reset tap detection state
|
||||||
|
neo3_state &= ~(1 << 3);
|
||||||
layer_on(NEO_3);
|
layer_on(NEO_3);
|
||||||
} else {
|
} else {
|
||||||
// Turn off NEO_3 layer unless it's enabled through NEO2_LMOD3 as well.
|
// Turn off NEO_3 layer unless it's enabled through NEO2_LMOD3 as well.
|
||||||
if ((neo3_state & ~(1 << 2)) == 0) {
|
if ((neo3_state & (1 << 1)) == 0) {
|
||||||
layer_off(NEO_3);
|
layer_off(NEO_3);
|
||||||
}
|
}
|
||||||
neo3_state &= ~(1 << 2);
|
neo3_state &= ~(1 << 2);
|
||||||
|
|
||||||
// Was the NEO2_RMOD3 key TAPPED?
|
// Was the NEO2_RMOD3 key TAPPED?
|
||||||
if (timer_elapsed(neo3_timer) <= 150) {
|
if (timer_elapsed(neo3_timer) <= TAPPING_TERM) {
|
||||||
if (neo3_state > 0) {
|
if ((neo3_state & ~(1 << 3)) > 0) {
|
||||||
// We are still in NEO_3 layer, send keycode and modifiers for @
|
// We are still in NEO_3 layer, send keycode and modifiers for @
|
||||||
tap_with_modifiers(KC_2, MOD_MASK_SHIFT);
|
tap_with_modifiers(KC_2, MOD_MASK_SHIFT);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// Do the normal key processing, send y
|
// Do the normal key processing, send y
|
||||||
tap_with_modifiers(KC_Y, MOD_MASK_NONE);
|
if ((neo3_state & (1 << 3)) == 0) {
|
||||||
|
tap_with_modifiers(KC_Y, MOD_MASK_NONE);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
if (record->event.pressed && neo3_state > 0) {
|
||||||
|
// Track that we've seen a separate keypress event
|
||||||
|
neo3_state |= (1 << 3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((capslock_state & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) {
|
if ((capslock_state & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) {
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
[""]
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
/* This keyboard/layout is used to test community layout discovery/compilation. */
|
||||||
|
|
||||||
|
#define _DEFAULT 0
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_DEFAULT] = LAYOUT (
|
||||||
|
KC_B
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum _layer {
|
||||||
|
BASE,
|
||||||
|
FN
|
||||||
|
};
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = LAYOUT_tkl_ansi( \
|
||||||
|
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_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
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_BSPC, KC_INS, KC_HOME,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_DEL, KC_END, KC_PGDN, \
|
||||||
|
MT(MOD_LCTL, KC_ESC), 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_UP, \
|
||||||
|
KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RGUI,MO(FN) ,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT),
|
||||||
|
[FN] = LAYOUT_tkl_ansi( \
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,EEP_RST, _______,_______,KC_VOLU, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, _______,_______,KC_VOLD, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \
|
||||||
|
_______,_______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLD,KC_VOLU,_______, _______, KC_MPLY, \
|
||||||
|
_______,_______,_______, _______, _______,_______,MO(FN) ,_______, KC_MPRV,KC_MSTP,KC_MNXT)
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
@@ -1 +1,2 @@
|
|||||||
from . import keyboards
|
from . import keyboards
|
||||||
|
from . import keymaps
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
"""List the keymaps for a specific keyboard
|
||||||
|
"""
|
||||||
|
from milc import cli
|
||||||
|
import qmk.keymap
|
||||||
|
from qmk.errors import NoSuchKeyboardError
|
||||||
|
|
||||||
|
|
||||||
|
@cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse")
|
||||||
|
@cli.subcommand("List the keymaps for a specific keyboard")
|
||||||
|
def list_keymaps(cli):
|
||||||
|
"""List the keymaps for a specific keyboard
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard):
|
||||||
|
# We echo instead of cli.log.info to allow easier piping of this output
|
||||||
|
cli.echo('%s', name)
|
||||||
|
except NoSuchKeyboardError as e:
|
||||||
|
cli.echo("{fg_red}%s: %s", cli.config.list_keymaps.keyboard, e.message)
|
||||||
|
except (FileNotFoundError, PermissionError) as e:
|
||||||
|
cli.echo("{fg_red}%s: %s", cli.config.list_keymaps.keyboard, e)
|
||||||
|
except TypeError:
|
||||||
|
cli.echo("{fg_red}Something went wrong. Did you specify a keyboard?")
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
"""Functions that help you work with QMK keymaps.
|
"""Functions that help you work with QMK keymaps.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import qmk.path
|
import qmk.path
|
||||||
|
import qmk.makefile
|
||||||
|
|
||||||
# The `keymap.c` template to use when a keyboard doesn't have its own
|
# The `keymap.c` template to use when a keyboard doesn't have its own
|
||||||
DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H
|
DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H
|
||||||
@@ -94,3 +96,39 @@ def write(keyboard, keymap, layout, layers):
|
|||||||
keymap_fd.write(keymap_c)
|
keymap_fd.write(keymap_c)
|
||||||
|
|
||||||
return keymap_file
|
return keymap_file
|
||||||
|
|
||||||
|
|
||||||
|
def list_keymaps(keyboard_name):
|
||||||
|
""" List the available keymaps for a keyboard.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
keyboard_name: the keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a set with the names of the available keymaps
|
||||||
|
"""
|
||||||
|
# parse all the rules.mk files for the keyboard
|
||||||
|
rules_mk = qmk.makefile.get_rules_mk(keyboard_name)
|
||||||
|
names = set()
|
||||||
|
|
||||||
|
if rules_mk:
|
||||||
|
# qmk_firmware/keyboards
|
||||||
|
keyboards_dir = Path.cwd() / "keyboards"
|
||||||
|
# path to the keyboard's directory
|
||||||
|
kb_path = keyboards_dir / keyboard_name
|
||||||
|
# walk up the directory tree until keyboards_dir
|
||||||
|
# and collect all directories' name with keymap.c file in it
|
||||||
|
while kb_path != keyboards_dir:
|
||||||
|
keymaps_dir = kb_path / "keymaps"
|
||||||
|
if keymaps_dir.exists():
|
||||||
|
names = names.union([keymap for keymap in os.listdir(str(keymaps_dir)) if (keymaps_dir / keymap / "keymap.c").is_file()])
|
||||||
|
kb_path = kb_path.parent
|
||||||
|
|
||||||
|
# if community layouts are supported, get them
|
||||||
|
if "LAYOUTS" in rules_mk:
|
||||||
|
for layout in rules_mk["LAYOUTS"].split():
|
||||||
|
cl_path = Path.cwd() / "layouts" / "community" / layout
|
||||||
|
if cl_path.exists():
|
||||||
|
names = names.union([keymap for keymap in os.listdir(str(cl_path)) if (cl_path / keymap / "keymap.c").is_file()])
|
||||||
|
|
||||||
|
return sorted(names)
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
""" Functions for working with Makefiles
|
||||||
|
"""
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from qmk.errors import NoSuchKeyboardError
|
||||||
|
|
||||||
|
|
||||||
|
def parse_rules_mk_file(file, rules_mk=None):
|
||||||
|
"""Turn a rules.mk file into a dictionary.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
file: path to the rules.mk file
|
||||||
|
rules_mk: already parsed rules.mk the new file should be merged with
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a dictionary with the file's content
|
||||||
|
"""
|
||||||
|
if not rules_mk:
|
||||||
|
rules_mk = {}
|
||||||
|
|
||||||
|
file = Path(file)
|
||||||
|
if file.exists():
|
||||||
|
rules_mk_lines = file.read_text().split("\n")
|
||||||
|
|
||||||
|
for line in rules_mk_lines:
|
||||||
|
# Filter out comments
|
||||||
|
if line.strip().startswith("#"):
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Strip in-line comments
|
||||||
|
if '#' in line:
|
||||||
|
line = line[:line.index('#')].strip()
|
||||||
|
|
||||||
|
if '=' in line:
|
||||||
|
# Append
|
||||||
|
if '+=' in line:
|
||||||
|
key, value = line.split('+=', 1)
|
||||||
|
if key.strip() not in rules_mk:
|
||||||
|
rules_mk[key.strip()] = value.strip()
|
||||||
|
else:
|
||||||
|
rules_mk[key.strip()] += ' ' + value.strip()
|
||||||
|
# Set if absent
|
||||||
|
elif "?=" in line:
|
||||||
|
key, value = line.split('?=', 1)
|
||||||
|
if key.strip() not in rules_mk:
|
||||||
|
rules_mk[key.strip()] = value.strip()
|
||||||
|
else:
|
||||||
|
if ":=" in line:
|
||||||
|
line.replace(":", "")
|
||||||
|
key, value = line.split('=', 1)
|
||||||
|
rules_mk[key.strip()] = value.strip()
|
||||||
|
|
||||||
|
return rules_mk
|
||||||
|
|
||||||
|
|
||||||
|
def get_rules_mk(keyboard):
|
||||||
|
""" Get a rules.mk for a keyboard
|
||||||
|
|
||||||
|
Args:
|
||||||
|
keyboard: name of the keyboard
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
NoSuchKeyboardError: when the keyboard does not exists
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
a dictionary with the content of the rules.mk file
|
||||||
|
"""
|
||||||
|
# Start with qmk_firmware/keyboards
|
||||||
|
kb_path = Path.cwd() / "keyboards"
|
||||||
|
# walk down the directory tree
|
||||||
|
# and collect all rules.mk files
|
||||||
|
kb_dir = kb_path / keyboard
|
||||||
|
if kb_dir.exists():
|
||||||
|
rules_mk = dict()
|
||||||
|
for directory in Path(keyboard).parts:
|
||||||
|
kb_path = kb_path / directory
|
||||||
|
rules_mk_path = kb_path / "rules.mk"
|
||||||
|
if rules_mk_path.exists():
|
||||||
|
rules_mk = parse_rules_mk_file(rules_mk_path, rules_mk)
|
||||||
|
else:
|
||||||
|
raise NoSuchKeyboardError("The requested keyboard and/or revision does not exist.")
|
||||||
|
|
||||||
|
return rules_mk
|
||||||
@@ -54,3 +54,15 @@ def test_list_keyboards():
|
|||||||
# check to see if a known keyboard is returned
|
# check to see if a known keyboard is returned
|
||||||
# this will fail if handwired/onekey/pytest is removed
|
# this will fail if handwired/onekey/pytest is removed
|
||||||
assert 'handwired/onekey/pytest' in result.stdout
|
assert 'handwired/onekey/pytest' in result.stdout
|
||||||
|
|
||||||
|
|
||||||
|
def test_list_keymaps():
|
||||||
|
result = check_subcommand("list-keymaps", "-kb", "handwired/onekey/pytest")
|
||||||
|
assert result.returncode == 0
|
||||||
|
assert "default" and "test" in result.stdout
|
||||||
|
|
||||||
|
|
||||||
|
def test_list_keymaps_no_keyboard_found():
|
||||||
|
result = check_subcommand("list-keymaps", "-kb", "asdfghjkl")
|
||||||
|
assert result.returncode == 0
|
||||||
|
assert "does not exist" in result.stdout
|
||||||
@@ -55,7 +55,7 @@ ifneq ($(findstring STM32F072, $(MCU)),)
|
|||||||
|
|
||||||
# Board: it should exist either in <chibios>/os/hal/boards/,
|
# Board: it should exist either in <chibios>/os/hal/boards/,
|
||||||
# <keyboard_dir>/boards/, or drivers/boards/
|
# <keyboard_dir>/boards/, or drivers/boards/
|
||||||
BOARD ?= ST_STM32F072B_DISCOVERY
|
BOARD ?= GENERIC_STM32_F072XB
|
||||||
|
|
||||||
USE_FPU ?= no
|
USE_FPU ?= no
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
|
#include "debounce.h"
|
||||||
|
#include "quantum.h"
|
||||||
#include "split_util.h"
|
#include "split_util.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "quantum.h"
|
|
||||||
#include "debounce.h"
|
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
|
|
||||||
#ifdef ENCODER_ENABLE
|
#ifdef ENCODER_ENABLE
|
||||||
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#ifdef DIRECT_PINS
|
#ifdef DIRECT_PINS
|
||||||
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
|
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
|
||||||
#else
|
#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW)
|
||||||
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||||
static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||||
#endif
|
#endif
|
||||||
@@ -115,8 +115,11 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
|||||||
|
|
||||||
// For each col...
|
// For each col...
|
||||||
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||||
|
// Select the col pin to read (active low)
|
||||||
|
uint8_t pin_state = readPin(col_pins[col_index]);
|
||||||
|
|
||||||
// Populate the matrix row with the state of the col pin
|
// Populate the matrix row with the state of the col pin
|
||||||
current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unselect row
|
// Unselect row
|
||||||
@@ -160,12 +163,12 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
|||||||
matrix_row_t last_row_value = current_matrix[row_index];
|
matrix_row_t last_row_value = current_matrix[row_index];
|
||||||
|
|
||||||
// Check row pin state
|
// Check row pin state
|
||||||
if (readPin(row_pins[row_index])) {
|
if (readPin(row_pins[row_index]) == 0) {
|
||||||
// Pin HI, clear col bit
|
|
||||||
current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
|
|
||||||
} else {
|
|
||||||
// Pin LO, set col bit
|
// Pin LO, set col bit
|
||||||
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
|
current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col);
|
||||||
|
} else {
|
||||||
|
// Pin HI, clear col bit
|
||||||
|
current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine if the matrix changed state
|
// Determine if the matrix changed state
|
||||||
|
|||||||
+127
-120
@@ -112,6 +112,7 @@ static void send_mouse(report_mouse_t *report) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef EXTRAKEY_ENABLE
|
||||||
static void send_extra(uint8_t report_id, uint16_t data) {
|
static void send_extra(uint8_t report_id, uint16_t data) {
|
||||||
static uint8_t last_id = 0;
|
static uint8_t last_id = 0;
|
||||||
static uint16_t last_data = 0;
|
static uint16_t last_data = 0;
|
||||||
@@ -124,10 +125,19 @@ static void send_extra(uint8_t report_id, uint16_t data) {
|
|||||||
usbSetInterrupt3((void *)&report, sizeof(report));
|
usbSetInterrupt3((void *)&report, sizeof(report));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void send_system(uint16_t data) { send_extra(REPORT_ID_SYSTEM, data); }
|
static void send_system(uint16_t data) {
|
||||||
|
#ifdef EXTRAKEY_ENABLE
|
||||||
|
send_extra(REPORT_ID_SYSTEM, data - SYSTEM_POWER_DOWN + 1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void send_consumer(uint16_t data) { send_extra(REPORT_ID_CONSUMER, data); }
|
static void send_consumer(uint16_t data) {
|
||||||
|
#ifdef EXTRAKEY_ENABLE
|
||||||
|
send_extra(REPORT_ID_CONSUMER, data);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*------------------------------------------------------------------*
|
/*------------------------------------------------------------------*
|
||||||
* Request from host *
|
* Request from host *
|
||||||
@@ -200,128 +210,125 @@ uchar usbFunctionWrite(uchar *data, uchar len) {
|
|||||||
* Descriptors *
|
* Descriptors *
|
||||||
*------------------------------------------------------------------*/
|
*------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
|
||||||
* Report Descriptor for keyboard
|
|
||||||
*
|
|
||||||
* from an example in HID spec appendix
|
|
||||||
*/
|
|
||||||
const PROGMEM uchar keyboard_hid_report[] = {
|
const PROGMEM uchar keyboard_hid_report[] = {
|
||||||
0x05, 0x01, // Usage Page (Generic Desktop),
|
0x05, 0x01, // Usage Page (Generic Desktop)
|
||||||
0x09, 0x06, // Usage (Keyboard),
|
0x09, 0x06, // Usage (Keyboard)
|
||||||
0xA1, 0x01, // Collection (Application),
|
0xA1, 0x01, // Collection (Application)
|
||||||
0x75, 0x01, // Report Size (1),
|
// Modifiers (8 bits)
|
||||||
0x95, 0x08, // Report Count (8),
|
0x05, 0x07, // Usage Page (Keyboard/Keypad)
|
||||||
0x05, 0x07, // Usage Page (Key Codes),
|
0x19, 0xE0, // Usage Minimum (Keyboard Left Control)
|
||||||
0x19, 0xE0, // Usage Minimum (224),
|
0x29, 0xE7, // Usage Maximum (Keyboard Right GUI)
|
||||||
0x29, 0xE7, // Usage Maximum (231),
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
0x15, 0x00, // Logical Minimum (0),
|
0x25, 0x01, // Logical Maximum (1)
|
||||||
0x25, 0x01, // Logical Maximum (1),
|
0x95, 0x08, // Report Count (8)
|
||||||
0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte
|
0x75, 0x01, // Report Size (1)
|
||||||
0x95, 0x01, // Report Count (1),
|
0x81, 0x02, // Input (Data, Variable, Absolute)
|
||||||
0x75, 0x08, // Report Size (8),
|
// Reserved (1 byte)
|
||||||
0x81, 0x03, // Input (Constant), ;Reserved byte
|
0x95, 0x01, // Report Count (1)
|
||||||
0x95, 0x05, // Report Count (5),
|
0x75, 0x08, // Report Size (8)
|
||||||
0x75, 0x01, // Report Size (1),
|
0x81, 0x03, // Input (Constant)
|
||||||
0x05, 0x08, // Usage Page (LEDs),
|
// Keycodes (6 bytes)
|
||||||
0x19, 0x01, // Usage Minimum (1),
|
0x05, 0x07, // Usage Page (Keyboard/Keypad)
|
||||||
0x29, 0x05, // Usage Maximum (5),
|
0x19, 0x00, // Usage Minimum (0)
|
||||||
0x91, 0x02, // Output (Data, Variable, Absolute), ;LED report
|
0x29, 0xFF, // Usage Maximum (255)
|
||||||
0x95, 0x01, // Report Count (1),
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
0x75, 0x03, // Report Size (3),
|
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||||
0x91, 0x03, // Output (Constant), ;LED report padding
|
0x95, 0x06, // Report Count (6)
|
||||||
0x95, 0x06, // Report Count (6),
|
0x75, 0x08, // Report Size (8)
|
||||||
0x75, 0x08, // Report Size (8),
|
0x81, 0x00, // Input (Data, Array, Absolute)
|
||||||
0x15, 0x00, // Logical Minimum (0),
|
|
||||||
0x26, 0xFF, 0x00, // Logical Maximum(255),
|
// Status LEDs (5 bits)
|
||||||
0x05, 0x07, // Usage Page (Key Codes),
|
0x05, 0x08, // Usage Page (LED)
|
||||||
0x19, 0x00, // Usage Minimum (0),
|
0x19, 0x01, // Usage Minimum (Num Lock)
|
||||||
0x29, 0xFF, // Usage Maximum (255),
|
0x29, 0x05, // Usage Maximum (Kana)
|
||||||
0x81, 0x00, // Input (Data, Array),
|
0x95, 0x05, // Report Count (5)
|
||||||
0xc0 // End Collection
|
0x75, 0x01, // Report Size (1)
|
||||||
|
0x91, 0x02, // Output (Data, Variable, Absolute)
|
||||||
|
// LED padding (3 bits)
|
||||||
|
0x95, 0x01, // Report Count (1)
|
||||||
|
0x75, 0x03, // Report Size (3)
|
||||||
|
0x91, 0x03, // Output (Constant)
|
||||||
|
0xC0 // End Collection
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Report Descriptor for mouse
|
|
||||||
*
|
|
||||||
* Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension
|
|
||||||
* http://www.microchip.com/forums/tm.aspx?high=&m=391435&mpage=1#391521
|
|
||||||
* http://www.keil.com/forum/15671/
|
|
||||||
* http://www.microsoft.com/whdc/device/input/wheel.mspx
|
|
||||||
*/
|
|
||||||
const PROGMEM uchar mouse_hid_report[] = {
|
const PROGMEM uchar mouse_hid_report[] = {
|
||||||
/* mouse */
|
// Mouse report descriptor
|
||||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
0x05, 0x01, // Usage Page (Generic Desktop)
|
||||||
0x09, 0x02, // USAGE (Mouse)
|
0x09, 0x02, // Usage (Mouse)
|
||||||
0xa1, 0x01, // COLLECTION (Application)
|
0xA1, 0x01, // Collection (Application)
|
||||||
0x85, REPORT_ID_MOUSE, // REPORT_ID (1)
|
0x85, REPORT_ID_MOUSE, // Report ID
|
||||||
0x09, 0x01, // USAGE (Pointer)
|
0x09, 0x01, // Usage (Pointer)
|
||||||
0xa1, 0x00, // COLLECTION (Physical)
|
0xA1, 0x00, // Collection (Physical)
|
||||||
// ---------------------------- Buttons
|
// Buttons (5 bits)
|
||||||
0x05, 0x09, // USAGE_PAGE (Button)
|
0x05, 0x09, // Usage Page (Button)
|
||||||
0x19, 0x01, // USAGE_MINIMUM (Button 1)
|
0x19, 0x01, // Usage Minimum (Button 1)
|
||||||
0x29, 0x05, // USAGE_MAXIMUM (Button 5)
|
0x29, 0x05, // Usage Maximum (Button 5)
|
||||||
0x15, 0x00, // LOGICAL_MINIMUM (0)
|
0x15, 0x00, // Logical Minimum (0)
|
||||||
0x25, 0x01, // LOGICAL_MAXIMUM (1)
|
0x25, 0x01, // Logical Maximum (1)
|
||||||
0x75, 0x01, // REPORT_SIZE (1)
|
0x95, 0x05, // Report Count (5)
|
||||||
0x95, 0x05, // REPORT_COUNT (5)
|
0x75, 0x01, // Report Size (1)
|
||||||
0x81, 0x02, // INPUT (Data,Var,Abs)
|
0x81, 0x02, // Input (Data, Variable, Absolute)
|
||||||
0x75, 0x03, // REPORT_SIZE (3)
|
// Button padding (3 bits)
|
||||||
0x95, 0x01, // REPORT_COUNT (1)
|
0x95, 0x01, // Report Count (1)
|
||||||
0x81, 0x03, // INPUT (Cnst,Var,Abs)
|
0x75, 0x03, // Report Size (3)
|
||||||
// ---------------------------- X,Y position
|
0x81, 0x03, // Input (Constant)
|
||||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
|
||||||
0x09, 0x30, // USAGE (X)
|
// X/Y position (2 bytes)
|
||||||
0x09, 0x31, // USAGE (Y)
|
0x05, 0x01, // Usage Page (Generic Desktop)
|
||||||
0x15, 0x81, // LOGICAL_MINIMUM (-127)
|
0x09, 0x30, // Usage (X)
|
||||||
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
|
0x09, 0x31, // Usage (Y)
|
||||||
0x75, 0x08, // REPORT_SIZE (8)
|
0x15, 0x81, // Logical Minimum (-127)
|
||||||
0x95, 0x02, // REPORT_COUNT (2)
|
0x25, 0x7F, // Logical Maximum (127)
|
||||||
0x81, 0x06, // INPUT (Data,Var,Rel)
|
0x95, 0x02, // Report Count (2)
|
||||||
// ---------------------------- Vertical wheel
|
0x75, 0x08, // Report Size (8)
|
||||||
0x09, 0x38, // USAGE (Wheel)
|
0x81, 0x06, // Input (Data, Variable, Relative)
|
||||||
0x15, 0x81, // LOGICAL_MINIMUM (-127)
|
|
||||||
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
|
// Vertical wheel (1 byte)
|
||||||
0x35, 0x00, // PHYSICAL_MINIMUM (0) - reset physical
|
0x09, 0x38, // Usage (Wheel)
|
||||||
0x45, 0x00, // PHYSICAL_MAXIMUM (0)
|
0x15, 0x81, // Logical Minimum (-127)
|
||||||
0x75, 0x08, // REPORT_SIZE (8)
|
0x25, 0x7F, // Logical Maximum (127)
|
||||||
0x95, 0x01, // REPORT_COUNT (1)
|
0x95, 0x01, // Report Count (1)
|
||||||
0x81, 0x06, // INPUT (Data,Var,Rel)
|
0x75, 0x08, // Report Size (8)
|
||||||
// ---------------------------- Horizontal wheel
|
0x81, 0x06, // Input (Data, Variable, Relative)
|
||||||
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
|
// Horizontal wheel (1 byte)
|
||||||
0x0a, 0x38, 0x02, // USAGE (AC Pan)
|
0x05, 0x0C, // Usage Page (Consumer)
|
||||||
0x15, 0x81, // LOGICAL_MINIMUM (-127)
|
0x0A, 0x38, 0x02, // Usage (AC Pan)
|
||||||
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
|
0x15, 0x81, // Logical Minimum (-127)
|
||||||
0x75, 0x08, // REPORT_SIZE (8)
|
0x25, 0x7F, // Logical Maximum (127)
|
||||||
0x95, 0x01, // REPORT_COUNT (1)
|
0x95, 0x01, // Report Count (1)
|
||||||
0x81, 0x06, // INPUT (Data,Var,Rel)
|
0x75, 0x08, // Report Size (8)
|
||||||
0xc0, // END_COLLECTION
|
0x81, 0x06, // Input (Data, Variable, Relative)
|
||||||
0xc0, // END_COLLECTION
|
0xC0, // End Collection
|
||||||
/* system control */
|
0xC0, // End Collection
|
||||||
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
|
|
||||||
0x09, 0x80, // USAGE (System Control)
|
#ifdef EXTRAKEY_ENABLE
|
||||||
0xa1, 0x01, // COLLECTION (Application)
|
// Extrakeys report descriptor
|
||||||
0x85, REPORT_ID_SYSTEM, // REPORT_ID (2)
|
0x05, 0x01, // Usage Page (Generic Desktop)
|
||||||
0x15, 0x01, // LOGICAL_MINIMUM (0x1)
|
0x09, 0x80, // Usage (System Control)
|
||||||
0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
|
0xA1, 0x01, // Collection (Application)
|
||||||
0x19, 0x01, // USAGE_MINIMUM (0x1)
|
0x85, REPORT_ID_SYSTEM, // Report ID
|
||||||
0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
|
0x1A, 0x81, 0x00, // Usage Minimum (System Power Down)
|
||||||
0x75, 0x10, // REPORT_SIZE (16)
|
0x2A, 0x83, 0x00, // Usage Maximum (System Wake Up)
|
||||||
0x95, 0x01, // REPORT_COUNT (1)
|
0x16, 0x01, 0x00, // Logical Minimum
|
||||||
0x81, 0x00, // INPUT (Data,Array,Abs)
|
0x26, 0x03, 0x00, // Logical Maximum
|
||||||
0xc0, // END_COLLECTION
|
0x95, 0x01, // Report Count (1)
|
||||||
/* consumer */
|
0x75, 0x10, // Report Size (16)
|
||||||
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
|
0x81, 0x00, // Input (Data, Array, Absolute)
|
||||||
0x09, 0x01, // USAGE (Consumer Control)
|
0xC0, // End Collection
|
||||||
0xa1, 0x01, // COLLECTION (Application)
|
|
||||||
0x85, REPORT_ID_CONSUMER, // REPORT_ID (3)
|
0x05, 0x0C, // Usage Page (Consumer)
|
||||||
0x15, 0x01, // LOGICAL_MINIMUM (0x1)
|
0x09, 0x01, // Usage (Consumer Control)
|
||||||
0x26, 0x9c, 0x02, // LOGICAL_MAXIMUM (0x29c)
|
0xA1, 0x01, // Collection (Application)
|
||||||
0x19, 0x01, // USAGE_MINIMUM (0x1)
|
0x85, REPORT_ID_CONSUMER, // Report ID
|
||||||
0x2a, 0x9c, 0x02, // USAGE_MAXIMUM (0x29c)
|
0x1A, 0x01, 0x00, // Usage Minimum (Consumer Control)
|
||||||
0x75, 0x10, // REPORT_SIZE (16)
|
0x2A, 0x9C, 0x02, // Usage Maximum (AC Distribute Vertically)
|
||||||
0x95, 0x01, // REPORT_COUNT (1)
|
0x16, 0x01, 0x00, // Logical Minimum
|
||||||
0x81, 0x00, // INPUT (Data,Array,Abs)
|
0x26, 0x9C, 0x02, // Logical Maximum
|
||||||
0xc0, // END_COLLECTION
|
0x95, 0x01, // Report Count (1)
|
||||||
|
0x75, 0x10, // Report Size (16)
|
||||||
|
0x81, 0x00, // Input (Data, Array, Absolute)
|
||||||
|
0xC0 // End Collection
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef USB_MAX_POWER_CONSUMPTION
|
#ifndef USB_MAX_POWER_CONSUMPTION
|
||||||
|
|||||||
+13
-2
@@ -3,14 +3,25 @@ DYNAMIC_KEYMAP_ENABLE = no
|
|||||||
CONSOLE_ENABLE = yes
|
CONSOLE_ENABLE = yes
|
||||||
COMMAND_ENABLE = yes
|
COMMAND_ENABLE = yes
|
||||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
|
||||||
# only enable audio on specific boards
|
# only enable audio on specific boards
|
||||||
ifeq ($(strip $(KEYBOARD)), maartenwut/plain60)
|
ifeq ($(strip $(KEYBOARD)), maartenwut/plain60)
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
else
|
endif
|
||||||
AUDIO_ENABLE = no
|
|
||||||
|
ifeq ($(strip $(KEYBOARD)), clueboard/60)
|
||||||
|
AUDIO_ENABLE = yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(KEYBOARD)), hadron/ver3)
|
||||||
|
AUDIO_ENABLE = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(KEYBOARD)), fruity60)
|
ifeq ($(strip $(KEYBOARD)), fruity60)
|
||||||
COMMAND_ENABLE = no
|
COMMAND_ENABLE = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(KEYBOARD)), kbdfans/kbd75/rev1)
|
||||||
|
COMMAND_ENABLE = no
|
||||||
|
endif
|
||||||
Reference in new issue
Block a user