Skip to content

Commit

Permalink
Change include guards in quantum/ to pragma once (qmk#11239)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Dec 26, 2020
1 parent 53eb7f0 commit 48f4768
Show file tree
Hide file tree
Showing 50 changed files with 68 additions and 204 deletions.
5 changes: 1 addition & 4 deletions quantum/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _API_H_
#define _API_H_
#pragma once

#ifdef __AVR__
# include "lufa.h"
Expand Down Expand Up @@ -54,5 +53,3 @@ __attribute__((weak)) bool process_api_quantum(uint8_t length, uint8_t* data);
__attribute__((weak)) bool process_api_keyboard(uint8_t length, uint8_t* data);

__attribute__((weak)) bool process_api_user(uint8_t length, uint8_t* data);

#endif
5 changes: 1 addition & 4 deletions quantum/api/api_sysex.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _API_SYSEX_H_
#define _API_SYSEX_H_
#pragma once

#include "api.h"

void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t* bytes, uint16_t length);

#define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l)

#endif
6 changes: 2 additions & 4 deletions quantum/audio/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AUDIO_H
#define AUDIO_H

#pragma once

#include <stdint.h>
#include <stdbool.h>
Expand Down Expand Up @@ -103,5 +103,3 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat);
#define PLAY_LOOP(note_array) play_notes(&note_array, NOTE_ARRAY_SIZE((note_array)), true)

bool is_playing_notes(void);

#endif
11 changes: 4 additions & 7 deletions quantum/audio/luts.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#if defined(__AVR__)
# include <avr/io.h>
# include <avr/interrupt.h>
Expand All @@ -23,14 +25,9 @@
# include <hal.h>
#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 */
5 changes: 1 addition & 4 deletions quantum/audio/muse.h
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions quantum/audio/musical_notes.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef MUSICAL_NOTES_H
#define MUSICAL_NOTES_H
#pragma once

// Tempo Placeholder
#define TEMPO_DEFAULT 100
Expand Down Expand Up @@ -229,5 +228,3 @@
#define NOTE_GF8 NOTE_FS8
#define NOTE_AF8 NOTE_GS8
#define NOTE_BF8 NOTE_AS8

#endif
12 changes: 5 additions & 7 deletions quantum/audio/voices.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include <stdint.h>
#include <stdbool.h>
#if defined(__AVR__)
Expand All @@ -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,
Expand All @@ -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
4 changes: 1 addition & 3 deletions quantum/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef COLOR_H
#define COLOR_H
#pragma once

#include <stdint.h>
#include <stdbool.h>
Expand Down Expand Up @@ -86,4 +85,3 @@ RGB hsv_to_rgb_nocie(HSV hsv);
#ifdef RGBW
void convert_rgb_to_rgbw(LED_TYPE *led);
#endif
#endif // COLOR_H
7 changes: 2 additions & 5 deletions quantum/keycode_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "eeconfig.h"
#include "keycode.h"
#include "action_code.h"

#ifndef KEYCODE_CONFIG_H
# define KEYCODE_CONFIG_H

uint16_t keycode_config(uint16_t keycode);
uint8_t mod_config(uint8_t mod);

Expand All @@ -42,5 +41,3 @@ typedef union {
} keymap_config_t;

extern keymap_config_t keymap_config;

#endif /* KEYCODE_CONFIG_H */
5 changes: 1 addition & 4 deletions quantum/keymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef KEYMAP_H
#define KEYMAP_H
#pragma once

#include <stdint.h>
#include <stdbool.h>
Expand Down Expand Up @@ -55,5 +54,3 @@ uint16_t keymap_function_id_to_action(uint16_t function_id);

extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];

#endif
6 changes: 2 additions & 4 deletions quantum/keymap_extras/keymap_nordic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYMAP_NORDIC_H
#define KEYMAP_NORDIC_H

#pragma once

#include "keymap.h"

Expand Down Expand Up @@ -66,5 +66,3 @@

#define NO_BSLS ALGR(KC_MINS)
#define NO_MU ALGR(KC_M)

#endif
6 changes: 2 additions & 4 deletions quantum/keymap_extras/keymap_plover_dvorak.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYMAP_PLOVER_DVORAK_H
#define KEYMAP_PLOVER_DVORAK_H

#pragma once

#include "keymap_dvorak.h"

Expand Down Expand Up @@ -43,5 +43,3 @@
#define PD_O DV_V
#define PD_E DV_N
#define PD_U DV_M

#endif
6 changes: 2 additions & 4 deletions quantum/keymap_extras/keymap_steno.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEYMAP_STENO_H
#define KEYMAP_STENO_H

#pragma once

#include "keymap.h"

Expand Down Expand Up @@ -72,5 +72,3 @@ enum steno_keycodes {
STN_ZR,
STN__MAX = STN_ZR, // must be less than QK_STENO_BOLT
};

#endif
5 changes: 1 addition & 4 deletions quantum/led_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef LED_MATRIX_H
#define LED_MATRIX_H
#pragma once

#ifndef BACKLIGHT_ENABLE
# error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE
Expand Down Expand Up @@ -123,5 +122,3 @@ typedef struct {
} led_matrix_driver_t;

extern const led_matrix_driver_t led_matrix_driver;

#endif
5 changes: 1 addition & 4 deletions quantum/led_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef LED_TABLES_H
#define LED_TABLES_H
#pragma once

#include "progmem.h"
#include <stdint.h>

#ifdef USE_CIE1931_CURVE
extern const uint8_t CIE1931_CURVE[] PROGMEM;
#endif

#endif
5 changes: 1 addition & 4 deletions quantum/pointing_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef POINTING_DEVICE_H
#define POINTING_DEVICE_H
#pragma once

#include <stdint.h>
#include "host.h"
Expand All @@ -27,5 +26,3 @@ void pointing_device_task(void);
void pointing_device_send(void);
report_mouse_t pointing_device_get_report(void);
void pointing_device_set_report(report_mouse_t newMouseReport);

#endif
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_audio.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef PROCESS_AUDIO_H
#define PROCESS_AUDIO_H
#pragma once

float compute_freq_for_midi_note(uint8_t note);

Expand All @@ -9,5 +8,3 @@ void process_audio_noteoff(uint8_t note);
void process_audio_all_notes_off(void);

void audio_on_user(void);

#endif
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_clicky.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef PROCESS_CLICKY_H
#define PROCESS_CLICKY_H
#pragma once

void clicky_play(void);
bool process_clicky(uint16_t keycode, keyrecord_t *record);
Expand All @@ -13,5 +12,3 @@ void clicky_on(void);
void clicky_off(void);

bool is_clicky_on(void);

#endif
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_combo.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PROCESS_COMBO_H
#define PROCESS_COMBO_H
#pragma once

#include "progmem.h"
#include "quantum.h"
Expand Down Expand Up @@ -62,5 +61,3 @@ void combo_enable(void);
void combo_disable(void);
void combo_toggle(void);
bool is_combo_enabled(void);

#endif
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_key_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PROCESS_KEY_LOCK_H
#define PROCESS_KEY_LOCK_H
#pragma once

#include "quantum.h"

bool process_key_lock(uint16_t *keycode, keyrecord_t *record);

#endif // PROCESS_KEY_LOCK_H
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_leader.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PROCESS_LEADER_H
#define PROCESS_LEADER_H
#pragma once

#include "quantum.h"

Expand All @@ -37,5 +36,3 @@ void qk_leader_start(void);
extern uint16_t leader_sequence[5]; \
extern uint8_t leader_sequence_size
#define LEADER_DICTIONARY() if (leading && timer_elapsed(leader_time) > LEADER_TIMEOUT)

#endif
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_midi.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PROCESS_MIDI_H
#define PROCESS_MIDI_H
#pragma once

#include "quantum.h"

Expand Down Expand Up @@ -53,5 +52,3 @@ uint8_t midi_compute_note(uint16_t keycode);
# endif // MIDI_ADVANCED

#endif // MIDI_ENABLE

#endif
5 changes: 1 addition & 4 deletions quantum/process_keycode/process_music.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PROCESS_MUSIC_H
#define PROCESS_MUSIC_H
#pragma once

#include "quantum.h"

Expand Down Expand Up @@ -57,5 +56,3 @@ bool music_mask_user(uint16_t keycode);
# endif

#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))

#endif
Loading

0 comments on commit 48f4768

Please sign in to comment.