mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-24 04:12:56 +00:00
LED drivers: add support for shutdown pin (#23058)
* LED drivers: add support for shutdown pin * Update candidate boards
This commit is contained in:
parent
0b7df03ab7
commit
a9f1105f98
@ -16,6 +16,7 @@
|
||||
|
||||
#include "is31fl3218-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define IS31FL3218_PWM_REGISTER_COUNT 18
|
||||
#define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3
|
||||
@ -66,6 +67,11 @@ void is31fl3218_write_pwm_buffer(void) {
|
||||
void is31fl3218_init(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3218_SDB_PIN)
|
||||
setPinOutput(IS31FL3218_SDB_PIN);
|
||||
writePinHigh(IS31FL3218_SDB_PIN);
|
||||
#endif
|
||||
|
||||
// In case we ever want to reinitialize (?)
|
||||
is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "is31fl3218.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define IS31FL3218_PWM_REGISTER_COUNT 18
|
||||
#define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3
|
||||
@ -66,6 +67,11 @@ void is31fl3218_write_pwm_buffer(void) {
|
||||
void is31fl3218_init(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3218_SDB_PIN)
|
||||
setPinOutput(IS31FL3218_SDB_PIN);
|
||||
writePinHigh(IS31FL3218_SDB_PIN);
|
||||
#endif
|
||||
|
||||
// In case we ever want to reinitialize (?)
|
||||
is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "is31fl3731-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3731_PWM_REGISTER_COUNT 144
|
||||
@ -97,6 +98,11 @@ void is31fl3731_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3731_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3731_SDB_PIN)
|
||||
setPinOutput(IS31FL3731_SDB_PIN);
|
||||
writePinHigh(IS31FL3731_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_init(i);
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "is31fl3731.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3731_PWM_REGISTER_COUNT 144
|
||||
@ -96,6 +97,11 @@ void is31fl3731_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3731_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3731_SDB_PIN)
|
||||
setPinOutput(IS31FL3731_SDB_PIN);
|
||||
writePinHigh(IS31FL3731_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3733-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3733_PWM_REGISTER_COUNT 192
|
||||
@ -142,6 +143,11 @@ void is31fl3733_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3733_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3733_SDB_PIN)
|
||||
setPinOutput(IS31FL3733_SDB_PIN);
|
||||
writePinHigh(IS31FL3733_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
is31fl3733_init(i);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "is31fl3733.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3733_PWM_REGISTER_COUNT 192
|
||||
@ -141,6 +142,11 @@ void is31fl3733_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3733_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3733_SDB_PIN)
|
||||
setPinOutput(IS31FL3733_SDB_PIN);
|
||||
writePinHigh(IS31FL3733_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
is31fl3733_init(i);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "is31fl3736-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96
|
||||
@ -113,6 +114,11 @@ void is31fl3736_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3736_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3736_SDB_PIN)
|
||||
setPinOutput(IS31FL3736_SDB_PIN);
|
||||
writePinHigh(IS31FL3736_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) {
|
||||
is31fl3736_init(i);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "is31fl3736.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3736_PWM_REGISTER_COUNT 192 // actually 96
|
||||
@ -113,6 +114,11 @@ void is31fl3736_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3736_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3736_SDB_PIN)
|
||||
setPinOutput(IS31FL3736_SDB_PIN);
|
||||
writePinHigh(IS31FL3736_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) {
|
||||
is31fl3736_init(i);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "is31fl3737-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144
|
||||
@ -115,6 +116,11 @@ void is31fl3737_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3737_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3737_SDB_PIN)
|
||||
setPinOutput(IS31FL3737_SDB_PIN);
|
||||
writePinHigh(IS31FL3737_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) {
|
||||
is31fl3737_init(i);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "is31fl3737.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3737_PWM_REGISTER_COUNT 192 // actually 144
|
||||
@ -115,6 +116,11 @@ void is31fl3737_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3737_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3737_SDB_PIN)
|
||||
setPinOutput(IS31FL3737_SDB_PIN);
|
||||
writePinHigh(IS31FL3737_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) {
|
||||
is31fl3737_init(i);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "is31fl3741-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3741_PWM_0_REGISTER_COUNT 180
|
||||
@ -141,6 +142,11 @@ void is31fl3741_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3741_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3741_SDB_PIN)
|
||||
setPinOutput(IS31FL3741_SDB_PIN);
|
||||
writePinHigh(IS31FL3741_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) {
|
||||
is31fl3741_init(i);
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "is31fl3741.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3741_PWM_0_REGISTER_COUNT 180
|
||||
@ -141,6 +142,11 @@ void is31fl3741_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3741_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3741_SDB_PIN)
|
||||
setPinOutput(IS31FL3741_SDB_PIN);
|
||||
writePinHigh(IS31FL3741_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) {
|
||||
is31fl3741_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3742a-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3742A_PWM_REGISTER_COUNT 180
|
||||
@ -114,6 +115,11 @@ void is31fl3742a_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3742a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3742A_SDB_PIN)
|
||||
setPinOutput(IS31FL3742A_SDB_PIN);
|
||||
writePinHigh(IS31FL3742A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) {
|
||||
is31fl3742a_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3742a.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3742A_PWM_REGISTER_COUNT 180
|
||||
@ -114,6 +115,11 @@ void is31fl3742a_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3742a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3742A_SDB_PIN)
|
||||
setPinOutput(IS31FL3742A_SDB_PIN);
|
||||
writePinHigh(IS31FL3742A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) {
|
||||
is31fl3742a_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3743a-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3743A_PWM_REGISTER_COUNT 198
|
||||
@ -136,6 +137,11 @@ void is31fl3743a_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3743a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3743A_SDB_PIN)
|
||||
setPinOutput(IS31FL3743A_SDB_PIN);
|
||||
writePinHigh(IS31FL3743A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) {
|
||||
is31fl3743a_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3743a.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3743A_PWM_REGISTER_COUNT 198
|
||||
@ -136,6 +137,11 @@ void is31fl3743a_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3743a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3743A_SDB_PIN)
|
||||
setPinOutput(IS31FL3743A_SDB_PIN);
|
||||
writePinHigh(IS31FL3743A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) {
|
||||
is31fl3743a_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3745-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3745_PWM_REGISTER_COUNT 144
|
||||
@ -136,6 +137,11 @@ void is31fl3745_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3745_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3745_SDB_PIN)
|
||||
setPinOutput(IS31FL3745_SDB_PIN);
|
||||
writePinHigh(IS31FL3745_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) {
|
||||
is31fl3745_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3745.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3745_PWM_REGISTER_COUNT 144
|
||||
@ -136,6 +137,11 @@ void is31fl3745_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3745_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3745_SDB_PIN)
|
||||
setPinOutput(IS31FL3745_SDB_PIN);
|
||||
writePinHigh(IS31FL3745_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) {
|
||||
is31fl3745_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3746a-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3746A_PWM_REGISTER_COUNT 72
|
||||
@ -114,6 +115,11 @@ void is31fl3746a_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3746a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3746A_SDB_PIN)
|
||||
setPinOutput(IS31FL3746A_SDB_PIN);
|
||||
writePinHigh(IS31FL3746A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) {
|
||||
is31fl3746a_init(i);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "is31fl3746a.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3746A_PWM_REGISTER_COUNT 72
|
||||
@ -114,6 +115,11 @@ void is31fl3746a_write_pwm_buffer(uint8_t index) {
|
||||
void is31fl3746a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3746A_SDB_PIN)
|
||||
setPinOutput(IS31FL3746A_SDB_PIN);
|
||||
writePinHigh(IS31FL3746A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) {
|
||||
is31fl3746a_init(i);
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "snled27351-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define SNLED27351_PWM_REGISTER_COUNT 192
|
||||
#define SNLED27351_LED_CONTROL_REGISTER_COUNT 24
|
||||
@ -103,6 +104,11 @@ void snled27351_write_pwm_buffer(uint8_t index) {
|
||||
void snled27351_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(SNLED27351_SDB_PIN)
|
||||
setPinOutput(SNLED27351_SDB_PIN);
|
||||
writePinHigh(SNLED27351_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) {
|
||||
snled27351_init(i);
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "snled27351.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define SNLED27351_PWM_REGISTER_COUNT 192
|
||||
#define SNLED27351_LED_CONTROL_REGISTER_COUNT 24
|
||||
@ -103,6 +104,11 @@ void snled27351_write_pwm_buffer(uint8_t index) {
|
||||
void snled27351_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(SNLED27351_SDB_PIN)
|
||||
setPinOutput(SNLED27351_SDB_PIN);
|
||||
writePinHigh(SNLED27351_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) {
|
||||
snled27351_init(i);
|
||||
}
|
||||
|
@ -5,3 +5,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
|
||||
#define IS31FL3733_SDB_PIN D5
|
||||
|
@ -1,12 +1,6 @@
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void matrix_init_kb(void) {
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
|
@ -44,6 +44,7 @@ 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 IS31FL3731_SDB_PIN B16
|
||||
|
||||
/* i2c (for LED matrix) */
|
||||
#define I2C1_CLOCK_SPEED 400000
|
||||
|
@ -95,11 +95,6 @@ __attribute__ ((weak)) void matrix_scan_user(void) {}
|
||||
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
#ifdef LED_MATRIX_ENABLE
|
||||
// Turn on LED controller
|
||||
setPinOutput(B16);
|
||||
writePinHigh(B16);
|
||||
#endif
|
||||
// The backlight always has to be initialized, otherwise it will stay lit
|
||||
lcd_backlight_hal_init();
|
||||
#ifdef ST7565_ENABLE
|
||||
|
@ -50,3 +50,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
|
||||
#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_GND
|
||||
#define IS31FL3733_SDB_PIN B16
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "is31fl3733-dual.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3733_PWM_REGISTER_COUNT 192
|
||||
@ -126,6 +127,11 @@ void is31fl3733_write_pwm_buffer(uint8_t bus, uint8_t index) {
|
||||
}
|
||||
|
||||
void is31fl3733_init_drivers(void) {
|
||||
#if defined(IS31FL3733_SDB_PIN)
|
||||
setPinOutput(IS31FL3733_SDB_PIN);
|
||||
writePinHigh(IS31FL3733_SDB_PIN);
|
||||
#endif
|
||||
|
||||
i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN);
|
||||
|
||||
is31fl3733_init(0, 0);
|
||||
|
@ -201,14 +201,6 @@ led_config_t g_led_config = {
|
||||
}
|
||||
};
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
// Turn on LED controller
|
||||
setPinOutput(B16);
|
||||
writePinHigh(B16);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
@ -22,6 +22,7 @@ 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 IS31FL3731_SDB_PIN B16
|
||||
|
||||
/* i2c (for LED matrix) */
|
||||
#define I2C1_CLOCK_SPEED 400000
|
||||
|
@ -65,15 +65,6 @@ led_config_t g_led_config = {
|
||||
};
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
#ifdef LED_MATRIX_ENABLE
|
||||
// Turn on LED controller
|
||||
setPinOutput(B16);
|
||||
writePinHigh(B16);
|
||||
#endif
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN B7
|
||||
|
@ -183,11 +183,4 @@ void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(B7);
|
||||
writePinHigh(B7);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
#endif
|
||||
|
@ -181,11 +181,4 @@ void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(B7);
|
||||
writePinHigh(B7);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
#endif
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN A2
|
||||
|
@ -116,9 +116,3 @@ void suspend_wakeup_init_kb(void) {
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -126,9 +126,3 @@ void suspend_wakeup_init_kb(void) {
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN A2
|
||||
|
@ -119,12 +119,4 @@ void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -126,9 +126,3 @@ void suspend_wakeup_init_kb(void) {
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN A2
|
||||
|
@ -116,11 +116,4 @@ void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -119,12 +119,4 @@ void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -126,9 +126,3 @@ void suspend_wakeup_init_kb(void) {
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN A2
|
||||
|
@ -131,9 +131,3 @@ void suspend_wakeup_init_kb(void) {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN B7
|
||||
|
@ -151,11 +151,4 @@ void matrix_init_kb(void) {
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(B7);
|
||||
writePinHigh(B7);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
#endif
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN A2
|
||||
|
@ -149,12 +149,4 @@ void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(A2);
|
||||
writePinHigh(A2);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -17,3 +17,4 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
#define IS31FL3741_SDB_PIN B7
|
||||
|
@ -142,14 +142,4 @@ led_config_t g_led_config = {
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(B7);
|
||||
writePinHigh(B7);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -16,6 +16,8 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
|
||||
#define IS31FL3731_SDB_PIN D2
|
||||
#define IS31FL3731_IRQ_PIN D3
|
||||
|
||||
#define RGB_MATRIX_DISABLE_KEYCODES
|
||||
|
||||
|
@ -93,13 +93,9 @@ void keyboard_pre_init_kb(void) {
|
||||
setPinOutput(POWER_LED_PIN);
|
||||
writePinLow(POWER_LED_PIN);
|
||||
|
||||
// Enable RGB driver IC
|
||||
setPinOutput(RGB_DISABLE_N_PIN);
|
||||
writePinHigh(RGB_DISABLE_N_PIN);
|
||||
|
||||
// We don't use this feature of the IS31FL3731 but it is electrically connected
|
||||
// Make sure not to drive it
|
||||
setPinInput(RGB_IRQ_N_PIN);
|
||||
setPinInput(IS31FL3731_IRQ_PIN);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
@ -19,8 +19,6 @@
|
||||
#include "quantum.h"
|
||||
|
||||
#define POWER_LED_PIN F1
|
||||
#define RGB_DISABLE_N_PIN D2
|
||||
#define RGB_IRQ_N_PIN D3
|
||||
|
||||
// If you want something similar to what Taran from LMG does in https://github.com/TaranVH/2nd-keyboard
|
||||
// you can create a "wrapper key" by uncommenting the row below and chosing your wrapper keycode.
|
||||
|
@ -4,9 +4,9 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3743A_I2C_ADDRESS_1 IS31FL3743A_I2C_ADDRESS_GND_GND
|
||||
#define IS31FL3743A_SDB_PIN C1
|
||||
|
||||
#define CAPS_LOCK_INDEX 28
|
||||
#define WIN_MOD_INDEX 16
|
||||
#define MAC_MOD_INDEX 17
|
||||
#define WIN_LOCK_INDEX 54
|
||||
#define SDB C1 //RGB matrix Power control PIN
|
||||
|
@ -213,14 +213,14 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
|
||||
|
||||
void suspend_power_down_kb() {
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
writePinLow(SDB);
|
||||
writePinLow(IS31FL3743A_SDB_PIN);
|
||||
# endif
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb() {
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
writePinHigh(SDB);
|
||||
writePinHigh(IS31FL3743A_SDB_PIN);
|
||||
# endif
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
@ -228,8 +228,4 @@ void suspend_wakeup_init_kb() {
|
||||
void board_init(void) {
|
||||
// JTAG-DP Disabled and SW-DP Disabled
|
||||
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
setPinOutput(SDB);
|
||||
writePinHigh(SDB);
|
||||
# endif
|
||||
}
|
||||
|
@ -4,10 +4,10 @@
|
||||
#pragma once
|
||||
|
||||
#define IS31FL3743A_I2C_ADDRESS_1 IS31FL3743A_I2C_ADDRESS_GND_GND
|
||||
#define IS31FL3743A_SDB_PIN A4
|
||||
|
||||
#define CAPS_LOCK_INDEX 28
|
||||
#define WIN_MOD_INDEX 16
|
||||
#define MAC_MOD_INDEX 17
|
||||
#define SDB A4
|
||||
|
||||
#define g_suspend_state rgb_matrix_get_suspend_state()
|
||||
|
@ -149,12 +149,12 @@ bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
|
||||
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
writePinLow(SDB);
|
||||
writePinLow(IS31FL3743A_SDB_PIN);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
writePinHigh(SDB);
|
||||
writePinHigh(IS31FL3743A_SDB_PIN);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
@ -220,8 +220,4 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
void board_init(void) {
|
||||
// JTAG-DP Disabled and SW-DP Disabled
|
||||
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
setPinOutput(SDB);
|
||||
writePinHigh(SDB);
|
||||
# endif
|
||||
}
|
||||
|
@ -16,5 +16,4 @@
|
||||
#pragma once
|
||||
|
||||
#define SNLED27351_I2C_ADDRESS_1 SNLED27351_I2C_ADDRESS_GND
|
||||
|
||||
#define SDB C1
|
||||
#define SNLED27351_SDB_PIN C1
|
||||
|
@ -102,18 +102,13 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
|
||||
void suspend_power_down_kb() {
|
||||
writePinLow(SDB);
|
||||
writePinLow(SNLED27351_SDB_PIN);
|
||||
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb() {
|
||||
writePinHigh(SDB);
|
||||
|
||||
writePinHigh(SNLED27351_SDB_PIN);
|
||||
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
void board_init(void) {
|
||||
setPinOutput(SDB);
|
||||
writePinHigh(SDB);
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND
|
||||
#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_VCC
|
||||
#define IS31FL3733_SDB_PIN B9
|
||||
|
||||
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS
|
||||
|
||||
|
@ -16,14 +16,6 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This board has !SDB of the is31 wired to D2. Set high to enable */
|
||||
void keyboard_post_init_kb(void) {
|
||||
setPinOutput(B9);
|
||||
writePinHigh(B9);
|
||||
|
||||
keyboard_post_init_user();
|
||||
}
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
|
Loading…
Reference in New Issue
Block a user