diff options
author | Ryan <fauxpark@gmail.com> | 2020-12-26 15:56:11 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-26 15:56:11 +1100 |
commit | 1d1d5da43f86d9dded47c66afec94991d623f114 (patch) | |
tree | 5f0d4d303a1f5dd67a3d9a19b0f99b8e3f06a4e6 | |
parent | 48f4768d33313e6a6ed48c31f95eb44feda10a51 (diff) | |
download | qmk_firmware-1d1d5da43f86d9dded47c66afec94991d623f114.tar.gz qmk_firmware-1d1d5da43f86d9dded47c66afec94991d623f114.zip |
Change include guards in tmk_core/ and drivers/ to pragma once (#11240)
60 files changed, 96 insertions, 258 deletions
diff --git a/drivers/avr/hd44780.h b/drivers/avr/hd44780.h index e60817e98..08e60f8a4 100644 --- a/drivers/avr/hd44780.h +++ b/drivers/avr/hd44780.h | |||
@@ -1,5 +1,3 @@ | |||
1 | #ifndef LCD_H | ||
2 | #define LCD_H | ||
3 | /************************************************************************* | 1 | /************************************************************************* |
4 | Title : C include file for the HD44780U LCD library (lcd.c) | 2 | Title : C include file for the HD44780U LCD library (lcd.c) |
5 | Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury | 3 | Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury |
@@ -43,6 +41,8 @@ | |||
43 | 41 | ||
44 | */ | 42 | */ |
45 | 43 | ||
44 | #pragma once | ||
45 | |||
46 | #include <inttypes.h> | 46 | #include <inttypes.h> |
47 | #include <avr/pgmspace.h> | 47 | #include <avr/pgmspace.h> |
48 | 48 | ||
@@ -346,5 +346,3 @@ extern void lcd_data(uint8_t data); | |||
346 | #define lcd_puts_P(__s) lcd_puts_p(PSTR(__s)) | 346 | #define lcd_puts_P(__s) lcd_puts_p(PSTR(__s)) |
347 | 347 | ||
348 | /**@}*/ | 348 | /**@}*/ |
349 | |||
350 | #endif // LCD_H | ||
diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h index 4a35867cd..e5af73364 100644 --- a/drivers/avr/i2c_master.h +++ b/drivers/avr/i2c_master.h | |||
@@ -17,8 +17,7 @@ | |||
17 | * GitHub repository: https://github.com/g4lvanix/I2C-master-lib | 17 | * GitHub repository: https://github.com/g4lvanix/I2C-master-lib |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef I2C_MASTER_H | 20 | #pragma once |
21 | #define I2C_MASTER_H | ||
22 | 21 | ||
23 | #define I2C_READ 0x01 | 22 | #define I2C_READ 0x01 |
24 | #define I2C_WRITE 0x00 | 23 | #define I2C_WRITE 0x00 |
@@ -42,5 +41,3 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16 | |||
42 | i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); | 41 | i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); |
43 | i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); | 42 | i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); |
44 | void i2c_stop(void); | 43 | void i2c_stop(void); |
45 | |||
46 | #endif // I2C_MASTER_H | ||
diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h index 5d92150e6..1cd0625ef 100644 --- a/drivers/avr/i2c_slave.h +++ b/drivers/avr/i2c_slave.h | |||
@@ -20,8 +20,7 @@ | |||
20 | Read or write to the necessary buffer according to the opperation. | 20 | Read or write to the necessary buffer according to the opperation. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifndef I2C_SLAVE_H | 23 | #pragma once |
24 | #define I2C_SLAVE_H | ||
25 | 24 | ||
26 | #define I2C_SLAVE_REG_COUNT 30 | 25 | #define I2C_SLAVE_REG_COUNT 30 |
27 | 26 | ||
@@ -29,5 +28,3 @@ extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; | |||
29 | 28 | ||
30 | void i2c_slave_init(uint8_t address); | 29 | void i2c_slave_init(uint8_t address); |
31 | void i2c_slave_stop(void); | 30 | void i2c_slave_stop(void); |
32 | |||
33 | #endif // I2C_SLAVE_H | ||
diff --git a/drivers/avr/ssd1306.h b/drivers/avr/ssd1306.h index 9131afcf6..6eecdcfaa 100644 --- a/drivers/avr/ssd1306.h +++ b/drivers/avr/ssd1306.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef SSD1306_H | 1 | #pragma once |
2 | #define SSD1306_H | ||
3 | 2 | ||
4 | #include <stdbool.h> | 3 | #include <stdbool.h> |
5 | #include <stdio.h> | 4 | #include <stdio.h> |
@@ -86,5 +85,3 @@ void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); | |||
86 | void matrix_write(struct CharacterMatrix *matrix, const char *data); | 85 | void matrix_write(struct CharacterMatrix *matrix, const char *data); |
87 | void matrix_write_P(struct CharacterMatrix *matrix, const char *data); | 86 | void matrix_write_P(struct CharacterMatrix *matrix, const char *data); |
88 | void matrix_render(struct CharacterMatrix *matrix); | 87 | void matrix_render(struct CharacterMatrix *matrix); |
89 | |||
90 | #endif | ||
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 345c030c9..81cd54369 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h | |||
@@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef ACTION_H | 17 | |
18 | #define ACTION_H | 18 | #pragma once |
19 | 19 | ||
20 | #include <stdint.h> | 20 | #include <stdint.h> |
21 | #include <stdbool.h> | 21 | #include <stdbool.h> |
@@ -124,5 +124,3 @@ void debug_action(action_t action); | |||
124 | #ifdef __cplusplus | 124 | #ifdef __cplusplus |
125 | } | 125 | } |
126 | #endif | 126 | #endif |
127 | |||
128 | #endif /* ACTION_H */ | ||
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index eea554ff2..eb18c36ae 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h | |||
@@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef ACTION_CODE_H | 17 | |
18 | #define ACTION_CODE_H | 18 | #pragma once |
19 | 19 | ||
20 | /** \brief Action codes | 20 | /** \brief Action codes |
21 | * | 21 | * |
@@ -306,5 +306,3 @@ enum swap_hands_param_tap_op { | |||
306 | #define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON) | 306 | #define ACTION_SWAP_HANDS_OFF_ON() ACTION(ACT_SWAP_HANDS, OP_SH_OFF_ON) |
307 | #define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON) | 307 | #define ACTION_SWAP_HANDS_ON() ACTION(ACT_SWAP_HANDS, OP_SH_ON) |
308 | #define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF) | 308 | #define ACTION_SWAP_HANDS_OFF() ACTION(ACT_SWAP_HANDS, OP_SH_OFF) |
309 | |||
310 | #endif /* ACTION_CODE_H */ | ||
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index f9f686112..d72cd3e3a 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h | |||
@@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef ACTION_LAYER_H | 17 | |
18 | #define ACTION_LAYER_H | 18 | #pragma once |
19 | 19 | ||
20 | #include <stdint.h> | 20 | #include <stdint.h> |
21 | #include "keyboard.h" | 21 | #include "keyboard.h" |
@@ -120,5 +120,3 @@ uint8_t layer_switch_get_layer(keypos_t key); | |||
120 | 120 | ||
121 | /* return action depending on current layer status */ | 121 | /* return action depending on current layer status */ |
122 | action_t layer_switch_get_action(keypos_t key); | 122 | action_t layer_switch_get_action(keypos_t key); |
123 | |||
124 | #endif | ||
diff --git a/tmk_core/common/action_macro.h b/tmk_core/common/action_macro.h index 21004ead6..685e2c6ff 100644 --- a/tmk_core/common/action_macro.h +++ b/tmk_core/common/action_macro.h | |||
@@ -14,8 +14,9 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef ACTION_MACRO_H | 17 | |
18 | #define ACTION_MACRO_H | 18 | #pragma once |
19 | |||
19 | #include <stdint.h> | 20 | #include <stdint.h> |
20 | #include "progmem.h" | 21 | #include "progmem.h" |
21 | 22 | ||
@@ -120,5 +121,3 @@ enum macro_command_id { | |||
120 | /* for backward comaptibility */ | 121 | /* for backward comaptibility */ |
121 | #define MD(key) DOWN(KC_##key) | 122 | #define MD(key) DOWN(KC_##key) |
122 | #define MU(key) UP(KC_##key) | 123 | #define MU(key) UP(KC_##key) |
123 | |||
124 | #endif /* ACTION_MACRO_H */ | ||
diff --git a/tmk_core/common/action_tapping.h b/tmk_core/common/action_tapping.h index 7015ce761..087090f80 100644 --- a/tmk_core/common/action_tapping.h +++ b/tmk_core/common/action_tapping.h | |||
@@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef ACTION_TAPPING_H | 17 | |
18 | #define ACTION_TAPPING_H | 18 | #pragma once |
19 | 19 | ||
20 | /* period of tapping(ms) */ | 20 | /* period of tapping(ms) */ |
21 | #ifndef TAPPING_TERM | 21 | #ifndef TAPPING_TERM |
@@ -36,5 +36,3 @@ uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); | |||
36 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); | 36 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); |
37 | void action_tapping_process(keyrecord_t record); | 37 | void action_tapping_process(keyrecord_t record); |
38 | #endif | 38 | #endif |
39 | |||
40 | #endif | ||
diff --git a/tmk_core/common/action_util.h b/tmk_core/common/action_util.h index 743ff1406..ff29f79b0 100644 --- a/tmk_core/common/action_util.h +++ b/tmk_core/common/action_util.h | |||
@@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef ACTION_UTIL_H | 17 | |
18 | #define ACTION_UTIL_H | 18 | #pragma once |
19 | 19 | ||
20 | #include <stdint.h> | 20 | #include <stdint.h> |
21 | #include "report.h" | 21 | #include "report.h" |
@@ -98,5 +98,3 @@ void clear_oneshot_swaphands(void); | |||
98 | #ifdef __cplusplus | 98 | #ifdef __cplusplus |
99 | } | 99 | } |
100 | #endif | 100 | #endif |
101 | |||
102 | #endif | ||
diff --git a/tmk_core/common/arm_atsam/printf.h b/tmk_core/common/arm_atsam/printf.h index ad6672220..95557f5b0 100644 --- a/tmk_core/common/arm_atsam/printf.h +++ b/tmk_core/common/arm_atsam/printf.h | |||
@@ -1,10 +1,7 @@ | |||
1 | #ifndef _PRINTF_H_ | 1 | #pragma once |
2 | #define _PRINTF_H_ | ||
3 | 2 | ||
4 | #define CONSOLE_PRINTBUF_SIZE 512 | 3 | #define CONSOLE_PRINTBUF_SIZE 512 |
5 | 4 | ||
6 | void console_printf(char *fmt, ...); | 5 | void console_printf(char *fmt, ...); |
7 | 6 | ||
8 | #define __xprintf console_printf | 7 | #define __xprintf console_printf |
9 | |||
10 | #endif //_PRINTF_H_ | ||
diff --git a/tmk_core/common/avr/suspend_avr.h b/tmk_core/common/avr/suspend_avr.h index e4cc0be50..6df048f3b 100644 --- a/tmk_core/common/avr/suspend_avr.h +++ b/tmk_core/common/avr/suspend_avr.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef SUSPEND_AVR_H | 1 | #pragma once |
2 | #define SUSPEND_AVR_H | ||
3 | 2 | ||
4 | #include <stdint.h> | 3 | #include <stdint.h> |
5 | #include <stdbool.h> | 4 | #include <stdbool.h> |
@@ -24,5 +23,3 @@ __asm__ __volatile__ ( \ | |||
24 | : "r0" \ | 23 | : "r0" \ |
25 | ) | 24 | ) |
26 | // clang-format on | 25 | // clang-format on |
27 | |||
28 | #endif | ||
diff --git a/tmk_core/common/avr/timer_avr.h b/tmk_core/common/avr/timer_avr.h index 9aea21c65..c1b726bd0 100644 --- a/tmk_core/common/avr/timer_avr.h +++ b/tmk_core/common/avr/timer_avr.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef TIMER_AVR_H | 18 | #pragma once |
19 | #define TIMER_AVR_H 1 | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | 21 | ||
@@ -38,5 +37,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #if (TIMER_RAW_TOP > 255) | 37 | #if (TIMER_RAW_TOP > 255) |
39 | # error "Timer0 can't count 1ms at this clock freq. Use larger prescaler." | 38 | # error "Timer0 can't count 1ms at this clock freq. Use larger prescaler." |
40 | #endif | 39 | #endif |
41 | |||
42 | #endif | ||
diff --git a/tmk_core/common/avr/xprintf.h b/tmk_core/common/avr/xprintf.h index 70e0f8e48..80834f171 100644 --- a/tmk_core/common/avr/xprintf.h +++ b/tmk_core/common/avr/xprintf.h | |||
@@ -2,8 +2,7 @@ | |||
2 | Extended itoa, puts and printf (C)ChaN, 2011 | 2 | Extended itoa, puts and printf (C)ChaN, 2011 |
3 | -----------------------------------------------------------------------------*/ | 3 | -----------------------------------------------------------------------------*/ |
4 | 4 | ||
5 | #ifndef XPRINTF_H | 5 | #pragma once |
6 | #define XPRINTF_H | ||
7 | 6 | ||
8 | #include <inttypes.h> | 7 | #include <inttypes.h> |
9 | #include <avr/pgmspace.h> | 8 | #include <avr/pgmspace.h> |
@@ -102,5 +101,3 @@ char xatoi(char **str, long *ret); | |||
102 | #ifdef __cplusplus | 101 | #ifdef __cplusplus |
103 | } | 102 | } |
104 | #endif | 103 | #endif |
105 | |||
106 | #endif | ||
diff --git a/tmk_core/common/bootloader.h b/tmk_core/common/bootloader.h index 19260a079..25ebd9528 100644 --- a/tmk_core/common/bootloader.h +++ b/tmk_core/common/bootloader.h | |||
@@ -15,10 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef BOOTLOADER_H | 18 | #pragma once |
19 | #define BOOTLOADER_H | ||
20 | 19 | ||
21 | /* give code for your bootloader to come up if needed */ | 20 | /* give code for your bootloader to come up if needed */ |
22 | void bootloader_jump(void); | 21 | void bootloader_jump(void); |
23 | |||
24 | #endif | ||
diff --git a/tmk_core/common/bootmagic.h b/tmk_core/common/bootmagic.h index c64dc1785..8209d0194 100644 --- a/tmk_core/common/bootmagic.h +++ b/tmk_core/common/bootmagic.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef BOOTMAGIC_H | 1 | #pragma once |
2 | #define BOOTMAGIC_H | ||
3 | 2 | ||
4 | /* FIXME: Add special doxygen comments for defines here. */ | 3 | /* FIXME: Add special doxygen comments for defines here. */ |
5 | 4 | ||
@@ -101,5 +100,3 @@ | |||
101 | 100 | ||
102 | void bootmagic(void); | 101 | void bootmagic(void); |
103 | bool bootmagic_scan_keycode(uint8_t keycode); | 102 | bool bootmagic_scan_keycode(uint8_t keycode); |
104 | |||
105 | #endif | ||
diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 373325cd2..4dac7c1b5 100644 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h | |||
@@ -21,8 +21,7 @@ | |||
21 | * This library also assumes that the pages are not used by the firmware. | 21 | * This library also assumes that the pages are not used by the firmware. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef __EEPROM_H | 24 | #pragma once |
25 | #define __EEPROM_H | ||
26 | 25 | ||
27 | #include <ch.h> | 26 | #include <ch.h> |
28 | #include <hal.h> | 27 | #include <hal.h> |
@@ -83,5 +82,3 @@ uint16_t EEPROM_Init(void); | |||
83 | void EEPROM_Erase(void); | 82 | void EEPROM_Erase(void); |
84 | uint16_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte); | 83 | uint16_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte); |
85 | uint8_t EEPROM_ReadDataByte(uint16_t Address); | 84 | uint8_t EEPROM_ReadDataByte(uint16_t Address); |
86 | |||
87 | #endif /* __EEPROM_H */ | ||
diff --git a/tmk_core/common/chibios/flash_stm32.h b/tmk_core/common/chibios/flash_stm32.h index 8a874f606..90d5bff47 100644 --- a/tmk_core/common/chibios/flash_stm32.h +++ b/tmk_core/common/chibios/flash_stm32.h | |||
@@ -16,8 +16,7 @@ | |||
16 | * Modifications for QMK and STM32F303 by Yiancar | 16 | * Modifications for QMK and STM32F303 by Yiancar |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifndef __FLASH_STM32_H | 19 | #pragma once |
20 | #define __FLASH_STM32_H | ||
21 | 20 | ||
22 | #ifdef __cplusplus | 21 | #ifdef __cplusplus |
23 | extern "C" { | 22 | extern "C" { |
@@ -41,5 +40,3 @@ void FLASH_ClearFlag(uint32_t FLASH_FLAG); | |||
41 | #ifdef __cplusplus | 40 | #ifdef __cplusplus |
42 | } | 41 | } |
43 | #endif | 42 | #endif |
44 | |||
45 | #endif /* __FLASH_STM32_H */ | ||
diff --git a/tmk_core/common/debug.h b/tmk_core/common/debug.h index f9d611bb0..3d2e2315e 100644 --- a/tmk_core/common/debug.h +++ b/tmk_core/common/debug.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef DEBUG_H | 18 | #pragma once |
19 | #define DEBUG_H 1 | ||
20 | 19 | ||
21 | #include <stdbool.h> | 20 | #include <stdbool.h> |
22 | #include "print.h" | 21 | #include "print.h" |
@@ -168,5 +167,3 @@ extern debug_config_t debug_config; | |||
168 | # define debug_bin_reverse(data) | 167 | # define debug_bin_reverse(data) |
169 | 168 | ||
170 | #endif /* NO_DEBUG */ | 169 | #endif /* NO_DEBUG */ |
171 | |||
172 | #endif | ||
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 6fbe78903..c4f048391 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef EECONFIG_H | 18 | #pragma once |
19 | #define EECONFIG_H | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | #include <stdbool.h> | 21 | #include <stdbool.h> |
@@ -111,5 +110,3 @@ void eeconfig_update_haptic(uint32_t val); | |||
111 | 110 | ||
112 | bool eeconfig_read_handedness(void); | 111 | bool eeconfig_read_handedness(void); |
113 | void eeconfig_update_handedness(bool val); | 112 | void eeconfig_update_handedness(bool val); |
114 | |||
115 | #endif | ||
diff --git a/tmk_core/common/eeprom.h b/tmk_core/common/eeprom.h index 8a81e7066..f5b3f0ad5 100644 --- a/tmk_core/common/eeprom.h +++ b/tmk_core/common/eeprom.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef TMK_CORE_COMMON_EEPROM_H_ | 1 | #pragma once |
2 | #define TMK_CORE_COMMON_EEPROM_H_ | ||
3 | 2 | ||
4 | #if defined(__AVR__) && !defined(EEPROM_DRIVER) | 3 | #if defined(__AVR__) && !defined(EEPROM_DRIVER) |
5 | # include <avr/eeprom.h> | 4 | # include <avr/eeprom.h> |
@@ -20,5 +19,3 @@ void eeprom_update_word(uint16_t *__p, uint16_t __value); | |||
20 | void eeprom_update_dword(uint32_t *__p, uint32_t __value); | 19 | void eeprom_update_dword(uint32_t *__p, uint32_t __value); |
21 | void eeprom_update_block(const void *__src, void *__dst, size_t __n); | 20 | void eeprom_update_block(const void *__src, void *__dst, size_t __n); |
22 | #endif | 21 | #endif |
23 | |||
24 | #endif /* TMK_CORE_COMMON_EEPROM_H_ */ | ||
diff --git a/tmk_core/common/host_driver.h b/tmk_core/common/host_driver.h index 3cfec40cc..f34a22053 100644 --- a/tmk_core/common/host_driver.h +++ b/tmk_core/common/host_driver.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef HOST_DRIVER_H | 18 | #pragma once |
19 | #define HOST_DRIVER_H | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | #include "report.h" | 21 | #include "report.h" |
@@ -31,5 +30,3 @@ typedef struct { | |||
31 | void (*send_system)(uint16_t); | 30 | void (*send_system)(uint16_t); |
32 | void (*send_consumer)(uint16_t); | 31 | void (*send_consumer)(uint16_t); |
33 | } host_driver_t; | 32 | } host_driver_t; |
34 | |||
35 | #endif | ||
diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index caa18e7e7..d04e685cd 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef KEYBOARD_H | 18 | #pragma once |
19 | #define KEYBOARD_H | ||
20 | 19 | ||
21 | #include <stdbool.h> | 20 | #include <stdbool.h> |
22 | #include <stdint.h> | 21 | #include <stdint.h> |
@@ -77,5 +76,3 @@ void housekeeping_task_user(void); | |||
77 | #ifdef __cplusplus | 76 | #ifdef __cplusplus |
78 | } | 77 | } |
79 | #endif | 78 | #endif |
80 | |||
81 | #endif | ||
diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index 5c8ba8fe6..d35e44d8d 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h | |||
@@ -21,8 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
21 | * See https://web.archive.org/web/20060218214400/http://www.usb.org/developers/devclass_docs/Hut1_12.pdf | 21 | * See https://web.archive.org/web/20060218214400/http://www.usb.org/developers/devclass_docs/Hut1_12.pdf |
22 | * or http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (older) | 22 | * or http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (older) |
23 | */ | 23 | */ |
24 | #ifndef KEYCODE_H | 24 | |
25 | #define KEYCODE_H | 25 | #pragma once |
26 | 26 | ||
27 | /* FIXME: Add doxygen comments here */ | 27 | /* FIXME: Add doxygen comments here */ |
28 | 28 | ||
@@ -542,4 +542,3 @@ enum mouse_keys { | |||
542 | KC_MS_ACCEL1, | 542 | KC_MS_ACCEL1, |
543 | KC_MS_ACCEL2 | 543 | KC_MS_ACCEL2 |
544 | }; | 544 | }; |
545 | #endif | ||
diff --git a/tmk_core/common/magic.h b/tmk_core/common/magic.h index 3fa2d8b81..a6552c04d 100644 --- a/tmk_core/common/magic.h +++ b/tmk_core/common/magic.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef MAGIC_H | 1 | #pragma once |
2 | #define MAGIC_H | ||
3 | 2 | ||
4 | void magic(void); | 3 | void magic(void); |
5 | |||
6 | #endif | ||
diff --git a/tmk_core/common/matrix.h b/tmk_core/common/matrix.h index 31ec84430..e36f01460 100644 --- a/tmk_core/common/matrix.h +++ b/tmk_core/common/matrix.h | |||
@@ -14,8 +14,8 @@ GNU General Public License for more details. | |||
14 | You should have received a copy of the GNU General Public License | 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #ifndef MATRIX_H | 17 | |
18 | #define MATRIX_H | 18 | #pragma once |
19 | 19 | ||
20 | #include <stdint.h> | 20 | #include <stdint.h> |
21 | #include <stdbool.h> | 21 | #include <stdbool.h> |
@@ -76,5 +76,3 @@ void matrix_scan_user(void); | |||
76 | #ifdef __cplusplus | 76 | #ifdef __cplusplus |
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | |||
80 | #endif | ||
diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h index 05e453823..300d262f5 100644 --- a/tmk_core/common/mousekey.h +++ b/tmk_core/common/mousekey.h | |||
@@ -15,9 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef MOUSEKEY_H | 18 | #pragma once |
19 | # define MOUSEKEY_H | ||
20 | #endif | ||
21 | 19 | ||
22 | #include <stdbool.h> | 20 | #include <stdbool.h> |
23 | #include "host.h" | 21 | #include "host.h" |
diff --git a/tmk_core/common/nodebug.h b/tmk_core/common/nodebug.h index b9c8b3ac0..0b176684b 100644 --- a/tmk_core/common/nodebug.h +++ b/tmk_core/common/nodebug.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef NODEBUG_H | 18 | #pragma once |
19 | #define NODEBUG_H | ||
20 | 19 | ||
21 | #ifndef NO_DEBUG | 20 | #ifndef NO_DEBUG |
22 | # define NO_DEBUG | 21 | # define NO_DEBUG |
@@ -25,5 +24,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
25 | #else | 24 | #else |
26 | # include "debug.h" | 25 | # include "debug.h" |
27 | #endif | 26 | #endif |
28 | |||
29 | #endif | ||
diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h index 1c7723621..647a5aa05 100644 --- a/tmk_core/common/print.h +++ b/tmk_core/common/print.h | |||
@@ -22,8 +22,7 @@ | |||
22 | * THE SOFTWARE. | 22 | * THE SOFTWARE. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef PRINT_H__ | 25 | #pragma once |
26 | #define PRINT_H__ 1 | ||
27 | 26 | ||
28 | #include <stdint.h> | 27 | #include <stdint.h> |
29 | #include <stdbool.h> | 28 | #include <stdbool.h> |
@@ -269,5 +268,3 @@ extern "C" | |||
269 | #define pbin16(data) print_bin16(data) | 268 | #define pbin16(data) print_bin16(data) |
270 | #define pbin_reverse(data) print_bin_reverse8(data) | 269 | #define pbin_reverse(data) print_bin_reverse8(data) |
271 | #define pbin_reverse16(data) print_bin_reverse16(data) | 270 | #define pbin_reverse16(data) print_bin_reverse16(data) |
272 | |||
273 | #endif | ||
diff --git a/tmk_core/common/raw_hid.h b/tmk_core/common/raw_hid.h index c579157f1..6d60ab2bf 100644 --- a/tmk_core/common/raw_hid.h +++ b/tmk_core/common/raw_hid.h | |||
@@ -1,8 +1,5 @@ | |||
1 | #ifndef _RAW_HID_H_ | 1 | #pragma once |
2 | #define _RAW_HID_H_ | ||
3 | 2 | ||
4 | void raw_hid_receive(uint8_t *data, uint8_t length); | 3 | void raw_hid_receive(uint8_t *data, uint8_t length); |
5 | 4 | ||
6 | void raw_hid_send(uint8_t *data, uint8_t length); | 5 | void raw_hid_send(uint8_t *data, uint8_t length); |
7 | |||
8 | #endif | ||
diff --git a/tmk_core/common/sendchar.h b/tmk_core/common/sendchar.h index bd7b94fd9..b150dd464 100644 --- a/tmk_core/common/sendchar.h +++ b/tmk_core/common/sendchar.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef SENDCHAR_H | 18 | #pragma once |
19 | #define SENDCHAR_H | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | 21 | ||
@@ -30,5 +29,3 @@ int8_t sendchar(uint8_t c); | |||
30 | #ifdef __cplusplus | 29 | #ifdef __cplusplus |
31 | } | 30 | } |
32 | #endif | 31 | #endif |
33 | |||
34 | #endif | ||
diff --git a/tmk_core/common/sleep_led.h b/tmk_core/common/sleep_led.h index d160213f1..38f80a660 100644 --- a/tmk_core/common/sleep_led.h +++ b/tmk_core/common/sleep_led.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef SLEEP_LED_H | 1 | #pragma once |
2 | #define SLEEP_LED_H | ||
3 | 2 | ||
4 | #ifdef SLEEP_LED_ENABLE | 3 | #ifdef SLEEP_LED_ENABLE |
5 | 4 | ||
@@ -16,5 +15,3 @@ void sleep_led_toggle(void); | |||
16 | # define sleep_led_toggle() | 15 | # define sleep_led_toggle() |
17 | 16 | ||
18 | #endif | 17 | #endif |
19 | |||
20 | #endif | ||
diff --git a/tmk_core/common/suspend.h b/tmk_core/common/suspend.h index 87f5025da..766df95aa 100644 --- a/tmk_core/common/suspend.h +++ b/tmk_core/common/suspend.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef SUSPEND_H | 1 | #pragma once |
2 | #define SUSPEND_H | ||
3 | 2 | ||
4 | #include <stdint.h> | 3 | #include <stdint.h> |
5 | #include <stdbool.h> | 4 | #include <stdbool.h> |
@@ -13,5 +12,3 @@ void suspend_wakeup_init_user(void); | |||
13 | void suspend_wakeup_init_kb(void); | 12 | void suspend_wakeup_init_kb(void); |
14 | void suspend_power_down_user(void); | 13 | void suspend_power_down_user(void); |
15 | void suspend_power_down_kb(void); | 14 | void suspend_power_down_kb(void); |
16 | |||
17 | #endif | ||
diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h index 7ee7feac2..58f637dd9 100644 --- a/tmk_core/common/timer.h +++ b/tmk_core/common/timer.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef TIMER_H | 18 | #pragma once |
19 | #define TIMER_H 1 | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | #include <stdbool.h> | 21 | #include <stdbool.h> |
@@ -51,5 +50,3 @@ uint32_t timer_elapsed32(uint32_t last); | |||
51 | #ifdef __cplusplus | 50 | #ifdef __cplusplus |
52 | } | 51 | } |
53 | #endif | 52 | #endif |
54 | |||
55 | #endif | ||
diff --git a/tmk_core/common/uart.h b/tmk_core/common/uart.h index 59a1a7cd1..ea247b17b 100644 --- a/tmk_core/common/uart.h +++ b/tmk_core/common/uart.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef _uart_included_h_ | 1 | #pragma once |
2 | #define _uart_included_h_ | ||
3 | 2 | ||
4 | #include <stdint.h> | 3 | #include <stdint.h> |
5 | 4 | ||
@@ -7,5 +6,3 @@ void uart_init(uint32_t baud); | |||
7 | void uart_putchar(uint8_t c); | 6 | void uart_putchar(uint8_t c); |
8 | uint8_t uart_getchar(void); | 7 | uint8_t uart_getchar(void); |
9 | uint8_t uart_available(void); | 8 | uint8_t uart_available(void); |
10 | |||
11 | #endif | ||
diff --git a/tmk_core/common/util.h b/tmk_core/common/util.h index 68642e7fd..db57f268c 100644 --- a/tmk_core/common/util.h +++ b/tmk_core/common/util.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef UTIL_H | 18 | #pragma once |
19 | #define UTIL_H | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | 21 | ||
@@ -46,5 +45,3 @@ uint32_t bitrev32(uint32_t bits); | |||
46 | #ifdef __cplusplus | 45 | #ifdef __cplusplus |
47 | } | 46 | } |
48 | #endif | 47 | #endif |
49 | |||
50 | #endif | ||
diff --git a/tmk_core/common/virtser.h b/tmk_core/common/virtser.h index 74891b6ae..a0645f9e0 100644 --- a/tmk_core/common/virtser.h +++ b/tmk_core/common/virtser.h | |||
@@ -1,10 +1,7 @@ | |||
1 | #ifndef _VIRTSER_H_ | 1 | #pragma once |
2 | #define _VIRTSER_H_ | ||
3 | 2 | ||
4 | /* Define this function in your code to process incoming bytes */ | 3 | /* Define this function in your code to process incoming bytes */ |
5 | void virtser_recv(const uint8_t ch); | 4 | void virtser_recv(const uint8_t ch); |
6 | 5 | ||
7 | /* Call this to send a character over the Virtual Serial Device */ | 6 | /* Call this to send a character over the Virtual Serial Device */ |
8 | void virtser_send(const uint8_t byte); | 7 | void virtser_send(const uint8_t byte); |
9 | |||
10 | #endif | ||
diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index f5ef12ac0..89128e9da 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef WAIT_H | 1 | #pragma once |
2 | #define WAIT_H | ||
3 | 2 | ||
4 | #include <inttypes.h> | 3 | #include <inttypes.h> |
5 | 4 | ||
@@ -41,5 +40,3 @@ void wait_ms(uint32_t ms); | |||
41 | #ifdef __cplusplus | 40 | #ifdef __cplusplus |
42 | } | 41 | } |
43 | #endif | 42 | #endif |
44 | |||
45 | #endif | ||
diff --git a/tmk_core/protocol/adb.h b/tmk_core/protocol/adb.h index 7d37485fc..34cbcf769 100644 --- a/tmk_core/protocol/adb.h +++ b/tmk_core/protocol/adb.h | |||
@@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |||
35 | POSSIBILITY OF SUCH DAMAGE. | 35 | POSSIBILITY OF SUCH DAMAGE. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #ifndef ADB_H | 38 | #pragma once |
39 | #define ADB_H | ||
40 | 39 | ||
41 | #include <stdint.h> | 40 | #include <stdint.h> |
42 | #include <stdbool.h> | 41 | #include <stdbool.h> |
@@ -57,5 +56,3 @@ void adb_host_listen(uint8_t cmd, uint8_t data_h, uint8_t data_l); | |||
57 | void adb_host_kbd_led(uint8_t led); | 56 | void adb_host_kbd_led(uint8_t led); |
58 | void adb_mouse_task(void); | 57 | void adb_mouse_task(void); |
59 | void adb_mouse_init(void); | 58 | void adb_mouse_init(void); |
60 | |||
61 | #endif | ||
diff --git a/tmk_core/protocol/chibios/usb_driver.h b/tmk_core/protocol/chibios/usb_driver.h index 6d71bcec4..f94387deb 100644 --- a/tmk_core/protocol/chibios/usb_driver.h +++ b/tmk_core/protocol/chibios/usb_driver.h | |||
@@ -22,10 +22,9 @@ | |||
22 | * @{ | 22 | * @{ |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef USB_DRIVER_H | 25 | #pragma once |
26 | # define USB_DRIVER_H | ||
27 | 26 | ||
28 | # include <hal_usb_cdc.h> | 27 | #include <hal_usb_cdc.h> |
29 | 28 | ||
30 | /*===========================================================================*/ | 29 | /*===========================================================================*/ |
31 | /* Driver constants. */ | 30 | /* Driver constants. */ |
@@ -35,9 +34,9 @@ | |||
35 | /* Derived constants and error checks. */ | 34 | /* Derived constants and error checks. */ |
36 | /*===========================================================================*/ | 35 | /*===========================================================================*/ |
37 | 36 | ||
38 | # if HAL_USE_USB == FALSE | 37 | #if HAL_USE_USB == FALSE |
39 | # error "The USB Driver requires HAL_USE_USB" | 38 | # error "The USB Driver requires HAL_USE_USB" |
40 | # endif | 39 | #endif |
41 | 40 | ||
42 | /*===========================================================================*/ | 41 | /*===========================================================================*/ |
43 | /* Driver data structures and types. */ | 42 | /* Driver data structures and types. */ |
@@ -112,21 +111,21 @@ typedef struct { | |||
112 | /** | 111 | /** |
113 | * @brief @p SerialDriver specific data. | 112 | * @brief @p SerialDriver specific data. |
114 | */ | 113 | */ |
115 | # define _qmk_usb_driver_data \ | 114 | #define _qmk_usb_driver_data \ |
116 | _base_asynchronous_channel_data /* Driver state.*/ \ | 115 | _base_asynchronous_channel_data /* Driver state.*/ \ |
117 | qmkusbstate_t state; \ | 116 | qmkusbstate_t state; \ |
118 | /* Input buffers queue.*/ \ | 117 | /* Input buffers queue.*/ \ |
119 | input_buffers_queue_t ibqueue; \ | 118 | input_buffers_queue_t ibqueue; \ |
120 | /* Output queue.*/ \ | 119 | /* Output queue.*/ \ |
121 | output_buffers_queue_t obqueue; \ | 120 | output_buffers_queue_t obqueue; \ |
122 | /* End of the mandatory fields.*/ \ | 121 | /* End of the mandatory fields.*/ \ |
123 | /* Current configuration data.*/ \ | 122 | /* Current configuration data.*/ \ |
124 | const QMKUSBConfig *config; | 123 | const QMKUSBConfig *config; |
125 | 124 | ||
126 | /** | 125 | /** |
127 | * @brief @p SerialUSBDriver specific methods. | 126 | * @brief @p SerialUSBDriver specific methods. |
128 | */ | 127 | */ |
129 | # define _qmk_usb_driver_methods _base_asynchronous_channel_methods | 128 | #define _qmk_usb_driver_methods _base_asynchronous_channel_methods |
130 | 129 | ||
131 | /** | 130 | /** |
132 | * @extends BaseAsynchronousChannelVMT | 131 | * @extends BaseAsynchronousChannelVMT |
@@ -158,9 +157,9 @@ struct QMKUSBDriver { | |||
158 | /* External declarations. */ | 157 | /* External declarations. */ |
159 | /*===========================================================================*/ | 158 | /*===========================================================================*/ |
160 | 159 | ||
161 | # ifdef __cplusplus | 160 | #ifdef __cplusplus |
162 | extern "C" { | 161 | extern "C" { |
163 | # endif | 162 | #endif |
164 | void qmkusbInit(void); | 163 | void qmkusbInit(void); |
165 | void qmkusbObjectInit(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); | 164 | void qmkusbObjectInit(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); |
166 | void qmkusbStart(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); | 165 | void qmkusbStart(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); |
@@ -173,10 +172,8 @@ void qmkusbSOFHookI(QMKUSBDriver *qmkusbp); | |||
173 | void qmkusbDataTransmitted(USBDriver *usbp, usbep_t ep); | 172 | void qmkusbDataTransmitted(USBDriver *usbp, usbep_t ep); |
174 | void qmkusbDataReceived(USBDriver *usbp, usbep_t ep); | 173 | void qmkusbDataReceived(USBDriver *usbp, usbep_t ep); |
175 | void qmkusbInterruptTransmitted(USBDriver *usbp, usbep_t ep); | 174 | void qmkusbInterruptTransmitted(USBDriver *usbp, usbep_t ep); |
176 | # ifdef __cplusplus | 175 | #ifdef __cplusplus |
177 | } | 176 | } |
178 | # endif | 177 | #endif |
179 | |||
180 | #endif /* USB_DRIVER_H */ | ||
181 | 178 | ||
182 | /** @} */ | 179 | /** @} */ |
diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h index 1381d0765..eaa08d8f7 100644 --- a/tmk_core/protocol/chibios/usb_main.h +++ b/tmk_core/protocol/chibios/usb_main.h | |||
@@ -15,8 +15,7 @@ | |||
15 | * GPL v2 or later. | 15 | * GPL v2 or later. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef _USB_MAIN_H_ | 18 | #pragma once |
19 | #define _USB_MAIN_H_ | ||
20 | 19 | ||
21 | // TESTING | 20 | // TESTING |
22 | // extern uint8_t blinkLed; | 21 | // extern uint8_t blinkLed; |
@@ -89,5 +88,3 @@ int8_t sendchar(uint8_t c); | |||
89 | void console_flush_output(void); | 88 | void console_flush_output(void); |
90 | 89 | ||
91 | #endif /* CONSOLE_ENABLE */ | 90 | #endif /* CONSOLE_ENABLE */ |
92 | |||
93 | #endif /* _USB_MAIN_H_ */ | ||
diff --git a/tmk_core/protocol/ibm4704.h b/tmk_core/protocol/ibm4704.h index cc2418ee6..4f88d148b 100644 --- a/tmk_core/protocol/ibm4704.h +++ b/tmk_core/protocol/ibm4704.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | Copyright 2014 Jun WAKO <wakojun@gmail.com> | 2 | Copyright 2014 Jun WAKO <wakojun@gmail.com> |
3 | */ | 3 | */ |
4 | #ifndef IBM4704_H | 4 | |
5 | #define IBM4704_H | 5 | #pragma once |
6 | 6 | ||
7 | #define IBM4704_ERR_NONE 0 | 7 | #define IBM4704_ERR_NONE 0 |
8 | #define IBM4704_ERR_PARITY 0x70 | 8 | #define IBM4704_ERR_PARITY 0x70 |
@@ -101,5 +101,3 @@ static inline void inhibit(void) { | |||
101 | clock_hi(); | 101 | clock_hi(); |
102 | data_lo(); | 102 | data_lo(); |
103 | } | 103 | } |
104 | |||
105 | #endif | ||
diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 71fd7aad8..348a84c03 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h | |||
@@ -36,8 +36,7 @@ | |||
36 | this software. | 36 | this software. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #ifndef _LUFA_H_ | 39 | #pragma once |
40 | #define _LUFA_H_ | ||
41 | 40 | ||
42 | #include <avr/io.h> | 41 | #include <avr/io.h> |
43 | #include <avr/wdt.h> | 42 | #include <avr/wdt.h> |
@@ -68,5 +67,3 @@ extern host_driver_t lufa_driver; | |||
68 | // The header and terminator are not stored to save a few bytes of precious ram | 67 | // The header and terminator are not stored to save a few bytes of precious ram |
69 | # define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) | 68 | # define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) |
70 | #endif | 69 | #endif |
71 | |||
72 | #endif | ||
diff --git a/tmk_core/protocol/m0110.h b/tmk_core/protocol/m0110.h index 3f9686b0d..63ff3e90e 100644 --- a/tmk_core/protocol/m0110.h +++ b/tmk_core/protocol/m0110.h | |||
@@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |||
35 | POSSIBILITY OF SUCH DAMAGE. | 35 | POSSIBILITY OF SUCH DAMAGE. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #ifndef M0110_H | 38 | #pragma once |
39 | #define M0110_H | ||
40 | 39 | ||
41 | /* port settings for clock and data line */ | 40 | /* port settings for clock and data line */ |
42 | #if !(defined(M0110_CLOCK_PORT) && defined(M0110_CLOCK_PIN) && defined(M0110_CLOCK_DDR) && defined(M0110_CLOCK_BIT)) | 41 | #if !(defined(M0110_CLOCK_PORT) && defined(M0110_CLOCK_PIN) && defined(M0110_CLOCK_DDR) && defined(M0110_CLOCK_BIT)) |
@@ -80,5 +79,3 @@ uint8_t m0110_recv(void); | |||
80 | uint8_t m0110_recv_key(void); | 79 | uint8_t m0110_recv_key(void); |
81 | uint8_t m0110_inquiry(void); | 80 | uint8_t m0110_inquiry(void); |
82 | uint8_t m0110_instant(void); | 81 | uint8_t m0110_instant(void); |
83 | |||
84 | #endif | ||
diff --git a/tmk_core/protocol/midi/Config/LUFAConfig.h b/tmk_core/protocol/midi/Config/LUFAConfig.h index b346c05bd..dead96de7 100644 --- a/tmk_core/protocol/midi/Config/LUFAConfig.h +++ b/tmk_core/protocol/midi/Config/LUFAConfig.h | |||
@@ -39,8 +39,7 @@ | |||
39 | * manual section "Summary of Compile Tokens". | 39 | * manual section "Summary of Compile Tokens". |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #ifndef _LUFA_CONFIG_H_ | 42 | #pragma once |
43 | #define _LUFA_CONFIG_H_ | ||
44 | 43 | ||
45 | #if (ARCH == ARCH_AVR8) | 44 | #if (ARCH == ARCH_AVR8) |
46 | 45 | ||
@@ -90,4 +89,3 @@ | |||
90 | # error Unsupported architecture for this LUFA configuration file. | 89 | # error Unsupported architecture for this LUFA configuration file. |
91 | 90 | ||
92 | #endif | 91 | #endif |
93 | #endif | ||
diff --git a/tmk_core/protocol/midi/bytequeue/bytequeue.h b/tmk_core/protocol/midi/bytequeue/bytequeue.h index 33fb63a8c..29d15abbd 100644 --- a/tmk_core/protocol/midi/bytequeue/bytequeue.h +++ b/tmk_core/protocol/midi/bytequeue/bytequeue.h | |||
@@ -17,8 +17,7 @@ | |||
17 | // You should have received a copy of the GNU General Public License | 17 | // You should have received a copy of the GNU General Public License |
18 | // along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. | 18 | // along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 | ||
20 | #ifndef BYTEQUEUE_H | 20 | #pragma once |
21 | #define BYTEQUEUE_H | ||
22 | 21 | ||
23 | #ifdef __cplusplus | 22 | #ifdef __cplusplus |
24 | extern "C" { | 23 | extern "C" { |
@@ -54,5 +53,3 @@ void bytequeue_remove(byteQueue_t* queue, byteQueueIndex_t numToRemove); | |||
54 | #ifdef __cplusplus | 53 | #ifdef __cplusplus |
55 | } | 54 | } |
56 | #endif | 55 | #endif |
57 | |||
58 | #endif | ||
diff --git a/tmk_core/protocol/midi/bytequeue/interrupt_setting.h b/tmk_core/protocol/midi/bytequeue/interrupt_setting.h index 788f75d79..78294f076 100644 --- a/tmk_core/protocol/midi/bytequeue/interrupt_setting.h +++ b/tmk_core/protocol/midi/bytequeue/interrupt_setting.h | |||
@@ -16,8 +16,7 @@ | |||
16 | // You should have received a copy of the GNU General Public License | 16 | // You should have received a copy of the GNU General Public License |
17 | // along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. | 17 | // along with avr-bytequeue. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 | ||
19 | #ifndef INTERRUPT_SETTING_H | 19 | #pragma once |
20 | #define INTERRUPT_SETTING_H | ||
21 | 20 | ||
22 | #ifdef __cplusplus | 21 | #ifdef __cplusplus |
23 | extern "C" { | 22 | extern "C" { |
@@ -34,5 +33,3 @@ void restore_interrupt_setting(interrupt_setting_t setting); | |||
34 | #ifdef __cplusplus | 33 | #ifdef __cplusplus |
35 | } | 34 | } |
36 | #endif | 35 | #endif |
37 | |||
38 | #endif | ||
diff --git a/tmk_core/protocol/midi/midi.h b/tmk_core/protocol/midi/midi.h index 07d8cebc1..75f3b13b0 100644 --- a/tmk_core/protocol/midi/midi.h +++ b/tmk_core/protocol/midi/midi.h | |||
@@ -25,8 +25,7 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef XNOR_MIDI_H | 28 | #pragma once |
29 | #define XNOR_MIDI_H | ||
30 | 29 | ||
31 | #ifdef __cplusplus | 30 | #ifdef __cplusplus |
32 | extern "C" { | 31 | extern "C" { |
@@ -486,5 +485,3 @@ midi_packet_length_t midi_packet_length(uint8_t status); | |||
486 | #ifdef __cplusplus | 485 | #ifdef __cplusplus |
487 | } | 486 | } |
488 | #endif | 487 | #endif |
489 | |||
490 | #endif | ||
diff --git a/tmk_core/protocol/midi/midi_device.h b/tmk_core/protocol/midi/midi_device.h index 693d81a8e..79e8f7a93 100644 --- a/tmk_core/protocol/midi/midi_device.h +++ b/tmk_core/protocol/midi/midi_device.h | |||
@@ -21,8 +21,7 @@ | |||
21 | * @brief Device implementation functions | 21 | * @brief Device implementation functions |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef MIDI_DEVICE_H | 24 | #pragma once |
25 | #define MIDI_DEVICE_H | ||
26 | 25 | ||
27 | #ifdef __cplusplus | 26 | #ifdef __cplusplus |
28 | extern "C" { | 27 | extern "C" { |
@@ -147,5 +146,3 @@ void midi_device_set_pre_input_process_func(MidiDevice* device, midi_no_byte_fun | |||
147 | #ifdef __cplusplus | 146 | #ifdef __cplusplus |
148 | } | 147 | } |
149 | #endif | 148 | #endif |
150 | |||
151 | #endif | ||
diff --git a/tmk_core/protocol/midi/midi_function_types.h b/tmk_core/protocol/midi/midi_function_types.h index 761e88117..6f98a7298 100644 --- a/tmk_core/protocol/midi/midi_function_types.h +++ b/tmk_core/protocol/midi/midi_function_types.h | |||
@@ -21,8 +21,7 @@ | |||
21 | * @brief Function signature definitions | 21 | * @brief Function signature definitions |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #ifndef MIDI_FUNCTION_TYPES_H | 24 | #pragma once |
25 | #define MIDI_FUNCTION_TYPES_H | ||
26 | 25 | ||
27 | #ifdef __cplusplus | 26 | #ifdef __cplusplus |
28 | extern "C" { | 27 | extern "C" { |
@@ -46,5 +45,3 @@ typedef void (*midi_sysex_func_t)(MidiDevice *device, uint16_t start_byte, uint8 | |||
46 | #ifdef __cplusplus | 45 | #ifdef __cplusplus |
47 | } | 46 | } |
48 | #endif | 47 | #endif |
49 | |||
50 | #endif | ||
diff --git a/tmk_core/protocol/midi/sysex_tools.h b/tmk_core/protocol/midi/sysex_tools.h index 454a92ea5..7d7f10d24 100644 --- a/tmk_core/protocol/midi/sysex_tools.h +++ b/tmk_core/protocol/midi/sysex_tools.h | |||
@@ -16,8 +16,7 @@ | |||
16 | // You should have received a copy of the GNU General Public License | 16 | // You should have received a copy of the GNU General Public License |
17 | // along with avr-midi. If not, see <http://www.gnu.org/licenses/>. | 17 | // along with avr-midi. If not, see <http://www.gnu.org/licenses/>. |
18 | 18 | ||
19 | #ifndef SYSEX_TOOLS_H | 19 | #pragma once |
20 | #define SYSEX_TOOLS_H | ||
21 | 20 | ||
22 | #ifdef __cplusplus | 21 | #ifdef __cplusplus |
23 | extern "C" { | 22 | extern "C" { |
@@ -91,5 +90,3 @@ uint16_t sysex_decode(uint8_t *decoded, const uint8_t *source, uint16_t length); | |||
91 | #ifdef __cplusplus | 90 | #ifdef __cplusplus |
92 | } | 91 | } |
93 | #endif | 92 | #endif |
94 | |||
95 | #endif | ||
diff --git a/tmk_core/protocol/news.h b/tmk_core/protocol/news.h index d0c4bc6a4..327a13856 100644 --- a/tmk_core/protocol/news.h +++ b/tmk_core/protocol/news.h | |||
@@ -35,8 +35,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |||
35 | POSSIBILITY OF SUCH DAMAGE. | 35 | POSSIBILITY OF SUCH DAMAGE. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #ifndef NEWS_H | 38 | #pragma once |
39 | #define NEWS_H | 39 | |
40 | /* | 40 | /* |
41 | * Primitive PS/2 Library for AVR | 41 | * Primitive PS/2 Library for AVR |
42 | */ | 42 | */ |
@@ -46,5 +46,3 @@ void news_init(void); | |||
46 | uint8_t news_recv(void); | 46 | uint8_t news_recv(void); |
47 | 47 | ||
48 | /* device role */ | 48 | /* device role */ |
49 | |||
50 | #endif | ||
diff --git a/tmk_core/protocol/next_kbd.h b/tmk_core/protocol/next_kbd.h index bff7a474d..1249ebf39 100644 --- a/tmk_core/protocol/next_kbd.h +++ b/tmk_core/protocol/next_kbd.h | |||
@@ -45,13 +45,12 @@ POSSIBILITY OF SUCH DAMAGE. | |||
45 | 45 | ||
46 | */ | 46 | */ |
47 | 47 | ||
48 | #include <stdbool.h> | 48 | #pragma once |
49 | 49 | ||
50 | #ifndef NEXT_KBD_H | 50 | #include <stdbool.h> |
51 | # define NEXT_KBD_H | ||
52 | 51 | ||
53 | # define NEXT_KBD_KMBUS_IDLE 0x300600 | 52 | #define NEXT_KBD_KMBUS_IDLE 0x300600 |
54 | # define NEXT_KBD_TIMING 50 | 53 | #define NEXT_KBD_TIMING 50 |
55 | 54 | ||
56 | extern uint8_t next_kbd_error; | 55 | extern uint8_t next_kbd_error; |
57 | 56 | ||
@@ -59,5 +58,3 @@ extern uint8_t next_kbd_error; | |||
59 | void next_kbd_init(void); | 58 | void next_kbd_init(void); |
60 | void next_kbd_set_leds(bool left, bool right); | 59 | void next_kbd_set_leds(bool left, bool right); |
61 | uint32_t next_kbd_recv(void); | 60 | uint32_t next_kbd_recv(void); |
62 | |||
63 | #endif | ||
diff --git a/tmk_core/protocol/ps2.h b/tmk_core/protocol/ps2.h index e32cc9603..f12319285 100644 --- a/tmk_core/protocol/ps2.h +++ b/tmk_core/protocol/ps2.h | |||
@@ -35,8 +35,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |||
35 | POSSIBILITY OF SUCH DAMAGE. | 35 | POSSIBILITY OF SUCH DAMAGE. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #ifndef PS2_H | 38 | #pragma once |
39 | #define PS2_H | ||
40 | 39 | ||
41 | #include <stdbool.h> | 40 | #include <stdbool.h> |
42 | #include "wait.h" | 41 | #include "wait.h" |
@@ -138,5 +137,3 @@ static inline void inhibit(void) { | |||
138 | clock_lo(); | 137 | clock_lo(); |
139 | data_hi(); | 138 | data_hi(); |
140 | } | 139 | } |
141 | |||
142 | #endif | ||
diff --git a/tmk_core/protocol/ps2_io.h b/tmk_core/protocol/ps2_io.h index 35e26561d..de93cb7a3 100644 --- a/tmk_core/protocol/ps2_io.h +++ b/tmk_core/protocol/ps2_io.h | |||
@@ -1,5 +1,4 @@ | |||
1 | #ifndef PS2_IO_H | 1 | #pragma once |
2 | #define PS2_IO_H | ||
3 | 2 | ||
4 | void clock_init(void); | 3 | void clock_init(void); |
5 | void clock_lo(void); | 4 | void clock_lo(void); |
@@ -10,5 +9,3 @@ void data_init(void); | |||
10 | void data_lo(void); | 9 | void data_lo(void); |
11 | void data_hi(void); | 10 | void data_hi(void); |
12 | bool data_in(void); | 11 | bool data_in(void); |
13 | |||
14 | #endif | ||
diff --git a/tmk_core/protocol/ps2_mouse.h b/tmk_core/protocol/ps2_mouse.h index d743fb3d8..c97c6c893 100644 --- a/tmk_core/protocol/ps2_mouse.h +++ b/tmk_core/protocol/ps2_mouse.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef PS2_MOUSE_H | 18 | #pragma once |
19 | #define PS2_MOUSE_H | ||
20 | 19 | ||
21 | #include <stdbool.h> | 20 | #include <stdbool.h> |
22 | #include "debug.h" | 21 | #include "debug.h" |
@@ -176,5 +175,3 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution); | |||
176 | void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate); | 175 | void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate); |
177 | 176 | ||
178 | void ps2_mouse_moved_user(report_mouse_t *mouse_report); | 177 | void ps2_mouse_moved_user(report_mouse_t *mouse_report); |
179 | |||
180 | #endif | ||
diff --git a/tmk_core/protocol/serial_mouse.h b/tmk_core/protocol/serial_mouse.h index b10315f36..cb83cf4f6 100644 --- a/tmk_core/protocol/serial_mouse.h +++ b/tmk_core/protocol/serial_mouse.h | |||
@@ -15,8 +15,7 @@ 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/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef SERIAL_MOUSE_H | 18 | #pragma once |
19 | #define SERIAL_MOUSE_H | ||
20 | 19 | ||
21 | #include <stdint.h> | 20 | #include <stdint.h> |
22 | 21 | ||
@@ -28,5 +27,3 @@ static inline uint8_t serial_mouse_init(void) { | |||
28 | } | 27 | } |
29 | 28 | ||
30 | void serial_mouse_task(void); | 29 | void serial_mouse_task(void); |
31 | |||
32 | #endif | ||
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index 3a7c0bdba..4c6728ebb 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h | |||
@@ -40,8 +40,8 @@ | |||
40 | * | 40 | * |
41 | * Header file for Descriptors.c. | 41 | * Header file for Descriptors.c. |
42 | */ | 42 | */ |
43 | #ifndef _DESCRIPTORS_H_ | 43 | |
44 | #define _DESCRIPTORS_H_ | 44 | #pragma once |
45 | 45 | ||
46 | #include <LUFA/Drivers/USB/USB.h> | 46 | #include <LUFA/Drivers/USB/USB.h> |
47 | 47 | ||
@@ -286,4 +286,3 @@ enum usb_endpoints { | |||
286 | #define JOYSTICK_EPSIZE 8 | 286 | #define JOYSTICK_EPSIZE 8 |
287 | 287 | ||
288 | uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress); | 288 | uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress); |
289 | #endif | ||
diff --git a/tmk_core/protocol/xt.h b/tmk_core/protocol/xt.h index e7e1a13f4..6dc5f19d0 100644 --- a/tmk_core/protocol/xt.h +++ b/tmk_core/protocol/xt.h | |||
@@ -36,8 +36,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |||
36 | POSSIBILITY OF SUCH DAMAGE. | 36 | POSSIBILITY OF SUCH DAMAGE. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #ifndef XT_H | 39 | #pragma once |
40 | #define XT_H | ||
41 | 40 | ||
42 | #define XT_DATA_IN() \ | 41 | #define XT_DATA_IN() \ |
43 | do { \ | 42 | do { \ |
@@ -69,5 +68,3 @@ POSSIBILITY OF SUCH DAMAGE. | |||
69 | 68 | ||
70 | void xt_host_init(void); | 69 | void xt_host_init(void); |
71 | uint8_t xt_host_recv(void); | 70 | uint8_t xt_host_recv(void); |
72 | |||
73 | #endif | ||
diff --git a/tmk_core/ring_buffer.h b/tmk_core/ring_buffer.h index 25fab638e..8f887c8f7 100644 --- a/tmk_core/ring_buffer.h +++ b/tmk_core/ring_buffer.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef RING_BUFFER_H | 1 | #pragma once |
2 | #define RING_BUFFER_H | 2 | |
3 | /*-------------------------------------------------------------------- | 3 | /*-------------------------------------------------------------------- |
4 | * Ring buffer to store scan codes from keyboard | 4 | * Ring buffer to store scan codes from keyboard |
5 | *------------------------------------------------------------------*/ | 5 | *------------------------------------------------------------------*/ |
@@ -43,5 +43,3 @@ static inline bool rbuf_has_data(void) { | |||
43 | static inline void rbuf_clear(void) { | 43 | static inline void rbuf_clear(void) { |
44 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { rbuf_head = rbuf_tail = 0; } | 44 | ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { rbuf_head = rbuf_tail = 0; } |
45 | } | 45 | } |
46 | |||
47 | #endif /* RING_BUFFER_H */ | ||