ソースを参照

Warning reductions (#430)

Warning reductions
Jack Humbert 9 年 前
コミット
1a0bac8bcc
55 ファイル変更168 行追加160 行削除
  1. 1 0
      keyboard/atomic/atomic.h
  2. BIN
      keyboard/atomic/keymaps/default/compiled.hex
  3. BIN
      keyboard/clueboard1/keymaps/default/compiled.hex
  4. BIN
      keyboard/ergodox_ez/keymaps/adnw_k_o_y/compiled.hex
  5. BIN
      keyboard/ergodox_ez/keymaps/csharp_dev/compiled.hex
  6. 1 1
      keyboard/ergodox_ez/keymaps/csharp_dev/keymap.c
  7. BIN
      keyboard/ergodox_ez/keymaps/dvorak_spanish/compiled.hex
  8. 6 6
      keyboard/ergodox_ez/keymaps/dvorak_spanish/keymap.c
  9. 3 0
      keyboard/ergodox_ez/keymaps/erez_experimental/config.h
  10. 0 4
      keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c
  11. BIN
      keyboard/ergodox_ez/keymaps/ordinary/compiled.hex
  12. 1 0
      keyboard/ergodox_ez/keymaps/ordinary/keymap.c
  13. BIN
      keyboard/ergodox_ez/keymaps/osx_de/compiled.hex
  14. 1 13
      keyboard/ergodox_ez/keymaps/osx_de/keymap.c
  15. BIN
      keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/compiled.hex
  16. 13 14
      keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/keymap.c
  17. BIN
      keyboard/ergodox_ez/keymaps/osx_de_experimental/compiled.hex
  18. 11 13
      keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c
  19. 1 1
      keyboard/ergodox_ez/keymaps/osx_fr/keymap.c
  20. BIN
      keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/compiled.hex
  21. 1 0
      keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/keymap.c
  22. BIN
      keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/compiled.hex
  23. 1 0
      keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/keymap.c
  24. BIN
      keyboard/ergodox_ez/keymaps/townk_osx/compiled.hex
  25. 1 1
      keyboard/ergodox_ez/keymaps/townk_osx/config.h
  26. BIN
      keyboard/ergodox_ez/keymaps/workman_osx_mdw/compiled.hex
  27. 1 1
      keyboard/ergodox_ez/keymaps/workman_osx_mdw/keymap.c
  28. 0 3
      keyboard/jd45/Makefile
  29. 0 61
      keyboard/jd45/backlight.c
  30. 60 6
      keyboard/jd45/jd45.c
  31. 1 0
      keyboard/jd45/jd45.h
  32. BIN
      keyboard/jd45/keymaps/default/compiled.hex
  33. BIN
      keyboard/jd45/keymaps/justin/compiled.hex
  34. BIN
      keyboard/phantom/keymaps/default/compiled.hex
  35. 1 2
      keyboard/phantom/led.c
  36. 3 6
      keyboard/phantom/phantom.c
  37. 1 1
      keyboard/phantom/phantom.h
  38. BIN
      keyboard/planck/keymaps/experimental/compiled.hex
  39. 8 0
      keyboard/planck/keymaps/experimental/config.h
  40. 0 2
      keyboard/planck/keymaps/experimental/keymap.c
  41. BIN
      keyboard/planck/keymaps/lucas/compiled.hex
  42. 2 1
      keyboard/planck/keymaps/lucas/keymap.c
  43. BIN
      keyboard/planck/keymaps/unicode/compiled.hex
  44. 1 0
      keyboard/planck/planck.h
  45. BIN
      keyboard/preonic/keymaps/default/compiled.hex
  46. 31 14
      keyboard/preonic/keymaps/default/keymap.c
  47. 1 0
      keyboard/preonic/preonic.h
  48. 4 4
      quantum/keymap.h
  49. 0 3
      quantum/keymap_extras/keymap_german_osx.h
  50. 6 0
      quantum/led.c
  51. 1 2
      tmk_core/common/command.c
  52. 1 0
      tmk_core/common/command.h
  53. 3 0
      tmk_core/common/led.h
  54. 0 1
      tmk_core/protocol/lufa/bluetooth.c
  55. 2 0
      tmk_core/protocol/lufa/bluetooth.h

+ 1 - 0
keyboard/atomic/atomic.h

@@ -4,6 +4,7 @@
 #include "quantum.h"
 #include <stddef.h>
 #include <avr/io.h>
+#include <avr/interrupt.h>
 
 // This a shortcut to help you visually see your layout.
 // The following is an example using the Planck MIT layout

BIN
keyboard/atomic/keymaps/default/compiled.hex


BIN
keyboard/clueboard1/keymaps/default/compiled.hex


BIN
keyboard/ergodox_ez/keymaps/adnw_k_o_y/compiled.hex


BIN
keyboard/ergodox_ez/keymaps/csharp_dev/compiled.hex


+ 1 - 1
keyboard/ergodox_ez/keymaps/csharp_dev/keymap.c

@@ -202,7 +202,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 			break;
 		case MACRO_PARENTHESE:
 			if (record->event.pressed) {
-				return MACRO(  D(LSHIFT),T(LPRN), T(RPRN),U(LSHIFT), T(SCOLON), END);
+				return MACRO(  D(LSHIFT),T(9), T(0),U(LSHIFT), T(SCOLON), END);
 			} 
 			break;
       }

BIN
keyboard/ergodox_ez/keymaps/dvorak_spanish/compiled.hex


+ 6 - 6
keyboard/ergodox_ez/keymaps/dvorak_spanish/keymap.c

@@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         M(OBRACE),      KC_SLSH,KC_Q,   KC_J,   KC_K,   KC_X,   KC_LGUI,
         M(OBRACK),      KC_HOME,KC_PGDN,KC_PGUP,KC_END,
                                                            LCAG_T(KC_F5),  LT(AUX, KC_F6),
-                                                           MT(MOD_LALT | MOD_LCTL, KC_F4),
+                                                           MT((MOD_LALT | MOD_LCTL), KC_F4),
                                            KC_ENT,KC_TAB,MT((MOD_LALT | MOD_LSFT), KC_F3),
         // right hand
                     KC_EQL,    KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_MINUS,
@@ -77,8 +77,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
                     KC_RALT,   KC_B,   KC_M,   KC_W,   KC_V,   KC_Z,   M(CBRACE),
                                        KC_LEFT,KC_DOWN,KC_UP,  KC_RGHT,M(CBRACK),
         LT(AUX, KC_F7), LCAG_T(KC_F8),
-        MT(MOD_LALT | MOD_LCTL, KC_F11),
-        MT(MOD_LALT | MOD_LSFT, KC_F12),KC_BSPC, KC_SPC
+        MT((MOD_LALT | MOD_LCTL), KC_F11),
+        MT((MOD_LALT | MOD_LSFT), KC_F12),KC_BSPC, KC_SPC
     ),
 /* Keymap 1: Aux layer
  *
@@ -154,7 +154,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         M(OBRACE),      KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_LGUI,
         M(OBRACK),      KC_HOME,KC_PGDN,KC_PGUP,KC_END,
                                                                   LCAG_T(KC_F5),  KC_TRNS,
-                                                           MT(MOD_LALT | MOD_LCTL, KC_F4),
+                                                           MT((MOD_LALT | MOD_LCTL), KC_F4),
                                                                     KC_ENT,KC_TAB,KC_TRNS,
         // right hand
                     KC_EQL,    KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_MINUS,
@@ -163,8 +163,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
                     KC_RALT,   KC_N,   KC_M,   KC_COMM,KC_DOT, KC_SLSH,M(CBRACE),
                                        KC_LEFT,KC_DOWN,KC_UP,  KC_RGHT,M(CBRACK),
         KC_TRNS, LCAG_T(KC_F8),
-        MT(MOD_LALT | MOD_LCTL, KC_F11),
-        MT(MOD_LALT | MOD_LSFT, KC_F12),KC_BSPC, KC_SPC
+        MT((MOD_LALT | MOD_LCTL), KC_F11),
+        MT((MOD_LALT | MOD_LSFT), KC_F12),KC_BSPC, KC_SPC
 ),
 };
 

+ 3 - 0
keyboard/ergodox_ez/keymaps/erez_experimental/config.h

@@ -6,4 +6,7 @@
 #define ONESHOT_TAP_TOGGLE 2
 #define ONESHOT_TIMEOUT 300
 
+#undef LEADER_TIMEOUT
+#define LEADER_TIMEOUT 300
+
 #endif

+ 0 - 4
keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c

@@ -7,8 +7,6 @@
 #define SYMB 1 // symbols
 #define MDIA 2 // media keys
 
-#define LEADER_TIMEOUT 300
-
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 /* Keymap 0: Basic layer
  *
@@ -144,8 +142,6 @@ const uint16_t PROGMEM fn_actions[] = {
     [3] = ACTION_MACRO_TAP(1)                          // Eric Tang's Famous Macro!
 };
 
-static uint16_t key_timer;
-
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 {
   return MACRO_NONE;

BIN
keyboard/ergodox_ez/keymaps/ordinary/compiled.hex


+ 1 - 0
keyboard/ergodox_ez/keymaps/ordinary/keymap.c

@@ -3,6 +3,7 @@
 #include "debug.h"
 #include "action_layer.h"
 #include "action_util.h"
+#include "mousekey.h"
 
 #define BASE   0 // default layer
 #define SYMB   1 // symbols layer

BIN
keyboard/ergodox_ez/keymaps/osx_de/compiled.hex


+ 1 - 13
keyboard/ergodox_ez/keymaps/osx_de/keymap.c

@@ -1,19 +1,7 @@
 #include "ergodox_ez.h"
 #include "debug.h"
 #include "action_layer.h"
-#include "keymap_extras/keymap_french.h"
-#include "keymap_extras/keymap_neo2.h"
-#include "keymap_extras/keymap_uk.h"
-#include "keymap_extras/keymap_colemak.h"
-#include "keymap_extras/keymap_french_osx.h"
-#include "keymap_extras/keymap_nordic.h"
-#include "keymap_extras/keymap_dvorak.h"
-#include "keymap_extras/keymap_german.h"
-#include "keymap_extras/keymap_norwegian.c"
-#include "keymap_extras/keymap_fr_ch.h"
-#include "keymap_extras/keymap_german_osx.h"
-#include "keymap_extras/keymap_spanish.h"
-#include "keymap_extras/keymap_bepo.h"
+#include "keymap_german_osx.h"
 
 #define BASE 0
 #define SYMB 1

BIN
keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/compiled.hex


+ 13 - 14
keyboard/ergodox_ez/keymaps/osx_de_adnw_koy/keymap.c

@@ -1,19 +1,19 @@
 #include "ergodox_ez.h"
 #include "debug.h"
 #include "action_layer.h"
-#include "keymap_extras/keymap_french.h"
-#include "keymap_extras/keymap_neo2.h"
-#include "keymap_extras/keymap_uk.h"
-#include "keymap_extras/keymap_colemak.h"
-#include "keymap_extras/keymap_french_osx.h"
-#include "keymap_extras/keymap_nordic.h"
-#include "keymap_extras/keymap_dvorak.h"
-#include "keymap_extras/keymap_german.h"
-#include "keymap_extras/keymap_norwegian.c"
-#include "keymap_extras/keymap_fr_ch.h"
-#include "keymap_extras/keymap_german_osx.h"
-#include "keymap_extras/keymap_spanish.h"
-#include "keymap_extras/keymap_bepo.h"
+
+#include "keymap_neo2.h"
+#include "keymap_uk.h"
+#include "keymap_colemak.h"
+#include "keymap_french_osx.h"
+#include "keymap_nordic.h"
+#include "keymap_dvorak.h"
+#include "keymap_german.h"
+#include "keymap_norwegian.c"
+#include "keymap_fr_ch.h"
+#include "keymap_german_osx.h"
+#include "keymap_spanish.h"
+#include "keymap_bepo.h"
 
 #define BASE 0
 #define SYMB 1
@@ -128,7 +128,6 @@ const uint16_t PROGMEM fn_actions[] = {
 
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
 {
-static uint16_t start;
 switch(id) {
 case UNUSED:
 //Macro: UNUSED//-----------------------

BIN
keyboard/ergodox_ez/keymaps/osx_de_experimental/compiled.hex


+ 11 - 13
keyboard/ergodox_ez/keymaps/osx_de_experimental/keymap.c

@@ -1,19 +1,17 @@
 #include "ergodox_ez.h"
 #include "debug.h"
 #include "action_layer.h"
-#include "keymap_extras/keymap_french.h"
-#include "keymap_extras/keymap_neo2.h"
-#include "keymap_extras/keymap_uk.h"
-#include "keymap_extras/keymap_colemak.h"
-#include "keymap_extras/keymap_french_osx.h"
-#include "keymap_extras/keymap_nordic.h"
-#include "keymap_extras/keymap_dvorak.h"
-#include "keymap_extras/keymap_german.h"
-#include "keymap_extras/keymap_norwegian.c"
-#include "keymap_extras/keymap_fr_ch.h"
-#include "keymap_extras/keymap_german_osx.h"
-#include "keymap_extras/keymap_spanish.h"
-#include "keymap_extras/keymap_bepo.h"
+#include "keymap_neo2.h"
+#include "keymap_uk.h"
+#include "keymap_colemak.h"
+#include "keymap_nordic.h"
+#include "keymap_dvorak.h"
+#include "keymap_german.h"
+#include "keymap_norwegian.c"
+#include "keymap_fr_ch.h"
+#include "keymap_german_osx.h"
+#include "keymap_spanish.h"
+#include "keymap_bepo.h"
 
 
 /**

+ 1 - 1
keyboard/ergodox_ez/keymaps/osx_fr/keymap.c

@@ -2,7 +2,7 @@
 #include "ergodox_ez.h"
 #include "debug.h"
 #include "action_layer.h"
-#include "keymap_extras/keymap_french_osx.h"
+#include "keymap_french_osx.h"
 
 #define BASE 0 // default layer
 #define SYMB 1 // symbols

BIN
keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/compiled.hex


+ 1 - 0
keyboard/ergodox_ez/keymaps/romanzolotarev-norman-osx/keymap.c

@@ -30,6 +30,7 @@ const uint16_t PROGMEM fn_actions[] = {
 };
 
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  return MACRO_NONE;
 };
 
 // Runs just one time when the keyboard initializes.

BIN
keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/compiled.hex


+ 1 - 0
keyboard/ergodox_ez/keymaps/romanzolotarev-norman-qwerty-osx/keymap.c

@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 };
 
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
+  return MACRO_NONE;
 };
 
 // Runs just one time when the keyboard initializes.

BIN
keyboard/ergodox_ez/keymaps/townk_osx/compiled.hex


+ 1 - 1
keyboard/ergodox_ez/keymaps/townk_osx/config.h

@@ -74,7 +74,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 /* disable debug print */
-#define NO_DEBUG
+// #define NO_DEBUG
 
 /* disable print */
 // #define NO_PRINT

BIN
keyboard/ergodox_ez/keymaps/workman_osx_mdw/compiled.hex


+ 1 - 1
keyboard/ergodox_ez/keymaps/workman_osx_mdw/keymap.c

@@ -333,7 +333,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
         default:
         return MACRO_NONE;
       }
-
+  return MACRO_NONE;
 };
 
 // Runs just one time when the keyboard initializes.

+ 0 - 3
keyboard/jd45/Makefile

@@ -1,8 +1,5 @@
 
 
-# # project specific files
-SRC = backlight.c 
-
 # MCU name
 #MCU = at90usb1287
 MCU = atmega32u4

+ 0 - 61
keyboard/jd45/backlight.c

@@ -1,61 +0,0 @@
-
-#include <avr/io.h>
-#include "backlight.h"
-
-#define CHANNEL OCR1C
-
-void backlight_init_ports()
-{
-
-    // Setup PB7 as output and output low.
-    DDRB |= (1<<7);
-    PORTB &= ~(1<<7);
-    
-    // Use full 16-bit resolution. 
-    ICR1 = 0xFFFF;
-
-    // I could write a wall of text here to explain... but TL;DW
-    // Go read the ATmega32u4 datasheet.
-    // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
-    
-    // Pin PB7 = OCR1C (Timer 1, Channel C)
-    // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
-    // (i.e. start high, go low when counter matches.)
-    // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
-    // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
-    
-    TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
-    TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
-
-    backlight_init();
-}
-
-void backlight_set(uint8_t level)
-{
-    if ( level == 0 )
-    {
-        // Turn off PWM control on PB7, revert to output low.
-        TCCR1A &= ~(_BV(COM1C1));
-        CHANNEL = 0x0;
-        // Prevent backlight blink on lowest level
-        PORTB &= ~(_BV(PORTB7));
-    }
-    else if ( level == BACKLIGHT_LEVELS )
-    {
-        // Prevent backlight blink on lowest level
-        PORTB &= ~(_BV(PORTB7));
-        // Turn on PWM control of PB7
-        TCCR1A |= _BV(COM1C1);
-        // Set the brightness
-        CHANNEL = 0xFFFF;
-    }
-    else        
-    {
-        // Prevent backlight blink on lowest level
-        PORTB &= ~(_BV(PORTB7));
-        // Turn on PWM control of PB7
-        TCCR1A |= _BV(COM1C1);
-        // Set the brightness
-        CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
-    }
-}

+ 60 - 6
keyboard/jd45/jd45.c

@@ -10,18 +10,72 @@ void matrix_scan_user(void) {
 
 };
 
+#define CHANNEL OCR1C
+
+void backlight_init_ports(void)
+{
+
+    // Setup PB7 as output and output low.
+    DDRB |= (1<<7);
+    PORTB &= ~(1<<7);
+    
+    // Use full 16-bit resolution. 
+    ICR1 = 0xFFFF;
+
+    // I could write a wall of text here to explain... but TL;DW
+    // Go read the ATmega32u4 datasheet.
+    // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
+    
+    // Pin PB7 = OCR1C (Timer 1, Channel C)
+    // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
+    // (i.e. start high, go low when counter matches.)
+    // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
+    // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
+    
+    TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010;
+    TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
+
+    backlight_init();
+}
+
+void backlight_set(uint8_t level)
+{
+    if ( level == 0 )
+    {
+        // Turn off PWM control on PB7, revert to output low.
+        TCCR1A &= ~(_BV(COM1C1));
+        CHANNEL = 0x0;
+        // Prevent backlight blink on lowest level
+        PORTB &= ~(_BV(PORTB7));
+    }
+    else if ( level == BACKLIGHT_LEVELS )
+    {
+        // Prevent backlight blink on lowest level
+        PORTB &= ~(_BV(PORTB7));
+        // Turn on PWM control of PB7
+        TCCR1A |= _BV(COM1C1);
+        // Set the brightness
+        CHANNEL = 0xFFFF;
+    }
+    else        
+    {
+        // Prevent backlight blink on lowest level
+        PORTB &= ~(_BV(PORTB7));
+        // Turn on PWM control of PB7
+        TCCR1A |= _BV(COM1C1);
+        // Set the brightness
+        CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
+    }
+}
+
 void matrix_init_kb(void) {
 	#ifdef BACKLIGHT_ENABLE
     	backlight_init_ports();
 	#endif
 
-	if (matrix_init_user) {
-		(*matrix_init_user)();
-	}
+	matrix_init_user();
 };
 
 void matrix_scan_kb(void) {
-	if (matrix_scan_user) {
-		(*matrix_scan_user)();
-	}
+	matrix_scan_user();
 };

+ 1 - 0
keyboard/jd45/jd45.h

@@ -5,6 +5,7 @@
 #include "keymap.h"
 #include "backlight.h"
 #include <stddef.h>
+#include <avr/io.h>
 
 void matrix_init_user(void);
 void matrix_scan_user(void);

BIN
keyboard/jd45/keymaps/default/compiled.hex


BIN
keyboard/jd45/keymaps/justin/compiled.hex


BIN
keyboard/phantom/keymaps/default/compiled.hex


+ 1 - 2
keyboard/phantom/led.c

@@ -19,8 +19,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "stdint.h"
 #include "led.h"
 
-
-void led_init_ports() {
+void led_init(void) {
     // * Set our LED pins as output
     DDRB |= (1<<6);
 	DDRB |= (1<<7);

+ 3 - 6
keyboard/phantom/phantom.c

@@ -1,4 +1,5 @@
 #include "phantom.h"
+#include "led.h"
 
 __attribute__ ((weak))
 void matrix_init_user(void) {
@@ -13,16 +14,12 @@ void matrix_scan_user(void) {
 void matrix_init_kb(void) {
 	// put your keyboard start-up code here
 	// runs once when the firmware starts up
-	if (matrix_init_user) {
-		(*matrix_init_user)();
-	}
+	matrix_init_user();
 	led_init_ports();
 };
 
 void matrix_scan_kb(void) {
 	// put your looping keyboard code here
 	// runs every cycle (a lot)
-	if (matrix_scan_user) {
-		(*matrix_scan_user)();
-	}
+	matrix_scan_user();
 };

+ 1 - 1
keyboard/phantom/phantom.h

@@ -4,7 +4,7 @@
 #include "matrix.h"
 #include "keymap.h"
 #include <stddef.h>
-
+#include "action_util.h"
 
 /* Phantom matrix layout
    * ,-----------------------------------------------------------------------------.

BIN
keyboard/planck/keymaps/experimental/compiled.hex


+ 8 - 0
keyboard/planck/keymaps/experimental/config.h

@@ -0,0 +1,8 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#define LEADER_TIMEOUT 300
+
+#endif

+ 0 - 2
keyboard/planck/keymaps/experimental/keymap.c

@@ -321,8 +321,6 @@ void music_scale_user(void)
 
 LEADER_EXTERNS();
 
-#define LEADER_TIMEOUT 300
-
 void matrix_scan_user(void) {
   LEADER_DICTIONARY() { 
     leading = false;

BIN
keyboard/planck/keymaps/lucas/compiled.hex


+ 2 - 1
keyboard/planck/keymaps/lucas/keymap.c

@@ -12,6 +12,7 @@ If you have any question about this keymap feel free to shoot me a message on re
 #include "keymap_extras/keymap_german.h"
 #include "backlight.h"
 #include "debug.h"
+#include "action_layer.h"
 
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 [0] = { /* Colemak   
@@ -111,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   {KC_NO,   KC_NO,   KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT}
 },
 [6] = { /* Gaming 
-        /* CS:GO buy binds
+         * CS:GO buy binds
     * ,-----------------------------------------------------------------------.
     * |     |     |     |     |     |     |     |     |  7  |  8  |  9  |     |
     * |-----------------------------------------------------------------------|

BIN
keyboard/planck/keymaps/unicode/compiled.hex


+ 1 - 0
keyboard/planck/planck.h

@@ -2,6 +2,7 @@
 #define PLANCK_H
 
 #include "quantum.h"
+#include <avr/interrupt.h>
 
 #define PLANCK_MIT( \
 	k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \

BIN
keyboard/preonic/keymaps/default/compiled.hex


+ 31 - 14
keyboard/preonic/keymaps/default/keymap.c

@@ -164,18 +164,20 @@ const uint16_t PROGMEM fn_actions[] = {
 };
 
 #ifdef AUDIO_ENABLE
-float start_up[][2] = {
-  {440.0*pow(2.0,(14)/12.0), 20},
-  {440.0*pow(2.0,(26)/12.0), 8},
-  {440.0*pow(2.0,(18)/12.0), 20},
-  {440.0*pow(2.0,(26)/12.0), 8}
+float tone_startup[][2] = {
+  {NOTE_B5, 20},
+  {NOTE_B6, 8},
+  {NOTE_DS6, 20},
+  {NOTE_B6, 8}
 };
 
 float tone_qwerty[][2]     = SONG(QWERTY_SOUND);
 float tone_dvorak[][2]     = SONG(DVORAK_SOUND);
 float tone_colemak[][2]    = SONG(COLEMAK_SOUND);
 
-float goodbye[][2] = SONG(GOODBYE_SOUND);
+float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
+
+float music_scale[][2]     = SONG(MUSIC_SCALE_SOUND);
 #endif
 
 void persistant_default_layer_set(uint16_t default_layer) {
@@ -242,20 +244,35 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
     return MACRO_NONE;
 };
 
-
 void matrix_init_user(void) {
-  #ifdef AUDIO_ENABLE
-    _delay_ms(20); // gets rid of tick
-    PLAY_NOTE_ARRAY(start_up, false, 0);
-  #endif
+    #ifdef AUDIO_ENABLE
+        startup_user();
+    #endif
 }
 
 #ifdef AUDIO_ENABLE
 
-void play_goodbye_tone()
+void startup_user()
+{
+    _delay_ms(20); // gets rid of tick
+    PLAY_NOTE_ARRAY(tone_startup, false, 0);
+}
+
+void shutdown_user()
+{
+    PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
+    _delay_ms(150);
+    stop_all_notes();
+}
+
+void music_on_user(void)
+{
+    music_scale_user();
+}
+
+void music_scale_user(void)
 {
-  PLAY_NOTE_ARRAY(goodbye, false, 0);
-  _delay_ms(150);
+    PLAY_NOTE_ARRAY(music_scale, false, 0);
 }
 
 #endif

+ 1 - 0
keyboard/preonic/preonic.h

@@ -36,5 +36,6 @@
 void matrix_init_user(void);
 void matrix_scan_user(void);
 bool process_action_kb(keyrecord_t *record);
+void backlight_init_ports(void);
 
 #endif

+ 4 - 4
quantum/keymap.h

@@ -294,10 +294,10 @@ enum quantum_keycodes {
 #define SFT_T(kc) MT(MOD_LSFT, kc)
 #define ALT_T(kc) MT(MOD_LALT, kc)
 #define GUI_T(kc) MT(MOD_LGUI, kc)
-#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Control + Shift e.g. for gnome-terminal
-#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
-#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left control alt and gui
-#define ALL_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
+#define C_S_T(kc) MT((MOD_LCTL | MOD_LSFT), kc) // Control + Shift e.g. for gnome-terminal
+#define MEH_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT), kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl
+#define LCAG_T(kc) MT((MOD_LCTL | MOD_LALT | MOD_LGUI), kc) // Left control alt and gui
+#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
 
 // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap
 #define KC_HYPR HYPR(KC_NO)

+ 0 - 3
quantum/keymap_extras/keymap_german_osx.h

@@ -1,9 +1,6 @@
 #ifndef KEYMAP_GERMAN_OSX
 #define KEYMAP_GERMAN_OSX
 
-#ifdef KEYMAP_GERMAN
-	#warning redefining german keys
-#endif
 #include "keymap.h"
 
 // Alt gr

+ 6 - 0
quantum/led.c

@@ -24,6 +24,12 @@ void led_set_kb(uint8_t usb_led) {
 
 }
 
+__attribute__ ((weak))
+void led_init_ports(void)
+{
+
+}
+
 __attribute__ ((weak))
 void led_set(uint8_t usb_led)
 {

+ 1 - 2
tmk_core/common/command.c

@@ -66,7 +66,6 @@ static bool mousekey_console(uint8_t code);
 static void mousekey_console_help(void);
 #endif
 
-static uint8_t numkey2num(uint8_t code);
 static void switch_default_layer(uint8_t layer);
 
 
@@ -763,7 +762,7 @@ static bool mousekey_console(uint8_t code)
 /***********************************************************
  * Utilities
  ***********************************************************/
-static uint8_t numkey2num(uint8_t code)
+uint8_t numkey2num(uint8_t code)
 {
     switch (code) {
         case KC_1: return 1;

+ 1 - 0
tmk_core/common/command.h

@@ -27,6 +27,7 @@ bool command_extra(uint8_t code);
 bool command_console_extra(uint8_t code);
 
 #ifdef COMMAND_ENABLE
+uint8_t numkey2num(uint8_t code);
 bool command_proc(uint8_t code);
 #else
 #define command_proc(code)      false

+ 3 - 0
tmk_core/common/led.h

@@ -37,6 +37,9 @@ void led_set(uint8_t usb_led);
 /* keyboard-specific LED functionality */
 void led_set_kb(uint8_t usb_led);
 
+
+void led_init_ports(void);
+
 #ifdef __cplusplus
 }
 #endif

+ 0 - 1
tmk_core/protocol/lufa/bluetooth.c

@@ -19,7 +19,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "report.h"
 #include "print.h"
 #include "debug.h"
-#include "../serial.h"
 #include "bluetooth.h"
 
 void bluefruit_keyboard_print_report(report_keyboard_t *report)

+ 2 - 0
tmk_core/protocol/lufa/bluetooth.h

@@ -18,6 +18,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifndef BLUETOOTH_H
 #define BLUETOOTH_H
 
+#include "../serial.h"
+
 void bluefruit_serial_send(uint8_t data);
 
 /*