[Keyboard] Update spiderisland/split78 (#11990)
* [Keyboard] spiderisland/split78: add MCP23018 reset code Now, communication with the right side gets re-established after unplugging it and plugging it back in. * [Keyboard] spiderisland/split78: configure debouncing I've been experiencing particularly bad bounce on the 'A' key. Also, update maintainer github usernamemaster
parent
9fd5c6f619
commit
ce75f48acb
|
@ -33,3 +33,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define BACKLIGHT_PIN D4
|
#define BACKLIGHT_PIN D4
|
||||||
#define BACKLIGHT_LEVELS 3
|
#define BACKLIGHT_LEVELS 3
|
||||||
#define BACKLIGHT_BREATHING
|
#define BACKLIGHT_BREATHING
|
||||||
|
|
||||||
|
#define DEBOUNCE 50
|
||||||
|
|
|
@ -105,9 +105,17 @@ void matrix_init_custom(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static i2c_status_t mcp23018_status = I2C_STATUS_SUCCESS;
|
||||||
|
|
||||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
bool matrix_has_changed = false;
|
bool matrix_has_changed = false;
|
||||||
|
|
||||||
|
#if defined(RIGHT_HALF)
|
||||||
|
if (mcp23018_status != I2C_STATUS_SUCCESS) {
|
||||||
|
mcp23018_status = mcp23018_init();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
// Store last value of row prior to reading
|
// Store last value of row prior to reading
|
||||||
matrix_row_t last_row_value = current_matrix[row];
|
matrix_row_t last_row_value = current_matrix[row];
|
||||||
|
@ -124,7 +132,9 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
// as 0x75 would be no keys pressed
|
// as 0x75 would be no keys pressed
|
||||||
uint8_t data = 0x7F;
|
uint8_t data = 0x7F;
|
||||||
// Receive the columns from right half
|
// Receive the columns from right half
|
||||||
i2c_receive(TWI_ADDR_WRITE, &data, 1, I2C_TIMEOUT);
|
if (mcp23018_status == I2C_STATUS_SUCCESS) {
|
||||||
|
mcp23018_status = i2c_receive(TWI_ADDR_WRITE, &data, 1, I2C_TIMEOUT);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cols |= ((~(PINA | 0x80)) & 0x7F);
|
cols |= ((~(PINA | 0x80)) & 0x7F);
|
||||||
|
@ -146,7 +156,9 @@ void matrix_set_row_status(uint8_t row) {
|
||||||
//Set the remote row on port A
|
//Set the remote row on port A
|
||||||
txdata[0] = (GPIOA);
|
txdata[0] = (GPIOA);
|
||||||
txdata[1] = ( 0xFF & ~(1<<row) );
|
txdata[1] = ( 0xFF & ~(1<<row) );
|
||||||
i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)txdata, 2, I2C_TIMEOUT);
|
if (mcp23018_status == I2C_STATUS_SUCCESS) {
|
||||||
|
mcp23018_status = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)txdata, 2, I2C_TIMEOUT);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Set the local row on port B
|
//Set the local row on port B
|
||||||
|
|
|
@ -9,7 +9,7 @@ It is mistakenly called "87 key" on the AliExpress title and "104 key" (?!) in t
|
||||||
|
|
||||||
This port is based on the `split75` port which was mostly done by [Michael L. Walker](https://github.com/walkerstop).
|
This port is based on the `split75` port which was mostly done by [Michael L. Walker](https://github.com/walkerstop).
|
||||||
|
|
||||||
* Keyboard Maintainer: [unrelenting.technology](https://github.com/myfreeweb)
|
* Keyboard Maintainer: [unrelenting.technology](https://github.com/unrelentingtech)
|
||||||
* Hardware Availability: https://a.aliexpress.com/_dVJsSpR
|
* Hardware Availability: https://a.aliexpress.com/_dVJsSpR
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
|
@ -17,6 +17,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
WS2812_DRIVER = i2c
|
WS2812_DRIVER = i2c
|
||||||
|
DEBOUNCE_TYPE = sym_eager_pr
|
||||||
|
|
||||||
# custom matrix setup
|
# custom matrix setup
|
||||||
CUSTOM_MATRIX = lite
|
CUSTOM_MATRIX = lite
|
||||||
|
|
Loading…
Reference in New Issue