From 48f4768d33313e6a6ed48c31f95eb44feda10a51 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 26 Dec 2020 15:53:12 +1100 Subject: Change include guards in quantum/ to pragma once (#11239) --- quantum/audio/audio.h | 6 ++---- quantum/audio/luts.h | 11 ++++------- quantum/audio/muse.h | 5 +---- quantum/audio/musical_notes.h | 5 +---- quantum/audio/voices.h | 12 +++++------- 5 files changed, 13 insertions(+), 26 deletions(-) (limited to 'quantum/audio') diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 805cb4f7ab..bc00cd19e6 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef AUDIO_H -#define AUDIO_H + +#pragma once #include #include @@ -103,5 +103,3 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat); #define PLAY_LOOP(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), true) bool is_playing_notes(void); - -#endif diff --git a/quantum/audio/luts.h b/quantum/audio/luts.h index 6fdd3b4635..74980b292e 100644 --- a/quantum/audio/luts.h +++ b/quantum/audio/luts.h @@ -14,6 +14,8 @@ * along with this program. If not, see . */ +#pragma once + #if defined(__AVR__) # include # include @@ -23,14 +25,9 @@ # include #endif -#ifndef LUTS_H -# define LUTS_H - -# define VIBRATO_LUT_LENGTH 20 +#define VIBRATO_LUT_LENGTH 20 -# define FREQUENCY_LUT_LENGTH 349 +#define FREQUENCY_LUT_LENGTH 349 extern const float vibrato_lut[VIBRATO_LUT_LENGTH]; extern const uint16_t frequency_lut[FREQUENCY_LUT_LENGTH]; - -#endif /* LUTS_H */ diff --git a/quantum/audio/muse.h b/quantum/audio/muse.h index 6f382a7fee..ad2f96e43a 100644 --- a/quantum/audio/muse.h +++ b/quantum/audio/muse.h @@ -1,9 +1,6 @@ -#ifndef MUSE_H -#define MUSE_H +#pragma once #include "quantum.h" #include "process_audio.h" uint8_t muse_clock_pulse(void); - -#endif diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index 9742e19c43..8ac6aafd38 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef MUSICAL_NOTES_H -#define MUSICAL_NOTES_H +#pragma once // Tempo Placeholder #define TEMPO_DEFAULT 100 @@ -229,5 +228,3 @@ #define NOTE_GF8 NOTE_FS8 #define NOTE_AF8 NOTE_GS8 #define NOTE_BF8 NOTE_AS8 - -#endif diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h index 0c45b0720e..abafa2b404 100644 --- a/quantum/audio/voices.h +++ b/quantum/audio/voices.h @@ -13,6 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +#pragma once + #include #include #if defined(__AVR__) @@ -21,14 +24,11 @@ #include "wait.h" #include "luts.h" -#ifndef VOICES_H -# define VOICES_H - float voice_envelope(float frequency); typedef enum { default_voice, -# ifdef AUDIO_VOICES +#ifdef AUDIO_VOICES something, drums, butts_fader, @@ -41,12 +41,10 @@ typedef enum { // duty_fourth_down, // duty_third_down, // duty_fifth_third_down, -# endif +#endif number_of_voices // important that this is last } voice_type; void set_voice(voice_type v); void voice_iterate(void); void voice_deiterate(void); - -#endif -- cgit v1.2.1