summaryrefslogtreecommitdiffstats
path: root/keyboard/clueboard2
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2016-03-28 22:49:24 -0700
committerskullY <skullydazed@gmail.com>2016-03-28 22:49:24 -0700
commit5e822417d7aaebbb58154092ad2a7b5fd2469fbb (patch)
tree6720c29b604af5c365af3298c58ec07038c3cdce /keyboard/clueboard2
parent073b44924cdfd28d64ad2ee1dbe88b00f92d2c72 (diff)
Fixup clueboard support and add rgb to clueboard1
Diffstat (limited to 'keyboard/clueboard2')
-rw-r--r--keyboard/clueboard2/clueboard2.c8
-rw-r--r--keyboard/clueboard2/clueboard2.h4
-rw-r--r--keyboard/clueboard2/keymaps/keymap_default.c22
3 files changed, 24 insertions, 10 deletions
diff --git a/keyboard/clueboard2/clueboard2.c b/keyboard/clueboard2/clueboard2.c
index 97d393d18d..437f8d1e49 100644
--- a/keyboard/clueboard2/clueboard2.c
+++ b/keyboard/clueboard2/clueboard2.c
@@ -5,16 +5,16 @@
#endif
__attribute__ ((weak))
-void * matrix_init_user(void) {
+void matrix_init_user(void) {
// leave these blank
};
__attribute__ ((weak))
-void * matrix_scan_user(void) {
+void matrix_scan_user(void) {
// leave these blank
};
-void * matrix_init_kb(void) {
+void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
if (matrix_init_user) {
@@ -35,7 +35,7 @@ void * matrix_init_kb(void) {
MCUCR |= (1<<JTD);
};
-void * matrix_scan_kb(void) {
+void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
if (matrix_scan_user) {
diff --git a/keyboard/clueboard2/clueboard2.h b/keyboard/clueboard2/clueboard2.h
index 822a797351..9f0d42d2b3 100644
--- a/keyboard/clueboard2/clueboard2.h
+++ b/keyboard/clueboard2/clueboard2.h
@@ -51,7 +51,7 @@
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
}
-void * matrix_init_user(void);
-void * matrix_scan_user(void);
+void matrix_init_user(void);
+void matrix_scan_user(void);
#endif
diff --git a/keyboard/clueboard2/keymaps/keymap_default.c b/keyboard/clueboard2/keymaps/keymap_default.c
index 5d52f27a72..10fff7b9ac 100644
--- a/keyboard/clueboard2/keymaps/keymap_default.c
+++ b/keyboard/clueboard2/keymaps/keymap_default.c
@@ -70,15 +70,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------------------------------------------------------'
*/
[_RS] = KEYMAP(
- KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(0), F(6), \
- KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(7), \
+ #ifdef ENABLE_RGBLIGHT
+ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(1), F(7), \
+ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(8), \
KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
- MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(4), \
- KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(1), F(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(3), F(5), F(2)),
+ MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(5), \
+ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(2), F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(4), F(6), F(3)),
+ #else
+ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS),
+ #endif
};
enum function_id {
SHIFT_ESC,
+ #ifdef ENABLE_RGBLIGHT
RGBLED_TOGGLE,
RGBLED_STEP_MODE,
RGBLED_INCREASE_HUE,
@@ -87,10 +96,12 @@ enum function_id {
RGBLED_DECREASE_SAT,
RGBLED_INCREASE_VAL,
RGBLED_DECREASE_VAL
+ #endif
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_FUNCTION(SHIFT_ESC),
+ #ifdef ENABLE_RGBLIGHT
[1] = ACTION_FUNCTION(RGBLED_TOGGLE),
[2] = ACTION_FUNCTION(RGBLED_STEP_MODE),
[3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
@@ -99,6 +110,7 @@ const uint16_t PROGMEM fn_actions[] = {
[6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
[7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
[8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
+ #endif
};
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
@@ -125,6 +137,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
}
break;
//led operations
+ #ifdef ENABLE_RGBLIGHT
case RGBLED_TOGGLE:
if (record->event.pressed) {
rgblight_toggle();
@@ -166,5 +179,6 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
rgblight_step();
}
break;
+ #endif
}
}