diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2018-07-16 11:48:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-16 11:48:31 -0400 |
| commit | ade22f8e2c272044ea2f80ff6fe5ca9576858939 (patch) | |
| tree | 03c0131fa5982afc10a60e1fdd38a60be750291b /quantum/rgblight.c | |
| parent | 96cb9f4661faa80e795b1e6731b7a8e8a50bd0cb (diff) | |
| download | qmk_firmware-ade22f8e2c272044ea2f80ff6fe5ca9576858939.tar.gz qmk_firmware-ade22f8e2c272044ea2f80ff6fe5ca9576858939.zip | |
Adds support for Planck Rev 6 (#2666)
* initial files for rev 6 with encoder
* music map init, dip scan added
* adds ws2812 driver for arm
* flesh out dip and encoder support
* adds default encoder res
* adds default encoder res
* start muse implementation
* muse working with encoder as control
* flip direction
* try mouse wheel again
* dont break other revs
* dont break other revs
* conditional autio
* pwm ws driver (not working)
* update build includes for chibios
* update ws2812 driver/config
* last commit for glasser code
* working example
* remove rgb for now
* finish up rev6
* working encoder keycodes
* add warnings to planck keymaps about the LAYOUT
Diffstat (limited to 'quantum/rgblight.c')
| -rw-r--r-- | quantum/rgblight.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 4e2671d24..2490a1d9f 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
| @@ -14,9 +14,11 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include <math.h> | 16 | #include <math.h> |
| 17 | #include <avr/eeprom.h> | 17 | #ifdef __AVR__ |
| 18 | #include <avr/interrupt.h> | 18 | #include <avr/eeprom.h> |
| 19 | #include <util/delay.h> | 19 | #include <avr/interrupt.h> |
| 20 | #endif | ||
| 21 | #include "wait.h" | ||
| 20 | #include "progmem.h" | 22 | #include "progmem.h" |
| 21 | #include "timer.h" | 23 | #include "timer.h" |
| 22 | #include "rgblight.h" | 24 | #include "rgblight.h" |
| @@ -113,10 +115,16 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { | |||
| 113 | 115 | ||
| 114 | 116 | ||
| 115 | uint32_t eeconfig_read_rgblight(void) { | 117 | uint32_t eeconfig_read_rgblight(void) { |
| 116 | return eeprom_read_dword(EECONFIG_RGBLIGHT); | 118 | #ifdef __AVR__ |
| 119 | return eeprom_read_dword(EECONFIG_RGBLIGHT); | ||
| 120 | #else | ||
| 121 | return 0; | ||
| 122 | #endif | ||
| 117 | } | 123 | } |
| 118 | void eeconfig_update_rgblight(uint32_t val) { | 124 | void eeconfig_update_rgblight(uint32_t val) { |
| 119 | eeprom_update_dword(EECONFIG_RGBLIGHT, val); | 125 | #ifdef __AVR__ |
| 126 | eeprom_update_dword(EECONFIG_RGBLIGHT, val); | ||
| 127 | #endif | ||
| 120 | } | 128 | } |
| 121 | void eeconfig_update_rgblight_default(void) { | 129 | void eeconfig_update_rgblight_default(void) { |
| 122 | dprintf("eeconfig_update_rgblight_default\n"); | 130 | dprintf("eeconfig_update_rgblight_default\n"); |
| @@ -311,7 +319,7 @@ void rgblight_disable(void) { | |||
| 311 | #ifdef RGBLIGHT_ANIMATIONS | 319 | #ifdef RGBLIGHT_ANIMATIONS |
| 312 | rgblight_timer_disable(); | 320 | rgblight_timer_disable(); |
| 313 | #endif | 321 | #endif |
| 314 | _delay_ms(50); | 322 | wait_ms(50); |
| 315 | rgblight_set(); | 323 | rgblight_set(); |
| 316 | } | 324 | } |
| 317 | 325 | ||
