aboutsummaryrefslogtreecommitdiff
path: root/keyboards/jc65
diff options
context:
space:
mode:
authorPeter Tillemans <pti@snamellit.com>2019-05-31 02:11:55 +0200
committerDrashna Jaelre <drashna@live.com>2019-05-30 17:11:55 -0700
commit88966767ee6005c33600e97ef36c873d33cb1e15 (patch)
tree612eda4065a91ed3955f220000a1f0168d4db4ad /keyboards/jc65
parent3ef425423a9b8399b02c8240b4f56c3713f984f6 (diff)
downloadqmk_firmware-88966767ee6005c33600e97ef36c873d33cb1e15.tar.gz
qmk_firmware-88966767ee6005c33600e97ef36c873d33cb1e15.zip
[Keyboard] Fix jc65 when RGB or BACKLIGHT disabled (#6022)
Diffstat (limited to 'keyboards/jc65')
-rw-r--r--keyboards/jc65/v32a/v32a.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c
index 621789423..8176ade0a 100644
--- a/keyboards/jc65/v32a/v32a.c
+++ b/keyboards/jc65/v32a/v32a.c
@@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
29#include "i2c.h" 29#include "i2c.h"
30#include "quantum.h" 30#include "quantum.h"
31 31
32#ifdef RGBLIGHT_ENABLE
32extern rgblight_config_t rgblight_config; 33extern rgblight_config_t rgblight_config;
33 34
34void rgblight_set(void) { 35void rgblight_set(void) {
@@ -43,12 +44,16 @@ void rgblight_set(void) {
43 i2c_init(); 44 i2c_init();
44 i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); 45 i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
45} 46}
47#endif
46 48
47__attribute__ ((weak)) 49__attribute__ ((weak))
48void matrix_scan_user(void) { 50void matrix_scan_user(void) {
49 rgblight_task(); 51#ifdef RGBLIGHT_ENABLE
52 rgblight_task();
53#endif
50} 54}
51 55
56#ifdef BACKLIGHT_ENABLE
52void backlight_init_ports(void) { 57void backlight_init_ports(void) {
53 DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); 58 DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6);
54 PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); 59 PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6);
@@ -62,4 +67,5 @@ void backlight_set(uint8_t level) {
62 // Turn on the lights 67 // Turn on the lights
63 PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); 68 PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6);
64 } 69 }
65} \ No newline at end of file 70}
71#endif