diff options
| author | Joel Challis <git@zvecr.com> | 2019-08-14 20:07:26 +0100 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-08-14 12:07:26 -0700 |
| commit | 41482e02a6ac06bd9d0fa31c42d372c9d73c5d2b (patch) | |
| tree | a2f83906992e0c504119896c86a20c43d7000302 | |
| parent | 547fbe769c684745195a53baf9f62730ceea804d (diff) | |
| download | qmk_firmware-41482e02a6ac06bd9d0fa31c42d372c9d73c5d2b.tar.gz qmk_firmware-41482e02a6ac06bd9d0fa31c42d372c9d73c5d2b.zip | |
[Keyboard] Align xd84 and xd96 with moon (#6465)
* Refactor xd84 to use LINK_TIME_OPTIMIZATION_ENABLE
* Refactor xd96 to use LINK_TIME_OPTIMIZATION_ENABLE
* Align xd84 and xd96 with moon
* Update keyboards/xd96/rules.mk
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/xd84/rules.mk
Co-Authored-By: Drashna Jaelre <drashna@live.com>
| -rw-r--r-- | keyboards/xd84/config.h | 4 | ||||
| -rw-r--r-- | keyboards/xd84/custom_matrix_helper.c | 15 | ||||
| -rw-r--r-- | keyboards/xd84/matrix.c | 2 | ||||
| -rw-r--r-- | keyboards/xd84/pca9555.c | 35 | ||||
| -rw-r--r-- | keyboards/xd84/pca9555.h | 22 | ||||
| -rw-r--r-- | keyboards/xd84/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/xd84/rules.mk | 8 | ||||
| -rw-r--r-- | keyboards/xd96/config.h | 4 | ||||
| -rw-r--r-- | keyboards/xd96/matrix.c | 2 | ||||
| -rw-r--r-- | keyboards/xd96/pca9555.c | 20 | ||||
| -rw-r--r-- | keyboards/xd96/pca9555.h | 22 | ||||
| -rw-r--r-- | keyboards/xd96/readme.md | 2 | ||||
| -rw-r--r-- | keyboards/xd96/rules.mk | 6 |
13 files changed, 83 insertions, 61 deletions
diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h index 138c2c4c8..1ff5e1cfd 100644 --- a/keyboards/xd84/config.h +++ b/keyboards/xd84/config.h | |||
| @@ -237,7 +237,3 @@ | |||
| 237 | /* Bootmagic Lite key configuration */ | 237 | /* Bootmagic Lite key configuration */ |
| 238 | // #define BOOTMAGIC_LITE_ROW 0 | 238 | // #define BOOTMAGIC_LITE_ROW 0 |
| 239 | // #define BOOTMAGIC_LITE_COLUMN 0 | 239 | // #define BOOTMAGIC_LITE_COLUMN 0 |
| 240 | |||
| 241 | // LTO options | ||
| 242 | #define NO_ACTION_MACRO | ||
| 243 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c index a6a0a041d..a4c5b6afa 100644 --- a/keyboards/xd84/custom_matrix_helper.c +++ b/keyboards/xd84/custom_matrix_helper.c | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | /* Copyright 2019 | ||
| 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 | */ | ||
| 1 | #include <stdint.h> | 16 | #include <stdint.h> |
| 2 | #include <stdbool.h> | 17 | #include <stdbool.h> |
| 3 | #include "wait.h" | 18 | #include "wait.h" |
diff --git a/keyboards/xd84/matrix.c b/keyboards/xd84/matrix.c index a35905047..4cb5544ca 100644 --- a/keyboards/xd84/matrix.c +++ b/keyboards/xd84/matrix.c | |||
| @@ -65,7 +65,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | |||
| 65 | // Clear data in matrix row | 65 | // Clear data in matrix row |
| 66 | current_matrix[current_row] = 0; | 66 | current_matrix[current_row] = 0; |
| 67 | 67 | ||
| 68 | // Select row and wait for row selecton to stabilize | 68 | // Select row and wait for row selection to stabilize |
| 69 | select_row(current_row); | 69 | select_row(current_row); |
| 70 | wait_us(30); | 70 | wait_us(30); |
| 71 | 71 | ||
diff --git a/keyboards/xd84/pca9555.c b/keyboards/xd84/pca9555.c index df4631e9d..b0e542d8d 100644 --- a/keyboards/xd84/pca9555.c +++ b/keyboards/xd84/pca9555.c | |||
| @@ -1,9 +1,24 @@ | |||
| 1 | /* Copyright 2019 | ||
| 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 | */ | ||
| 1 | #include "i2c_master.h" | 16 | #include "i2c_master.h" |
| 2 | #include "pca9555.h" | 17 | #include "pca9555.h" |
| 3 | 18 | ||
| 4 | #include "debug.h" | 19 | #include "debug.h" |
| 5 | 20 | ||
| 6 | #define SLAVE_TO_ADDR(n) (n<<1) | 21 | #define SLAVE_TO_ADDR(n) (n << 1) |
| 7 | #define TIMEOUT 100 | 22 | #define TIMEOUT 100 |
| 8 | 23 | ||
| 9 | enum { | 24 | enum { |
| @@ -14,7 +29,7 @@ enum { | |||
| 14 | CMD_INVERSION_0, | 29 | CMD_INVERSION_0, |
| 15 | CMD_INVERSION_1, | 30 | CMD_INVERSION_1, |
| 16 | CMD_CONFIG_0, | 31 | CMD_CONFIG_0, |
| 17 | CMD_CONFIG_1 | 32 | CMD_CONFIG_1, |
| 18 | }; | 33 | }; |
| 19 | 34 | ||
| 20 | void pca9555_init(uint8_t slave_addr) { | 35 | void pca9555_init(uint8_t slave_addr) { |
| @@ -22,17 +37,17 @@ void pca9555_init(uint8_t slave_addr) { | |||
| 22 | if (!s_init) { | 37 | if (!s_init) { |
| 23 | i2c_init(); | 38 | i2c_init(); |
| 24 | 39 | ||
| 25 | s_init=1; | 40 | s_init = 1; |
| 26 | } | 41 | } |
| 27 | 42 | ||
| 28 | // TODO: could check device connected | 43 | // TODO: could check device connected |
| 29 | //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); | 44 | // i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); |
| 30 | //i2c_stop(); | 45 | // i2c_stop(); |
| 31 | } | 46 | } |
| 32 | 47 | ||
| 33 | void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { | 48 | void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { |
| 34 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); | 49 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); |
| 35 | uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; | 50 | uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; |
| 36 | 51 | ||
| 37 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); | 52 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); |
| 38 | if (ret != I2C_STATUS_SUCCESS) { | 53 | if (ret != I2C_STATUS_SUCCESS) { |
| @@ -42,7 +57,7 @@ void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { | |||
| 42 | 57 | ||
| 43 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { | 58 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { |
| 44 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); | 59 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); |
| 45 | uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; | 60 | uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; |
| 46 | 61 | ||
| 47 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); | 62 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); |
| 48 | if (ret != I2C_STATUS_SUCCESS) { | 63 | if (ret != I2C_STATUS_SUCCESS) { |
| @@ -52,10 +67,10 @@ void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { | |||
| 52 | 67 | ||
| 53 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { | 68 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { |
| 54 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); | 69 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); |
| 55 | uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; | 70 | uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; |
| 56 | 71 | ||
| 57 | uint8_t data = 0; | 72 | uint8_t data = 0; |
| 58 | i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); | 73 | i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); |
| 59 | if (ret != I2C_STATUS_SUCCESS) { | 74 | if (ret != I2C_STATUS_SUCCESS) { |
| 60 | print("pca9555_readPins::FAILED\n"); | 75 | print("pca9555_readPins::FAILED\n"); |
| 61 | } | 76 | } |
diff --git a/keyboards/xd84/pca9555.h b/keyboards/xd84/pca9555.h index 6aaee8a6f..ebb97e2f3 100644 --- a/keyboards/xd84/pca9555.h +++ b/keyboards/xd84/pca9555.h | |||
| @@ -18,15 +18,15 @@ | |||
| 18 | /* | 18 | /* |
| 19 | PCA9555 | 19 | PCA9555 |
| 20 | ,----------. | 20 | ,----------. |
| 21 | SDA --| SDA P00 |-- P1 | 21 | SDA --| SDA P00 |-- P00 |
| 22 | SCL --| SCL P01 |-- P2 | 22 | SCL --| SCL P01 |-- P01 |
| 23 | INT --| INT P02 |-- P3 | 23 | INT --| INT P02 |-- P02 |
| 24 | | P03 |-- P4 | 24 | | P03 |-- P03 |
| 25 | A0 --| A0 P04 |-- P5 | 25 | A0 --| A0 P04 |-- P04 |
| 26 | A1 --| A1 P05 |-- P6 | 26 | A1 --| A1 P05 |-- P05 |
| 27 | A2 --| A2 P06 |-- P7 | 27 | A2 --| A2 P06 |-- P06 |
| 28 | | P07 |-- P8 | 28 | | P07 |-- P07 |
| 29 | | | | 29 | | | |
| 30 | | P10 |-- P10 | 30 | | P10 |-- P10 |
| 31 | | P11 |-- P11 | 31 | | P11 |-- P11 |
| 32 | | P12 |-- P12 | 32 | | P12 |-- P12 |
| @@ -35,7 +35,7 @@ | |||
| 35 | | P15 |-- P15 | 35 | | P15 |-- P15 |
| 36 | | P16 |-- P16 | 36 | | P16 |-- P16 |
| 37 | | P17 |-- P17 | 37 | | P17 |-- P17 |
| 38 | `----------' | 38 | `----------' |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | #define PCA9555_PORT0 0 | 41 | #define PCA9555_PORT0 0 |
| @@ -52,4 +52,4 @@ void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); | |||
| 52 | 52 | ||
| 53 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); | 53 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); |
| 54 | 54 | ||
| 55 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file | 55 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); |
diff --git a/keyboards/xd84/readme.md b/keyboards/xd84/readme.md index 38b4efcba..b8d9c5dbb 100644 --- a/keyboards/xd84/readme.md +++ b/keyboards/xd84/readme.md | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 |  | 3 |  |
| 4 | 4 | ||
| 5 | Compact With 84 Keys & RGB LED Underglow | 5 | Keyboard with 84 Keys & RGB LED Underglow |
| 6 | - Designed by Xiudi | 6 | - Designed by Xiudi |
| 7 | - Up to 87 keys | 7 | - Up to 87 keys |
| 8 | - iso and ansi support | 8 | - iso and ansi support |
diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index 283d4babc..e0982e040 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk | |||
| @@ -78,11 +78,11 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
| 78 | AUDIO_ENABLE = no # Audio output on port C6 | 78 | AUDIO_ENABLE = no # Audio output on port C6 |
| 79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
| 80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | 80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) |
| 81 | LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
| 81 | 82 | ||
| 82 | # custom matrix setup | 83 | # custom matrix setup |
| 83 | CUSTOM_MATRIX = yes | 84 | CUSTOM_MATRIX = yes |
| 84 | SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c | 85 | SRC += custom_matrix_helper.c pca9555.c matrix.c |
| 86 | QUANTUM_LIB_SRC += i2c_master.c | ||
| 85 | 87 | ||
| 86 | EXTRAFLAGS += -flto | 88 | LAYOUTS = 75_ansi 75_iso |
| 87 | |||
| 88 | LAYOUTS = 75_ansi 75_iso \ No newline at end of file | ||
diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h index ea6c878e9..b0fa47795 100644 --- a/keyboards/xd96/config.h +++ b/keyboards/xd96/config.h | |||
| @@ -238,7 +238,3 @@ | |||
| 238 | /* Bootmagic Lite key configuration */ | 238 | /* Bootmagic Lite key configuration */ |
| 239 | // #define BOOTMAGIC_LITE_ROW 0 | 239 | // #define BOOTMAGIC_LITE_ROW 0 |
| 240 | // #define BOOTMAGIC_LITE_COLUMN 0 | 240 | // #define BOOTMAGIC_LITE_COLUMN 0 |
| 241 | |||
| 242 | // LTO options | ||
| 243 | #define NO_ACTION_MACRO | ||
| 244 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/xd96/matrix.c b/keyboards/xd96/matrix.c index 550dae4d0..e8fd850ed 100644 --- a/keyboards/xd96/matrix.c +++ b/keyboards/xd96/matrix.c | |||
| @@ -67,7 +67,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) | |||
| 67 | // Clear data in matrix row | 67 | // Clear data in matrix row |
| 68 | current_matrix[current_row] = 0; | 68 | current_matrix[current_row] = 0; |
| 69 | 69 | ||
| 70 | // Select row and wait for row selecton to stabilize | 70 | // Select row and wait for row selection to stabilize |
| 71 | select_row(current_row); | 71 | select_row(current_row); |
| 72 | wait_us(30); | 72 | wait_us(30); |
| 73 | 73 | ||
diff --git a/keyboards/xd96/pca9555.c b/keyboards/xd96/pca9555.c index 960df4f4e..b0e542d8d 100644 --- a/keyboards/xd96/pca9555.c +++ b/keyboards/xd96/pca9555.c | |||
| @@ -18,7 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | #include "debug.h" | 19 | #include "debug.h" |
| 20 | 20 | ||
| 21 | #define SLAVE_TO_ADDR(n) (n<<1) | 21 | #define SLAVE_TO_ADDR(n) (n << 1) |
| 22 | #define TIMEOUT 100 | 22 | #define TIMEOUT 100 |
| 23 | 23 | ||
| 24 | enum { | 24 | enum { |
| @@ -29,7 +29,7 @@ enum { | |||
| 29 | CMD_INVERSION_0, | 29 | CMD_INVERSION_0, |
| 30 | CMD_INVERSION_1, | 30 | CMD_INVERSION_1, |
| 31 | CMD_CONFIG_0, | 31 | CMD_CONFIG_0, |
| 32 | CMD_CONFIG_1 | 32 | CMD_CONFIG_1, |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | void pca9555_init(uint8_t slave_addr) { | 35 | void pca9555_init(uint8_t slave_addr) { |
| @@ -37,17 +37,17 @@ void pca9555_init(uint8_t slave_addr) { | |||
| 37 | if (!s_init) { | 37 | if (!s_init) { |
| 38 | i2c_init(); | 38 | i2c_init(); |
| 39 | 39 | ||
| 40 | s_init=1; | 40 | s_init = 1; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | // TODO: could check device connected | 43 | // TODO: could check device connected |
| 44 | //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); | 44 | // i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); |
| 45 | //i2c_stop(); | 45 | // i2c_stop(); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { | 48 | void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { |
| 49 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); | 49 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); |
| 50 | uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; | 50 | uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; |
| 51 | 51 | ||
| 52 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); | 52 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); |
| 53 | if (ret != I2C_STATUS_SUCCESS) { | 53 | if (ret != I2C_STATUS_SUCCESS) { |
| @@ -57,7 +57,7 @@ void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { | |||
| 57 | 57 | ||
| 58 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { | 58 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { |
| 59 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); | 59 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); |
| 60 | uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; | 60 | uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; |
| 61 | 61 | ||
| 62 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); | 62 | i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); |
| 63 | if (ret != I2C_STATUS_SUCCESS) { | 63 | if (ret != I2C_STATUS_SUCCESS) { |
| @@ -67,10 +67,10 @@ void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { | |||
| 67 | 67 | ||
| 68 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { | 68 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { |
| 69 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); | 69 | uint8_t addr = SLAVE_TO_ADDR(slave_addr); |
| 70 | uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; | 70 | uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; |
| 71 | 71 | ||
| 72 | uint8_t data = 0; | 72 | uint8_t data = 0; |
| 73 | i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); | 73 | i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); |
| 74 | if (ret != I2C_STATUS_SUCCESS) { | 74 | if (ret != I2C_STATUS_SUCCESS) { |
| 75 | print("pca9555_readPins::FAILED\n"); | 75 | print("pca9555_readPins::FAILED\n"); |
| 76 | } | 76 | } |
diff --git a/keyboards/xd96/pca9555.h b/keyboards/xd96/pca9555.h index 6aaee8a6f..ebb97e2f3 100644 --- a/keyboards/xd96/pca9555.h +++ b/keyboards/xd96/pca9555.h | |||
| @@ -18,15 +18,15 @@ | |||
| 18 | /* | 18 | /* |
| 19 | PCA9555 | 19 | PCA9555 |
| 20 | ,----------. | 20 | ,----------. |
| 21 | SDA --| SDA P00 |-- P1 | 21 | SDA --| SDA P00 |-- P00 |
| 22 | SCL --| SCL P01 |-- P2 | 22 | SCL --| SCL P01 |-- P01 |
| 23 | INT --| INT P02 |-- P3 | 23 | INT --| INT P02 |-- P02 |
| 24 | | P03 |-- P4 | 24 | | P03 |-- P03 |
| 25 | A0 --| A0 P04 |-- P5 | 25 | A0 --| A0 P04 |-- P04 |
| 26 | A1 --| A1 P05 |-- P6 | 26 | A1 --| A1 P05 |-- P05 |
| 27 | A2 --| A2 P06 |-- P7 | 27 | A2 --| A2 P06 |-- P06 |
| 28 | | P07 |-- P8 | 28 | | P07 |-- P07 |
| 29 | | | | 29 | | | |
| 30 | | P10 |-- P10 | 30 | | P10 |-- P10 |
| 31 | | P11 |-- P11 | 31 | | P11 |-- P11 |
| 32 | | P12 |-- P12 | 32 | | P12 |-- P12 |
| @@ -35,7 +35,7 @@ | |||
| 35 | | P15 |-- P15 | 35 | | P15 |-- P15 |
| 36 | | P16 |-- P16 | 36 | | P16 |-- P16 |
| 37 | | P17 |-- P17 | 37 | | P17 |-- P17 |
| 38 | `----------' | 38 | `----------' |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | #define PCA9555_PORT0 0 | 41 | #define PCA9555_PORT0 0 |
| @@ -52,4 +52,4 @@ void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); | |||
| 52 | 52 | ||
| 53 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); | 53 | void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); |
| 54 | 54 | ||
| 55 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file | 55 | uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); |
diff --git a/keyboards/xd96/readme.md b/keyboards/xd96/readme.md index 237d7a051..bf01db8bb 100644 --- a/keyboards/xd96/readme.md +++ b/keyboards/xd96/readme.md | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 |  | 3 |  |
| 4 | 4 | ||
| 5 | Compact With 96 Keys & RGB LED Underglow | 5 | Keyboard with 96 Keys & RGB LED Underglow |
| 6 | - Designed by Xiudi | 6 | - Designed by Xiudi |
| 7 | - ISO and ANSI support | 7 | - ISO and ANSI support |
| 8 | - Uses Kimera core | 8 | - Uses Kimera core |
diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index c9f804471..91736bd87 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk | |||
| @@ -78,9 +78,9 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
| 78 | AUDIO_ENABLE = no # Audio output on port C6 | 78 | AUDIO_ENABLE = no # Audio output on port C6 |
| 79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
| 80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | 80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) |
| 81 | LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
| 81 | 82 | ||
| 82 | # custom matrix setup | 83 | # custom matrix setup |
| 83 | CUSTOM_MATRIX = yes | 84 | CUSTOM_MATRIX = yes |
| 84 | SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c | 85 | SRC += custom_matrix_helper.c pca9555.c matrix.c |
| 85 | 86 | QUANTUM_LIB_SRC += i2c_master.c | |
| 86 | EXTRAFLAGS += -flto | ||
