]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/orthodox/rev1/rev1.c
0524d402041e90335c6c736401e1de932bc14cd6
[qmk_firmware.git] / keyboards / orthodox / rev1 / rev1.c
1 /*
2 This is the source file for the subproject
3
4 Copyright 2012 Jun Wako <wakojun@gmail.com>
5 Copyright 2015 Jack Humbert
6 Copyright 2017 Art Ortenburger
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #include "orthodox.h"
23
24 #ifdef AUDIO_ENABLE
25     float tone_startup[][2] = SONG(STARTUP_SOUND);
26     float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
27 #endif
28
29 void matrix_init_kb(void) {
30
31     #ifdef AUDIO_ENABLE
32         _delay_ms(20); // gets rid of tick
33         PLAY_SONG(tone_startup);
34     #endif
35
36     // // green led on
37     // DDRD |= (1<<5);
38     // PORTD &= ~(1<<5);
39
40     // // orange led on
41     // DDRB |= (1<<0);
42     // PORTB &= ~(1<<0);
43
44         matrix_init_user();
45 };
46
47 void shutdown_user(void) {
48     #ifdef AUDIO_ENABLE
49         PLAY_SONG(tone_goodbye);
50         _delay_ms(150);
51         stop_all_notes();
52     #endif
53 }