finish up docs
This commit is contained in:
parent
6a46da81cd
commit
1fd3feba47
@ -23,7 +23,7 @@ Configure the hardware via your `config.h`:
|
|||||||
|
|
||||||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
||||||
|
|
||||||
Define these arrays:
|
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||||
|
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* Refer to IS31 manual for these locations
|
/* Refer to IS31 manual for these locations
|
||||||
@ -36,7 +36,7 @@ Define these arrays:
|
|||||||
....
|
....
|
||||||
}
|
}
|
||||||
|
|
||||||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf). The `driver` is the index of the driver you defined in your `config.h`.
|
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf). The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
|
||||||
|
|
||||||
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* {row | col << 4}
|
/* {row | col << 4}
|
||||||
@ -57,7 +57,7 @@ Where all variables are decimels/floats.
|
|||||||
|
|
||||||
## Keycodes
|
## Keycodes
|
||||||
|
|
||||||
Many RGB keycodes are currently shared with the RGBLIGHT system:
|
All RGB keycodes are currently shared with the RGBLIGHT system:
|
||||||
|
|
||||||
* `RGB_TOG` - toggle
|
* `RGB_TOG` - toggle
|
||||||
* `RGB_MOD` - cycle through modes
|
* `RGB_MOD` - cycle through modes
|
||||||
@ -73,7 +73,13 @@ Many RGB keycodes are currently shared with the RGBLIGHT system:
|
|||||||
|
|
||||||
## Custom layer effects
|
## Custom layer effects
|
||||||
|
|
||||||
Customised effects can be defined with
|
Custom layer effects can be done by defining this in your `<keyboard>.c`:
|
||||||
|
|
||||||
|
void rgb_matrix_indicators_kb(void) {
|
||||||
|
// rgb_matrix_set_color(index, red, green, blue);
|
||||||
|
}
|
||||||
|
|
||||||
|
A similar function works in the keymap as `rgb_matrix_indicators_user`.
|
||||||
|
|
||||||
## Additional `config.h` Options
|
## Additional `config.h` Options
|
||||||
|
|
||||||
@ -88,3 +94,18 @@ The EEPROM for it is currently shared with the RGBLIGHT system (it's generally a
|
|||||||
|
|
||||||
#define EECONFIG_RGB_MATRIX (uint32_t *)16
|
#define EECONFIG_RGB_MATRIX (uint32_t *)16
|
||||||
|
|
||||||
|
Where `16` is an unused index from `eeconfig.h`.
|
||||||
|
|
||||||
|
## Suspended state
|
||||||
|
|
||||||
|
To use the suspend feature, add this to your `<keyboard>.c`:
|
||||||
|
|
||||||
|
void suspend_power_down_kb(void)
|
||||||
|
{
|
||||||
|
rgb_matrix_set_suspend_state(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void suspend_wakeup_init_kb(void)
|
||||||
|
{
|
||||||
|
rgb_matrix_set_suspend_state(false);
|
||||||
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* Copyright 2017 Jason Williams
|
/* Copyright 2017 Jack Humbert
|
||||||
* Copyright 2017 Jack Humbert
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -158,12 +157,6 @@ void matrix_scan_kb(void)
|
|||||||
matrix_scan_user();
|
matrix_scan_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led)
|
|
||||||
{
|
|
||||||
rgb_matrix_set_indicator_state(usb_led);
|
|
||||||
//rgb_matrix_debug_led(usb_led & (1<<USB_LED_CAPS_LOCK));
|
|
||||||
}
|
|
||||||
|
|
||||||
void suspend_power_down_kb(void)
|
void suspend_power_down_kb(void)
|
||||||
{
|
{
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/* Copyright 2017 Jason Williams
|
/* Copyright 2017 Jack Humbert
|
||||||
* Copyright 2017 Jack Humbert
|
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -84,6 +84,8 @@ enum rgb_matrix_effects {
|
|||||||
RGB_MATRIX_EFFECT_MAX
|
RGB_MATRIX_EFFECT_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue );
|
||||||
|
|
||||||
// This runs after another backlight effect and replaces
|
// This runs after another backlight effect and replaces
|
||||||
// colors already set
|
// colors already set
|
||||||
void rgb_matrix_indicators(void);
|
void rgb_matrix_indicators(void);
|
||||||
|
Reference in New Issue
Block a user