config.h (2613B)
1 /* 2 Copyright 2015 Jun Wako <wakojun@gmail.com> 3 4 This program is free software: you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation, either version 2 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #pragma once 19 20 #define MOUSEKEY_INTERVAL 20 21 #define MOUSEKEY_DELAY 0 22 #define MOUSEKEY_TIME_TO_MAX 60 23 #define MOUSEKEY_MAX_SPEED 7 24 #define MOUSEKEY_WHEEL_DELAY 0 25 26 /* key combination for command */ 27 #define IS_COMMAND() ( \ 28 get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ 29 get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ 30 ) 31 32 /* Serial config (for communication between halves) */ 33 #define SERIAL_USART_DRIVER SD1 // Only true for the master half 34 #define SERIAL_USART_CONFIG { (SERIAL_USART_SPEED), } // Only field is speed 35 #define SERIAL_USART_FULL_DUPLEX 36 37 #define LED_BRIGHTNESS_LO 100 38 #define LED_BRIGHTNESS_HI 255 39 40 /* LED matrix driver */ 41 #define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND 42 #define IS31FL3731_SDB_PIN B16 43 44 /* i2c (for LED matrix) */ 45 #define I2C1_CLOCK_SPEED 400000 46 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 47 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 48 #define I2C1_SCL_PIN B0 49 #define I2C1_SDA_PIN B1 50 51 #ifdef ST7565_ENABLE 52 /* LCD driver */ 53 # define ST7565_A0_PIN C7 54 # define ST7565_RST_PIN C8 55 # define ST7565_SS_PIN C4 56 # define ST7565_SPI_CLK_DIVISOR 2 57 # define ST7565_CONTRAST 22 58 # define ST7565_DISPLAY_WIDTH 128 59 # define ST7565_DISPLAY_HEIGHT 32 60 61 /* SPI (for LCD) */ 62 # define SPI_DRIVER SPID1 63 # define SPI_SCK_PIN C5 64 # define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATIVE_2 65 # define SPI_MOSI_PIN C6 66 # define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATIVE_2 67 # define SPI_MISO_PIN A4 // Just an unused pin, the "normal" MISO pin (C7) is used for other things 68 # define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATIVE_7 // Default for A4 69 #endif 70 71 /* 72 * Feature disable options 73 * These options are also useful to firmware size reduction. 74 */ 75 76 /* disable debug print */ 77 //#define NO_DEBUG 78 79 /* disable print */ 80 //#define NO_PRINT 81 82 /* disable action features */ 83 //#define NO_ACTION_LAYER 84 //#define NO_ACTION_TAPPING 85 //#define NO_ACTION_ONESHOT