rev1.c 631 B

1234567891011121314151617181920212223242526272829303132
  1. #include "crkbd.h"
  2. #ifdef AUDIO_ENABLE
  3. float tone_startup[][2] = SONG(STARTUP_SOUND);
  4. float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
  5. #endif
  6. #ifdef SSD1306OLED
  7. void led_set_kb(uint8_t usb_led) {
  8. // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
  9. //led_set_user(usb_led);
  10. }
  11. #endif
  12. void matrix_init_kb(void) {
  13. #ifdef AUDIO_ENABLE
  14. _delay_ms(20); // gets rid of tick
  15. PLAY_SONG(tone_startup);
  16. #endif
  17. matrix_init_user();
  18. };
  19. void shutdown_kb(void) {
  20. #ifdef AUDIO_ENABLE
  21. PLAY_SONG(tone_goodbye);
  22. _delay_ms(150);
  23. stop_all_notes();
  24. #endif
  25. }