diff options
Diffstat (limited to 'keyboards/ergodash/rev2/rev2.c')
| -rw-r--r-- | keyboards/ergodash/rev2/rev2.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/keyboards/ergodash/rev2/rev2.c b/keyboards/ergodash/rev2/rev2.c new file mode 100644 index 000000000..5e787921c --- /dev/null +++ b/keyboards/ergodash/rev2/rev2.c | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #include "ergodash.h" | ||
| 2 | |||
| 3 | #ifdef AUDIO_ENABLE | ||
| 4 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
| 5 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #ifdef SSD1306OLED | ||
| 9 | void led_set_kb(uint8_t usb_led) { | ||
| 10 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 11 | led_set_user(usb_led); | ||
| 12 | } | ||
| 13 | #endif | ||
| 14 | |||
| 15 | void matrix_init_kb(void) { | ||
| 16 | |||
| 17 | #ifdef AUDIO_ENABLE | ||
| 18 | _delay_ms(20); // gets rid of tick | ||
| 19 | PLAY_SONG(tone_startup); | ||
| 20 | #endif | ||
| 21 | |||
| 22 | // // green led on | ||
| 23 | // DDRD |= (1<<5); | ||
| 24 | // PORTD &= ~(1<<5); | ||
| 25 | |||
| 26 | // // orange led on | ||
| 27 | // DDRB |= (1<<0); | ||
| 28 | // PORTB &= ~(1<<0); | ||
| 29 | |||
| 30 | matrix_init_user(); | ||
| 31 | }; | ||
| 32 | |||
| 33 | void shutdown_user(void) { | ||
| 34 | #ifdef AUDIO_ENABLE | ||
| 35 | PLAY_SONG(tone_goodbye); | ||
| 36 | _delay_ms(150); | ||
| 37 | stop_all_notes(); | ||
| 38 | #endif | ||
| 39 | } | ||
