config.h (2708B)
1 /* 2 Copyright 2012 Jun Wako <wakojun@gmail.com> 3 Copyright 2015 Jack Humbert 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #pragma once 20 21 #define USER_BUTTON_PIN C13 22 #define DEBUG_LED_PIN B2 23 #define USB_VBUS_PIN B10 24 25 #ifdef USE_USB_OTG_HS_PORT 26 # define USB_DRIVER USBD2 27 #endif 28 29 // WS2812 RGB LED strip input and number of LEDs 30 #define WS2812_PWM_DRIVER PWMD3 31 #define WS2812_PWM_CHANNEL 1 32 #define WS2812_PWM_PAL_MODE 2 33 #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 34 #define WS2812_PWM_DMA_CHANNEL 5 35 #define WS2812_EXTERNAL_PULLUP 36 37 #define BACKLIGHT_PWM_DRIVER PWMD8 38 #define BACKLIGHT_PWM_CHANNEL 2 39 #define BACKLIGHT_PAL_MODE 3 40 41 /* Audio config */ 42 #define AUDIO_PIN A4 43 #define AUDIO_PIN_ALT A5 44 #define AUDIO_PIN_ALT_AS_NEGATIVE 45 46 /* serial.c configuration for split keyboard */ 47 #define SERIAL_USART_DRIVER SD1 48 #define SERIAL_USART_TX_PIN A10 49 #define SERIAL_USART_TX_PAL_MODE 7 50 #define SERIAL_USART_RX_PIN A9 51 #define SERIAL_USART_RX_PAL_MODE 7 52 #define SERIAL_USART_TIMEOUT 10 53 #define SERIAL_USART_SPEED (1 * 1024 * 1024) 54 #define SERIAL_USART_FULL_DUPLEX 55 56 57 /* i2c config for oleds */ 58 #define I2C_DRIVER I2CD1 59 #define I2C1_CLOCK_SPEED 400000 60 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9 61 62 /* spi config for eeprom and pmw3360 sensor */ 63 #define SPI_DRIVER SPID1 64 #define SPI_SCK_PIN B3 65 #define SPI_SCK_PAL_MODE 5 66 #define SPI_MOSI_PIN B5 67 #define SPI_MOSI_PAL_MODE 5 68 #define SPI_MISO_PIN B4 69 #define SPI_MISO_PAL_MODE 5 70 71 #define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B13 72 #define EXTERNAL_FLASH_SPI_CLOCK_DIVISOR 4 73 #define EXTERNAL_FLASH_SIZE (8 * 1024 * 1024) 74 75 /* pmw3360 config */ 76 #define POINTING_DEVICE_CS_PIN B8 77 #define POINTING_DEVICE_ROTATION_270 78 #undef ROTATIONAL_TRANSFORM_ANGLE 79 #define PMW33XX_SPI_DIVISOR 16 80 81 // lcd 82 #define DISPLAY_RST_PIN NO_PIN 83 #define DISPLAY_DC_PIN B12 84 #define DISPLAY_CS_PIN B9 85 #define DISPLAY_SPI_DIVIDER 1 86 87 #define DRV2605L_FB_ERM_LRA 0 88 #define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100 89 #define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100