]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] Update 1upkeyboards/super16 with code from vendor (#5645)
authorJeff Hastings <jeffmhastings@gmail.com>
Fri, 19 Apr 2019 17:43:15 +0000 (13:43 -0400)
committerDrashna Jaelre <drashna@live.com>
Fri, 19 Apr 2019 17:43:15 +0000 (10:43 -0700)
* readme formatting

* cleanup rules.mk

* update config.h

* add numpad layout

* Update default keymap

* cleanup rules

* disable console and commands to fit the bootloader

* cleanup whitespace

* revert readme changes

* revert changes to config.h

* remove unused keycodes

* add LAYOUTS to rules.mk

* remove redundant config setting

Co-Authored-By: jeffmhastings <jeffmhastings@gmail.com>
keyboards/1upkeyboards/super16/config.h
keyboards/1upkeyboards/super16/info.json
keyboards/1upkeyboards/super16/keymaps/default/keymap.c
keyboards/1upkeyboards/super16/rules.mk
keyboards/1upkeyboards/super16/super16.c
keyboards/1upkeyboards/super16/super16.h

index 810aa254e4bae0067ef5d04d7f6fca6ed5688a2e..4af4dda63ae3d7afdea11612aeb9b2fcee405867 100644 (file)
@@ -21,7 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 /* USB Device descriptor parameter */
 #define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x0000
+#define PRODUCT_ID      0x2010
 #define DEVICE_VER      0x0001
 #define MANUFACTURER    1upkeyboards
 #define PRODUCT         super16
@@ -65,9 +65,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
   #define RGBLIGHT_VAL_STEP 8
   #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
   #define RGBLIGHT_SLEEP  /* If defined, the RGB lighting will be switched off when the host goes to sleep */
-/*== all animations enable ==*/
-//   #define RGBLIGHT_ANIMATIONS
-// /*== or choose animations ==*/
+  /*== all animations enable ==*/
+  #define RGBLIGHT_ANIMATIONS
+  /*== or choose animations ==*/
 //   #define RGBLIGHT_EFFECT_BREATHING
 //   #define RGBLIGHT_EFFECT_RAINBOW_MOOD
 //   #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
@@ -85,10 +85,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* define if matrix has ghost (lacks anti-ghosting diodes) */
 //#define MATRIX_HAS_GHOST
 
-/* number of backlight levels */
-
 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
 #define LOCKING_SUPPORT_ENABLE
+
 /* Locking resynchronize hack */
 #define LOCKING_RESYNC_ENABLE
 
@@ -242,3 +241,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* Bootmagic Lite key configuration */
 // #define BOOTMAGIC_LITE_ROW 0
 // #define BOOTMAGIC_LITE_COLUMN 0
+
+/* prevent stuck modifiers */
index e8f4faa23d4ab46160834eabafbfa32cbdd8056c..10f81f4d08b52e953f55e2e5101b52bd38b67b03 100644 (file)
@@ -1,12 +1,15 @@
 {
-    "keyboard_name": "super16", 
-    "url": "", 
-    "maintainer": "qmk", 
-    "width": 4, 
-    "height": 4, 
-    "layouts": {
-        "LAYOUT_ortho_4x4": {
-            "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}]
-        }
+  "keyboard_name": "super16",
+  "url": "",
+  "maintainer": "qmk",
+  "width": 4,
+  "height": 4,
+  "layouts": {
+    "LAYOUT_ortho_4x4": {
+      "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}]
+    },
+    "LAYOUT_numpad_4x4": {
+      "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}]
     }
-}
\ No newline at end of file
+  }
+}
index 36ad3f2839af6a4f6630fde1ac3d545196f2c3b3..47889abae574aadb972cbc59dde23286d847a60a 100644 (file)
  */
 #include QMK_KEYBOARD_H
 
-// Defines the keycodes used by our macros in process_record_user
-enum custom_keycodes {
-  QMKBEST = SAFE_RANGE,
-  QMKURL
-};
-
 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
   [0] = LAYOUT_ortho_4x4( /* Base */
-    KC_A,  KC_1,  KC_2, KC_4, \
-    KC_A,  KC_1,  KC_2, KC_4, \
-    KC_A,  KC_1,  KC_2, KC_4, \
-    KC_A,  KC_1,  KC_2, KC_4 \
+    RGB_TOG,    KC_1,    KC_U,    KC_P,
+    RGB_MOD,    KC_1,    KC_U,    KC_P,
+    RGB_TOG,    KC_1,    KC_U,    KC_P,
+    RGB_MOD,    KC_1,    KC_U,    KC_P
   ),
 };
 
 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
-  switch (keycode) {
-    case QMKBEST:
-      if (record->event.pressed) {
-        // when keycode QMKBEST is pressed
-        SEND_STRING("QMK is the best thing ever!");
-      } else {
-        // when keycode QMKBEST is released
-      }
-      break;
-    case QMKURL:
-      if (record->event.pressed) {
-        // when keycode QMKURL is pressed
-        SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
-      } else {
-        // when keycode QMKURL is released
-      }
-      break;
-  }
   return true;
 }
 
index 8fb44b9b5cf0969ffc95c113c3f3074e44a48871..31042dfb81195e029f96b0765355a49914cfb551 100644 (file)
@@ -1,5 +1,4 @@
 # MCU name
-#MCU = at90usb1286
 MCU = atmega32u4
 
 # Processor frequency.
@@ -15,7 +14,6 @@ MCU = atmega32u4
 #     software delays.
 F_CPU = 16000000
 
-
 #
 # LUFA specific
 #
@@ -48,7 +46,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
 #   atmega32a    bootloadHID
 BOOTLOADER = caterina
 
-
 # If you don't know the bootloader type, then you can specify the
 # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
 #   Teensy halfKay      512
@@ -58,26 +55,27 @@ BOOTLOADER = caterina
 #   USBaspLoader        2048
 # OPT_DEFS += -DBOOTLOADER_SIZE=4096
 
+#EXTRAFLAGS += -flto
 
 # Build Options
 #   change yes to no to disable
 #
-BOOTMAGIC_ENABLE = lite      # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE = lite     # Virtual DIP switch configuration(+1000)
 MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
 EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
-CONSOLE_ENABLE = yes        # Console for debug(+400)
-COMMAND_ENABLE = yes        # Commands for debug and configuration
+CONSOLE_ENABLE = no         # Console for debug(+400)
+COMMAND_ENABLE = no         # Commands for debug and configuration
 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
 SLEEP_LED_ENABLE = no       # Breathing sleep LED during USB suspend
 # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
 NKRO_ENABLE = no            # USB Nkey Rollover
 BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality on B7 by default
-RGBLIGHT_ENABLE = yes        # Enable keyboard RGB underglow
+RGBLIGHT_ENABLE = yes       # Enable keyboard RGB underglow
 MIDI_ENABLE = no            # MIDI support (+2400 to 4200, depending on config)
 UNICODE_ENABLE = no         # Unicode
 BLUETOOTH_ENABLE = no       # Enable Bluetooth with the Adafruit EZ-Key HID
 AUDIO_ENABLE = no           # Audio output on port C6
 FAUXCLICKY_ENABLE = no      # Use buzzer to emulate clicky switches
-HD44780_ENABLE = no            # Enable support for HD44780 based LCDs (+400)
+HD44780_ENABLE = no         # Enable support for HD44780 based LCDs (+400)
 
-LAYOUTS = ortho_4x4
+LAYOUTS = ortho_4x4 numpad_4x4
index cf33cab92698cfd4d46c529a70ad4a85805f3bc5..72e47f447b12ff07d308094406d9796fa510f9ea 100644 (file)
 #include "super16.h"
 
 void matrix_init_kb(void) {
-       // put your keyboard start-up code here
-       // runs once when the firmware starts up
+  // put your keyboard start-up code here
+  // runs once when the firmware starts up
 
-       matrix_init_user();
+  matrix_init_user();
 }
 
 void matrix_scan_kb(void) {
-       // put your looping keyboard code here
-       // runs every cycle (a lot)
+  // put your looping keyboard code here
+  // runs every cycle (a lot)
 
-       matrix_scan_user();
+  matrix_scan_user();
 }
 
 bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
-       // put your per-action keyboard code here
-       // runs for every action, just before processing by the firmware
+  // put your per-action keyboard code here
+  // runs for every action, just before processing by the firmware
 
-       return process_record_user(keycode, record);
+  return process_record_user(keycode, record);
 }
 
 void led_set_kb(uint8_t usb_led) {
-       // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+  // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
 
-       led_set_user(usb_led);
+  led_set_user(usb_led);
 }
index a95f687b164a9d195728c85d15c6e61cca94a47e..0595af8dcd6e0612028eaef62b07c6377b6eaf0e 100644 (file)
  * The second converts the arguments into a two-dimensional array which
  * represents the switch matrix.
  */
+
 #define LAYOUT_ortho_4x4( \
-    k00, k01, k02, k03, \
-    k10, k11, k12, k13, \
-    k20, k21, k22, k23, \
-    k30, k31, k32, k33  \
-) \
-{ \
-    { k00, k01, k02, k03 }, \
-    { k10, k11, k12, k13 }, \
-    { k20, k21, k22, k23 }, \
-    { k30, k31, k32, k33 }, \
+  K00, K01, K02, K03, \
+  K10, K11, K12, K13, \
+  K20, K21, K22, K23, \
+  K30, K31, K32, K33  \
+) { \
+  { K00, K01, K02, K03 }, \
+  { K10, K11, K12, K13 }, \
+  { K20, K21, K22, K23 }, \
+  { K30, K31, K32, K33 }  \
+}
+
+#define LAYOUT_numpad_4x4( \
+  K00, K01, K02, K03, \
+  K10, K11, K12,      \
+  K20, K21, K22, K23, \
+     K31,   K32      \
+) { \
+    { K00,   K01, K02, K03 }, \
+    { K10,   K11, K12, KC_NO }, \
+    { K20,   K21, K22, K23 }, \
+    { KC_NO, K31, K32, KC_NO }  \
 }