2
0

rev1.c 1.3 KB

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