Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Pinky(https://github.com/tamanishi/Pinky3) keyboard #4748

Merged
merged 6 commits into from
Jan 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve
  • Loading branch information
tamanishi committed Jan 1, 2019
commit 17a750f011695409849fa05d580f544eeb610cd8
23 changes: 0 additions & 23 deletions keyboards/pinky/3/3.c
Original file line number Diff line number Diff line change
@@ -1,24 +1 @@
#include "pinky.h"
drashna marked this conversation as resolved.
Show resolved Hide resolved

#ifdef AUDIO_ENABLE
float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif

void matrix_init_kb(void) {

#ifdef AUDIO_ENABLE
_delay_ms(20); // gets rid of tick
PLAY_SONG(tone_startup);
#endif

matrix_init_user();
};

void shutdown_kb(void) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_goodbye);
_delay_ms(150);
stop_all_notes();
#endif
}
2 changes: 2 additions & 0 deletions keyboards/pinky/3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

#define SOFT_SERIAL_PIN D2

/*
* Feature disable options
* These options are also useful to firmware size reduction.
Expand Down
95 changes: 43 additions & 52 deletions keyboards/pinky/3/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,63 @@ enum macro_keycodes {
KC_SAMPLEMACRO,
};

#define KC______ KC_TRNS
#define KC_XXXXX KC_NO
#define ________ KC_TRNS
#define XXXXXXXX KC_NO
#define KC_LOWER LOWER
#define KC_RAISE RAISE
#define KC_ADJ ADJUST
#define KC_RST RESET
#define KC_CTLTB CTL_T(KC_TAB)
#define KC_GUIEI GUI_T(KC_LANG2)
#define KC_ALTKN ALT_T(KC_LANG1)


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_kc( \
//,-----------------------------------------+------. ,------------------------------------------------.
ESC, Q, W, E, R, T, LPRN, RPRN, Y, U, I, O, P, BSPC,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
CTLTB, A, S, D, F, G, LBRC, RBRC, H, J, K, L, SCLN, QUOT,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
LSFT, Z, X, C, V, B, ADJ, ADJ, N, M, COMM, DOT, SLSH, ENT,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
LALT, LOWER, LGUI, SPC, SPC, RGUI, RAISE, RALT \
//`---------------------------' `---------------------------'
[_QWERTY] = LAYOUT(
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ADJ, KC_ADJ, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
KC_LALT, KC_LOWER, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RAISE, KC_RALT \
//`---------------------------------------' `---------------------------------------'
),

[_LOWER] = LAYOUT_kc( \
//,-----------------------------------------+------. ,------------------------------------------------.
GRV, 1, 2, 3, 4, 5, _____, _____, 6, 7, 8, 9, 0, BSLS,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, MINS, EQL, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____ \
//`---------------------------' `---------------------------'
[_LOWER] = LAYOUT( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, ________, ________, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________ \
//`---------------------------------------' `---------------------------------------'
),

[_RAISE] = LAYOUT_kc( \
//,-----------------------------------------+------. ,------------------------------------------------.
GRV, 1, 2, 3, 4, 5, _____, _____, 6, 7, 8, 9, 0, BSLS,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, MINS, EQL, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____ \
//`---------------------------' `---------------------------'
[_RAISE] = LAYOUT( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, ________, ________, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________ \
//`---------------------------------------' `---------------------------------------'
),

[_ADJUST] = LAYOUT_kc( \
//,-----------------------------------------+------. ,------------------------------------------------.
_____, F1, F2, F3, F4, F5, LCBR, RCBR, F6, F7, F8, F9, F10, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, F11, F12, _____, _____, _____, LCBR, RCBR, HOME, PGDN, PGUP, END, _____, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,\
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
_____, _____, _____, _____, _____, _____, _____, _____ \
//`---------------------------' `---------------------------'
[_ADJUST] = LAYOUT( \
//,---------------------------------------------------------------------. ,---------------------------------------------------------------------.
________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, KC_F11, KC_F12, ________, ________, ________, KC_LCBR, KC_RCBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ________, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\
//|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------|
________, ________, ________, ________, ________, ________, ________, ________ \
//`---------------------------------------' `---------------------------------------'
)
};

void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}

void matrix_init_user(void) {
//
}
Expand All @@ -107,7 +98,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
Expand Down
23 changes: 0 additions & 23 deletions keyboards/pinky/4/4.c
Original file line number Diff line number Diff line change
@@ -1,24 +1 @@
#include "pinky.h"
drashna marked this conversation as resolved.
Show resolved Hide resolved

#ifdef AUDIO_ENABLE
float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif

void matrix_init_kb(void) {

#ifdef AUDIO_ENABLE
_delay_ms(20); // gets rid of tick
PLAY_SONG(tone_startup);
#endif

matrix_init_user();
};

void shutdown_kb(void) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_goodbye);
_delay_ms(150);
stop_all_notes();
#endif
}
2 changes: 2 additions & 0 deletions keyboards/pinky/4/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)

#define SOFT_SERIAL_PIN D2

/*
* Feature disable options
* These options are also useful to firmware size reduction.
Expand Down
Loading