diff options
Diffstat (limited to 'keyboard/atomic/keymaps/pvc')
-rw-r--r-- | keyboard/atomic/keymaps/pvc/config.h | 7 | ||||
-rw-r--r-- | keyboard/atomic/keymaps/pvc/keymap.c | 41 |
2 files changed, 13 insertions, 35 deletions
diff --git a/keyboard/atomic/keymaps/pvc/config.h b/keyboard/atomic/keymaps/pvc/config.h index 5e956286b5..1473aac34f 100644 --- a/keyboard/atomic/keymaps/pvc/config.h +++ b/keyboard/atomic/keymaps/pvc/config.h @@ -42,14 +42,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 } -#define ROWS (int []){ D0, D5, B5, B6, B3 } +#define MATRIX_ROW_PINS { D0, D5, B5, B6, B3 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 } +#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 +#define DEBOUNCING_DELAY 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboard/atomic/keymaps/pvc/keymap.c b/keyboard/atomic/keymaps/pvc/keymap.c index 8431654d7d..f16ec8a6ec 100644 --- a/keyboard/atomic/keymaps/pvc/keymap.c +++ b/keyboard/atomic/keymaps/pvc/keymap.c @@ -62,8 +62,6 @@ #define M_BDFLT M(MACRO_BREATH_DEFAULT) -//#define MU_TOG M(MACRO_MUSIC_TOGGLE) -//#define AU_TOG M(MACRO_AUDIO_TOGGLE) #define VC_UP M(MACRO_INC_VOICE) #define VC_DOWN M(MACRO_DEC_VOICE) @@ -156,11 +154,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* UPPER * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | / | * | - | NUM LK | SCR LK | XXXXXX . PAUSE | + * | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | + | ~ | | | INS | + * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | ` | XXXXXX . | HOME | + * | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| * | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END | * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| @@ -498,31 +496,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) #ifdef AUDIO_ENABLE -/* -bool process_action_user(keyrecord_t *record) -{ - - uint8_t starting_note = 0x0C; - int offset = 7; - - if (IS_LAYER_ON(LAYER_MUSIC)) - { - if (record->event.pressed) - { - play_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)), 0xF); - } - else - { - stop_note(((double)220.0)*pow(2.0, -4.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row))); - } - } -} -*/ - void matrix_init_user(void) { set_voice(default_voice); - play_startup_tone(); + startup_user(); println("Matrix Init"); } @@ -570,30 +547,30 @@ void led_set_user(uint8_t usb_led) } -void play_startup_tone() +void startup_user() { _delay_ms(10); // gets rid of tick PLAY_NOTE_ARRAY(tone_my_startup, false, STACCATO); } -void play_goodbye_tone() +void shutdown_user() { PLAY_NOTE_ARRAY(tone_my_goodbye, false, STACCATO); _delay_ms(2000); stop_all_notes(); } -void play_audio_on_tone(void) +void audio_on_user(void) { PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO); } -void play_music_on_tone(void) +void music_on_user(void) { PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO); } -void play_music_scale(void) +void music_scale_user(void) { PLAY_NOTE_ARRAY(music_scale, false, STACCATO); } |