qmk_firmware

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

config.h (1674B)


      1 /* Copyright 2023 ArthurCyy <https://github.com/ArthurCyy>
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 2 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  */
     16 
     17 #pragma once
     18 
     19 // EEPROM i2c chip
     20 #define EEPROM_I2C_24LC256
     21 
     22 #define POWER_SWITCH_PIN B0
     23 
     24 /* 16 with dummy columns for shift registers */
     25 #define SHR_SERIES_NUM 2
     26 #define SHR_CLOCK_PIN A0
     27 #define SHR_DATA_PIN A1
     28 #define SHR_LATCH_PIN C15
     29 
     30 /* MIIIW Protocol Driver */
     31 #define MWPROTO_BITRATE 256000
     32 #define MWPROTO_DRIVER SD1
     33 #define MWPROTO_TX_PIN A9
     34 #define MWPROTO_TX_PAL_MODE 1
     35 #define MWPROTO_RX_PIN A10
     36 #define MWPROTO_RX_PAL_MODE 1
     37 #define MWPROTO_WAKEUP_PIN A15
     38 #define MWPROTO_STATUS_PIN C13
     39 
     40 /* RGB Matrix config */
     41 #define RGB_EN_PIN A8
     42 
     43 // PWM RGB Underglow Defines
     44 #define WS2812_BYTE_ORDER WS2812_BYTE_ORDER_GRB
     45 #define WS2812_TRST_US 200
     46 
     47 // I2C config
     48 #define I2C_DRIVER I2CD1
     49 #define I2C1_SCL_PIN B6
     50 #define I2C1_SDA_PIN B7
     51 #define I2C1_SCL_PAL_MODE 1
     52 #define I2C1_SDA_PAL_MODE 1
     53 #define I2C1_TIMINGR_PRESC 0x00U
     54 #define I2C1_TIMINGR_SCLDEL 0x03U
     55 #define I2C1_TIMINGR_SDADEL 0x01U
     56 #define I2C1_TIMINGR_SCLH 0x03U
     57 #define I2C1_TIMINGR_SCLL 0x09U