Skip to content

Commit

Permalink
[Keyboard] Fix jc65 when RGB or BACKLIGHT disabled (qmk#6022)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptillemans authored and drashna committed May 31, 2019
1 parent 3ef4254 commit 8896676
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions keyboards/jc65/v32a/v32a.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c.h"
#include "quantum.h"

#ifdef RGBLIGHT_ENABLE
extern rgblight_config_t rgblight_config;

void rgblight_set(void) {
Expand All @@ -43,12 +44,16 @@ void rgblight_set(void) {
i2c_init();
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
}
#endif

__attribute__ ((weak))
void matrix_scan_user(void) {
rgblight_task();
#ifdef RGBLIGHT_ENABLE
rgblight_task();
#endif
}

#ifdef BACKLIGHT_ENABLE
void backlight_init_ports(void) {
DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6);
PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6);
Expand All @@ -62,4 +67,5 @@ void backlight_set(uint8_t level) {
// Turn on the lights
PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6);
}
}
}
#endif

0 comments on commit 8896676

Please sign in to comment.