qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

config.h (2154B)


      1 /*
      2  * ----------------------------------------------------------------------------
      3  * "THE BEER-WARE LICENSE" (Revision 42):
      4  * <https://github.com/Legonut> wrote this file.  As long as you retain this
      5  * notice you can do whatever you want with this stuff. If we meet some day, and
      6  * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
      7  * ----------------------------------------------------------------------------
      8  */
      9 
     10 #pragma once
     11 
     12 #define BUSY_WAIT
     13 #define BUSY_WAIT_INSTRUCTIONS 35 // Increase if two rows are pressed at the same time.
     14 #define GPIO_INPUT_PIN_DELAY 10
     15 
     16 /* Touchbar adjustments */
     17 #define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe
     18 #define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe
     19 #define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster
     20 #define TOUCH_SEGMENTS 3
     21 
     22 /* CRC Configuration */
     23 #define CRC8_OPTIMIZE_SPEED
     24 #define CRC8_USE_TABLE
     25 
     26 /* Split Keyboard Configuration */
     27 #define SPLIT_USB_DETECT
     28 #define SERIAL_USART_TX_PAL_MODE 7
     29 #define SERIAL_USART_TIMEOUT 5
     30 #define SERIAL_USART_DRIVER SD1
     31 //#define SERIAL_USART_FULL_DUPLEX - Waiting on reunification pr
     32 #if SERIAL_USART_FULL_DUPLEX
     33     #define SERIAL_USART_RX_PIN A10
     34     #define SERIAL_USART_RX_PAL_MODE 7
     35     // Mun connects TX to TX and RX to RX as we were planning on i2c split, so we need pin swap for full duplex
     36     #define SERIAL_USART_PIN_SWAP
     37     #define SERIAL_USART_SPEED (2 * 1024 * 1024)
     38 #else
     39     #define SERIAL_USART_SPEED (1 * 1024 * 1024)
     40 #endif
     41 
     42 /* Split Transport Features */
     43 #define SPLIT_TRANSACTION_IDS_KB TOUCH_ENCODER_SYNC, RGB_MENU_SYNC
     44 
     45 #define WS2812_PWM_DRIVER PWMD3
     46 #define WS2812_PWM_CHANNEL 2
     47 #define WS2812_PWM_PAL_MODE 2
     48 #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3
     49 #define WS2812_PWM_DMA_CHANNEL 3
     50 
     51 #define TOUCH_UPDATE_INTERVAL 33
     52 #define OLED_UPDATE_INTERVAL 33
     53 #define OLED_FONT_H "keyboards/rgbkb/common/glcdfont.c"
     54 
     55 /* Audio Configuration */
     56 #define AUDIO_PIN A4
     57 #define AUDIO_PIN_ALT A5
     58 #define AUDIO_PIN_ALT_AS_NEGATIVE
     59 #define AUDIO_CLICKY
     60 #define AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE
     61 #define AUDIO_DAC_OFF_VALUE 0