浏览代码

Move `SENDSTRING_BELL` code to `send_string.h` (#13566)

Ryan 3 年之前
父节点
当前提交
332a5aa7cb
共有 2 个文件被更改,包括 8 次插入3 次删除
  1. 0 3
      quantum/quantum.c
  2. 8 0
      quantum/send_string.c

+ 0 - 3
quantum/quantum.c

@@ -49,9 +49,6 @@ float goodbye_song[][2] = GOODBYE_SONG;
 #    ifdef DEFAULT_LAYER_SONGS
 #    ifdef DEFAULT_LAYER_SONGS
 float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS;
 float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS;
 #    endif
 #    endif
-#    ifdef SENDSTRING_BELL
-float bell_song[][2] = SONG(TERMINAL_SOUND);
-#    endif
 #endif
 #endif
 
 
 #ifdef AUTO_SHIFT_ENABLE
 #ifdef AUTO_SHIFT_ENABLE

+ 8 - 0
quantum/send_string.c

@@ -20,6 +20,14 @@
 
 
 #include "send_string.h"
 #include "send_string.h"
 
 
+#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL)
+#    include "audio.h"
+#    ifndef BELL_SOUND
+#        define BELL_SOUND TERMINAL_SOUND
+#    endif
+float bell_song[][2] = SONG(BELL_SOUND);
+#endif
+
 // clang-format off
 // clang-format off
 
 
 /* Bit-Packed look-up table to convert an ASCII character to whether
 /* Bit-Packed look-up table to convert an ASCII character to whether