Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
799acb2802 | ||
|
|
18bc525493 | ||
|
|
4edb5a5e8c | ||
|
|
3b5fd4cc51 | ||
|
|
cd9a430d66 | ||
|
|
1b267d4840 | ||
|
|
32d03eef90 | ||
|
|
f2f2afe13b | ||
|
|
3a3ea03b6e | ||
|
|
f3afc716cb | ||
|
|
e72562fe6f |
No files matched your search
File renamed without changes.
@@ -141,6 +141,10 @@ else
|
|||||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||||
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
|
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
|
||||||
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
||||||
|
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
|
||||||
|
OPT_DEFS += -DEEPROM_DRIVER
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||||
|
SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
|
||||||
else
|
else
|
||||||
# This will effectively work the same as "transient" if not supported by the chip
|
# This will effectively work the same as "transient" if not supported by the chip
|
||||||
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
|
||||||
|
|||||||
@@ -2,14 +2,16 @@
|
|||||||
|
|
||||||
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
The EEPROM driver can be swapped out depending on the needs of the keyboard, or whether extra hardware is present.
|
||||||
|
|
||||||
Driver | Description
|
Driver | Description
|
||||||
--------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
`EEPROM_DRIVER = vendor` | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. Other chips will generally act as "transient" below.
|
`EEPROM_DRIVER = vendor` (default) | Uses the on-chip driver provided by the chip manufacturer. For AVR, this is provided by avr-libc. This is supported on ARM for a subset of chips -- STM32F3xx, STM32F1xx, and STM32F072xB will be emulated by writing to flash. STM32L0xx and STM32L1xx will use the onboard dedicated true EEPROM. Other chips will generally act as "transient" below.
|
||||||
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
`EEPROM_DRIVER = i2c` | Supports writing to I2C-based 24xx EEPROM chips. See the driver section below.
|
||||||
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
`EEPROM_DRIVER = transient` | Fake EEPROM driver -- supports reading/writing to RAM, and will be discarded when power is lost.
|
||||||
|
|
||||||
## Vendor Driver Configuration
|
## Vendor Driver Configuration
|
||||||
|
|
||||||
|
!> Resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.
|
||||||
|
|
||||||
No configurable options are available.
|
No configurable options are available.
|
||||||
|
|
||||||
## I2C Driver Configuration
|
## I2C Driver Configuration
|
||||||
|
|||||||
+2
-1
@@ -16,7 +16,8 @@
|
|||||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css" title="light">
|
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/buble.css" title="light">
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css" media="(prefers-color-scheme: dark)">
|
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/dark.css" media="(prefers-color-scheme: dark)">
|
||||||
<link rel="stylesheet" href="//unpkg.com/[email protected]/dist/toc.css">
|
<link rel="stylesheet" href="//unpkg.com/[email protected]/dist/toc.css">
|
||||||
<link rel="stylesheet" href="sidebar.css" />
|
<link rel="stylesheet" href="qmk_custom_light.css">
|
||||||
|
<link rel="stylesheet" href="qmk_custom_dark.css" media="(prefers-color-scheme: dark)">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
.sidebar li.active {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section p.tip,
|
||||||
|
.markdown-section tr:nth-child(2n) {
|
||||||
|
background-color:#444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section tr {
|
||||||
|
border-top: 1px solid #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section td, .markdown-section th {
|
||||||
|
border: 1px solid #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section p.tip code {
|
||||||
|
background-color: #555;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page_toc code {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-section hr, .search {
|
||||||
|
border-bottom: 1px solid #777 !important;
|
||||||
|
}
|
||||||
File renamed without changes.
@@ -0,0 +1,96 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* 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 <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
#include "eeprom_driver.h"
|
||||||
|
#include "eeprom_stm32_L0_L1.h"
|
||||||
|
|
||||||
|
#define EEPROM_BASE_ADDR 0x08080000
|
||||||
|
#define EEPROM_ADDR(offset) (EEPROM_BASE_ADDR + (offset))
|
||||||
|
#define EEPROM_PTR(offset) ((__IO uint8_t *)EEPROM_ADDR(offset))
|
||||||
|
#define EEPROM_BYTE(location, offset) (*(EEPROM_PTR(((uint32_t)location) + ((uint32_t)offset))))
|
||||||
|
|
||||||
|
#define BUFFER_BYTE(buffer, offset) (*(((uint8_t *)buffer) + offset))
|
||||||
|
|
||||||
|
#define FLASH_PEKEY1 0x89ABCDEF
|
||||||
|
#define FLASH_PEKEY2 0x02030405
|
||||||
|
|
||||||
|
static inline void STM32_L0_L1_EEPROM_WaitNotBusy(void) {
|
||||||
|
while (FLASH->SR & FLASH_SR_BSY) {
|
||||||
|
__WFI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void STM32_L0_L1_EEPROM_Unlock(void) {
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
if (FLASH->PECR & FLASH_PECR_PELOCK) {
|
||||||
|
FLASH->PEKEYR = FLASH_PEKEY1;
|
||||||
|
FLASH->PEKEYR = FLASH_PEKEY2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void STM32_L0_L1_EEPROM_Lock(void) {
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
FLASH->PECR |= FLASH_PECR_PELOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_driver_init(void) {}
|
||||||
|
|
||||||
|
void eeprom_driver_erase(void) {
|
||||||
|
STM32_L0_L1_EEPROM_Unlock();
|
||||||
|
|
||||||
|
for (size_t offset = 0; offset < STM32_ONBOARD_EEPROM_SIZE; offset += sizeof(uint32_t)) {
|
||||||
|
FLASH->PECR |= FLASH_PECR_ERASE | FLASH_PECR_DATA;
|
||||||
|
|
||||||
|
*(__IO uint32_t *)EEPROM_ADDR(offset) = (uint32_t)0;
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
FLASH->PECR &= ~(FLASH_PECR_ERASE | FLASH_PECR_DATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_Lock();
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||||
|
for (size_t offset = 0; offset < len; ++offset) {
|
||||||
|
// Drop out if we've hit the limit of the EEPROM
|
||||||
|
if ((((uint32_t)addr) + offset) >= STM32_ONBOARD_EEPROM_SIZE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
BUFFER_BYTE(buf, offset) = EEPROM_BYTE(addr, offset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||||
|
STM32_L0_L1_EEPROM_Unlock();
|
||||||
|
|
||||||
|
for (size_t offset = 0; offset < len; ++offset) {
|
||||||
|
// Drop out if we've hit the limit of the EEPROM
|
||||||
|
if ((((uint32_t)addr) + offset) >= STM32_ONBOARD_EEPROM_SIZE) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_WaitNotBusy();
|
||||||
|
EEPROM_BYTE(addr, offset) = BUFFER_BYTE(buf, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
STM32_L0_L1_EEPROM_Lock();
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/*
|
||||||
|
The size used by the STM32 L0/L1 EEPROM driver.
|
||||||
|
*/
|
||||||
|
#ifndef STM32_ONBOARD_EEPROM_SIZE
|
||||||
|
# ifdef VIA_ENABLE
|
||||||
|
# define STM32_ONBOARD_EEPROM_SIZE 1024
|
||||||
|
# else
|
||||||
|
# include "eeconfig.h"
|
||||||
|
# define STM32_ONBOARD_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO and EEPROM page sizing
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STM32_ONBOARD_EEPROM_SIZE > 128
|
||||||
|
# pragma message("Please note: resetting EEPROM using an STM32L0/L1 device takes up to 1 second for every 1kB of internal EEPROM used.")
|
||||||
|
#endif
|
||||||
@@ -1,268 +0,0 @@
|
|||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 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"
|
|
||||||
#include "stm32_gpio.h"
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver local definitions. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver exported variables. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver local variables and types. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Type of STM32 GPIO port setup.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
uint32_t moder;
|
|
||||||
uint32_t otyper;
|
|
||||||
uint32_t ospeedr;
|
|
||||||
uint32_t pupdr;
|
|
||||||
uint32_t odr;
|
|
||||||
uint32_t afrl;
|
|
||||||
uint32_t afrh;
|
|
||||||
} gpio_setup_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Type of STM32 GPIO initialization data.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
#if STM32_HAS_GPIOA || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PAData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOB || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PBData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOC || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PCData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOD || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PDData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOE || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PEData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOF || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PFData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOG || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PGData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOH || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PHData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOI || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PIData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOJ || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PJData;
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOK || defined(__DOXYGEN__)
|
|
||||||
gpio_setup_t PKData;
|
|
||||||
#endif
|
|
||||||
} gpio_config_t;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief STM32 GPIO static initialization data.
|
|
||||||
*/
|
|
||||||
static const gpio_config_t gpio_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
|
|
||||||
#if STM32_HAS_GPIOJ
|
|
||||||
{VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR,
|
|
||||||
VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH},
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOK
|
|
||||||
{VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR,
|
|
||||||
VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH}
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver local functions. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {
|
|
||||||
|
|
||||||
gpiop->OTYPER = config->otyper;
|
|
||||||
gpiop->OSPEEDR = config->ospeedr;
|
|
||||||
gpiop->PUPDR = config->pupdr;
|
|
||||||
gpiop->ODR = config->odr;
|
|
||||||
gpiop->AFRL = config->afrl;
|
|
||||||
gpiop->AFRH = config->afrh;
|
|
||||||
gpiop->MODER = config->moder;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void stm32_gpio_init(void) {
|
|
||||||
|
|
||||||
/* Enabling GPIO-related clocks, the mask comes from the
|
|
||||||
registry header file.*/
|
|
||||||
rccResetAHB(STM32_GPIO_EN_MASK);
|
|
||||||
rccEnableAHB(STM32_GPIO_EN_MASK, true);
|
|
||||||
|
|
||||||
/* Initializing all the defined GPIO ports.*/
|
|
||||||
#if STM32_HAS_GPIOA
|
|
||||||
gpio_init(GPIOA, &gpio_default_config.PAData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOB
|
|
||||||
gpio_init(GPIOB, &gpio_default_config.PBData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOC
|
|
||||||
gpio_init(GPIOC, &gpio_default_config.PCData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOD
|
|
||||||
gpio_init(GPIOD, &gpio_default_config.PDData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOE
|
|
||||||
gpio_init(GPIOE, &gpio_default_config.PEData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOF
|
|
||||||
gpio_init(GPIOF, &gpio_default_config.PFData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOG
|
|
||||||
gpio_init(GPIOG, &gpio_default_config.PGData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOH
|
|
||||||
gpio_init(GPIOH, &gpio_default_config.PHData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOI
|
|
||||||
gpio_init(GPIOI, &gpio_default_config.PIData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOJ
|
|
||||||
gpio_init(GPIOJ, &gpio_default_config.PJData);
|
|
||||||
#endif
|
|
||||||
#if STM32_HAS_GPIOK
|
|
||||||
gpio_init(GPIOK, &gpio_default_config.PKData);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver interrupt handlers. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/*===========================================================================*/
|
|
||||||
/* Driver exported functions. */
|
|
||||||
/*===========================================================================*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Early initialization code.
|
|
||||||
* @details GPIO ports and system clocks are initialized before everything
|
|
||||||
* else.
|
|
||||||
*/
|
|
||||||
void __early_init(void) {
|
|
||||||
extern void enter_bootloader_mode_if_requested(void);
|
|
||||||
enter_bootloader_mode_if_requested();
|
|
||||||
stm32_gpio_init();
|
|
||||||
stm32_clock_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if HAL_USE_SDC || defined(__DOXYGEN__)
|
|
||||||
/**
|
|
||||||
* @brief SDC card detection.
|
|
||||||
*/
|
|
||||||
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
|
||||||
|
|
||||||
(void)sdcp;
|
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief SDC card write protection detection.
|
|
||||||
*/
|
|
||||||
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
|
||||||
|
|
||||||
(void)sdcp;
|
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif /* HAL_USE_SDC */
|
|
||||||
|
|
||||||
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
|
||||||
/**
|
|
||||||
* @brief MMC_SPI card detection.
|
|
||||||
*/
|
|
||||||
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
|
||||||
|
|
||||||
(void)mmcp;
|
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief MMC_SPI card write protection detection.
|
|
||||||
*/
|
|
||||||
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
|
||||||
|
|
||||||
(void)mmcp;
|
|
||||||
/* TODO: Fill the implementation.*/
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Board-specific initialization code.
|
|
||||||
* @todo Add your board-specific code, if any.
|
|
||||||
*/
|
|
||||||
void boardInit(void) {
|
|
||||||
SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
|
|
||||||
SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP);
|
|
||||||
}
|
|
||||||
@@ -1,923 +0,0 @@
|
|||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file has been automatically generated using ChibiStudio board
|
|
||||||
* generator plugin. Do not edit manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BOARD_H
|
|
||||||
#define BOARD_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Setup for ST STM32F072B-Discovery board.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Board identifier.
|
|
||||||
*/
|
|
||||||
#define BOARD_ST_STM32F072B_DISCOVERY
|
|
||||||
#define BOARD_NAME "ST STM32F072B-Discovery"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 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 */
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
|
|
||||||
File renamed without changes.
@@ -6,13 +6,6 @@
|
|||||||
"height": 4,
|
"height": 4,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [
|
|
||||||
{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Del", "x":11, "y":0}, {"label":"BkSp", "x":12, "y":0}, {"label":"7", "x":13, "y":0}, {"label":"8", "x":14, "y":0}, {"label":"9", "x":15, "y":0}, {"label":"*", "x":16, "y":0},
|
|
||||||
{"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"Enter", "x":11.25, "y":1, "w":1.75}, {"label":"4", "x":13, "y":1}, {"label":"5", "x":14, "y":1}, {"label":"6", "x":15, "y":1}, {"label":"-", "x":16, "y":1},
|
|
||||||
{"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"Shift", "x":10.75, "y":2, "w":1.25}, {"label":"↑", "x":12, "y":2}, {"label":"1", "x":13, "y":2}, {"label":"2", "x":14, "y":2}, {"label":"3", "x":15, "y":2}, {"label":"+", "x":16, "y":2},
|
|
||||||
{"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"GUI", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":1.75}, {"x":5.5, "y":3, "w":1}, {"label":"Backspace", "x":6.5, "y":3, "w":2.25}, {"label":"Menu", "x":8.75, "y":3, "w":1.25}, {"label":"Fn", "x":10, "y":3}, {"label":"←", "x":11, "y":3}, {"label":"↓", "x":12, "y":3}, {"label":"→", "x":13, "y":3}, {"label":"0", "x":14, "y":3}, {"label":".", "x":15, "y":3}, {"label":"Enter", "x":16, "y":3}]
|
|
||||||
},
|
|
||||||
"LAYOUT_lefty": {
|
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"7", "x":0, "y":0}, {"label":"8", "x":1, "y":0}, {"label":"9", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"Q", "x":5, "y":0}, {"label":"W", "x":6, "y":0}, {"label":"E", "x":7, "y":0}, {"label":"R", "x":8, "y":0}, {"label":"T", "x":9, "y":0}, {"label":"Y", "x":10, "y":0}, {"label":"U", "x":11, "y":0}, {"label":"I", "x":12, "y":0}, {"label":"O", "x":13, "y":0}, {"label":"P", "x":14, "y":0}, {"label":"{", "x":15, "y":0}, {"label":"}", "x":16, "y":0},
|
{"label":"7", "x":0, "y":0}, {"label":"8", "x":1, "y":0}, {"label":"9", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"Q", "x":5, "y":0}, {"label":"W", "x":6, "y":0}, {"label":"E", "x":7, "y":0}, {"label":"R", "x":8, "y":0}, {"label":"T", "x":9, "y":0}, {"label":"Y", "x":10, "y":0}, {"label":"U", "x":11, "y":0}, {"label":"I", "x":12, "y":0}, {"label":"O", "x":13, "y":0}, {"label":"P", "x":14, "y":0}, {"label":"{", "x":15, "y":0}, {"label":"}", "x":16, "y":0},
|
||||||
{"label":"4", "x":0, "y":1}, {"label":"5", "x":1, "y":1}, {"label":"6", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.25}, {"label":"A", "x":5.25, "y":1}, {"label":"S", "x":6.25, "y":1}, {"label":"D", "x":7.25, "y":1}, {"label":"F", "x":8.25, "y":1}, {"label":"G", "x":9.25, "y":1}, {"label":"H", "x":10.25, "y":1}, {"label":"J", "x":11.25, "y":1}, {"label":"K", "x":12.25, "y":1}, {"label":"L", "x":13.25, "y":1}, {"label":":", "x":14.25, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.75},
|
{"label":"4", "x":0, "y":1}, {"label":"5", "x":1, "y":1}, {"label":"6", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.25}, {"label":"A", "x":5.25, "y":1}, {"label":"S", "x":6.25, "y":1}, {"label":"D", "x":7.25, "y":1}, {"label":"F", "x":8.25, "y":1}, {"label":"G", "x":9.25, "y":1}, {"label":"H", "x":10.25, "y":1}, {"label":"J", "x":11.25, "y":1}, {"label":"K", "x":12.25, "y":1}, {"label":"L", "x":13.25, "y":1}, {"label":":", "x":14.25, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.75},
|
||||||
+2
-2
@@ -22,7 +22,7 @@
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Keymap _BL: Base Layer (Default Layer)
|
/* Keymap _BL: Base Layer (Default Layer)
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT_lefty(
|
[_BL] = LAYOUT(
|
||||||
KC_P7 , KC_P8, KC_P9 , KC_PAST, KC_ESC , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_BSPC , \
|
KC_P7 , KC_P8, KC_P9 , KC_PAST, KC_ESC , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_DEL , KC_BSPC , \
|
||||||
KC_P4 , KC_P5, KC_P6 , KC_PMNS, KC_TAB , KC_A , KC_S , KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , \
|
KC_P4 , KC_P5, KC_P6 , KC_PMNS, KC_TAB , KC_A , KC_S , KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , \
|
||||||
KC_P1 , KC_P2, KC_P3 , KC_PPLS, KC_LSFT, KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_UP ,KC_RSFT , \
|
KC_P1 , KC_P2, KC_P3 , KC_PPLS, KC_LSFT, KC_Z , KC_X, KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_UP ,KC_RSFT , \
|
||||||
@@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
/* Keymap _FL: Function Layer
|
/* Keymap _FL: Function Layer
|
||||||
*/
|
*/
|
||||||
[_FL] = LAYOUT_lefty(
|
[_FL] = LAYOUT(
|
||||||
KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \
|
KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \
|
||||||
KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \
|
KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \
|
||||||
KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \
|
KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "candybar.h"
|
#include "lefty.h"
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
@@ -17,19 +17,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT( \
|
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
|
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, k1d, k1e, k1f, k1g, \
|
|
||||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
|
|
||||||
k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g \
|
|
||||||
) { \
|
|
||||||
{ k00, k01 , k02, k03 , k04 , k05, k06 , k07, k08, k09, k0a, k0b , k0c, k0d, k0e, k0f, k0g } , \
|
|
||||||
{ k10, k11 , k12, k13 , k14 , k15, k16 , k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g } , \
|
|
||||||
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
|
||||||
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define LAYOUT_lefty( \
|
#define LAYOUT( \
|
||||||
k0d, k0e, k0f, k0g, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
|
k0d, k0e, k0f, k0g, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
|
||||||
k1d, k1e, k1f, k1g, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \
|
k1d, k1e, k1f, k1g, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \
|
||||||
k2d, k2e, k2f, k2g, k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
k2d, k2e, k2f, k2g, k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
||||||
@@ -40,5 +29,3 @@
|
|||||||
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
||||||
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_righty LAYOUT
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# The Key Company Candybar
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/)
|
||||||
|
* Hardware Supported: TKC Candybar
|
||||||
|
* Hardware Availability: [TheKey.Company](https://thekey.company/collections/candybar)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make candybar/lefty:default:dfu-util
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
# 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,18 +0,0 @@
|
|||||||
The Key Company Candybar
|
|
||||||
===
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller.
|
|
||||||
|
|
||||||
Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/)
|
|
||||||
Hardware Supported: TKC Candybar
|
|
||||||
Hardware Availability: Via GB
|
|
||||||
|
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
|
||||||
|
|
||||||
make candybar:default:dfu-util
|
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
/* Copyright 2018 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0006
|
||||||
|
#define MANUFACTURER The Key Company
|
||||||
|
#define PRODUCT Candybar
|
||||||
|
#define DESCRIPTION A compact staggered 40% keyboard with attached numpad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 17
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define MATRIX_ROW_PINS { A8, A9, A10, A13 }
|
||||||
|
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 }
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
//#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
//#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
// #define WS2812_LED_N 2
|
||||||
|
// #define RGBLED_NUM WS2812_LED_N
|
||||||
|
// #define WS2812_TIM_N 2
|
||||||
|
// #define WS2812_TIM_CH 2
|
||||||
|
// #define PORT_WS2812 GPIOA
|
||||||
|
// #define PIN_WS2812 1
|
||||||
|
// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
|
||||||
|
//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
|
||||||
|
//#define WS2812_EXTERNAL_PULLUP
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "TKC Candybar",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "terrymathews",
|
||||||
|
"width": 17,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Del", "x":11, "y":0}, {"label":"BkSp", "x":12, "y":0}, {"label":"7", "x":13, "y":0}, {"label":"8", "x":14, "y":0}, {"label":"9", "x":15, "y":0}, {"label":"*", "x":16, "y":0},
|
||||||
|
{"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"Enter", "x":11.25, "y":1, "w":1.75}, {"label":"4", "x":13, "y":1}, {"label":"5", "x":14, "y":1}, {"label":"6", "x":15, "y":1}, {"label":"-", "x":16, "y":1},
|
||||||
|
{"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"Shift", "x":10.75, "y":2, "w":1.25}, {"label":"↑", "x":12, "y":2}, {"label":"1", "x":13, "y":2}, {"label":"2", "x":14, "y":2}, {"label":"3", "x":15, "y":2}, {"label":"+", "x":16, "y":2},
|
||||||
|
{"label":"Ctrl", "x":0, "y":3, "w":1.25}, {"label":"GUI", "x":1.25, "y":3, "w":1.25}, {"label":"Alt", "x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":1.75}, {"x":5.5, "y":3, "w":1}, {"label":"Backspace", "x":6.5, "y":3, "w":2.25}, {"label":"Menu", "x":8.75, "y":3, "w":1.25}, {"label":"Fn", "x":10, "y":3}, {"label":"←", "x":11, "y":3}, {"label":"↓", "x":12, "y":3}, {"label":"→", "x":13, "y":3}, {"label":"0", "x":14, "y":3}, {"label":".", "x":15, "y":3}, {"label":"Enter", "x":16, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File renamed without changes.
@@ -0,0 +1,15 @@
|
|||||||
|
# The Key Company Candybar
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/)
|
||||||
|
* Hardware Supported: TKC Candybar
|
||||||
|
* Hardware Availability: [TheKey.Company](https://thekey.company/collections/candybar)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make candybar/righty:default:dfu-util
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2018 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 "righty.h"
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/* Copyright 2018 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, k1d, k1e, k1f, k1g, \
|
||||||
|
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \
|
||||||
|
k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g \
|
||||||
|
) { \
|
||||||
|
{ k00, k01 , k02, k03 , k04 , k05, k06 , k07, k08, k09, k0a, k0b , k0c, k0d, k0e, k0f, k0g } , \
|
||||||
|
{ k10, k11 , k12, k13 , k14 , k15, k16 , k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g } , \
|
||||||
|
{ k20, KC_NO, k22, k23 , k24 , k25, k26 , k27, k28, k29, k2a, k2b , k2c, k2d, k2e, k2f, k2g } , \
|
||||||
|
{ k30, k31 , k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b , k3c, k3d, k3e, k3f, k3g } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = STM32F072
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
# EXTRAFLAGS+=-flto
|
||||||
|
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
|
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
AUDIO_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
SERIAL_LINK_ENABLE = no
|
||||||
|
|
||||||
|
|
||||||
|
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||||
|
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
||||||
@@ -16,10 +16,6 @@
|
|||||||
|
|
||||||
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
|
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
|
||||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 60
|
#define MOUSEKEY_WHEEL_TIME_TO_MAX 60
|
||||||
// Timeout settings for leader key
|
|
||||||
#undef LEADER_TIMEOUT
|
|
||||||
#define LEADER_TIMEOUT 350
|
|
||||||
#define LEADER_PER_KEY_TIMING
|
|
||||||
|
|
||||||
#undef DEBOUNCE
|
#undef DEBOUNCE
|
||||||
#define DEBOUNCE 45
|
#define DEBOUNCE 45
|
||||||
|
|||||||
@@ -36,9 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
OSM(MOD_LSFT) ,LT(2,KC_BSPACE) ,OSM(MOD_LGUI) ,
|
OSM(MOD_LSFT) ,LT(2,KC_BSPACE) ,OSM(MOD_LGUI) ,
|
||||||
|
|
||||||
|
|
||||||
TO(1) ,KC_6 ,KC_7 ,KC_8 ,TD_F9 ,LT(3,KC_0) ,KC_DQUO ,
|
TO(1) ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,LT(3,KC_0) ,KC_DQUO ,
|
||||||
KC_UNDS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,RSFT_T(KC_MINUS) ,
|
KC_UNDS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,RSFT_T(KC_MINUS) ,
|
||||||
HYPR_T(KC_H) ,ALT_T(KC_J) ,RCTL_T(KC_K) ,LT(6,KC_L) ,TD_CLN ,GUI_T(KC_QUOTE) ,
|
HYPR_H ,ALT_J ,CTL_K ,LT(6,KC_L) ,TD_CLN ,CMD_QUOT ,
|
||||||
ALT_TAB ,KC_N ,MEH_T(KC_M) ,KC_COMMA ,KC_DOT ,KC_SLASH ,LT(4,KC_KP_ASTERISK),
|
ALT_TAB ,KC_N ,MEH_T(KC_M) ,KC_COMMA ,KC_DOT ,KC_SLASH ,LT(4,KC_KP_ASTERISK),
|
||||||
LT(4,KC_ENTER) ,KC_DOWN ,KC_LBRACKET ,KC_RBRACKET ,OSL(2) ,
|
LT(4,KC_ENTER) ,KC_DOWN ,KC_LBRACKET ,KC_RBRACKET ,OSL(2) ,
|
||||||
KC_AUDIO_MUTE ,KC_ESCAPE ,
|
KC_AUDIO_MUTE ,KC_ESCAPE ,
|
||||||
@@ -88,14 +88,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LABK ,KC_RABK ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LABK ,KC_RABK ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,KC_AT ,KC_TRANSPARENT ,KC_EQL ,F_ARROW ,KC_GRAVE ,
|
KC_TRANSPARENT ,KC_AT ,KC_TRANSPARENT ,KC_EQL ,F_ARROW ,KC_GRAVE ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LBRACKET ,KC_RBRACKET ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_LBRACKET ,KC_RBRACKET ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,IARROW ,ARROW ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,
|
KC_TRANSPARENT ,
|
||||||
// Right hand
|
// Right hand
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
LALT(LSFT(KC_UP)) ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_KP_ASTERISK ,KC_PERC ,KC_DLR ,
|
LALT(LSFT(KC_UP)) ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_KP_ASTERISK ,KC_PERC ,KC_DLR ,
|
||||||
KC_AMPR ,KC_LPRN ,KC_RPRN ,KC_CIRC ,KC_KP_PLUS ,KC_PIPE ,
|
KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_KP_PLUS ,KC_PIPE ,
|
||||||
LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH ,
|
LALT(LSFT(KC_DOWN)),KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH ,KC_BSLASH ,
|
||||||
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,KC_TRANSPARENT ,
|
||||||
RESET ,KC_TRANSPARENT ,
|
RESET ,KC_TRANSPARENT ,
|
||||||
@@ -316,3 +316,11 @@ void oneshot_mods_changed_user(uint8_t mods) {
|
|||||||
void oneshot_locked_mods_changed_user(uint8_t mods) {
|
void oneshot_locked_mods_changed_user(uint8_t mods) {
|
||||||
oneshot_mods_changed_user(mods);
|
oneshot_mods_changed_user(mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============== alt_tab callbacks
|
||||||
|
void alt_tab_activated(void){
|
||||||
|
layer_on(7); // activate motion layer
|
||||||
|
}
|
||||||
|
void alt_tab_deactivated(void){
|
||||||
|
layer_off(7); // activate motion layer
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_nordic.h"
|
||||||
|
enum layers {
|
||||||
|
_DEFAULT,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PRKL = SAFE_RANGE,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define FN MO(_FN)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Default
|
||||||
|
* ,-----------------------------------------------------------------------------------.------.
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | ¨^ | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä | Entr |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|------'
|
||||||
|
* | Shift| Z | X | C | V | Space | B | N | M | , | . |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_DEFAULT] = LAYOUT_2u_space(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_QUOT, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, LT(_FN, KC_ENT),
|
||||||
|
KC_LSFT, LGUI_T(KC_Z), KC_X, KC_C, KC_V, LT(_LOWER, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, LT(_RAISE, KC_DOT)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower - Numbers and some symbols
|
||||||
|
* ,------------------------------------------------------------------------------------------.
|
||||||
|
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | DEL |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------|
|
||||||
|
* | | TAB | | | | | | | | | | ' | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------'
|
||||||
|
* | | | | | | | | | | - | |
|
||||||
|
* `------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_2u_space(
|
||||||
|
KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_DEL,
|
||||||
|
_______, KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_APOS, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, NO_MINS, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise - AltGred Characters and more symbols
|
||||||
|
* ,------------------------------------------------------------------------------------------.
|
||||||
|
* | ~ | > | @ | £ | $ | % | & | | | [ | ] | ≈ | ? | { |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------|
|
||||||
|
* | | | | UP | | | | | | | | | } |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------'
|
||||||
|
* | | < | LEFT | DOWN | RIGHT| | | | | | |
|
||||||
|
* `------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_2u_space(
|
||||||
|
NO_TILD, NO_SECT, NO_AT, NO_PND, NO_DLR, KC_PERC, NO_AMPR, NO_LCBR, NO_LBRC, NO_RBRC, NO_RCBR, NO_QUES, LSFT(NO_LBRC),
|
||||||
|
_______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, LSFT(NO_RBRC),
|
||||||
|
_______, NO_HALF, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN
|
||||||
|
* ,------------------------------------------------------------------------------------------.
|
||||||
|
* |RESET | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------|
|
||||||
|
* | |RGB_P |RGB_HD|RGB_HI| VOL- | PREV | NEXT | VOL+ | | | | PRKL | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|------'
|
||||||
|
* | RGB_M|RGB_VD|RGB_VI|RGB_TG| | PLAY/PAUSE | | | |LCA(DEL)| |
|
||||||
|
* `------+------+------+------+------+------+------+------+------+------+------+------'
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT_2u_space(
|
||||||
|
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_M_P, RGB_HUD, RGB_HUI, KC_VOLD, KC_MPRV, KC_MNXT, KC_VOLU, _______, _______, _______, PRKL, _______,
|
||||||
|
RGB_MOD, RGB_VAD, RGB_VAI, RGB_TOG, _______, KC_MPLY, _______, _______, _______, LCA(KC_DEL), _______
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(LCTL(KC_RIGHT));
|
||||||
|
} else {
|
||||||
|
tap_code16(LCTL(KC_LEFT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case PRKL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
//When PRKL is pressed, print out the holy power word of our people
|
||||||
|
SEND_STRING("PERKELE");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# The default keymap for PRKL30
|
||||||
|
|
||||||
|
Layout geared towards productivity with OSX
|
||||||
|
-----
|
||||||
|
|
||||||
|
Default layer
|
||||||
|

|
||||||
|
|
||||||
|
Lower
|
||||||
|

|
||||||
|
|
||||||
|
Raise
|
||||||
|

|
||||||
|
|
||||||
|
FN
|
||||||
|

|
||||||
@@ -27,7 +27,8 @@ CUSTOM_MATRIX = yes # Custom matrix file
|
|||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
BACKLIGHT_DRIVER = custom
|
||||||
MIDI_ENABLE = no # MIDI support
|
MIDI_ENABLE = no # MIDI support
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
|||||||
@@ -16,8 +16,6 @@
|
|||||||
#ifndef RGBLIGHT_H
|
#ifndef RGBLIGHT_H
|
||||||
#define RGBLIGHT_H
|
#define RGBLIGHT_H
|
||||||
|
|
||||||
#include "rgblight_reconfig.h"
|
|
||||||
|
|
||||||
/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
|
/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
|
||||||
|
|
||||||
old mode number (before 0.6.117) to new mode name table
|
old mode number (before 0.6.117) to new mode name table
|
||||||
@@ -64,6 +62,39 @@
|
|||||||
|-----------------|-----------------------------------|
|
|-----------------|-----------------------------------|
|
||||||
*****/
|
*****/
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ANIMATIONS
|
||||||
|
// for backward compatibility
|
||||||
|
# define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
# define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
# define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
# define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
# define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_STATIC_PATTERNS
|
||||||
|
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
// check dynamic animation effects chose ?
|
||||||
|
#if defined(RGBLIGHT_EFFECT_BREATHING) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_SNAKE) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_KNIGHT) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_CHRISTMAS) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_RGB_TEST) \
|
||||||
|
|| defined(RGBLIGHT_EFFECT_ALTERNATING)
|
||||||
|
# define RGBLIGHT_USE_TIMER
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
|
#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym,
|
||||||
#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
|
#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym,
|
||||||
#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
|
#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym,
|
||||||
@@ -263,12 +294,19 @@ void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom);
|
|||||||
# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
|
# define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF)
|
||||||
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
|
void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
|
||||||
|
# ifdef RGBLIGHT_USE_TIMER
|
||||||
void rgblight_task(void);
|
void rgblight_task(void);
|
||||||
|
|
||||||
void rgblight_timer_init(void);
|
void rgblight_timer_init(void);
|
||||||
void rgblight_timer_enable(void);
|
void rgblight_timer_enable(void);
|
||||||
void rgblight_timer_disable(void);
|
void rgblight_timer_disable(void);
|
||||||
void rgblight_timer_toggle(void);
|
void rgblight_timer_toggle(void);
|
||||||
|
# else
|
||||||
|
# define rgblight_task()
|
||||||
|
# define rgblight_timer_init()
|
||||||
|
# define rgblight_timer_enable()
|
||||||
|
# define rgblight_timer_disable()
|
||||||
|
# define rgblight_timer_toggle()
|
||||||
|
# endif
|
||||||
|
|
||||||
# ifdef RGBLIGHT_SPLIT
|
# ifdef RGBLIGHT_SPLIT
|
||||||
# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0)
|
# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0)
|
||||||
|
|||||||
@@ -0,0 +1,270 @@
|
|||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "pointing_device.h"
|
||||||
|
#include "adns9800_srom_A4.h"
|
||||||
|
#include "../../lib/lufa/LUFA/Drivers/Peripheral/SPI.h"
|
||||||
|
|
||||||
|
// registers
|
||||||
|
#define REG_Product_ID 0x00
|
||||||
|
#define REG_Revision_ID 0x01
|
||||||
|
#define REG_Motion 0x02
|
||||||
|
#define REG_Delta_X_L 0x03
|
||||||
|
#define REG_Delta_X_H 0x04
|
||||||
|
#define REG_Delta_Y_L 0x05
|
||||||
|
#define REG_Delta_Y_H 0x06
|
||||||
|
#define REG_SQUAL 0x07
|
||||||
|
#define REG_Pixel_Sum 0x08
|
||||||
|
#define REG_Maximum_Pixel 0x09
|
||||||
|
#define REG_Minimum_Pixel 0x0a
|
||||||
|
#define REG_Shutter_Lower 0x0b
|
||||||
|
#define REG_Shutter_Upper 0x0c
|
||||||
|
#define REG_Frame_Period_Lower 0x0d
|
||||||
|
#define REG_Frame_Period_Upper 0x0e
|
||||||
|
#define REG_Configuration_I 0x0f
|
||||||
|
#define REG_Configuration_II 0x10
|
||||||
|
#define REG_Frame_Capture 0x12
|
||||||
|
#define REG_SROM_Enable 0x13
|
||||||
|
#define REG_Run_Downshift 0x14
|
||||||
|
#define REG_Rest1_Rate 0x15
|
||||||
|
#define REG_Rest1_Downshift 0x16
|
||||||
|
#define REG_Rest2_Rate 0x17
|
||||||
|
#define REG_Rest2_Downshift 0x18
|
||||||
|
#define REG_Rest3_Rate 0x19
|
||||||
|
#define REG_Frame_Period_Max_Bound_Lower 0x1a
|
||||||
|
#define REG_Frame_Period_Max_Bound_Upper 0x1b
|
||||||
|
#define REG_Frame_Period_Min_Bound_Lower 0x1c
|
||||||
|
#define REG_Frame_Period_Min_Bound_Upper 0x1d
|
||||||
|
#define REG_Shutter_Max_Bound_Lower 0x1e
|
||||||
|
#define REG_Shutter_Max_Bound_Upper 0x1f
|
||||||
|
#define REG_LASER_CTRL0 0x20
|
||||||
|
#define REG_Observation 0x24
|
||||||
|
#define REG_Data_Out_Lower 0x25
|
||||||
|
#define REG_Data_Out_Upper 0x26
|
||||||
|
#define REG_SROM_ID 0x2a
|
||||||
|
#define REG_Lift_Detection_Thr 0x2e
|
||||||
|
#define REG_Configuration_V 0x2f
|
||||||
|
#define REG_Configuration_IV 0x39
|
||||||
|
#define REG_Power_Up_Reset 0x3a
|
||||||
|
#define REG_Shutdown 0x3b
|
||||||
|
#define REG_Inverse_Product_ID 0x3f
|
||||||
|
#define REG_Motion_Burst 0x50
|
||||||
|
#define REG_SROM_Load_Burst 0x62
|
||||||
|
#define REG_Pixel_Burst 0x64
|
||||||
|
|
||||||
|
// pins
|
||||||
|
#define NCS 0
|
||||||
|
|
||||||
|
extern const uint16_t firmware_length;
|
||||||
|
extern const uint8_t firmware_data[];
|
||||||
|
|
||||||
|
enum motion_burst_property{
|
||||||
|
motion = 0,
|
||||||
|
observation,
|
||||||
|
delta_x_l,
|
||||||
|
delta_x_h,
|
||||||
|
delta_y_l,
|
||||||
|
delta_y_h,
|
||||||
|
squal,
|
||||||
|
pixel_sum,
|
||||||
|
maximum_pixel,
|
||||||
|
minimum_pixel,
|
||||||
|
shutter_upper,
|
||||||
|
shutter_lower,
|
||||||
|
frame_period_upper,
|
||||||
|
frame_period_lower,
|
||||||
|
end_data
|
||||||
|
};
|
||||||
|
|
||||||
|
// used to track the motion delta between updates
|
||||||
|
volatile int32_t delta_x;
|
||||||
|
volatile int32_t delta_y;
|
||||||
|
|
||||||
|
void adns_begin(void){
|
||||||
|
PORTB &= ~ (1 << NCS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void adns_end(void){
|
||||||
|
PORTB |= (1 << NCS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void adns_write(uint8_t reg_addr, uint8_t data){
|
||||||
|
|
||||||
|
adns_begin();
|
||||||
|
|
||||||
|
//send address of the register, with MSBit = 1 to indicate it's a write
|
||||||
|
SPI_TransferByte(reg_addr | 0x80 );
|
||||||
|
SPI_TransferByte(data);
|
||||||
|
|
||||||
|
// tSCLK-NCS for write operation
|
||||||
|
wait_us(20);
|
||||||
|
|
||||||
|
adns_end();
|
||||||
|
|
||||||
|
// tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound
|
||||||
|
wait_us(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t adns_read(uint8_t reg_addr){
|
||||||
|
|
||||||
|
adns_begin();
|
||||||
|
|
||||||
|
// send adress of the register, with MSBit = 0 to indicate it's a read
|
||||||
|
SPI_TransferByte(reg_addr & 0x7f );
|
||||||
|
uint8_t data = SPI_TransferByte(0);
|
||||||
|
|
||||||
|
// tSCLK-NCS for read operation is 120ns
|
||||||
|
wait_us(1);
|
||||||
|
|
||||||
|
adns_end();
|
||||||
|
|
||||||
|
// tSRW/tSRR (=20us) minus tSCLK-NCS
|
||||||
|
wait_us(19);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pointing_device_init(void) {
|
||||||
|
|
||||||
|
if(!is_keyboard_master())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// interrupt 2
|
||||||
|
EICRA &= ~(1 << 4);
|
||||||
|
EICRA |= (1 << 5);
|
||||||
|
EIMSK |= (1<<INT2);
|
||||||
|
|
||||||
|
// mode 3
|
||||||
|
SPI_Init(
|
||||||
|
SPI_SPEED_FCPU_DIV_8 |
|
||||||
|
SPI_ORDER_MSB_FIRST |
|
||||||
|
SPI_SCK_LEAD_FALLING |
|
||||||
|
SPI_SAMPLE_TRAILING |
|
||||||
|
SPI_MODE_MASTER);
|
||||||
|
|
||||||
|
// set B0 output
|
||||||
|
DDRB |= (1 << 0);
|
||||||
|
|
||||||
|
// reset serial port
|
||||||
|
adns_end();
|
||||||
|
adns_begin();
|
||||||
|
adns_end();
|
||||||
|
|
||||||
|
// reboot
|
||||||
|
adns_write(REG_Power_Up_Reset, 0x5a);
|
||||||
|
wait_ms(50);
|
||||||
|
|
||||||
|
// read registers and discard
|
||||||
|
adns_read(REG_Motion);
|
||||||
|
adns_read(REG_Delta_X_L);
|
||||||
|
adns_read(REG_Delta_X_H);
|
||||||
|
adns_read(REG_Delta_Y_L);
|
||||||
|
adns_read(REG_Delta_Y_H);
|
||||||
|
|
||||||
|
// upload firmware
|
||||||
|
|
||||||
|
// set the configuration_IV register in 3k firmware mode
|
||||||
|
// bit 1 = 1 for 3k mode, other bits are reserved
|
||||||
|
adns_write(REG_Configuration_IV, 0x02);
|
||||||
|
|
||||||
|
// write 0x1d in SROM_enable reg for initializing
|
||||||
|
adns_write(REG_SROM_Enable, 0x1d);
|
||||||
|
|
||||||
|
// wait for more than one frame period
|
||||||
|
// assume that the frame rate is as low as 100fps... even if it should never be that low
|
||||||
|
wait_ms(10);
|
||||||
|
|
||||||
|
// write 0x18 to SROM_enable to start SROM download
|
||||||
|
adns_write(REG_SROM_Enable, 0x18);
|
||||||
|
|
||||||
|
// write the SROM file (=firmware data)
|
||||||
|
adns_begin();
|
||||||
|
|
||||||
|
// write burst destination adress
|
||||||
|
SPI_TransferByte(REG_SROM_Load_Burst | 0x80);
|
||||||
|
wait_us(15);
|
||||||
|
|
||||||
|
// send all bytes of the firmware
|
||||||
|
unsigned char c;
|
||||||
|
for(int i = 0; i < firmware_length; i++){
|
||||||
|
c = (unsigned char)pgm_read_byte(firmware_data + i);
|
||||||
|
SPI_TransferByte(c);
|
||||||
|
wait_us(15);
|
||||||
|
}
|
||||||
|
|
||||||
|
adns_end();
|
||||||
|
|
||||||
|
wait_ms(10);
|
||||||
|
|
||||||
|
// enable laser(bit 0 = 0b), in normal mode (bits 3,2,1 = 000b)
|
||||||
|
// reading the actual value of the register is important because the real
|
||||||
|
// default value is different from what is said in the datasheet, and if you
|
||||||
|
// change the reserved bytes (like by writing 0x00...) it would not work.
|
||||||
|
uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0);
|
||||||
|
adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0);
|
||||||
|
|
||||||
|
wait_ms(1);
|
||||||
|
|
||||||
|
// set the configuration_I register to set the CPI
|
||||||
|
// 0x01 = 50, minimum
|
||||||
|
// 0x44 = 3400, default
|
||||||
|
// 0x8e = 7100
|
||||||
|
// 0xA4 = 8200, maximum
|
||||||
|
adns_write(REG_Configuration_I, 0x04);
|
||||||
|
|
||||||
|
wait_ms(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
void pointing_device_task(void) {
|
||||||
|
|
||||||
|
if(!is_keyboard_master())
|
||||||
|
return;
|
||||||
|
|
||||||
|
report_mouse_t report = pointing_device_get_report();
|
||||||
|
|
||||||
|
// clamp deltas from -127 to 127
|
||||||
|
report.x = delta_x < -127 ? 127 : delta_x > 127 ? 127 : delta_x;
|
||||||
|
report.x = -report.x;
|
||||||
|
|
||||||
|
report.y = delta_y < -127 ? 127 : delta_y > 127 ? 127 : delta_y;
|
||||||
|
|
||||||
|
// reset deltas
|
||||||
|
delta_x = 0;
|
||||||
|
delta_y = 0;
|
||||||
|
|
||||||
|
pointing_device_set_report(report);
|
||||||
|
pointing_device_send();
|
||||||
|
}
|
||||||
|
|
||||||
|
int16_t convertDeltaToInt(uint8_t high, uint8_t low){
|
||||||
|
|
||||||
|
// join bytes into twos compliment
|
||||||
|
uint16_t twos_comp = (high << 8) | low;
|
||||||
|
|
||||||
|
// convert twos comp to int
|
||||||
|
if (twos_comp & 0x8000)
|
||||||
|
return -1 * ((twos_comp ^ 0xffff) + 1);
|
||||||
|
|
||||||
|
return twos_comp;
|
||||||
|
}
|
||||||
|
|
||||||
|
ISR(INT2_vect) {
|
||||||
|
// called on interrupt 2 when sensed motion
|
||||||
|
// copy burst data from the respective registers
|
||||||
|
|
||||||
|
adns_begin();
|
||||||
|
|
||||||
|
// send adress of the register, with MSBit = 1 to indicate it's a write
|
||||||
|
SPI_TransferByte(REG_Motion_Burst & 0x7f);
|
||||||
|
|
||||||
|
uint8_t burst_data[pixel_sum];
|
||||||
|
|
||||||
|
for (int i = 0; i < pixel_sum; ++i) {
|
||||||
|
burst_data[i] = SPI_TransferByte(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
delta_x += convertDeltaToInt(burst_data[delta_x_h], burst_data[delta_x_l]);
|
||||||
|
delta_y += convertDeltaToInt(burst_data[delta_y_h], burst_data[delta_y_l]);
|
||||||
|
|
||||||
|
adns_end();
|
||||||
|
}
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
|
const uint16_t firmware_length = 3070;
|
||||||
|
|
||||||
|
const uint8_t firmware_data[] PROGMEM = {
|
||||||
|
0x03, 0xa4, 0x6e, 0x16, 0x6d, 0x89, 0x3e, 0xfe, 0x5f, 0x1c, 0xb8, 0xf2, 0x47, 0x0c, 0x7b,
|
||||||
|
0x74, 0x6a, 0x56, 0x0f, 0x7d, 0x76, 0x71, 0x4b, 0x0c, 0x97, 0xb6, 0xcf, 0xfd, 0x78, 0x72,
|
||||||
|
0x66, 0x2f, 0xbd, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2c, 0xb0, 0xe4, 0x32, 0xf1, 0x6a, 0x56,
|
||||||
|
0x2e, 0xbf, 0xfc, 0x7a, 0x57, 0x0d, 0x79, 0x70, 0x66, 0x46, 0x0e, 0x7f, 0x5d, 0x19, 0x91,
|
||||||
|
0xaa, 0xc2, 0x0d, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x3a, 0xd7, 0x2c,
|
||||||
|
0xbb, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0xb2, 0xc7, 0x0c, 0x9a, 0x97, 0x8f, 0x52, 0xfd, 0x0d,
|
||||||
|
0xb8, 0x41, 0x00, 0x9e, 0x8e, 0x9a, 0x1e, 0x6d, 0x0c, 0xe2, 0xaa, 0x13, 0x93, 0xb8, 0xc1,
|
||||||
|
0x2a, 0x29, 0xbb, 0x0b, 0xe3, 0x71, 0x08, 0x6d, 0xfd, 0xb6, 0xd9, 0xcf, 0x65, 0x21, 0x27,
|
||||||
|
0x45, 0x1b, 0xbe, 0xe2, 0x61, 0x86, 0x3c, 0xbf, 0x68, 0x9c, 0xd6, 0x75, 0x01, 0x5e, 0xe0,
|
||||||
|
0xc6, 0x92, 0x79, 0xf4, 0x6a, 0xa9, 0xbb, 0x2a, 0x79, 0xd0, 0xe1, 0x5c, 0x32, 0xb1, 0x5a,
|
||||||
|
0x1b, 0xba, 0xaf, 0x11, 0xea, 0x24, 0x6a, 0x83, 0x4f, 0x8d, 0xed, 0x19, 0x62, 0x70, 0x54,
|
||||||
|
0xfb, 0x0e, 0x1f, 0x83, 0xcc, 0xf0, 0xb7, 0xae, 0x05, 0xd3, 0x42, 0x5d, 0x48, 0xa0, 0x7a,
|
||||||
|
0x0b, 0x73, 0xb3, 0xc8, 0xa6, 0xb7, 0x1b, 0x08, 0x13, 0x9b, 0x89, 0x44, 0x42, 0xae, 0xd8,
|
||||||
|
0x6a, 0xba, 0x9b, 0x84, 0x25, 0x8b, 0xa4, 0x5e, 0x0b, 0x85, 0xb0, 0x8f, 0x8d, 0x80, 0x9c,
|
||||||
|
0xd1, 0x52, 0xc7, 0xcb, 0xff, 0x8d, 0x8b, 0xdd, 0x87, 0xf2, 0x63, 0xca, 0xe7, 0x4f, 0x4a,
|
||||||
|
0x57, 0x3c, 0xdf, 0xaf, 0xcb, 0x5c, 0xbb, 0x39, 0x0b, 0x01, 0x9c, 0x79, 0x22, 0x15, 0xb8,
|
||||||
|
0xa0, 0xd3, 0x72, 0x02, 0x35, 0x20, 0x40, 0xe0, 0x17, 0xde, 0x89, 0x88, 0xce, 0xe9, 0x2b,
|
||||||
|
0x75, 0xba, 0xa0, 0x96, 0x24, 0x1e, 0x71, 0xb5, 0x15, 0x00, 0x61, 0xe0, 0x5c, 0x93, 0x4e,
|
||||||
|
0xea, 0x53, 0xd0, 0xfc, 0xef, 0xae, 0x2b, 0xeb, 0x8f, 0xc7, 0x69, 0x68, 0xc7, 0xfc, 0x1a,
|
||||||
|
0x1f, 0x41, 0x0d, 0xd0, 0xc1, 0x03, 0xaf, 0xc9, 0xfd, 0xe4, 0x21, 0x43, 0xc4, 0xef, 0xc2,
|
||||||
|
0xdd, 0x7b, 0x73, 0xbc, 0xca, 0xf4, 0xa5, 0x2e, 0x83, 0x90, 0x1f, 0x78, 0x41, 0xc3, 0x13,
|
||||||
|
0x8e, 0x95, 0x0a, 0x57, 0xdf, 0x0a, 0x87, 0x40, 0x2b, 0xd9, 0xba, 0x56, 0x59, 0x9d, 0x2c,
|
||||||
|
0xb2, 0xb8, 0xb3, 0xfb, 0x77, 0x78, 0x3a, 0xef, 0xbf, 0x2d, 0xc8, 0xb9, 0x94, 0x62, 0x47,
|
||||||
|
0x92, 0x98, 0x42, 0x23, 0x07, 0xd9, 0x39, 0x46, 0x5e, 0x6f, 0xe0, 0x46, 0x14, 0x0e, 0x3d,
|
||||||
|
0x74, 0x40, 0x21, 0xb4, 0x67, 0x05, 0xa8, 0xe2, 0x12, 0x93, 0x41, 0xc2, 0x80, 0xb9, 0x56,
|
||||||
|
0x4b, 0xf9, 0x5a, 0x15, 0x9c, 0x37, 0xc4, 0x4b, 0x05, 0xad, 0x5a, 0xaf, 0xa1, 0x3e, 0xe4,
|
||||||
|
0x6e, 0xc5, 0x91, 0xb6, 0x75, 0x7d, 0x1b, 0xe4, 0xc5, 0x4d, 0x28, 0x6b, 0xe9, 0xad, 0x20,
|
||||||
|
0x8b, 0x64, 0x91, 0x57, 0x4f, 0xdf, 0x9a, 0x97, 0x7e, 0xbe, 0x8e, 0xd6, 0xd6, 0x3b, 0x17,
|
||||||
|
0xf9, 0x19, 0x28, 0xb2, 0x2e, 0x8f, 0x26, 0xb4, 0x9b, 0xe5, 0xde, 0x0f, 0x8d, 0x0a, 0x9a,
|
||||||
|
0x9d, 0x1b, 0xde, 0x6f, 0xcb, 0x84, 0xba, 0x26, 0xd0, 0x12, 0xef, 0x30, 0x38, 0x43, 0xac,
|
||||||
|
0xb7, 0xa7, 0xef, 0x09, 0x7c, 0x52, 0x27, 0xfc, 0x2e, 0xab, 0x50, 0xa0, 0x21, 0x40, 0xe7,
|
||||||
|
0xc1, 0x5f, 0x02, 0x41, 0x84, 0xa8, 0x54, 0xa8, 0x2e, 0x37, 0x6f, 0xd8, 0xb1, 0xa4, 0xd0,
|
||||||
|
0x75, 0xef, 0x31, 0xca, 0x54, 0x1e, 0x33, 0xad, 0x19, 0xa1, 0x94, 0xbc, 0x1b, 0x34, 0x6c,
|
||||||
|
0xfb, 0x5f, 0xcc, 0x45, 0x76, 0xc8, 0x96, 0xce, 0x1c, 0x3a, 0x0e, 0x77, 0xed, 0xd8, 0xd2,
|
||||||
|
0x96, 0xac, 0x77, 0x30, 0xe1, 0xef, 0xb0, 0x33, 0xf0, 0x6e, 0x3d, 0xce, 0x5e, 0x6d, 0xde,
|
||||||
|
0x8a, 0xdc, 0x9b, 0x91, 0x63, 0x2a, 0x95, 0x20, 0x0d, 0xfd, 0x78, 0xba, 0xcb, 0x15, 0x43,
|
||||||
|
0xc9, 0x20, 0x96, 0x83, 0x06, 0xd9, 0x11, 0xf3, 0xe2, 0x13, 0xcf, 0x9c, 0x91, 0x7f, 0x33,
|
||||||
|
0x46, 0xa7, 0xe2, 0xd3, 0x75, 0xff, 0x4f, 0x0c, 0x0c, 0xaf, 0xcd, 0xa6, 0x9c, 0xa6, 0x73,
|
||||||
|
0xe2, 0x6d, 0x17, 0x16, 0xb5, 0x99, 0x80, 0x35, 0xd9, 0x61, 0xf3, 0x48, 0x23, 0xff, 0xae,
|
||||||
|
0x53, 0x89, 0xfa, 0x55, 0x1c, 0x37, 0xa5, 0xe8, 0x62, 0x12, 0xb2, 0x22, 0x04, 0xed, 0x42,
|
||||||
|
0xb6, 0x65, 0xc4, 0x41, 0x42, 0x72, 0xca, 0x7e, 0x5e, 0x2f, 0x69, 0x46, 0xef, 0xbd, 0x7e,
|
||||||
|
0xdf, 0x35, 0x1e, 0x5b, 0x77, 0xaf, 0x8d, 0x39, 0xf8, 0xa7, 0xd8, 0x31, 0x00, 0xd3, 0x85,
|
||||||
|
0x66, 0xd5, 0xcd, 0x59, 0xd6, 0x5e, 0x9f, 0xb2, 0x3f, 0x09, 0xd1, 0xc4, 0x5b, 0x74, 0x62,
|
||||||
|
0xd3, 0x30, 0x35, 0xf3, 0xe3, 0x7d, 0x7f, 0xab, 0x38, 0xc2, 0x33, 0x42, 0xd0, 0x67, 0xd0,
|
||||||
|
0xf4, 0xcf, 0x97, 0xec, 0x35, 0x31, 0xfe, 0x94, 0x9c, 0xa1, 0x66, 0x91, 0xc8, 0x05, 0x45,
|
||||||
|
0x19, 0x85, 0x0f, 0x4a, 0xb0, 0x3a, 0x20, 0x44, 0xa4, 0x6b, 0x33, 0x0c, 0xa6, 0xb4, 0x4c,
|
||||||
|
0x46, 0x30, 0x15, 0x2d, 0xbb, 0x04, 0x3c, 0x9d, 0x48, 0xf6, 0x84, 0x9a, 0x62, 0x07, 0xe9,
|
||||||
|
0x6c, 0x8f, 0xde, 0x29, 0x28, 0x5a, 0x17, 0xec, 0x56, 0xf3, 0xc4, 0xe0, 0x86, 0x2f, 0xb5,
|
||||||
|
0x1c, 0x8f, 0xaa, 0xc6, 0xc0, 0xcf, 0x0d, 0xcf, 0x1d, 0x4f, 0xb2, 0xbf, 0x26, 0x5c, 0x7c,
|
||||||
|
0x8d, 0xd3, 0xe4, 0x56, 0xd1, 0xe8, 0x90, 0x94, 0x6a, 0xba, 0x27, 0xba, 0xf7, 0xba, 0x39,
|
||||||
|
0xc8, 0x08, 0x03, 0x25, 0x7f, 0x16, 0x8f, 0x61, 0xbf, 0xdf, 0x45, 0x88, 0x7d, 0x90, 0x80,
|
||||||
|
0x55, 0x58, 0x72, 0x4f, 0xf8, 0xd0, 0x94, 0xbb, 0x55, 0x2a, 0x47, 0x4f, 0xaa, 0x87, 0x2d,
|
||||||
|
0xd4, 0xe7, 0xaf, 0x08, 0x33, 0xc9, 0xec, 0x0b, 0x5b, 0xb8, 0x53, 0x27, 0x2e, 0xfb, 0xad,
|
||||||
|
0x69, 0xb6, 0x53, 0x64, 0x48, 0x13, 0x41, 0xf8, 0x02, 0x06, 0x6f, 0xb8, 0xcc, 0x64, 0xec,
|
||||||
|
0x65, 0x65, 0x7e, 0xdf, 0x3f, 0x1e, 0xe1, 0xee, 0xde, 0x3c, 0x1a, 0xe8, 0x0f, 0xf0, 0x2c,
|
||||||
|
0xea, 0x6e, 0x52, 0x77, 0x34, 0x41, 0xa1, 0xcc, 0x72, 0x8f, 0x6e, 0x9c, 0x3b, 0x8d, 0x39,
|
||||||
|
0xdf, 0xd4, 0x08, 0x24, 0xba, 0x36, 0xc7, 0x09, 0xf2, 0xf1, 0xa2, 0xd1, 0xe0, 0xa3, 0x6a,
|
||||||
|
0x5c, 0xc7, 0xb2, 0x0d, 0x1c, 0xfb, 0x5f, 0xc8, 0x86, 0xd8, 0x3e, 0x1c, 0xb7, 0x1f, 0x2d,
|
||||||
|
0xd8, 0xf2, 0xcd, 0x52, 0xeb, 0xde, 0x50, 0x14, 0xb7, 0xc7, 0xa2, 0x8b, 0x78, 0x70, 0x11,
|
||||||
|
0x87, 0x1a, 0xc5, 0xb8, 0xe5, 0x5e, 0xa5, 0xc9, 0x94, 0x22, 0x66, 0x7b, 0x8b, 0x74, 0xab,
|
||||||
|
0x85, 0x28, 0x95, 0x90, 0x6e, 0x07, 0xdd, 0x79, 0x57, 0xb3, 0x75, 0xc8, 0x18, 0x67, 0x39,
|
||||||
|
0x06, 0x21, 0x55, 0xba, 0xba, 0xda, 0xf9, 0x3b, 0xe9, 0x5d, 0xc9, 0x1f, 0x6f, 0x61, 0x3b,
|
||||||
|
0xc2, 0x7e, 0x3d, 0x07, 0xa6, 0x84, 0x91, 0xb7, 0x63, 0x7e, 0x5f, 0xfc, 0xd1, 0x7d, 0x08,
|
||||||
|
0xdd, 0x79, 0x07, 0xe1, 0x9e, 0x11, 0x25, 0xe8, 0x10, 0x05, 0x66, 0xfa, 0xca, 0xc3, 0x41,
|
||||||
|
0x01, 0x27, 0x54, 0xd2, 0x46, 0xae, 0xe3, 0xff, 0x43, 0xae, 0x8d, 0x0e, 0x31, 0x13, 0x1f,
|
||||||
|
0x95, 0x79, 0x82, 0x86, 0x7e, 0xfb, 0xd4, 0x17, 0x57, 0xb8, 0x25, 0xe7, 0x1d, 0x18, 0x8f,
|
||||||
|
0x06, 0x1a, 0xe5, 0xef, 0x55, 0x28, 0x72, 0x42, 0xae, 0xdf, 0x9e, 0xbb, 0x14, 0xab, 0xd8,
|
||||||
|
0x36, 0x4f, 0x46, 0x4b, 0x35, 0x92, 0x64, 0x6d, 0xbb, 0x60, 0xc2, 0x0b, 0x6f, 0x57, 0x5e,
|
||||||
|
0x3a, 0x8f, 0x3d, 0xcb, 0xe5, 0xda, 0x6c, 0x5c, 0x85, 0x8f, 0x9d, 0xa6, 0x7e, 0x1e, 0x49,
|
||||||
|
0x1a, 0xcc, 0xc9, 0xec, 0x04, 0xab, 0x35, 0xf2, 0x9b, 0xe7, 0xb3, 0x52, 0xb1, 0x1c, 0xc1,
|
||||||
|
0xfe, 0x5c, 0x0b, 0xf5, 0x72, 0x0b, 0xec, 0x8e, 0xcd, 0x67, 0x98, 0xbf, 0xa5, 0x28, 0xca,
|
||||||
|
0x48, 0x9b, 0x60, 0x1c, 0xee, 0x00, 0xde, 0x01, 0xbc, 0xa4, 0x02, 0xd2, 0x19, 0xb6, 0x05,
|
||||||
|
0xd6, 0x52, 0x78, 0xdb, 0x20, 0xbd, 0x3f, 0x95, 0x97, 0xb1, 0x59, 0x3d, 0x9d, 0x83, 0xc2,
|
||||||
|
0xfd, 0x23, 0xa5, 0xfd, 0xd8, 0x20, 0x92, 0x27, 0xee, 0x3c, 0xe9, 0x5a, 0x61, 0x11, 0xe1,
|
||||||
|
0x31, 0xb4, 0x4c, 0xb4, 0xa9, 0xe2, 0x6d, 0x2e, 0xae, 0x5f, 0x37, 0x8e, 0x07, 0xfd, 0xed,
|
||||||
|
0x85, 0x07, 0x79, 0x43, 0x7e, 0xfa, 0xd6, 0x03, 0xe8, 0x5b, 0x65, 0x2a, 0xe4, 0xf9, 0x36,
|
||||||
|
0x9e, 0xff, 0x53, 0x6d, 0x51, 0x50, 0x61, 0x72, 0x18, 0xcd, 0x3d, 0xe4, 0xb6, 0x27, 0x10,
|
||||||
|
0x4a, 0xdd, 0xfd, 0xa3, 0x36, 0x67, 0xac, 0xc7, 0x85, 0x1c, 0xd3, 0xe7, 0x17, 0x74, 0xe2,
|
||||||
|
0x8e, 0xee, 0xa6, 0xf4, 0xb6, 0x86, 0x24, 0xcf, 0x40, 0xdf, 0x35, 0x08, 0x0f, 0x55, 0xdd,
|
||||||
|
0x51, 0xe9, 0x7c, 0x39, 0x78, 0x5c, 0xdf, 0x20, 0x2a, 0xeb, 0xed, 0x35, 0x10, 0x26, 0x98,
|
||||||
|
0x77, 0x69, 0x4e, 0x51, 0x7a, 0xb2, 0x9f, 0x1d, 0xbc, 0x06, 0xcd, 0xcf, 0x4d, 0xb9, 0xfa,
|
||||||
|
0xb7, 0xaf, 0x6a, 0x07, 0x0c, 0x96, 0x42, 0x57, 0x6c, 0x3d, 0xa5, 0xfe, 0x91, 0xe3, 0x76,
|
||||||
|
0x9f, 0xdd, 0x3c, 0x83, 0x25, 0xab, 0x24, 0x89, 0x47, 0x7c, 0xba, 0xd7, 0x7d, 0x72, 0x90,
|
||||||
|
0x80, 0xb0, 0x03, 0xa4, 0xef, 0x04, 0x0a, 0x9e, 0x5a, 0x14, 0x1c, 0xab, 0x75, 0x47, 0x05,
|
||||||
|
0xcb, 0xa2, 0x97, 0x0d, 0x6a, 0xa5, 0x7c, 0xa4, 0x40, 0x90, 0xe2, 0x6c, 0xfa, 0xd4, 0xbd,
|
||||||
|
0x69, 0xd0, 0x06, 0x53, 0x67, 0xfa, 0xe7, 0xcc, 0x06, 0x42, 0x45, 0xbe, 0xbd, 0x6f, 0x3e,
|
||||||
|
0x48, 0x70, 0xf5, 0x2b, 0x83, 0xc7, 0xba, 0x54, 0x9c, 0xab, 0x54, 0x1f, 0x81, 0xe2, 0x11,
|
||||||
|
0x82, 0x51, 0x02, 0x51, 0x63, 0x13, 0x86, 0x38, 0xb1, 0x56, 0x0c, 0x4d, 0x68, 0xf3, 0x53,
|
||||||
|
0x1d, 0xfb, 0xe3, 0x15, 0xe8, 0x42, 0xf3, 0x27, 0x9b, 0xa5, 0x4a, 0x86, 0x90, 0xe1, 0x17,
|
||||||
|
0xdc, 0x99, 0xe2, 0x5c, 0x79, 0xc6, 0x5f, 0x7e, 0x33, 0xc0, 0x41, 0xb6, 0x9e, 0xfc, 0x10,
|
||||||
|
0x8a, 0xf4, 0xfd, 0xe9, 0xd2, 0x52, 0x53, 0x54, 0x89, 0x04, 0xbd, 0x69, 0xd2, 0x54, 0x32,
|
||||||
|
0x96, 0xec, 0x44, 0x08, 0xc3, 0x86, 0x10, 0xd1, 0x3e, 0x32, 0xb5, 0x4f, 0x52, 0x49, 0x58,
|
||||||
|
0x49, 0xf2, 0x8d, 0x83, 0x89, 0xf3, 0x24, 0x83, 0x65, 0x72, 0x53, 0xaf, 0x2d, 0x90, 0x61,
|
||||||
|
0x99, 0x92, 0x31, 0x75, 0x93, 0x46, 0xe5, 0xd3, 0x48, 0x11, 0x01, 0xc9, 0x10, 0x98, 0x66,
|
||||||
|
0x86, 0x79, 0x19, 0x73, 0x7d, 0xda, 0xa1, 0xb0, 0x41, 0x9e, 0xcd, 0xdc, 0xc2, 0x66, 0x86,
|
||||||
|
0xdd, 0xb8, 0xc9, 0xe3, 0xe7, 0x80, 0x96, 0xf5, 0x38, 0x72, 0xa5, 0xda, 0xe5, 0x38, 0x13,
|
||||||
|
0x57, 0x2b, 0xbd, 0x32, 0xc7, 0x44, 0xe0, 0xe3, 0x2d, 0xed, 0x54, 0x40, 0x74, 0x9d, 0x02,
|
||||||
|
0x55, 0x38, 0x45, 0x89, 0x6f, 0x14, 0x40, 0xf6, 0x7b, 0x41, 0x1e, 0x04, 0xdb, 0xa4, 0xd9,
|
||||||
|
0xf3, 0x90, 0xae, 0x10, 0xc9, 0xc3, 0x72, 0x5d, 0x0d, 0x01, 0x51, 0xf1, 0xd1, 0x96, 0x43,
|
||||||
|
0xc6, 0x1a, 0x98, 0x3d, 0xbd, 0xcd, 0xdf, 0x44, 0x82, 0xd0, 0x17, 0xa2, 0x9e, 0x6c, 0x0c,
|
||||||
|
0x2f, 0x46, 0xeb, 0xd8, 0x4a, 0xce, 0xfe, 0xbe, 0xcd, 0xf9, 0xd4, 0xe3, 0x36, 0xf3, 0xd8,
|
||||||
|
0x1c, 0x00, 0x24, 0xf2, 0xac, 0x03, 0x11, 0xb6, 0x18, 0x8f, 0x9c, 0xba, 0xf6, 0x4f, 0xfd,
|
||||||
|
0x78, 0x72, 0x83, 0xbf, 0x3e, 0x5c, 0x24, 0xf9, 0x4d, 0xea, 0x85, 0x74, 0x25, 0xe3, 0x46,
|
||||||
|
0x7b, 0x5e, 0xfe, 0xbd, 0xbf, 0x5e, 0x68, 0x51, 0xe5, 0x53, 0x85, 0x9a, 0x03, 0x4c, 0x09,
|
||||||
|
0xf0, 0x6b, 0xc2, 0x97, 0xfc, 0xcc, 0x96, 0x2c, 0xaf, 0xf7, 0x8c, 0x26, 0xd8, 0xc7, 0xfc,
|
||||||
|
0xda, 0x1f, 0x0e, 0x0f, 0x39, 0x1a, 0xb2, 0x0a, 0x98, 0x1a, 0x15, 0xdc, 0x3e, 0x4b, 0x9e,
|
||||||
|
0x9d, 0x40, 0x3e, 0x71, 0x5b, 0x66, 0xc3, 0x88, 0xf8, 0x57, 0x14, 0x06, 0xc7, 0x2c, 0xcd,
|
||||||
|
0x31, 0x8e, 0x1e, 0x88, 0x79, 0x9f, 0x33, 0x94, 0xea, 0x21, 0x08, 0x0d, 0x35, 0x7d, 0xa2,
|
||||||
|
0x57, 0x46, 0xe3, 0x0f, 0xb9, 0xa9, 0xbc, 0xd2, 0x06, 0xb8, 0xfa, 0xf9, 0xb0, 0xf3, 0xc3,
|
||||||
|
0x8a, 0x38, 0x82, 0x06, 0x7f, 0xd9, 0xce, 0x92, 0xa2, 0x9e, 0xfc, 0x2a, 0xc8, 0x51, 0xb7,
|
||||||
|
0x7d, 0xdb, 0x47, 0x37, 0xaf, 0x8b, 0xb8, 0x6d, 0x70, 0x21, 0x02, 0x63, 0x5e, 0xbd, 0x38,
|
||||||
|
0xf1, 0xe1, 0x9f, 0xe3, 0xe2, 0x79, 0x3b, 0x42, 0x05, 0xe2, 0xc6, 0x13, 0x7a, 0xe2, 0x91,
|
||||||
|
0x73, 0xe2, 0x79, 0x8b, 0x2f, 0x7f, 0x88, 0x02, 0x06, 0x4e, 0xb8, 0x66, 0xb8, 0xc0, 0xc4,
|
||||||
|
0x3b, 0x1c, 0x3e, 0x96, 0x0f, 0xbb, 0x7f, 0xe8, 0x85, 0x5b, 0xb2, 0xf6, 0xa7, 0x48, 0x5b,
|
||||||
|
0x95, 0x83, 0x57, 0xe0, 0xe8, 0x22, 0x67, 0x07, 0x3c, 0x27, 0x65, 0x66, 0xe8, 0x84, 0xab,
|
||||||
|
0xea, 0xf5, 0xb5, 0x00, 0xec, 0xa4, 0xa3, 0xe8, 0x25, 0x77, 0xd1, 0x81, 0x9c, 0x87, 0xd3,
|
||||||
|
0x1a, 0x31, 0x58, 0xa4, 0x0a, 0xa8, 0x71, 0x9c, 0x52, 0x88, 0x4d, 0x50, 0xff, 0xdb, 0x41,
|
||||||
|
0x81, 0x04, 0xc3, 0x84, 0xaa, 0x72, 0x79, 0x2f, 0x9b, 0x2d, 0x2f, 0x1c, 0xa5, 0x6b, 0x68,
|
||||||
|
0x9b, 0x3b, 0x6b, 0x1c, 0x67, 0xeb, 0x42, 0xe0, 0xe3, 0x2c, 0x7b, 0x52, 0x8e, 0xc1, 0x7e,
|
||||||
|
0xd8, 0xab, 0x02, 0x46, 0xd1, 0x83, 0x38, 0x1a, 0x18, 0xad, 0x90, 0x7f, 0xdb, 0x22, 0xc1,
|
||||||
|
0x80, 0xea, 0xf7, 0x67, 0x1d, 0xa7, 0xb2, 0x40, 0xdb, 0xc3, 0xc4, 0xd5, 0x8b, 0x49, 0xf8,
|
||||||
|
0xdc, 0x25, 0x80, 0x7e, 0xfa, 0x64, 0xac, 0x36, 0x4d, 0x74, 0x6f, 0x3e, 0x57, 0x23, 0xb4,
|
||||||
|
0x49, 0x7c, 0x6f, 0x3e, 0x7c, 0xa7, 0x34, 0xb7, 0x6b, 0x66, 0xf8, 0xd1, 0x69, 0x6d, 0x83,
|
||||||
|
0xc5, 0x8a, 0xe2, 0x42, 0x3f, 0x8b, 0x5e, 0x5a, 0xd5, 0xcd, 0x47, 0x64, 0xeb, 0x4e, 0xef,
|
||||||
|
0x62, 0x19, 0x37, 0xd3, 0x8e, 0x68, 0x51, 0x4a, 0x96, 0xbb, 0x5b, 0xa0, 0x34, 0xd8, 0xb4,
|
||||||
|
0xf4, 0xb0, 0x99, 0x53, 0xb1, 0x70, 0xc3, 0x1d, 0x6e, 0x2b, 0x03, 0x76, 0xc9, 0x00, 0x0b,
|
||||||
|
0x10, 0xca, 0xb7, 0xf3, 0xbe, 0x4b, 0xe2, 0xb4, 0x6c, 0x4a, 0x9f, 0x59, 0x39, 0x30, 0xc7,
|
||||||
|
0xc3, 0x88, 0x38, 0x63, 0xc4, 0xcf, 0xd1, 0xfd, 0xf0, 0x6d, 0xfe, 0x68, 0x92, 0x98, 0x11,
|
||||||
|
0x7d, 0x90, 0x0c, 0x64, 0x23, 0xe8, 0x25, 0x77, 0xd1, 0x81, 0x75, 0xa4, 0xf4, 0x35, 0x6f,
|
||||||
|
0xe4, 0x9c, 0x7a, 0x48, 0xd0, 0xde, 0x37, 0x42, 0xf8, 0x5b, 0xe9, 0x16, 0xba, 0x16, 0x4b,
|
||||||
|
0x7c, 0xdb, 0x2c, 0x0e, 0xa0, 0xbc, 0x5c, 0x82, 0x71, 0xa0, 0x9d, 0x3a, 0x0a, 0x7e, 0xd0,
|
||||||
|
0xdc, 0x93, 0x79, 0xf6, 0x78, 0xb5, 0x89, 0xd9, 0x70, 0x5d, 0xe0, 0x9d, 0xe7, 0xea, 0xee,
|
||||||
|
0x88, 0x52, 0x18, 0x11, 0x7d, 0xf1, 0xce, 0xc1, 0x69, 0x8d, 0x3f, 0xea, 0x51, 0xc1, 0x49,
|
||||||
|
0xb1, 0xc4, 0xa6, 0xf0, 0xdc, 0xbd, 0x61, 0xb7, 0x2c, 0x85, 0x4a, 0xcb, 0xdd, 0x96, 0x50,
|
||||||
|
0x8b, 0x68, 0xf7, 0x7e, 0xb9, 0x1c, 0x19, 0xfb, 0x5c, 0x79, 0xf8, 0x7d, 0xe9, 0xf3, 0x0e,
|
||||||
|
0xc7, 0x6e, 0x1c, 0x67, 0xb4, 0xb7, 0x4a, 0xc5, 0xbe, 0x3c, 0x8c, 0x94, 0x36, 0x02, 0x8f,
|
||||||
|
0x81, 0x57, 0xe7, 0x4b, 0xd6, 0x2b, 0x10, 0xbe, 0x3c, 0x97, 0xbb, 0x41, 0x88, 0x6f, 0x13,
|
||||||
|
0xe6, 0x27, 0x13, 0x4b, 0xd5, 0x44, 0xa9, 0xd9, 0x2d, 0xcd, 0x51, 0x91, 0x03, 0x14, 0xd5,
|
||||||
|
0x6b, 0x3d, 0xb5, 0x98, 0xf0, 0x09, 0xaa, 0x42, 0x8e, 0x82, 0xe8, 0xf1, 0x36, 0xec, 0xb5,
|
||||||
|
0x48, 0x5f, 0x9f, 0xca, 0x16, 0x5a, 0x3f, 0x4d, 0xbb, 0xa6, 0xd4, 0x08, 0x1a, 0xfb, 0xe5,
|
||||||
|
0xeb, 0x40, 0x04, 0xe8, 0x40, 0x84, 0xc4, 0x8e, 0x74, 0xae, 0x47, 0x4d, 0xfc, 0xb5, 0x91,
|
||||||
|
0xe2, 0x33, 0xf2, 0xf7, 0xae, 0xcd, 0x10, 0x47, 0xb1, 0x4b, 0xe2, 0xa2, 0x8d, 0x7c, 0x2c,
|
||||||
|
0x32, 0x6f, 0xdd, 0xc4, 0xc2, 0xf1, 0x09, 0x56, 0x2d, 0x1e, 0x9d, 0x7d, 0x67, 0x32, 0x61,
|
||||||
|
0x7f, 0x12, 0xe4, 0x3f, 0xfa, 0xe2, 0x7d, 0x7b, 0xd4, 0x67, 0x4e, 0x7f, 0x14, 0x6a, 0x6c,
|
||||||
|
0x8e, 0x74, 0x9b, 0xbc, 0x3d, 0xc4, 0x70, 0xc4, 0x37, 0xd5, 0x60, 0xe0, 0x87, 0xbd, 0xb8,
|
||||||
|
0x1a, 0x75, 0x9d, 0x7a, 0x80, 0xc1, 0xa9, 0x1f, 0xad, 0x7b, 0x27, 0xe5, 0x4c, 0xb0, 0x06,
|
||||||
|
0xd0, 0xfb, 0x1c, 0x5a, 0xeb, 0xbd, 0x2e, 0x96, 0x49, 0x13, 0x43, 0x06, 0x8b, 0xcb, 0x6a,
|
||||||
|
0xf0, 0x5d, 0x56, 0x6c, 0x4e, 0x18, 0x26, 0xd4, 0xc8, 0x53, 0x48, 0x70, 0xe2, 0x0f, 0x9c,
|
||||||
|
0xa1, 0x35, 0x01, 0x96, 0xc7, 0x0b, 0xc9, 0x4b, 0xd3, 0x19, 0xe8, 0x5a, 0x75, 0xad, 0xc8,
|
||||||
|
0x52, 0xce, 0x3c, 0x2e, 0xfd, 0x5f, 0x04, 0xcf, 0x9e, 0xd6, 0x33, 0xdb, 0x08, 0x34, 0xba,
|
||||||
|
0x34, 0x9b, 0xf4, 0x25, 0xaa, 0x7f, 0x52, 0x37, 0x4f, 0x8b, 0x94, 0x95, 0x94, 0x2d, 0x88,
|
||||||
|
0x10, 0xd1, 0x05, 0x07, 0xcf, 0xd4, 0x04, 0xdb, 0x95, 0xbe, 0x36, 0xd0, 0x1c, 0x1c, 0xa4,
|
||||||
|
0x85, 0x0a, 0x02, 0x80, 0xde, 0xb1, 0x1b, 0x56, 0xaf, 0x51, 0x22, 0xa7, 0xa4, 0x4a, 0x2c,
|
||||||
|
0x2f, 0x17, 0x7c, 0x13, 0x4c, 0x36, 0xad, 0x90, 0x8c, 0xea, 0xd4, 0x58, 0x3a, 0xca, 0xea,
|
||||||
|
0x1d, 0x5c, 0x6c, 0x93, 0xad, 0x59, 0xed, 0xb1, 0x17, 0xa4, 0x22, 0x95, 0x67, 0xbe, 0xbb,
|
||||||
|
0x25, 0xaf, 0x65, 0xc8, 0xe5, 0x90, 0xe1, 0x17, 0xdc, 0x7a, 0x47, 0xe9, 0x8f, 0xc3, 0xc3,
|
||||||
|
0x5a, 0xdc, 0x20, 0x20, 0x4a, 0x09, 0xfc, 0x39, 0x51, 0x29, 0x31, 0xfb, 0xa0, 0x0a, 0x61,
|
||||||
|
0x08, 0x9b, 0xb9, 0xb3, 0x6c, 0x95, 0xc5, 0x94, 0x00, 0x66, 0xf1, 0xb9, 0x79, 0x90, 0x7f,
|
||||||
|
0x95, 0x5f, 0x55, 0xe1, 0x13, 0x6b, 0x87, 0xa8, 0x62, 0x21, 0x98, 0xf2, 0x57, 0x19, 0x92,
|
||||||
|
0x10, 0xb3, 0x24, 0x81, 0x12, 0x21, 0xff, 0xd6, 0xf9, 0x73, 0x71, 0xc2, 0x62, 0x09, 0x31,
|
||||||
|
0xeb, 0xe0, 0x7a, 0x35, 0x60, 0x8d, 0xc9, 0xb1, 0xe5, 0xa7, 0x8b, 0xca, 0xbc, 0x2d, 0xfa,
|
||||||
|
0x63, 0xc7, 0x68, 0x1d, 0x19, 0xb5, 0x61, 0x78, 0xd0, 0x8b, 0xdb, 0xc0, 0x39, 0x22, 0x55,
|
||||||
|
0x6a, 0x28, 0xc2, 0x52, 0x1e, 0x6b, 0xf7, 0x1d, 0xb6, 0xfa, 0x4f, 0xcf, 0x27, 0x7c, 0xaf,
|
||||||
|
0x7f, 0x0c, 0x96, 0xba, 0xce, 0x2a, 0x54, 0x59, 0x5b, 0x20, 0xfb, 0x42, 0x87, 0x44, 0xd9,
|
||||||
|
0x2e, 0x10, 0x43, 0xab, 0x58, 0x92, 0xb6, 0x8d, 0x78, 0xf3, 0xa3, 0xde, 0x0e, 0x07, 0x75,
|
||||||
|
0x68, 0x52, 0x26, 0x3f, 0x3d, 0xec, 0xd0, 0x36, 0xdf, 0x1a, 0x16, 0x88, 0x5f, 0xbd, 0x1c,
|
||||||
|
0x4d, 0x9e, 0x27, 0x4c, 0x12, 0x07, 0x0d, 0x2b, 0xb1, 0xdc, 0x00, 0x45, 0x54, 0x3d, 0xfc,
|
||||||
|
0xcf, 0xfa, 0xc9, 0x06, 0x4b, 0x08, 0x64, 0xac, 0x8d, 0x17, 0x4d, 0xdf, 0x83, 0x24, 0xfb,
|
||||||
|
0xf6, 0x9e, 0x5f, 0xf9, 0x0f, 0x8d, 0x07, 0x18, 0xb1, 0xb2, 0x37, 0xd2, 0x66, 0x9c, 0x82,
|
||||||
|
0x09, 0x75, 0x52, 0x5b, 0x19, 0x74, 0x59, 0xa3, 0x64, 0x6d, 0x17, 0x93, 0x3a, 0x13, 0xd2,
|
||||||
|
0xda, 0x97, 0xa4, 0x2b, 0x55, 0x7a, 0x32, 0xf9, 0x2f, 0x9b, 0xaa, 0x87, 0x6d, 0xce, 0x1d,
|
||||||
|
0x07, 0x9a, 0x52, 0xfa, 0x40, 0xc5, 0x20, 0x43, 0xcc, 0xa8, 0xc3, 0x84, 0x2c, 0x44, 0x8b,
|
||||||
|
0x44, 0x88, 0x62, 0xe7, 0x68, 0x4c, 0x2a, 0x69, 0xa7, 0xcf, 0x6f, 0x4d, 0x06, 0xed, 0x8a,
|
||||||
|
0x8f, 0x9a, 0x62, 0xca, 0xed, 0xa5, 0x57, 0x18, 0x86, 0x9d, 0xe8, 0x7c, 0x14, 0xeb, 0x71,
|
||||||
|
0xeb, 0xc0, 0xf4, 0x3a, 0x98, 0x11, 0x01, 0xc0, 0xa3, 0x53, 0xaf, 0x20, 0x7e, 0xde, 0x22,
|
||||||
|
0x5c, 0x1f, 0x60, 0x8b, 0xb7, 0x5f, 0x74, 0x76, 0xd0, 0x87, 0xfa, 0x11, 0xd3, 0xa5, 0xba,
|
||||||
|
0x5c, 0x82, 0xe1, 0x52, 0x54, 0x6b, 0x69, 0xeb, 0x31, 0x43, 0x01, 0x1a, 0x55, 0x7f, 0xdc,
|
||||||
|
0x2f, 0xd8, 0x01, 0x26, 0x6f, 0x1c, 0x2d, 0x72, 0x7b, 0xc8, 0x93, 0x99, 0x2a, 0x08, 0xa8,
|
||||||
|
0x6f, 0xb4, 0x28, 0x40, 0x8a, 0x8a, 0x4e, 0xd5, 0x3b, 0x39, 0x45, 0xa8, 0xe4, 0xe7, 0x73,
|
||||||
|
0x8f, 0x00, 0x64, 0xd3, 0xc7, 0x87, 0xde, 0x43, 0x82, 0x2c, 0xe8, 0x57, 0x17, 0x29, 0xce,
|
||||||
|
0xb8, 0x47, 0xd6, 0x08, 0x79, 0xd7, 0xc4, 0xe9, 0x23, 0x43, 0x9d, 0xb8, 0xcb, 0x78, 0x08,
|
||||||
|
0x32, 0xf1, 0xec, 0x84, 0x80, 0x1e, 0xb9, 0x29, 0x12, 0x0c, 0x29, 0xcc, 0x9c, 0xd0, 0x10,
|
||||||
|
0xa7, 0xd6, 0x8a, 0xe9, 0xf6, 0xfa, 0x8d, 0x7e, 0x95, 0x2e, 0x57, 0xcf, 0x8e, 0x38, 0x6b,
|
||||||
|
0x35, 0xf0, 0xbc, 0xa6, 0x4e, 0x13, 0x7b, 0x41, 0x19, 0x15, 0x5d, 0x99, 0xbd, 0x22, 0x40,
|
||||||
|
0x6a, 0x07, 0x2d, 0xd5, 0xd6, 0xff, 0x1d, 0x7b, 0xa6, 0xc4, 0xaa, 0x77, 0x44, 0x78, 0x2f,
|
||||||
|
0x55, 0x9f, 0x7d, 0x53, 0xf0, 0x2b, 0x2b, 0xba, 0x36, 0xc2, 0xf8, 0x6d, 0xf0, 0x2b, 0xbb,
|
||||||
|
0x6b, 0x97, 0x05, 0xb4, 0x4a, 0xc2, 0x86, 0x62, 0xb8, 0x76, 0xe7, 0xbb, 0xdf, 0x9c, 0x5a,
|
||||||
|
0x70, 0x19, 0x95, 0x59, 0x15, 0xcf, 0xa6, 0xa9, 0x7a, 0x24, 0x4c, 0xc6, 0x65, 0xb9, 0xda,
|
||||||
|
0x17, 0x6f, 0x2b, 0x55, 0x07, 0x32, 0x72, 0xd1, 0xee, 0x9c, 0x3a, 0x51, 0x98, 0x36, 0x37,
|
||||||
|
0xf8, 0x61, 0xfc, 0x91, 0xbc, 0xcb, 0x34, 0xd8, 0x43, 0xa0, 0x7a, 0xea, 0xc4, 0x8a, 0x64,
|
||||||
|
0x4d, 0xe0, 0x03, 0x93, 0xfb, 0xb4, 0xd8, 0x11, 0x21, 0x11, 0x66, 0x97, 0xb9, 0xba, 0x81,
|
||||||
|
0x29, 0xc2, 0x8f, 0x8c, 0x14, 0x18, 0x22, 0x94, 0xc4, 0xb0, 0xf1, 0x10, 0xc4, 0x8b, 0x5d,
|
||||||
|
0x8d, 0x7f, 0x14, 0xaf, 0x46, 0x19, 0x36, 0xa4, 0x36, 0x22, 0x18, 0x18, 0xe3, 0xab, 0x2c,
|
||||||
|
0x91, 0x03, 0xf7, 0xc5, 0xf5, 0xf5, 0x59, 0xc2, 0xd2, 0xf7, 0xc7, 0x64, 0x54, 0x76, 0xfb,
|
||||||
|
0x71, 0x70, 0xe8, 0xb2, 0x44, 0xa1, 0x2d, 0x59, 0x17, 0x02, 0xd6, 0x6f, 0x7a, 0xeb, 0xe0,
|
||||||
|
0x53, 0x81, 0xf6, 0x5e, 0x7f, 0x37, 0xd4, 0x52, 0x13, 0x04, 0x44, 0xd5, 0xc8, 0xd3, 0xdd,
|
||||||
|
0x6f, 0xd5, 0xfb, 0x71, 0x20, 0xe3, 0x0d, 0x0c, 0x47, 0x25, 0xa1, 0x41, 0xd2, 0xc7, 0xe5,
|
||||||
|
0xc9, 0xd9, 0x27, 0xa5, 0x38, 0xe4, 0x30, 0xbb, 0x86, 0x07, 0x84, 0xef, 0x24, 0x9f, 0xf9,
|
||||||
|
0x52, 0x74, 0xd2, 0x50, 0x73, 0xc4, 0x27, 0x73, 0x3b, 0x8d, 0x9c, 0xa6, 0xf6, 0x4b, 0x25,
|
||||||
|
0x91, 0xc5, 0x9e, 0x1e, 0xb2, 0x78, 0x0c, 0x23, 0x80, 0xdd, 0xa3, 0x21, 0xf5, 0xa9, 0x9e,
|
||||||
|
0x00, 0x16, 0x19, 0xbc, 0xd9, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, 0x3d, 0xf8, 0x72, 0x66,
|
||||||
|
0x2f, 0xdc, 0x3a, 0xf6, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x27, 0xcc, 0xfb, 0x55, 0x09, 0x71,
|
||||||
|
0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xd0, 0x22, 0xc6, 0xef, 0x5c, 0x1b,
|
||||||
|
0xb4, 0xea, 0x56, 0x2e, 0xbf, 0xfc, 0x5b, 0x34, 0xcb, 0x14, 0x8b, 0x94, 0xaa, 0xb7, 0xec,
|
||||||
|
0x5a, 0x36, 0xcf, 0x1c, 0xba, 0xf6, 0x4d, 0xdb, 0x35, 0xf3 };
|
||||||
@@ -0,0 +1,255 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Alexander Tulloh
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xCA49
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Alexander Tulloh
|
||||||
|
#define PRODUCT Oddball
|
||||||
|
#define DESCRIPTION A ballin keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { F6, B5, B6, F7 }
|
||||||
|
#define MATRIX_COL_PINS { D6, D7, B4, D3, C6, C7 }
|
||||||
|
#define UNUSED_PINS { B7, D4, D5, E6, F0, F1, F4, F5 }
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
#define USE_I2C
|
||||||
|
#define SPLIT_USB_DETECT
|
||||||
|
#define MASTER_RIGHT
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
// #define RGB_DI_PIN E2
|
||||||
|
// #ifdef RGB_DI_PIN
|
||||||
|
// #define RGBLED_NUM 16
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
// #define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Oddball",
|
||||||
|
"url": "https://atulloh.github.io/oddball",
|
||||||
|
"maintainer": "Alexander Tulloh",
|
||||||
|
"width": 14,
|
||||||
|
"height": 4.75,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"sw1", "x":0, "y":0.37}, {"label":"sw2", "x":1, "y":0.37}, {"label":"sw3", "x":2, "y":0.12}, {"label":"sw4", "x":3, "y":0}, {"label":"sw5", "x":4, "y":0.12}, {"label":"sw6", "x":5, "y":0.25},
|
||||||
|
{"label":"sw6", "x":8 , "y":0.25}, {"label":"sw5", "x":9 , "y":0.12}, {"label":"sw4", "x":10, "y":0}, {"label":"sw3", "x":11, "y":0.12}, {"label":"sw2", "x":12, "y":0.37}, {"label":"sw1", "x":13, "y":0.37},
|
||||||
|
{"label":"sw7", "x":0, "y":1.37}, {"label":"sw8", "x":1, "y":1.37}, {"label":"sw9", "x":2, "y":1.12}, {"label":"sw10", "x":3, "y":1}, {"label":"sw11", "x":4, "y":1.12}, {"label":"sw12", "x":5, "y":1.25},
|
||||||
|
{"label":"sw12", "x":8, "y":1.25}, {"label":"sw11", "x":9, "y":1.12}, {"label":"sw10", "x":10, "y":1}, {"label":"sw9", "x":11, "y":1.12}, {"label":"sw8", "x":12, "y":1.37}, {"label":"sw7", "x":13, "y":1.37},
|
||||||
|
{"label":"sw13", "x":0, "y":2.37}, {"label":"sw14", "x":1, "y":2.37}, {"label":"sw15", "x":2, "y":2.12}, {"label":"sw16", "x":3, "y":2}, {"label":"sw17", "x":4, "y":2.12}, {"label":"sw18", "x":5, "y":2.25},
|
||||||
|
{"label":"sw18", "x":8, "y":2.25}, {"label":"sw17", "x":9, "y":2.12}, {"label":"sw16", "x":10, "y":2}, {"label":"sw15", "x":11, "y":2.12}, {"label":"sw14", "x":12, "y":2.37}, {"label":"sw13", "x":13, "y":2.37},
|
||||||
|
{"label":"sw19", "x":4.5, "y":3.5, "h":1.25}, {"label":"sw20", "x":5.5, "y":3.5, "h":1.25},
|
||||||
|
{"label":"sw20", "x":7.5, "y":3.5, "h":1.25}, {"label":"sw19", "x":8.5, "y":3.5, "h":1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2020 Alexander Tulloh
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_BSPC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB,
|
||||||
|
KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_SPC,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
MO(_LOWER), KC_LCTL, _______, MO(_RAISE)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
KC_DEL, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_BTN3, KC_DQUO, KC_7, KC_8, KC_9, KC_ASTR, KC_UNDS,
|
||||||
|
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_QUOT, KC_4, KC_5, KC_6, KC_PLUS, KC_ENT,
|
||||||
|
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_0, KC_1, KC_2, KC_3, KC_MINS, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
_______, KC_ESC, KC_F7, KC_F9, KC_F9, KC_F10, KC_PIPE, KC_PGUP, KC_UP, KC_PGDN, KC_GRAVE, _______,
|
||||||
|
_______, KC_LGUI, KC_F4, KC_F5, KC_F6, KC_F11, KC_AMPR, KC_LEFT, KC_DOWN, KC_RGHT, KC_TILD, _______,
|
||||||
|
_______, KC_INS, KC_F1, KC_F2, KC_F3, KC_F12, KC_EQUAL, KC_HOME, _______, KC_END, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 Alexander Tulloh
|
||||||
|
*
|
||||||
|
* 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 "oddball.h"
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2020 Alexander Tulloh
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
LT1, LT2, RT1, RT2 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, LT1, LT2 }, \
|
||||||
|
{ R05, R04, R03, R02, R01, R00 }, \
|
||||||
|
{ R15, R14, R13, R12, R11, R10 }, \
|
||||||
|
{ R25, R24, R23, R22, R21, R20 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, RT2, RT1 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Oddball
|
||||||
|
|
||||||
|
A split keyboard with trackball support.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Alexander Tulloh](https://github.com/atulloh)
|
||||||
|
* Hardware Supported: Oddball PCB and plates, and using an [ADNS9800 and breakout board for mouse](https://www.tindie.com/products/jkicklighter/adns-9800-laser-motion-sensor/)
|
||||||
|
* Hardware Availability: [atulloh.github.io/oddball](https://atulloh.github.io/oddball)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make oddball:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = halfkay
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
|
||||||
|
DEBOUNCE_TYPE = eager_pk
|
||||||
|
SPLIT_KEYBOARD = yes
|
||||||
|
|
||||||
|
# Add trackball support
|
||||||
|
POINTING_DEVICE_ENABLE = yes
|
||||||
|
SRC += adns.c
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
#undef ONESHOT_TIMEOUT
|
||||||
|
#define ONESHOT_TIMEOUT 1500
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "danielo515.h"
|
||||||
|
|
||||||
|
// Shortcut to make keymap more readable
|
||||||
|
# define SYM_L OSL(_SYMB)
|
||||||
|
|
||||||
|
# define KC_ALAS LALT_T(KC_PAST) // alt or keypad *
|
||||||
|
# define KC_CTPL LCTL_T(KC_BSLS) // <C-\>
|
||||||
|
|
||||||
|
# define KC_NAGR LT(_NAV, KC_GRV)
|
||||||
|
# define KC_NAMI LT(_NAV, KC_MINS)
|
||||||
|
# define AD_ESC LT(_ADJUST, KC_ESC)
|
||||||
|
# define NAV_SPC LT(_NAV, KC_SPACE)
|
||||||
|
|
||||||
|
# define KC_ADPU LT(_ADJUST, KC_PGUP)
|
||||||
|
# define WIN_LEFT WIN_TO_LEFT
|
||||||
|
# define WIN_RIGHT WIN_TO_RIGHT
|
||||||
|
# define COPY_CUT TD(COPY_CUT)
|
||||||
|
# define TD_PASTE TD(PASTE_DANCE)
|
||||||
|
# define CTL OSM(MOD_LCTL)
|
||||||
|
# define ALT OSM(MOD_LALT)
|
||||||
|
# define GUI OSM(MOD_LGUI)
|
||||||
|
# define ENT_SYM LT(_SYMB, KC_ENT)
|
||||||
|
# define __S LT(_S,KC_S)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_DQUO ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD_PASTE, ALT_TAB ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,SFT_MINS,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
SHIFT ,KC_A ,__S ,FN_D ,FN_F ,KC_G ,COPY_CUT, KC_UNDS ,HYPR_H ,ALT_J ,CTL_K ,KC_L ,TD_CLN ,CMD_QUOT,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_BSLS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DEL ,KC_PGDN , ALT_TAB ,AD_ESC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ASTR ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
CTL ,ALT ,KC_LEFT ,KC_RIGHT, GUI , SHIFT ,KC_BSPC , KC_LEAD ,NAV_SPC , ENT_SYM, KC_LBRC ,KC_RBRC ,KC_DOWN ,KC_UP
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
),
|
||||||
|
|
||||||
|
[_SYMB] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______ ,KC_EXLM ,KC_DLR ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_PMNS ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______ ,KC_AT ,KC_DLR , KC_LPRN, KC_RPRN,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_BSPC ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,_______ ,_______ , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX,SFT_LEFT,SFT_RIGHT,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,KC_HOME ,CTL_LEFT,CTL_RIGHT,XXXXXXX,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,WIN_LEFT,WIN_RIGHT
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
),
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,RESET ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_F12 ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_MUTE ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
),
|
||||||
|
[_F] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,ALL_WIN ,EXPOSE ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
),
|
||||||
|
[_D] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F12 ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_PMNS ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_BSPC ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
),
|
||||||
|
[_S] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_LT ,KC_GT ,XXXXXXX ,XXXXXXX , XXXXXXX ,KC_HASH ,KC_LCBR ,KC_RCBR ,KC_ASTR ,KC_PERC ,KC_DLR ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,_______ ,KC_EQL ,F_ARROW ,KC_GRAVE,XXXXXXX , XXXXXXX ,KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_PLUS ,KC_PIPE ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_CIRC ,KC_DLR ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH,IARROW ,
|
||||||
|
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , XXXXXXX ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
|
||||||
|
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void alt_tab_activated(void){
|
||||||
|
layer_on(_NAV);
|
||||||
|
};
|
||||||
|
void alt_tab_deactivated(void){
|
||||||
|
layer_off(_NAV);
|
||||||
|
};
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
switch (get_highest_layer(state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
set_led_off;
|
||||||
|
break;
|
||||||
|
case _SYMB:
|
||||||
|
case _D:
|
||||||
|
set_led_green;
|
||||||
|
break;
|
||||||
|
case _NAV:
|
||||||
|
set_led_blue;
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
set_led_red;
|
||||||
|
break;
|
||||||
|
case _S:
|
||||||
|
set_led_magenta;
|
||||||
|
break;
|
||||||
|
case _F:
|
||||||
|
set_led_white;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Danielo keymap for Redox Wireless
|
||||||
|
Most of the custom functionality is on my user-space `users/danielo515`
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
|
||||||
|
COMBO_ENABLE = yes
|
||||||
|
LEADER_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
LTO_ENABLE = yes # link time optimizations
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define DEFAULT_LAYER 0
|
||||||
|
#define HHKB_NAV_LAYER 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[DEFAULT_LAYER] = LAYOUT_hhkb_arrow(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, _______, KC_MENU, KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
[HHKB_NAV_LAYER] = LAYOUT_hhkb_arrow(
|
||||||
|
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, KC_INS, KC_DEL,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_DEL,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_ENT,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# cijanzen's keymap for the Bananasplit
|
||||||
|
## Layout Notes
|
||||||
|
|
||||||
|
Split right shift and split backspace. Second layer follows HHKB layer 2 layout.
|
||||||
|
|
||||||
|
Base layer:
|
||||||
|
```
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] |Backspace|
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn1 |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| Ctrl | GUI | Alt | Space | Alt | GUI | App | Ctrl |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
```
|
||||||
|
|
||||||
|
Fn1 layer:
|
||||||
|
|
||||||
|
```
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
|Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| | | | | | | | |Pscr |Slck |Paus | Up | | Del |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| | | | | | | | |Home |PgUp |Left |Right| Enter |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| | | | | | | | |End |PgDn |Down | | |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
| | | | | | | | |
|
||||||
|
-------------------------------------------------------------------------------------------
|
||||||
|
```
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
"""Generate a keymap.c from a configurator export.
|
"""Generate a keymap.c from a configurator export.
|
||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
|
||||||
@@ -9,7 +8,7 @@ import qmk.keymap
|
|||||||
import qmk.path
|
import qmk.path
|
||||||
|
|
||||||
|
|
||||||
@cli.argument('-o', '--output', arg_only=True, type=Path, help='File to write to')
|
@cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to')
|
||||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||||
@cli.argument('filename', arg_only=True, help='Configurator JSON file')
|
@cli.argument('filename', arg_only=True, help='Configurator JSON file')
|
||||||
@cli.subcommand('Creates a keymap.c from a QMK Configurator export.')
|
@cli.subcommand('Creates a keymap.c from a QMK Configurator export.')
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#include "danielo515.h"
|
||||||
|
#include "alt_tab.h"
|
||||||
|
|
||||||
|
bool altPressed = false;
|
||||||
|
__attribute__((weak)) void alt_tab_activated(void){};
|
||||||
|
__attribute__((weak)) void alt_tab_deactivated(void){};
|
||||||
|
extern bool onMac;
|
||||||
|
|
||||||
|
// =============== ALT_TAB single key handling
|
||||||
|
bool process_alt_tab(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case ALT_TAB:
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (altPressed) {
|
||||||
|
tap_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
altPressed = true;
|
||||||
|
onMac ? register_code(KC_LGUI) : register_code(KC_LALT);
|
||||||
|
tap_code(KC_TAB);
|
||||||
|
alt_tab_activated();
|
||||||
|
}
|
||||||
|
// avoid alt releasing if the key is of movement
|
||||||
|
case KC_RIGHT ... KC_UP:
|
||||||
|
if (altPressed) {
|
||||||
|
return true; // yes QMK, do your stuff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Reset sticky alt tab when any other key is pressed
|
||||||
|
if (altPressed) {
|
||||||
|
onMac ? unregister_code(KC_LGUI) : unregister_code(KC_LALT);
|
||||||
|
altPressed = false;
|
||||||
|
alt_tab_deactivated();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
bool process_alt_tab(uint16_t keycode, keyrecord_t *record);
|
||||||
+25
-10
@@ -1,21 +1,36 @@
|
|||||||
#include "combo.h"
|
#include "combo.h"
|
||||||
|
|
||||||
enum combos {
|
enum combos {
|
||||||
JK_ESC,
|
JK_ESC,
|
||||||
YU_COM,
|
YU_COM,
|
||||||
UI_COM,
|
UI_COM,
|
||||||
IO_COM,
|
IO_COM,
|
||||||
OP_COM,
|
QW_COM,
|
||||||
QW_COM
|
COM_SLS,
|
||||||
|
COM_DOT,
|
||||||
|
M_COMM,
|
||||||
|
N_M,
|
||||||
|
OP_COM,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END};
|
const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END};
|
||||||
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||||
const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END};
|
const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END};
|
||||||
const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END};
|
const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END};
|
||||||
|
const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END};
|
||||||
|
const uint16_t PROGMEM com_sls[] = {KC_COMMA, KC_SLSH, COMBO_END};
|
||||||
|
const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END};
|
||||||
|
const uint16_t PROGMEM m_comm[] = {KC_M,KC_COMMA, COMBO_END};
|
||||||
|
const uint16_t PROGMEM n_m[] = {KC_N, KC_M,COMBO_END};
|
||||||
|
|
||||||
combo_t key_combos[COMBO_COUNT] = {
|
combo_t key_combos[COMBO_COUNT] = {
|
||||||
[JK_ESC] = COMBO(jk_combo, KC_ESC),
|
[JK_ESC] = COMBO(jk_combo, KC_ESC),
|
||||||
[YU_COM] = COMBO(yu_combo, KC_CIRC),
|
[YU_COM] = COMBO(yu_combo, KC_CIRC),
|
||||||
[UI_COM] = COMBO(ui_combo, KC_ESC),
|
[UI_COM] = COMBO(ui_combo, KC_DLR),
|
||||||
[IO_COM] = COMBO(io_combo, KC_TILD)
|
[IO_COM] = COMBO(io_combo, KC_TILD),
|
||||||
|
[QW_COM] = COMBO(qw_combo, KC_AT),
|
||||||
|
[COM_SLS] = COMBO(com_sls, KC_QUES),
|
||||||
|
[COM_DOT] = COMBO(com_dot, KC_QUES),
|
||||||
|
[M_COMM] = COMBO(m_comm, KC_ESC),
|
||||||
|
[N_M] = COMBO(n_m, KC_DLR),
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(COMBO_ENABLE)
|
#if defined(COMBO_ENABLE)
|
||||||
#define COMBO_COUNT 4
|
#define COMBO_COUNT 9
|
||||||
#define COMBO_TERM 50
|
#define COMBO_TERM 40
|
||||||
#endif // !COMBO_ENABLE
|
#endif // !COMBO_ENABLE
|
||||||
|
// Timeout settings for leader key
|
||||||
|
#undef LEADER_TIMEOUT
|
||||||
|
#define LEADER_TIMEOUT 350
|
||||||
|
#define LEADER_PER_KEY_TIMING
|
||||||
+74
-360
@@ -1,373 +1,87 @@
|
|||||||
#include "danielo515.h"
|
#include "danielo515.h"
|
||||||
|
|
||||||
bool onMac = true;
|
bool onMac = true;
|
||||||
// Send control or GUI depending if we are on windows or mac
|
|
||||||
bool CMD(uint16_t kc) {
|
|
||||||
if(onMac){ tap_code16(LGUI(kc)); } else { tap_code16(LCTL(kc)); }
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//**************** Handle keys function *********************//
|
|
||||||
bool altPressed = false;
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
|
||||||
{
|
|
||||||
bool pressed = record->event.pressed;
|
|
||||||
if(pressed){
|
|
||||||
refresh_incremental_macros(keycode);
|
|
||||||
if(process_incremental_macro(keycode)){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(is_macro(keycode)){
|
|
||||||
return handle_macro(keycode);
|
|
||||||
}
|
|
||||||
switch (keycode) {
|
|
||||||
case MAC_TGL:
|
|
||||||
onMac = !onMac;
|
|
||||||
onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (keycode)
|
|
||||||
{
|
|
||||||
case QWERTY:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_qwerty);
|
|
||||||
#endif
|
|
||||||
layer_on(_QWERTY);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
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;
|
|
||||||
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;
|
|
||||||
case ADJUST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_ADJUST);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
// == Macros START ===
|
|
||||||
case ARROW:
|
|
||||||
if (record->event.pressed) SEND_STRING("->");
|
|
||||||
return false;
|
|
||||||
case F_ARROW:
|
|
||||||
if (record->event.pressed) SEND_STRING("=>");
|
|
||||||
return false;
|
|
||||||
case GREP:
|
|
||||||
if (record->event.pressed) SEND_STRING(" | grep "); return false;
|
|
||||||
// == Macros END ===
|
|
||||||
// == Multi Os START ===
|
|
||||||
case KC_HOME:// make the home behave the same on OSX
|
|
||||||
if (record->event.pressed && onMac) {
|
|
||||||
SEND_STRING(SS_LCTRL("a"));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
case KC_END:// make the end behave the same on OSX
|
|
||||||
if (record->event.pressed && onMac) {
|
|
||||||
tap_code16(C(KC_E));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
case AC_A:// Accent á
|
|
||||||
if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); return false;
|
|
||||||
case AC_E:// Accent é
|
|
||||||
if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); return false;
|
|
||||||
case AC_I:// Accent í
|
|
||||||
if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); return false;
|
|
||||||
case AC_O:// Accent ó
|
|
||||||
if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); return false;
|
|
||||||
case CUT: if (record->event.pressed) return CMD(KC_X);
|
|
||||||
case COPY:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c"));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case PASTE:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v"));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case SAVE:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s"));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case UNDO:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z"));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case FIND:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f"));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case CHG_LAYOUT:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f"));
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
// == Multi Os END ===
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
case RGB_SLD:
|
|
||||||
if (record->event.pressed) { rgblight_mode(1); }
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
//First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt
|
|
||||||
#endif
|
|
||||||
case ALT_TAB:
|
|
||||||
if (record->event.pressed)
|
|
||||||
{
|
|
||||||
if (altPressed)
|
|
||||||
{
|
|
||||||
tap_code(KC_TAB);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
altPressed = true;
|
|
||||||
layer_on(7); // go to movement layer
|
|
||||||
onMac ? register_code(KC_LGUI) : register_code(KC_LALT);
|
|
||||||
tap_code(KC_TAB);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
// avoid alt releasing if the key is of movement
|
|
||||||
case KC_RIGHT ... KC_UP:
|
|
||||||
if (altPressed)
|
|
||||||
{
|
|
||||||
return true; // yes QMK, do your stuff
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Reset sticky alt tab
|
|
||||||
if (altPressed)
|
|
||||||
{
|
|
||||||
onMac ? unregister_code(KC_LGUI) : unregister_code(KC_LALT);
|
|
||||||
altPressed = false;
|
|
||||||
layer_off(7);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
//**************** LEADER *********************//
|
//**************** LEADER *********************//
|
||||||
#ifdef LEADER_ENABLE
|
#ifdef LEADER_ENABLE
|
||||||
LEADER_EXTERNS();
|
LEADER_EXTERNS();
|
||||||
#ifdef RGBLIGHT_ENABLE
|
# ifdef RGBLIGHT_ENABLE
|
||||||
|
|
||||||
void leader_start() {
|
void leader_start() { rgblight_setrgb_range(5, 100, 199, 10, 15); };
|
||||||
rgblight_setrgb_range(5, 100, 199, 10,15);
|
|
||||||
};
|
|
||||||
|
|
||||||
void leader_end(){
|
void leader_end() { rgblight_setrgb_range(200, 200, 255, 10, 15); };
|
||||||
rgblight_setrgb_range(200, 200, 255, 10,15);
|
# endif
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void matrix_scan_user(void)
|
void matrix_scan_user(void) {
|
||||||
{
|
if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT) {
|
||||||
if (leading && leader_sequence_size > 0 && timer_elapsed(leader_time) > LEADER_TIMEOUT)
|
leading = false;
|
||||||
{
|
SEQ_ONE_KEY(KC_T) { SEND_STRING("``" SS_TAP(X_LEFT)); }
|
||||||
leading = false;
|
// Triple ticks
|
||||||
SEQ_ONE_KEY(KC_T) {
|
SEQ_TWO_KEYS(KC_T, KC_T) { SEND_STRING("```" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "```" SS_TAP(X_UP)); }
|
||||||
SEND_STRING("``" SS_TAP(X_LEFT));
|
// ==== International spanish accent vowels ====
|
||||||
}
|
SEQ_ONE_KEY(KC_A) { SEND_STRING(SS_LALT("e") "a"); }
|
||||||
// Triple ticks
|
SEQ_ONE_KEY(KC_E) { SEND_STRING(SS_LALT("e") "e"); }
|
||||||
SEQ_TWO_KEYS(KC_T, KC_T) {
|
SEQ_ONE_KEY(KC_I) { SEND_STRING(SS_LALT("e") "i"); }
|
||||||
SEND_STRING("```" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "```" SS_TAP(X_UP));
|
SEQ_ONE_KEY(KC_O) { SEND_STRING(SS_LALT("e") "o"); }
|
||||||
}
|
SEQ_ONE_KEY(KC_U) { SEND_STRING(SS_LALT("e") "u"); }
|
||||||
// ==== International spanish accent vowels ====
|
SEQ_ONE_KEY(KC_N) { SEND_STRING(SS_LALT("n") "n"); }
|
||||||
SEQ_ONE_KEY(KC_A) {
|
// ==== MACROS ===
|
||||||
SEND_STRING(SS_LALT("e") "a");
|
SEQ_ONE_KEY(KC_G) { SEND_STRING(" | grep "); }
|
||||||
}
|
SEQ_ONE_KEY(KC_K) { onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); }
|
||||||
SEQ_ONE_KEY(KC_E) {
|
// vim delete all
|
||||||
SEND_STRING(SS_LALT("e") "e");
|
SEQ_TWO_KEYS(KC_D, KC_G) {
|
||||||
}
|
if (onMac) {
|
||||||
SEQ_ONE_KEY(KC_I) {
|
SEND_STRING(SS_LGUI("a") SS_TAP(X_D));
|
||||||
SEND_STRING(SS_LALT("e") "i");
|
} else {
|
||||||
}
|
SEND_STRING(SS_LCTRL("a") SS_TAP(X_D));
|
||||||
SEQ_ONE_KEY(KC_O) {
|
}
|
||||||
SEND_STRING(SS_LALT("e") "o");
|
}
|
||||||
}
|
// tripe delete!
|
||||||
SEQ_ONE_KEY(KC_U) {
|
SEQ_ONE_KEY(KC_BSPACE) { SEND_STRING(SS_TAP(X_BSPACE) SS_TAP(X_BSPACE) SS_TAP(X_BSPACE)); }
|
||||||
SEND_STRING(SS_LALT("e") "u");
|
SEQ_TWO_KEYS(KC_P, KC_G) { SEND_STRING("ps -ef | grep "); }
|
||||||
}
|
SEQ_TWO_KEYS(KC_J, KC_A) { SEND_STRING("() => {}" SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); }
|
||||||
SEQ_ONE_KEY(KC_N) { // ñ
|
// this is a pain to type
|
||||||
SEND_STRING(SS_LALT("n") "n");
|
SEQ_TWO_KEYS(KC_S, KC_S) { SEND_STRING("~/.ssh/ "); }
|
||||||
}
|
SEQ_TWO_KEYS(KC_F, KC_T) { SEND_STRING("feat():" SS_TAP(X_LEFT) SS_TAP(X_LEFT)); }
|
||||||
// ==== MACROS ===
|
// ### LAYER CHANGE
|
||||||
SEQ_ONE_KEY(KC_G) { // grep
|
SEQ_ONE_KEY(KC_1) { layer_on(1); }
|
||||||
SEND_STRING(" | grep ");
|
// control enter, because yes
|
||||||
}
|
SEQ_ONE_KEY(KC_H) { SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_ENTER) SS_UP(X_LCTRL)); }
|
||||||
SEQ_ONE_KEY(KC_K) {
|
// paste all
|
||||||
onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f"));
|
SEQ_ONE_KEY(KC_P) {
|
||||||
}
|
if (onMac) {
|
||||||
SEQ_TWO_KEYS(KC_D, KC_G) { // vim delete all
|
SEND_STRING(SS_LGUI("a") SS_LGUI("v"));
|
||||||
if(onMac){
|
} else {
|
||||||
SEND_STRING(SS_LGUI("a") SS_TAP(X_D));
|
SEND_STRING(SS_LCTRL("a") SS_LCTRL("v"));
|
||||||
} else {
|
}
|
||||||
SEND_STRING(SS_LCTRL("a") SS_TAP(X_D));
|
}
|
||||||
}
|
SEQ_THREE_KEYS(KC_M, KC_A, KC_C) {
|
||||||
}
|
onMac = true;
|
||||||
SEQ_ONE_KEY(KC_BSPACE) { // tripe delete!
|
# ifdef RGBLIGHT_ENABLE
|
||||||
SEND_STRING(SS_TAP(X_BSPACE) SS_TAP(X_BSPACE) SS_TAP(X_BSPACE));
|
rgblight_setrgb(255, 255, 255);
|
||||||
}
|
# endif
|
||||||
SEQ_TWO_KEYS(KC_P, KC_G) {
|
}
|
||||||
SEND_STRING("ps -ef | grep ");
|
SEQ_THREE_KEYS(KC_W, KC_I, KC_N) {
|
||||||
}
|
onMac = false;
|
||||||
SEQ_TWO_KEYS(KC_J, KC_A) {
|
# ifdef RGBLIGHT_ENABLE
|
||||||
SEND_STRING("() => {}"SS_TAP(X_LEFT) SS_TAP(X_LEFT)SS_TAP(X_LEFT) SS_TAP(X_LEFT)SS_TAP(X_LEFT) SS_TAP(X_LEFT)SS_TAP(X_LEFT));
|
rgblight_setrgb(255, 255, 0);
|
||||||
}
|
# endif
|
||||||
SEQ_TWO_KEYS(KC_S, KC_S) {
|
}
|
||||||
SEND_STRING("~/.ssh/ "); // this is a pain to type
|
/* Copy all */
|
||||||
}
|
SEQ_ONE_KEY(KC_Y) {
|
||||||
SEQ_TWO_KEYS(KC_F, KC_T) {
|
if (onMac) {
|
||||||
SEND_STRING("feat():" SS_TAP(X_LEFT) SS_TAP(X_LEFT));
|
SEND_STRING(SS_LGUI("a") SS_LGUI("c"));
|
||||||
}
|
} else {
|
||||||
// ### LAYER CHANGE
|
SEND_STRING(SS_LCTRL("a") SS_LCTRL("c"));
|
||||||
SEQ_ONE_KEY(KC_1) {
|
}
|
||||||
layer_on(1);
|
}
|
||||||
}
|
// emoji bar
|
||||||
SEQ_ONE_KEY(KC_H) { // control enter, because yes
|
SEQ_TWO_KEYS(KC_E, KC_E) { SEND_STRING(SS_DOWN(X_LGUI) SS_LCTRL(" ") SS_UP(X_LGUI)); }
|
||||||
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_ENTER) SS_UP(X_LCTRL));
|
|
||||||
}
|
|
||||||
// paste all
|
|
||||||
SEQ_ONE_KEY(KC_P) {
|
|
||||||
if(onMac){
|
|
||||||
SEND_STRING(SS_LGUI("a") SS_LGUI("v"));
|
|
||||||
} else {
|
|
||||||
SEND_STRING(SS_LCTRL("a") SS_LCTRL("v"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SEQ_THREE_KEYS(KC_M, KC_A, KC_C) {
|
|
||||||
onMac = true;
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_setrgb(255, 255, 255);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
SEQ_THREE_KEYS(KC_W, KC_I, KC_N) {
|
|
||||||
onMac = false;
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
rgblight_setrgb(255, 255, 0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
/* Copy all */
|
|
||||||
SEQ_ONE_KEY(KC_Y) {
|
|
||||||
if(onMac){
|
|
||||||
SEND_STRING(SS_LGUI("a") SS_LGUI("c"));
|
|
||||||
} else {
|
|
||||||
SEND_STRING(SS_LCTRL("a") SS_LCTRL("c"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//emoji bar
|
|
||||||
SEQ_TWO_KEYS(KC_E, KC_E) {
|
|
||||||
SEND_STRING(SS_DOWN(X_LGUI) SS_LCTRL(" ") SS_UP(X_LGUI));
|
|
||||||
}
|
|
||||||
|
|
||||||
SEQ_TWO_KEYS(KC_F, KC_F) {
|
SEQ_TWO_KEYS(KC_F, KC_F) { SEND_STRING("ps -ef | grep "); }
|
||||||
SEND_STRING("ps -ef | grep ");
|
SEQ_TWO_KEYS(KC_H, KC_T) { SEND_STRING("https://"); }
|
||||||
}
|
|
||||||
SEQ_TWO_KEYS(KC_H, KC_T) {
|
|
||||||
SEND_STRING("https://");
|
|
||||||
}
|
|
||||||
|
|
||||||
leader_end();
|
leader_end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // LEADER
|
#endif // LEADER
|
||||||
|
|
||||||
// ======== INCREMENTAL MACROS STUFF =============
|
|
||||||
|
|
||||||
#define MAX_INCREMENTAL_MACRO 20
|
|
||||||
#define TAP_ROTATION_TIMEOUT 400
|
|
||||||
|
|
||||||
uint16_t latest_kc = 0;
|
|
||||||
uint16_t latest_rotation = 0;
|
|
||||||
int key_count = 0;
|
|
||||||
|
|
||||||
const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) };
|
|
||||||
|
|
||||||
bool process_incremental_macro (uint16_t kc) {
|
|
||||||
|
|
||||||
if( kc < INC_MACROS_START || kc > INC_MACROS_END ){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
int macro_idx = (int) (kc - INC_MACROS_START) - 1;
|
|
||||||
char tempstring[3] = {0};
|
|
||||||
tempstring[0] = incremental_macros[macro_idx][key_count];
|
|
||||||
// Special cases of SS_TAP SS_UP and SS_DOWN, they require two characters so get both once and skip on next iteration
|
|
||||||
if( tempstring[0] == '\1' || tempstring[0] == '\2' || tempstring[0] == '\3'){
|
|
||||||
tempstring[1] = incremental_macros[macro_idx][++key_count];
|
|
||||||
}
|
|
||||||
if( tempstring[0] == '\0'){
|
|
||||||
key_count = 0;
|
|
||||||
}
|
|
||||||
send_string(tempstring);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
void refresh_incremental_macros (uint16_t kc) {
|
|
||||||
if (kc == latest_kc)
|
|
||||||
{
|
|
||||||
if ( (timer_elapsed(latest_rotation) > TAP_ROTATION_TIMEOUT) || (key_count >= MAX_INCREMENTAL_MACRO) ) key_count = 0;
|
|
||||||
else key_count++;
|
|
||||||
} else {
|
|
||||||
key_count = 0;
|
|
||||||
latest_kc = kc;
|
|
||||||
}
|
|
||||||
|
|
||||||
latest_rotation = timer_read();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ======== VISUAL STUDIO CODE SHORTCUTS STUFF
|
|
||||||
|
|
||||||
bool is_macro (uint16_t kc){
|
|
||||||
return kc > MACRO_START && kc < MACRO_END;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool command_shift_p (bool isMac) {
|
|
||||||
isMac
|
|
||||||
? SEND_STRING(SS_DOWN(X_LSHIFT)SS_LGUI("p")SS_UP(X_LSHIFT))
|
|
||||||
: SEND_STRING(SS_DOWN(X_LSHIFT)SS_LCTRL("p")SS_UP(X_LSHIFT));
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool VSCommand(bool isMac, char *cmd)
|
|
||||||
{
|
|
||||||
command_shift_p (isMac);
|
|
||||||
send_string(cmd);
|
|
||||||
SEND_STRING(SS_TAP(X_ENTER));
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool handle_macro(uint16_t kc)
|
|
||||||
{
|
|
||||||
switch (kc)
|
|
||||||
{
|
|
||||||
case T_TERM: return VSCommand(onMac, "toit");
|
|
||||||
case FIX_ALL: return VSCommand(onMac, "faap");
|
|
||||||
case BLK_CMNT: return VSCommand(onMac, "tbc");
|
|
||||||
case LN_CMNT: return VSCommand(onMac, "tlic");
|
|
||||||
case CMD_S_P: return command_shift_p(onMac);
|
|
||||||
case TRI_TICKS: SEND_STRING("[[[ "); break;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
@@ -1,104 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#include "process_records.h"
|
||||||
|
|
||||||
bool handle_macro(uint16_t kc);
|
|
||||||
bool is_macro (uint16_t kc);
|
|
||||||
bool process_incremental_macro (uint16_t);
|
|
||||||
void refresh_incremental_macros (uint16_t);
|
|
||||||
//**************** KEYCODES *********************//
|
|
||||||
|
|
||||||
enum custom_keycodes
|
|
||||||
{
|
|
||||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
|
||||||
EPRM,
|
|
||||||
RGB_SLD,
|
|
||||||
ALT_TAB,
|
|
||||||
// Macros
|
|
||||||
ARROW,
|
|
||||||
F_ARROW,
|
|
||||||
QWERTY,
|
|
||||||
GREP,
|
|
||||||
// Accented characters
|
|
||||||
AC_A,
|
|
||||||
AC_E,
|
|
||||||
AC_I,
|
|
||||||
AC_O,
|
|
||||||
// Custom multi-os key-codes
|
|
||||||
CUT,
|
|
||||||
COPY,
|
|
||||||
PASTE,
|
|
||||||
SAVE,
|
|
||||||
UNDO,
|
|
||||||
CHG_LAYOUT,
|
|
||||||
FIND,
|
|
||||||
// OTHER OLD STUFF
|
|
||||||
LOWER,
|
|
||||||
RAISE,
|
|
||||||
ADJUST,
|
|
||||||
MAC_TGL,
|
|
||||||
MACRO_START, // START OF VSC DECLARATIONS
|
|
||||||
T_TERM,
|
|
||||||
FIX_ALL,
|
|
||||||
BLK_CMNT,
|
|
||||||
LN_CMNT,
|
|
||||||
CMD_S_P,
|
|
||||||
TRI_TICKS,
|
|
||||||
MACRO_END, // END OF VSC DECLARATIONS
|
|
||||||
INC_MACROS_START,
|
|
||||||
INC_MACROS_END,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
enum layers {
|
|
||||||
_QWERTY,
|
|
||||||
_LOWER,
|
|
||||||
_RAISE,
|
|
||||||
_F,
|
|
||||||
_D,
|
|
||||||
_A,
|
|
||||||
_S,
|
|
||||||
_J,
|
|
||||||
_K,
|
|
||||||
_MACROS,
|
|
||||||
_ADJUST,
|
|
||||||
_SAFE_LAYER
|
|
||||||
};
|
|
||||||
|
|
||||||
// Function letters
|
|
||||||
#define FN_F LT(_F,KC_F)
|
|
||||||
#define FN_D LT(_D,KC_D)
|
|
||||||
#define FN_S LT(_S,KC_S)
|
|
||||||
#define FN_A LT(_A,KC_A)
|
|
||||||
#define FN_K LT(_K,KC_K)
|
|
||||||
#define FN_J LT(_J,KC_J)
|
|
||||||
#define KC_FN_D FN_D
|
|
||||||
#define KC_FN_S FN_S
|
|
||||||
#define KC_FN_F FN_F
|
|
||||||
|
|
||||||
#define KC_MACROS OSL(_MACROS)
|
|
||||||
|
|
||||||
|
|
||||||
#define KC_E_COLN LSFT(KC_DOT)
|
|
||||||
#define KC_E_EQL ES_EQL
|
|
||||||
#define KC_GUI OSM(MOD_RGUI)
|
|
||||||
#define KC_R_NUB S(KC_NUBS)
|
|
||||||
#define KC_E_LT KC_NUBS
|
|
||||||
#define KC_E_GT S(KC_NUBS)
|
|
||||||
#define KC_E_TILD ES_TILD
|
|
||||||
#define KC_E_MINS ES_MINS
|
|
||||||
#define KC_S_SPC SFT_T(KC_SPC) // Tap for Space, hold for Shift
|
|
||||||
#define KC_E_OVRR ES_OVRR
|
|
||||||
#define KC_E_APOS ES_APOS
|
|
||||||
#define KC_E_IEXL ES_IEXL
|
|
||||||
// Short hand for complex key combinations
|
|
||||||
# define WIN_LEFT_HALF LALT(LGUI(KC_LEFT))
|
|
||||||
# define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT))
|
|
||||||
# define WIN_TO_LEFT LALT(LSFT( LGUI(KC_LEFT) ))
|
|
||||||
# define WIN_TO_RIGHT LALT(LSFT( LGUI(KC_RIGHT) ))
|
|
||||||
|
|
||||||
// Ready to use Tap dance definitions, just put them on your layout
|
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
#include "tap_dance.h"
|
#include "tap_dance.h"
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
#include "process_records.h"
|
||||||
|
#include "alt_tab.h"
|
||||||
|
extern bool onMac;
|
||||||
|
// ======== INCREMENTAL MACROS STUFF =============
|
||||||
|
#define MAX_INCREMENTAL_MACRO 20
|
||||||
|
#define TAP_ROTATION_TIMEOUT 400
|
||||||
|
uint16_t latest_kc = 0;
|
||||||
|
uint16_t latest_rotation = 0;
|
||||||
|
int key_count = 0;
|
||||||
|
|
||||||
|
const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) };
|
||||||
|
|
||||||
|
bool process_incremental_macro(uint16_t kc) {
|
||||||
|
if (kc < INC_MACROS_START || kc > INC_MACROS_END) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int macro_idx = (int)(kc - INC_MACROS_START) - 1;
|
||||||
|
char tempstring[3] = {0};
|
||||||
|
tempstring[0] = incremental_macros[macro_idx][key_count];
|
||||||
|
// Special cases of SS_TAP SS_UP and SS_DOWN, they require two characters so get both once and skip on next iteration
|
||||||
|
if (tempstring[0] == '\1' || tempstring[0] == '\2' || tempstring[0] == '\3') {
|
||||||
|
tempstring[1] = incremental_macros[macro_idx][++key_count];
|
||||||
|
}
|
||||||
|
if (tempstring[0] == '\0') {
|
||||||
|
key_count = 0;
|
||||||
|
}
|
||||||
|
send_string(tempstring);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
void refresh_incremental_macros(uint16_t kc) {
|
||||||
|
if (kc == latest_kc) {
|
||||||
|
if ((timer_elapsed(latest_rotation) > TAP_ROTATION_TIMEOUT) || (key_count >= MAX_INCREMENTAL_MACRO))
|
||||||
|
key_count = 0;
|
||||||
|
else
|
||||||
|
key_count++;
|
||||||
|
} else {
|
||||||
|
key_count = 0;
|
||||||
|
latest_kc = kc;
|
||||||
|
}
|
||||||
|
|
||||||
|
latest_rotation = timer_read();
|
||||||
|
}
|
||||||
|
// Send control or GUI depending if we are on windows or mac
|
||||||
|
bool CMD(uint16_t kc) {
|
||||||
|
if(onMac){ tap_code16(LGUI(kc)); } else { tap_code16(LCTL(kc)); }
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
bool pressed = record->event.pressed;
|
||||||
|
if(pressed){
|
||||||
|
refresh_incremental_macros(keycode);
|
||||||
|
if(process_incremental_macro(keycode)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
switch (keycode) {
|
||||||
|
case MAC_TGL:
|
||||||
|
onMac = !onMac;
|
||||||
|
onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(tone_qwerty);
|
||||||
|
#endif
|
||||||
|
layer_on(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
// == Macros START ===
|
||||||
|
case IARROW: if (record->event.pressed) SEND_STRING("<-"); return false;
|
||||||
|
case ARROW: if (record->event.pressed) SEND_STRING("->"); return false;
|
||||||
|
case F_ARROW: if (record->event.pressed) SEND_STRING("=>"); return false;
|
||||||
|
case GREP: if (record->event.pressed) SEND_STRING(" | grep "); return false;
|
||||||
|
case CLN_EQ: if (record->event.pressed) SEND_STRING(":="); return false;
|
||||||
|
// == Macros END ===
|
||||||
|
// == Multi Os START ===
|
||||||
|
case KC_HOME:// make the home behave the same on OSX
|
||||||
|
if (record->event.pressed && onMac) {
|
||||||
|
SEND_STRING(SS_LCTRL("a"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
case KC_END:// make the end behave the same on OSX
|
||||||
|
if (record->event.pressed && onMac) {
|
||||||
|
tap_code16(C(KC_E));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
case AC_A:// Accent á
|
||||||
|
if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); return false;
|
||||||
|
case AC_E:// Accent é
|
||||||
|
if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); return false;
|
||||||
|
case AC_I:// Accent í
|
||||||
|
if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); return false;
|
||||||
|
case AC_O:// Accent ó
|
||||||
|
if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); return false;
|
||||||
|
case CUT: if (record->event.pressed) return CMD(KC_X);
|
||||||
|
case COPY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case PASTE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case SAVE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case UNDO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case FIND:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case CHG_LAYOUT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f"));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
// == Multi Os END ===
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
case RGB_SLD:
|
||||||
|
if (record->event.pressed) { rgblight_mode(1); }
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
//First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
// =============== ALT_TAB single key handling
|
||||||
|
return process_alt_tab(keycode, record);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
enum custom_keycodes
|
||||||
|
{
|
||||||
|
EPRM = SAFE_RANGE,
|
||||||
|
RGB_SLD,
|
||||||
|
ALT_TAB,
|
||||||
|
QWERTY,
|
||||||
|
SYM,
|
||||||
|
NAV,
|
||||||
|
ADJUST,
|
||||||
|
// Macros
|
||||||
|
ARROW,
|
||||||
|
IARROW,
|
||||||
|
CLN_EQ,
|
||||||
|
F_ARROW,
|
||||||
|
GREP,
|
||||||
|
// Accented characters
|
||||||
|
AC_A,
|
||||||
|
AC_E,
|
||||||
|
AC_I,
|
||||||
|
AC_O,
|
||||||
|
// Custom multi-os key-codes
|
||||||
|
CUT,
|
||||||
|
COPY,
|
||||||
|
PASTE,
|
||||||
|
SAVE,
|
||||||
|
UNDO,
|
||||||
|
CHG_LAYOUT,
|
||||||
|
FIND,
|
||||||
|
// OTHER OLD STUFF
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
MAC_TGL,
|
||||||
|
INC_MACROS_START,
|
||||||
|
INC_MACROS_END,
|
||||||
|
};
|
||||||
|
|
||||||
|
//**************** KEYCODES *********************//
|
||||||
|
enum layers {
|
||||||
|
_QWERTY,
|
||||||
|
_SYMB,
|
||||||
|
_NAV,
|
||||||
|
_ADJUST,
|
||||||
|
_F,
|
||||||
|
_D,
|
||||||
|
_S,
|
||||||
|
_A,
|
||||||
|
_J,
|
||||||
|
_K,
|
||||||
|
// iris specific - TBD
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_MACROS,
|
||||||
|
_SAFE_LAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
//===== Function letters
|
||||||
|
# define FN_F LT(_F,KC_F)
|
||||||
|
# define FN_D LT(_D,KC_D)
|
||||||
|
# define FN_S LT(_S,KC_S)
|
||||||
|
# define FN_A LT(_A,KC_A)
|
||||||
|
# define FN_K LT(_K,KC_K)
|
||||||
|
# define FN_J LT(_J,KC_J)
|
||||||
|
# define KC_FN_D FN_D
|
||||||
|
# define KC_FN_S FN_S
|
||||||
|
# define KC_FN_F FN_F
|
||||||
|
|
||||||
|
# define KC_MACROS OSL(_MACROS)
|
||||||
|
|
||||||
|
|
||||||
|
# define KC_E_COLN LSFT(KC_DOT)
|
||||||
|
# define KC_E_EQL ES_EQL
|
||||||
|
# define KC_GUI OSM(MOD_RGUI)
|
||||||
|
# define KC_R_NUB S(KC_NUBS)
|
||||||
|
# define KC_E_LT KC_NUBS
|
||||||
|
# define KC_E_GT S(KC_NUBS)
|
||||||
|
# define KC_E_TILD ES_TILD
|
||||||
|
# define KC_E_MINS ES_MINS
|
||||||
|
# define KC_E_OVRR ES_OVRR
|
||||||
|
# define KC_E_APOS ES_APOS
|
||||||
|
# define KC_E_IEXL ES_IEXL
|
||||||
|
//========== Short hand for complex key combinations
|
||||||
|
# define WIN_LEFT_HALF LALT(LGUI(KC_LEFT))
|
||||||
|
# define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT))
|
||||||
|
# define WIN_TO_LEFT LALT(LSFT( LGUI(KC_LEFT) ))
|
||||||
|
# define WIN_TO_RIGHT LALT(LSFT( LGUI(KC_RIGHT) ))
|
||||||
|
# define ALL_WIN LCTL(KC_DOWN)
|
||||||
|
# define EXPOSE LGUI(KC_DOWN)
|
||||||
|
// ========== Modifiers!!
|
||||||
|
# define SHIFT OSM(MOD_LSFT)
|
||||||
|
//=============== tap for key hold for mod
|
||||||
|
# define HYPR_H HYPR_T(KC_H)
|
||||||
|
# define CTL_K RCTL_T(KC_K)
|
||||||
|
# define ALT_J ALT_T(KC_J)
|
||||||
|
# define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift
|
||||||
|
# define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd
|
||||||
|
//=============== Movement modified
|
||||||
|
# define CTL_LEFT LCTL(KC_LEFT)
|
||||||
|
# define CTL_RIGHT LCTL(KC_RIGHT)
|
||||||
|
|
||||||
|
# define SFT_LEFT LSFT(KC_LEFT)
|
||||||
|
# define SFT_RIGHT LSFT(KC_RIGHT)
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
SRC += danielo515.c
|
SRC += danielo515.c \
|
||||||
|
alt_tab.c \
|
||||||
|
process_records.c
|
||||||
|
|
||||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||||
SRC += combo.c
|
SRC += combo.c
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ void dance_cut (qk_tap_dance_state_t *state, void *user_data);
|
|||||||
void dance_copy (qk_tap_dance_state_t *state, void *user_data);
|
void dance_copy (qk_tap_dance_state_t *state, void *user_data);
|
||||||
void dance_paste (qk_tap_dance_state_t *state, void *user_data);
|
void dance_paste (qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
|
||||||
|
// Ready to use Tap dance definitions, just put them on your layout
|
||||||
#define TD_COPY TD(_TD_COPY)
|
#define TD_COPY TD(_TD_COPY)
|
||||||
#define TD_CUT TD(_TD_CUT)
|
#define TD_CUT TD(_TD_CUT)
|
||||||
#define KC_TD_COPY TD(_TD_COPY) // Declarations for macros that add KC_
|
#define KC_TD_COPY TD(_TD_COPY) // Declarations for macros that add KC_
|
||||||
|
|||||||
Reference in new issue
Block a user