Skip to content

Commit

Permalink
sweet16
Browse files Browse the repository at this point in the history
  • Loading branch information
MMcM committed Feb 28, 2021
1 parent 33880c8 commit 3cd6a30
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 2 deletions.
39 changes: 39 additions & 0 deletions keyboards/1upkeyboards/sweet16/keymaps/mmcm/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include QMK_KEYBOARD_H

enum custom_keycodes {
UP_URL = SAFE_RANGE
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ortho_4x4(
KC_7, KC_8, KC_9, KC_ASTR,
KC_4, KC_5, KC_6, KC_SLSH,
KC_1, KC_2, KC_3, KC_MINS,
KC_0, KC_ENT, KC_DOT, KC_EQL
)
};

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case UP_URL:
if (record->event.pressed) {
SEND_STRING("http://1upkeyboards.com");
}
return false;
break;
}
return true;
}

#ifdef ENCODER_ENABLE
#include "encoder.h"
void encoder_update_user(int8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
}
#endif
File renamed without changes.
1 change: 1 addition & 0 deletions keyboards/1upkeyboards/sweet16/v1/promicro/promicro.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "promicro.h"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards

Make example for this keyboard (after setting up your build environment):

make 1upkeyboards/sweet16/v1:default
make 1upkeyboards/sweet16/v1/promicro:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
File renamed without changes.
18 changes: 18 additions & 0 deletions keyboards/1upkeyboards/sweet16/v1/proton_c/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

#include "config_common.h"

/* USB Device descriptor parameter */
#define PRODUCT_ID 0x0161
#define DEVICE_VER 0x0001

/* key matrix pins */
#define MATRIX_ROW_PINS { A2, A1, A0, B8 }
#define MATRIX_COL_PINS { B7, B6, B5, B4 }
#define UNUSED_PINS

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
1 change: 1 addition & 0 deletions keyboards/1upkeyboards/sweet16/v1/proton_c/proton_c.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "proton_c.h"
30 changes: 30 additions & 0 deletions keyboards/1upkeyboards/sweet16/v1/proton_c/proton_c.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#pragma once

#include "quantum.h"

// Any changes to the layout names and/or definitions must also be made to info.json

#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 } \
}

#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 } \
}

13 changes: 13 additions & 0 deletions keyboards/1upkeyboards/sweet16/v1/proton_c/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Sweet16 V1

A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards

* Keyboard Maintainer: QMK Community
* Hardware Supported: Sweet16 V1 PCB
* Hardware Availability: [1up Keyboards](https://1upkeyboards.com/)

Make example for this keyboard (after setting up your build environment):

make 1upkeyboards/sweet16/v1/proton_c:default

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
7 changes: 7 additions & 0 deletions keyboards/1upkeyboards/sweet16/v1/proton_c/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MCU name
MCU = STM32F303

## Features
CONSOLE_ENABLE = yes
ENCODER_ENABLE = no
AUDIO_ENABLE = no
1 change: 0 additions & 1 deletion keyboards/1upkeyboards/sweet16/v1/v1.c

This file was deleted.

0 comments on commit 3cd6a30

Please sign in to comment.