summaryrefslogtreecommitdiff
path: root/keyboards/input_club
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/input_club')
-rw-r--r--keyboards/input_club/ergodox_infinity/config.h29
-rw-r--r--keyboards/input_club/ergodox_infinity/ergodox_infinity.c2
-rw-r--r--keyboards/input_club/ergodox_infinity/info.json26
-rw-r--r--keyboards/input_club/infinity60/led/config.h2
-rw-r--r--keyboards/input_club/infinity60/led/led.c2
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.c56
-rw-r--r--keyboards/input_club/k_type/is31fl3733-dual.h1
-rw-r--r--keyboards/input_club/k_type/keymaps/andrew-fahmy/config.h36
-rw-r--r--keyboards/input_club/whitefox/config.h2
-rw-r--r--keyboards/input_club/whitefox/info.json25
-rw-r--r--keyboards/input_club/whitefox/whitefox.c2
11 files changed, 79 insertions, 104 deletions
diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h
index 3757ca3d60..b8ab5604d4 100644
--- a/keyboards/input_club/ergodox_infinity/config.h
+++ b/keyboards/input_club/ergodox_infinity/config.h
@@ -44,35 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* LED matrix driver */
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
-#define LED_MATRIX_LED_COUNT 76
-#define LED_MATRIX_SPLIT { 38, 38 }
-#define LED_DISABLE_WHEN_USB_SUSPENDED
-
-// LED Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects
-#define ENABLE_LED_MATRIX_ALPHAS_MODS
-#define ENABLE_LED_MATRIX_BREATHING
-#define ENABLE_LED_MATRIX_BAND
-#define ENABLE_LED_MATRIX_BAND_PINWHEEL
-#define ENABLE_LED_MATRIX_BAND_SPIRAL
-#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_LED_MATRIX_CYCLE_OUT_IN
-#define ENABLE_LED_MATRIX_DUAL_BEACON
-#if defined(LED_MATRIX_KEYREACTIVE_ENABLED)
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS
-# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS
-# define ENABLE_LED_MATRIX_SPLASH
-# define ENABLE_LED_MATRIX_MULTISPLASH
-#endif
-#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT
-#define ENABLE_LED_MATRIX_WAVE_UP_DOWN
/* i2c (for LED matrix) */
#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
index 8f245d9fa3..80d3681437 100644
--- a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
+++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c
@@ -171,7 +171,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
#endif
#ifdef LED_MATRIX_ENABLE
-const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
// The numbers in the comments are the led numbers DXX on the PCB
/* Refer to IS31 manual for these locations
* driver
diff --git a/keyboards/input_club/ergodox_infinity/info.json b/keyboards/input_club/ergodox_infinity/info.json
index d69aeb5d0c..d2d1e73943 100644
--- a/keyboards/input_club/ergodox_infinity/info.json
+++ b/keyboards/input_club/ergodox_infinity/info.json
@@ -7,7 +7,31 @@
"device_version": "0.0.1"
},
"led_matrix": {
- "driver": "is31fl3731"
+ "animations":{
+ "alphas_mods": true,
+ "breathing": true,
+ "band": true,
+ "band_pinwheel": true,
+ "band_spiral": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "dual_beacon": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "wave_left_right": true,
+ "wave_up_down": true
+ },
+ "driver": "is31fl3731",
+ "sleep": true,
+ "split_count": [38, 38]
},
"matrix_pins": {
"cols": ["D1", "D4", "D5", "D6", "D7"],
diff --git a/keyboards/input_club/infinity60/led/config.h b/keyboards/input_club/infinity60/led/config.h
index 293b192d60..b6f28a017e 100644
--- a/keyboards/input_club/infinity60/led/config.h
+++ b/keyboards/input_club/infinity60/led/config.h
@@ -3,8 +3,6 @@
#pragma once
-#define LED_MATRIX_LED_COUNT 63
-
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/input_club/infinity60/led/led.c b/keyboards/input_club/infinity60/led/led.c
index a6a63e202d..e54f30d7b4 100644
--- a/keyboards/input_club/infinity60/led/led.c
+++ b/keyboards/input_club/infinity60/led/led.c
@@ -4,7 +4,7 @@
#include "quantum.h"
#ifdef LED_MATRIX_ENABLE
-const is31fl3731_led_t g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.c b/keyboards/input_club/k_type/is31fl3733-dual.c
index e471cf0b71..385416439a 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.c
+++ b/keyboards/input_club/k_type/is31fl3733-dual.c
@@ -60,11 +60,10 @@
# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE
#endif
-// Transfer buffer for TWITransmitData()
-uint8_t g_twi_transfer_buffer[20];
+uint8_t i2c_transfer_buffer[20];
// These buffers match the IS31FL3733 PWM registers.
-// The control buffers match the PG0 LED On/Off registers.
+// The control buffers match the page 0 LED On/Off registers.
// Storing them like this is optimal for I2C transfers to the registers.
// We could optimize this and take out the unused registers from these
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
@@ -77,47 +76,52 @@ bool g_led_control_registers_update_required[IS31FL3733_DRIVER_COUNT]
bool is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data) {
// If the transaction fails function returns false.
- g_twi_transfer_buffer[0] = reg;
- g_twi_transfer_buffer[1] = data;
+ i2c_transfer_buffer[0] = reg;
+ i2c_transfer_buffer[1] = data;
#if IS31FL3733_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
+ if (i2c_transmit(index, addr << 1, i2c_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
+ if (i2c_transmit(index, addr << 1, i2c_transfer_buffer, 2, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
return true;
}
+void is31fl3733_select_page(uint8_t index, uint8_t addr, uint8_t page) {
+ is31fl3733_write_register(index, addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
+ is31fl3733_write_register(index, addr, IS31FL3733_REG_COMMAND, page);
+}
+
bool is31fl3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffer) {
- // Assumes PG1 is already selected.
+ // Assumes page 1 is already selected.
// If any of the transactions fails function returns false.
// Transmit PWM registers in 12 transfers of 16 bytes.
- // g_twi_transfer_buffer[] is 20 bytes
+ // i2c_transfer_buffer[] is 20 bytes
// Iterate over the pwm_buffer contents at 16 byte intervals.
for (int i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) {
- g_twi_transfer_buffer[0] = i;
+ i2c_transfer_buffer[0] = i;
// Copy the data from i to i+15.
// Device will auto-increment register for data after the first byte
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
for (int j = 0; j < 16; j++) {
- g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
+ i2c_transfer_buffer[1 + j] = pwm_buffer[i + j];
}
#if IS31FL3733_I2C_PERSISTENCE > 0
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
+ if (i2c_transmit(index, addr << 1, i2c_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
}
#else
- if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
+ if (i2c_transmit(index, addr << 1, i2c_transfer_buffer, 17, IS31FL3733_I2C_TIMEOUT) != 0) {
return false;
}
#endif
@@ -150,32 +154,23 @@ void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync) {
// then disable software shutdown.
// Sync is passed so set it according to the datasheet.
- // Unlock the command register.
- is31fl3733_write_register(bus, addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
+ is31fl3733_select_page(bus, addr, IS31FL3733_COMMAND_LED_CONTROL);
- // Select PG0
- is31fl3733_write_register(bus, addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_LED_CONTROL);
// Turn off all LEDs.
for (int i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3733_write_register(bus, addr, i, 0x00);
}
- // Unlock the command register.
- is31fl3733_write_register(bus, addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
+ is31fl3733_select_page(bus, addr, IS31FL3733_COMMAND_PWM);
- // Select PG1
- is31fl3733_write_register(bus, addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_PWM);
// Set PWM on all LEDs to 0
// No need to setup Breath registers to PWM as that is the default.
for (int i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i++) {
is31fl3733_write_register(bus, addr, i, 0x00);
}
- // Unlock the command register.
- is31fl3733_write_register(bus, addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
+ is31fl3733_select_page(bus, addr, IS31FL3733_COMMAND_FUNCTION);
- // Select PG3
- is31fl3733_write_register(bus, addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_FUNCTION);
// Set de-ghost pull-up resistors (SWx)
is31fl3733_write_register(bus, addr, IS31FL3733_FUNCTION_REG_SW_PULLUP, IS31FL3733_SW_PULLUP);
// Set de-ghost pull-down resistors (CSx)
@@ -242,11 +237,9 @@ void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bo
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
if (g_pwm_buffer_update_required[index]) {
- // Firstly we need to unlock the command register and select PG1.
- is31fl3733_write_register(index, addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
- is31fl3733_write_register(index, addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_PWM);
+ is31fl3733_select_page(index, addr, IS31FL3733_COMMAND_PWM);
- // If any of the transactions fail we risk writing dirty PG0,
+ // If any of the transactions fail we risk writing dirty page 0,
// refresh page 0 just in case.
if (!is31fl3733_write_pwm_buffer(index, addr, g_pwm_buffer[index])) {
g_led_control_registers_update_required[index] = true;
@@ -257,9 +250,8 @@ void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
if (g_led_control_registers_update_required[index]) {
- // Firstly we need to unlock the command register and select PG0
- is31fl3733_write_register(index, addr, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
- is31fl3733_write_register(index, addr, IS31FL3733_REG_COMMAND, IS31FL3733_COMMAND_LED_CONTROL);
+ is31fl3733_select_page(index, addr, IS31FL3733_COMMAND_LED_CONTROL);
+
for (int i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
is31fl3733_write_register(index, addr, i, g_led_control_registers[index][i]);
}
diff --git a/keyboards/input_club/k_type/is31fl3733-dual.h b/keyboards/input_club/k_type/is31fl3733-dual.h
index 2f7d58f7e7..e0fc5fd3b9 100644
--- a/keyboards/input_club/k_type/is31fl3733-dual.h
+++ b/keyboards/input_club/k_type/is31fl3733-dual.h
@@ -70,6 +70,7 @@ extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT];
void is31fl3733_init_drivers(void);
void is31fl3733_init(uint8_t bus, uint8_t addr, uint8_t sync);
bool is31fl3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data);
+void is31fl3733_select_page(uint8_t index, uint8_t addr, uint8_t page);
bool is31fl3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffer);
void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
diff --git a/keyboards/input_club/k_type/keymaps/andrew-fahmy/config.h b/keyboards/input_club/k_type/keymaps/andrew-fahmy/config.h
index c40495c8de..5052271687 100644
--- a/keyboards/input_club/k_type/keymaps/andrew-fahmy/config.h
+++ b/keyboards/input_club/k_type/keymaps/andrew-fahmy/config.h
@@ -16,37 +16,5 @@
#pragma once
-
-#ifdef RGB_MATRIX_ENABLE
-// # define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-// # define RGB_MATRIX_KEYPRESSES
-# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_RAINDROPS
-
-// # define DEBUG_MATRIX_SCAN_RATE
-
-# define RGB_MATRIX_LED_FLUSH_LIMIT 100
-// # define RGB_MATRIX_LED_PROCESS_LIMIT 2
-
-// i2c_master defines
-# define I2C_COUNT 2
-
-# define I2C1_BANK GPIOB
-# define I2C1_SCL 0 // A2 on pinout = B0
-# define I2C1_SDA 1 // A2 on pinout = B1
-# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
-# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
-
-# define USE_I2C2
-# define I2C2_BANK GPIOC
-# define I2C2_SCL 10 // A2 on pinout = C10
-# define I2C2_SDA 11 // A2 on pinout = C11
-# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2
-# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2
-
-# define DRIVER_ADDR_1 0b1010000
-# define DRIVER_ADDR_2 0b1010000
-# define DRIVER_COUNT 2
-# define DRIVER_1_LED_TOTAL 64
-# define DRIVER_2_LED_TOTAL 55
-# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
-#endif
+#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_RAINDROPS
+#define RGB_MATRIX_LED_FLUSH_LIMIT 100
diff --git a/keyboards/input_club/whitefox/config.h b/keyboards/input_club/whitefox/config.h
index 2d6affe84a..0a2a060e9b 100644
--- a/keyboards/input_club/whitefox/config.h
+++ b/keyboards/input_club/whitefox/config.h
@@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* LED matrix driver */
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
-#define LED_MATRIX_LED_COUNT 71
-#define LED_DISABLE_WHEN_USB_SUSPENDED
/* i2c (for LED matrix) */
#define I2C1_CLOCK_SPEED 400000
diff --git a/keyboards/input_club/whitefox/info.json b/keyboards/input_club/whitefox/info.json
index cb578e99b4..0428907fb8 100644
--- a/keyboards/input_club/whitefox/info.json
+++ b/keyboards/input_club/whitefox/info.json
@@ -8,7 +8,30 @@
"device_version": "0.0.1"
},
"led_matrix": {
- "driver": "is31fl3731"
+ "animations":{
+ "alphas_mods": true,
+ "breathing": true,
+ "band": true,
+ "band_pinwheel": true,
+ "band_spiral": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "cycle_out_in": true,
+ "dual_beacon": true,
+ "solid_reactive_simple": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "wave_left_right": true,
+ "wave_up_down": true
+ },
+ "driver": "is31fl3731",
+ "sleep": true
},
"matrix_pins": {
"cols": ["B2", "B3", "B18", "B19", "C0", "C8", "C9", "C10", "C11"],
diff --git a/keyboards/input_club/whitefox/whitefox.c b/keyboards/input_club/whitefox/whitefox.c
index 63c6a49240..07741365c3 100644
--- a/keyboards/input_club/whitefox/whitefox.c
+++ b/keyboards/input_club/whitefox/whitefox.c
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
#ifdef LED_MATRIX_ENABLE
-const is31fl3731_led_t PROGMEM g_is31fl3731_leds[LED_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
// The numbers in the comments are the led numbers DXX on the PCB
/* Refer to IS31 manual for these locations
* driver