mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-27 11:38:58 +06:00
023d644bb6
* Move RGBLight animations to data driven, 0-9 * Move RGBLight animations to data driven, A * Move RGBLight animations to data driven, B * Move RGBLight animations to data driven, C * Move RGBLight animations to data driven, D * Move RGBLight animations to data driven, E * Move RGBLight animations to data driven, F * Move RGBLight animations to data driven, G * Move RGBLight animations to data driven, H * Move RGBLight animations to data driven, handwired * Move RGBLight animations to data driven, I * Move RGBLight animations to data driven, J * Move RGBLight animations to data driven, K * Move RGBLight animations to data driven, L * Move RGBLight animations to data driven, M * Move RGBLight animations to data driven, N * Move RGBLight animations to data driven, O * Move RGBLight animations to data driven, P * Move RGBLight animations to data driven, Q * Move RGBLight animations to data driven, R * Move RGBLight animations to data driven, S * Move RGBLight animations to data driven, T * Move RGBLight animations to data driven, U * Move RGBLight animations to data driven, V * Move RGBLight animations to data driven, W * Move RGBLight animations to data driven, X * Move RGBLight animations to data driven, Y * Move RGBLight animations to data driven, Z * Fix incorrect placement * Fix build failures and mismatches
94 lines
2.5 KiB
C
94 lines
2.5 KiB
C
/**
|
|
* config.h
|
|
*
|
|
* Copyright 2020 astro <yuleiz@gmail.com>
|
|
*
|
|
* 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
|
|
|
|
/* key matrix size */
|
|
#define MATRIX_ROWS 6
|
|
#define MATRIX_COLS 16
|
|
|
|
#define DEF_PIN(port, pin) (((port) << 8) | pin)
|
|
#define GET_PORT(pp) (((pp) >> 8) & 0xFF)
|
|
#define GET_PIN(pp) ((pp) & 0xFF)
|
|
|
|
#define CUSTOM_MATRIX_ROW_PINS { \
|
|
DEF_PIN(TCA6424_PORT2, 7), \
|
|
DEF_PIN(TCA6424_PORT2, 6), \
|
|
DEF_PIN(TCA6424_PORT2, 0), \
|
|
DEF_PIN(TCA6424_PORT2, 2), \
|
|
DEF_PIN(TCA6424_PORT2, 4), \
|
|
DEF_PIN(TCA6424_PORT2, 5) }
|
|
|
|
#define CUSTOM_MATRIX_COL_PINS { \
|
|
DEF_PIN(TCA6424_PORT2, 1), \
|
|
DEF_PIN(TCA6424_PORT1, 7), \
|
|
DEF_PIN(TCA6424_PORT1, 6), \
|
|
DEF_PIN(TCA6424_PORT1, 5), \
|
|
DEF_PIN(TCA6424_PORT1, 4), \
|
|
DEF_PIN(TCA6424_PORT1, 3), \
|
|
DEF_PIN(TCA6424_PORT1, 2), \
|
|
DEF_PIN(TCA6424_PORT1, 1), \
|
|
DEF_PIN(TCA6424_PORT1, 0), \
|
|
DEF_PIN(TCA6424_PORT0, 7), \
|
|
DEF_PIN(TCA6424_PORT0, 6), \
|
|
DEF_PIN(TCA6424_PORT0, 5), \
|
|
DEF_PIN(TCA6424_PORT0, 4), \
|
|
DEF_PIN(TCA6424_PORT0, 3), \
|
|
DEF_PIN(TCA6424_PORT0, 2), \
|
|
DEF_PIN(TCA6424_PORT0, 1) }
|
|
|
|
#define ROW1_MASK 0x80
|
|
#define ROW2_MASK 0x40
|
|
#define ROW3_MASK 0x01
|
|
#define ROW4_MASK 0x04
|
|
#define ROW5_MASK 0x10
|
|
#define ROW6_MASK 0x20
|
|
#define ROW_PORT TCA6424_PORT2
|
|
|
|
#define COL1_MASK 0x02
|
|
#define COL2_MASK 0x80
|
|
#define COL3_MASK 0x40
|
|
#define COL4_MASK 0x20
|
|
#define COL5_MASK 0x10
|
|
#define COL6_MASK 0x08
|
|
#define COL7_MASK 0x04
|
|
#define COL8_MASK 0x02
|
|
#define COL9_MASK 0x01
|
|
#define COL10_MASK 0x80
|
|
#define COL11_MASK 0x40
|
|
#define COL12_MASK 0x20
|
|
#define COL13_MASK 0x10
|
|
#define COL14_MASK 0x08
|
|
#define COL15_MASK 0x04
|
|
#define COL16_MASK 0x02
|
|
|
|
|
|
#define DIODE_DIRECTION COL2ROW
|
|
|
|
// i2c setting
|
|
#define USE_I2CV1
|
|
#define I2C1_SCL 8
|
|
#define I2C1_SDA 9
|
|
#define I2C1_CLOCK_SPEED 400000
|
|
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
|
|
|
|
#define AW9523B_RGB_NUM 4
|
|
|
|
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE
|