diff options
Diffstat (limited to 'keyboards/keebwerk/mega/ansi')
-rwxr-xr-x | keyboards/keebwerk/mega/ansi/config.h | 4 | ||||
-rw-r--r-- | keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c | 92 | ||||
-rwxr-xr-x | keyboards/keebwerk/mega/ansi/rules.mk | 2 |
3 files changed, 50 insertions, 48 deletions
diff --git a/keyboards/keebwerk/mega/ansi/config.h b/keyboards/keebwerk/mega/ansi/config.h index c02f298e84..ee98c95636 100755 --- a/keyboards/keebwerk/mega/ansi/config.h +++ b/keyboards/keebwerk/mega/ansi/config.h @@ -50,7 +50,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } #define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } -#define DRIVER_COUNT 2 +#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND +#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_GND_SDA +#define IS31FL3733_DRIVER_COUNT 2 #define RGB_MATRIX_LED_COUNT 128 // These define which keys in the matrix are alphas/mods diff --git a/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c b/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c index 2b5d658f02..307eac90e1 100644 --- a/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c +++ b/keyboards/keebwerk/mega/ansi/keymaps/jesusvallejo/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { static uint16_t ledTimer; -uint8_t R = 0; /* First led*/ -uint8_t G = 0; /* Second led*/ -uint8_t B = 0; /* Third led*/ +uint8_t r = 0; /* First led*/ +uint8_t g = 0; /* Second led*/ +uint8_t b = 0; /* Third led*/ /* Boot animation parameters */ @@ -74,44 +74,44 @@ bool bootAnimation(void){ if (bootFirst>0 || bootSec>0){ if(bootFirst!=0){ if (timer_elapsed(ledTimer) > 150){ - G = 255; - R = 0; - B = 0; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 255; + r = 0; + b = 0; + is31fl3733_set_color( 6+64-1, r, g, b ); } if (timer_elapsed(ledTimer) > 300){ - G = 255; - R = 255; - B = 0; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 255; + r = 255; + b = 0; + is31fl3733_set_color( 6+64-1, r, g, b ); } if (timer_elapsed(ledTimer) > 400){ - G = 255; - R = 255; - B = 255; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 255; + r = 255; + b = 255; + is31fl3733_set_color( 6+64-1, r, g, b ); } if (timer_elapsed(ledTimer) > 500){ - G = 0; - R = 0; - B = 0; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 0; + r = 0; + b = 0; + is31fl3733_set_color( 6+64-1, r, g, b ); ledTimer = timer_read(); bootFirst--; } } if (bootFirst==0 && bootSec!=0){ if (timer_elapsed(ledTimer) > 200) { - G = 255; - R = 255; - B = 255; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 255; + r = 255; + b = 255; + is31fl3733_set_color( 6+64-1, r, g, b ); } if (timer_elapsed(ledTimer) > 400){ - G = 0; - R = 0; - B = 0; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 0; + r = 0; + b = 0; + is31fl3733_set_color( 6+64-1, r, g, b ); ledTimer = timer_read(); bootSec--; } @@ -125,29 +125,29 @@ bool bootAnimation(void){ void breathing(void) { if(timer_elapsed(ledTimer)<travelTime){ time = timer_elapsed(ledTimer); - if((time - previousTime) > fadeTime && R<maxBrightness){ - G+=fadeStep; - R+=fadeStep; - B+=fadeStep; - is31fl3733_set_color( 6+64-1, R, G, B ); + if((time - previousTime) > fadeTime && r<maxBrightness){ + g+=fadeStep; + r+=fadeStep; + b+=fadeStep; + is31fl3733_set_color( 6+64-1, r, g, b ); previousTime = time; } } else if(timer_elapsed(ledTimer)<(travelTime * 2)){ time = timer_elapsed(ledTimer); - if((time - previousTime) > fadeTime && R>minBrightness){ - G-=fadeStep; - R-=fadeStep; - B-=fadeStep; - is31fl3733_set_color( 6+64-1, R, G, B ); + if((time - previousTime) > fadeTime && r>minBrightness){ + g-=fadeStep; + r-=fadeStep; + b-=fadeStep; + is31fl3733_set_color( 6+64-1, r, g, b ); previousTime = time; } } else { - R=0; - G=0; - B=0; - is31fl3733_set_color( 6+64-1, R, G, B ); + r=0; + g=0; + b=0; + is31fl3733_set_color( 6+64-1, r, g, b ); previousTime = 0; time = 0; ledTimer=timer_read(); @@ -166,10 +166,10 @@ void matrix_scan_user(void){ prevCapsState = capsState; } else if(!capsState && capsState != prevCapsState){ - G = 0; - R = 0; - B = 0; - is31fl3733_set_color( 6+64-1, R, G, B ); + g = 0; + r = 0; + b = 0; + is31fl3733_set_color( 6+64-1, r, g, b ); prevCapsState = capsState; } } diff --git a/keyboards/keebwerk/mega/ansi/rules.mk b/keyboards/keebwerk/mega/ansi/rules.mk index 5546dc18d4..e257f3063f 100755 --- a/keyboards/keebwerk/mega/ansi/rules.mk +++ b/keyboards/keebwerk/mega/ansi/rules.mk @@ -24,4 +24,4 @@ SRC += keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ drivers/led/issi/is31fl3733.c \ quantum/color.c -QUANTUM_LIB_SRC += i2c_master.c +I2C_DRIVER_REQUIRED = yes |