diff --git a/cpu/arm7_common/include/VIC.h b/cpu/arm7_common/include/VIC.h index 6e8360ae5bb8..c98f4f0f112c 100644 --- a/cpu/arm7_common/include/VIC.h +++ b/cpu/arm7_common/include/VIC.h @@ -5,8 +5,7 @@ * */ -#ifndef VIC_H -#define VIC_H +#pragma once #include @@ -86,4 +85,3 @@ bool cpu_install_irq(int IntNumber, void *HandlerAddr, int Priority); #endif /** @} */ -#endif /* VIC_H */ diff --git a/cpu/arm7_common/include/architecture_arch.h b/cpu/arm7_common/include/architecture_arch.h index b2dc6230df83..ff7d27fdb660 100644 --- a/cpu/arm7_common/include/architecture_arch.h +++ b/cpu/arm7_common/include/architecture_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_arm7_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -34,4 +34,3 @@ extern "C" { #endif /** @} */ -#endif /* ARCHITECTURE_ARCH_H */ diff --git a/cpu/arm7_common/include/arm7_common.h b/cpu/arm7_common/include/arm7_common.h index fd91052c7d2e..32470aae4263 100644 --- a/cpu/arm7_common/include/arm7_common.h +++ b/cpu/arm7_common/include/arm7_common.h @@ -6,8 +6,7 @@ * more details. */ -#ifndef ARM7_COMMON_H -#define ARM7_COMMON_H +#pragma once /** * @defgroup cpu_arm7_common ARM7 CPU common @@ -101,4 +100,3 @@ extern "C" { #endif /** @} */ -#endif /* ARM7_COMMON_H */ diff --git a/cpu/arm7_common/include/arm_cpu.h b/cpu/arm7_common/include/arm_cpu.h index 0885a0a3d6cb..1e1005e33c55 100644 --- a/cpu/arm7_common/include/arm_cpu.h +++ b/cpu/arm7_common/include/arm_cpu.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef ARM_CPU_H -#define ARM_CPU_H +#pragma once #include #include "VIC.h" @@ -60,5 +59,3 @@ static inline uintptr_t cpu_get_caller_pc(void) #ifdef __cplusplus } #endif - -#endif /* ARM_CPU_H */ diff --git a/cpu/arm7_common/include/atomic_utils_arch.h b/cpu/arm7_common/include/atomic_utils_arch.h index 56264965e6ee..f29f19af8139 100644 --- a/cpu/arm7_common/include/atomic_utils_arch.h +++ b/cpu/arm7_common/include/atomic_utils_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_arm7_common * @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #ifndef DOXYGEN #include "periph_cpu.h" @@ -72,5 +72,4 @@ static inline void atomic_store_u32(volatile uint32_t *dest, uint32_t val) #endif #endif /* DOXYGEN */ -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/arm7_common/include/iap.h b/cpu/arm7_common/include/iap.h index 6bea0695dd7f..11f27cae2f4f 100644 --- a/cpu/arm7_common/include/iap.h +++ b/cpu/arm7_common/include/iap.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef IAP_H -#define IAP_H +#pragma once #include @@ -62,5 +61,3 @@ uint8_t iap_get_sector(uint32_t addr); #ifdef __cplusplus } #endif - -#endif /* IAP_H */ diff --git a/cpu/arm7_common/include/irq_arch.h b/cpu/arm7_common/include/irq_arch.h index 2b313f007042..83ae5920f86a 100644 --- a/cpu/arm7_common/include/irq_arch.h +++ b/cpu/arm7_common/include/irq_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_arm7_common * @{ @@ -16,8 +18,6 @@ * @author Heiko Will */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include "VIC.h" #include @@ -79,5 +79,4 @@ static inline __attribute__((always_inline)) bool irq_is_enabled(void) } #endif -#endif /* IRQ_ARCH_H */ /** @} */ diff --git a/cpu/arm7_common/include/thread_arch.h b/cpu/arm7_common/include/thread_arch.h index c96f4498dc74..676062fff38f 100644 --- a/cpu/arm7_common/include/thread_arch.h +++ b/cpu/arm7_common/include/thread_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_arm7_common * @{ @@ -17,8 +19,6 @@ * @author Kaspar Schleiser * @author Heiko Will */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #include "irq.h" @@ -46,5 +46,4 @@ static inline __attribute__((always_inline)) void thread_yield_higher(void) } #endif -#endif /* THREAD_ARCH_H */ /** @} */ diff --git a/cpu/arm7tdmi_gba/include/cpu.h b/cpu/arm7tdmi_gba/include/cpu.h index b57b95cdca29..7e344ec1a404 100644 --- a/cpu/arm7tdmi_gba/include/cpu.h +++ b/cpu/arm7tdmi_gba/include/cpu.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef CPU_H -#define CPU_H +#pragma once /** * @ingroup cpu_arm7tdmi_gba @@ -27,4 +26,3 @@ extern uintptr_t __stack_start; /**< end of user stack memory space */ #endif /** @} */ -#endif /* CPU_H */ diff --git a/cpu/arm7tdmi_gba/include/cpu_conf.h b/cpu/arm7tdmi_gba/include/cpu_conf.h index f52c1ddb16b1..2954aa686f1c 100644 --- a/cpu/arm7tdmi_gba/include/cpu_conf.h +++ b/cpu/arm7tdmi_gba/include/cpu_conf.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef CPU_CONF_H -#define CPU_CONF_H +#pragma once #ifdef __cplusplus extern "C" @@ -90,5 +89,3 @@ extern "C" #ifdef __cplusplus } #endif - -#endif /* CPU_CONF_H */ diff --git a/cpu/arm7tdmi_gba/include/periph_cpu.h b/cpu/arm7tdmi_gba/include/periph_cpu.h index 9e93b4049d60..57eb37bc1f7f 100644 --- a/cpu/arm7tdmi_gba/include/periph_cpu.h +++ b/cpu/arm7tdmi_gba/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_arm7tdmi_gba * @{ @@ -16,8 +18,6 @@ * @author */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include #ifdef __cplusplus @@ -34,5 +34,4 @@ extern "C" } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/arm7tdmi_gba/include/periph_gba.h b/cpu/arm7tdmi_gba/include/periph_gba.h index 429b7701b359..d512b830ba9c 100644 --- a/cpu/arm7tdmi_gba/include/periph_gba.h +++ b/cpu/arm7tdmi_gba/include/periph_gba.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_arm7tdmi_gba * @{ @@ -16,8 +18,6 @@ * @author Bennet Blischke */ -#ifndef PERIPH_GBA_H -#define PERIPH_GBA_H #include @@ -102,5 +102,4 @@ extern "C" } #endif -#endif /* PERIPH_GBA_H */ /** @} */ diff --git a/cpu/arm7tdmi_gba/stdio_fb/font_terminal.h b/cpu/arm7tdmi_gba/stdio_fb/font_terminal.h index 0ae779239af7..5fe808725fc7 100644 --- a/cpu/arm7tdmi_gba/stdio_fb/font_terminal.h +++ b/cpu/arm7tdmi_gba/stdio_fb/font_terminal.h @@ -1,5 +1,5 @@ -#ifndef FONT_TERMINAL_H -#define FONT_TERMINAL_H +#pragma once + #ifdef __cplusplus extern "C" @@ -282,5 +282,3 @@ extern "C" #ifdef __cplusplus } #endif - -#endif /* FONT_TERMINAL_H */ diff --git a/cpu/atmega1281/include/atmega_pcint.h b/cpu/atmega1281/include/atmega_pcint.h index c25d43c169ef..684363a689d0 100644 --- a/cpu/atmega1281/include/atmega_pcint.h +++ b/cpu/atmega1281/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -11,5 +11,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega1281/include/default_timer_config.h b/cpu/atmega1281/include/default_timer_config.h index 5cb1aaadf2e4..c38f674506c5 100644 --- a/cpu/atmega1281/include/default_timer_config.h +++ b/cpu/atmega1281/include/default_timer_config.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega1281 * @{ @@ -20,8 +22,6 @@ * @author Francisco Acosta */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -50,5 +50,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega1281/include/periph_cpu.h b/cpu/atmega1281/include/periph_cpu.h index eab61b47dde5..5345de0854df 100644 --- a/cpu/atmega1281/include/periph_cpu.h +++ b/cpu/atmega1281/include/periph_cpu.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega1281 * @{ @@ -20,8 +22,6 @@ * @author Francisco Acosta */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -110,5 +110,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega1284p/include/atmega_pcint.h b/cpu/atmega1284p/include/atmega_pcint.h index 36f30beb12c8..efba85468216 100644 --- a/cpu/atmega1284p/include/atmega_pcint.h +++ b/cpu/atmega1284p/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -13,5 +13,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega1284p/include/default_timer_config.h b/cpu/atmega1284p/include/default_timer_config.h index 62fbdb2afbe7..2d170201e22b 100644 --- a/cpu/atmega1284p/include/default_timer_config.h +++ b/cpu/atmega1284p/include/default_timer_config.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega1284p * @{ @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #include "periph_cpu_common.h" #include "periph_conf.h" /* <- Allow overwriting timer config from board */ @@ -47,5 +47,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega1284p/include/periph_cpu.h b/cpu/atmega1284p/include/periph_cpu.h index cf6f3a76d16d..19dd314d9c33 100644 --- a/cpu/atmega1284p/include/periph_cpu.h +++ b/cpu/atmega1284p/include/periph_cpu.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega1284p * @{ @@ -20,8 +22,6 @@ * @author Matthew Blue */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -113,5 +113,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega128rfa1/include/atmega_pcint.h b/cpu/atmega128rfa1/include/atmega_pcint.h index c25d43c169ef..684363a689d0 100644 --- a/cpu/atmega128rfa1/include/atmega_pcint.h +++ b/cpu/atmega128rfa1/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -11,5 +11,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega128rfa1/include/default_timer_config.h b/cpu/atmega128rfa1/include/default_timer_config.h index 3f193cee61a4..e38990648973 100644 --- a/cpu/atmega128rfa1/include/default_timer_config.h +++ b/cpu/atmega128rfa1/include/default_timer_config.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega128rfa1 * @{ @@ -17,8 +19,6 @@ * @author Steffen Robertz */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -54,5 +54,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega128rfa1/include/periph_cpu.h b/cpu/atmega128rfa1/include/periph_cpu.h index 4e3c4f709c3f..5e3d2f988e3c 100644 --- a/cpu/atmega128rfa1/include/periph_cpu.h +++ b/cpu/atmega128rfa1/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega128rfa1 * @{ @@ -17,8 +19,6 @@ * @author Steffen Robertz */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" #include "atmega_regs_common.h" @@ -107,5 +107,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega2560/include/atmega_pcint.h b/cpu/atmega2560/include/atmega_pcint.h index c0f6d6d28c84..c20cc7450e29 100644 --- a/cpu/atmega2560/include/atmega_pcint.h +++ b/cpu/atmega2560/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -12,5 +12,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega2560/include/default_timer_config.h b/cpu/atmega2560/include/default_timer_config.h index b3d850a259aa..e2ca8eb6cf60 100644 --- a/cpu/atmega2560/include/default_timer_config.h +++ b/cpu/atmega2560/include/default_timer_config.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega2560 * @{ @@ -20,8 +22,6 @@ * @author Francisco Acosta */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -50,5 +50,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega2560/include/periph_cpu.h b/cpu/atmega2560/include/periph_cpu.h index df606bfbd901..41e8862f3f22 100644 --- a/cpu/atmega2560/include/periph_cpu.h +++ b/cpu/atmega2560/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega2560 * @{ @@ -18,8 +20,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -112,5 +112,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega256rfr2/include/atmega_pcint.h b/cpu/atmega256rfr2/include/atmega_pcint.h index c25d43c169ef..684363a689d0 100644 --- a/cpu/atmega256rfr2/include/atmega_pcint.h +++ b/cpu/atmega256rfr2/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -11,5 +11,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega256rfr2/include/default_timer_config.h b/cpu/atmega256rfr2/include/default_timer_config.h index a96cdde2cbaa..bf7ba151303e 100644 --- a/cpu/atmega256rfr2/include/default_timer_config.h +++ b/cpu/atmega256rfr2/include/default_timer_config.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega256rfr2 * @{ @@ -17,8 +19,6 @@ * @author Steffen Robertz */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -54,5 +54,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega256rfr2/include/periph_cpu.h b/cpu/atmega256rfr2/include/periph_cpu.h index 6e42eba9206d..6d26eb802775 100644 --- a/cpu/atmega256rfr2/include/periph_cpu.h +++ b/cpu/atmega256rfr2/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega256rfr2 * @{ @@ -17,8 +19,6 @@ * @author Steffen Robertz */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" #include "atmega_regs_common.h" @@ -108,5 +108,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega328p/include/atmega_pcint.h b/cpu/atmega328p/include/atmega_pcint.h index 69b1d32ef889..772331f2258c 100644 --- a/cpu/atmega328p/include/atmega_pcint.h +++ b/cpu/atmega328p/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -12,5 +12,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega328p/include/default_timer_config.h b/cpu/atmega328p/include/default_timer_config.h index 08e3ffebebe5..6a569c313471 100644 --- a/cpu/atmega328p/include/default_timer_config.h +++ b/cpu/atmega328p/include/default_timer_config.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega328p * @{ @@ -18,8 +20,6 @@ * @author Hauke Petersen */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -40,5 +40,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega328p/include/periph_cpu.h b/cpu/atmega328p/include/periph_cpu.h index d53e5496a0f2..21b6ca7dc4bb 100644 --- a/cpu/atmega328p/include/periph_cpu.h +++ b/cpu/atmega328p/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega328p * @{ @@ -18,8 +20,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -103,5 +103,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega32u4/include/atmega_pcint.h b/cpu/atmega32u4/include/atmega_pcint.h index 0595cc4614f5..4e536b762a6e 100644 --- a/cpu/atmega32u4/include/atmega_pcint.h +++ b/cpu/atmega32u4/include/atmega_pcint.h @@ -1,5 +1,5 @@ -#ifndef ATMEGA_PCINT_H -#define ATMEGA_PCINT_H +#pragma once + #ifdef __cplusplus extern "C" { @@ -10,5 +10,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* ATMEGA_PCINT_H */ diff --git a/cpu/atmega32u4/include/default_timer_config.h b/cpu/atmega32u4/include/default_timer_config.h index fe454f843514..895eab72bf80 100644 --- a/cpu/atmega32u4/include/default_timer_config.h +++ b/cpu/atmega32u4/include/default_timer_config.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega32u4 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -47,5 +47,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega32u4/include/periph_cpu.h b/cpu/atmega32u4/include/periph_cpu.h index be2d71df4dcf..8bc52d940070 100644 --- a/cpu/atmega32u4/include/periph_cpu.h +++ b/cpu/atmega32u4/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega32u4 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -97,5 +97,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega8/include/cpu_conf.h b/cpu/atmega8/include/cpu_conf.h index b187ebf9af66..dcb08769b98d 100644 --- a/cpu/atmega8/include/cpu_conf.h +++ b/cpu/atmega8/include/cpu_conf.h @@ -9,6 +9,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @{ @@ -24,8 +26,6 @@ * @author Hugues Larrive */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "atmega_regs_common.h" @@ -89,5 +89,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/atmega8/include/default_timer_config.h b/cpu/atmega8/include/default_timer_config.h index 686c2bbde1a8..fb7a2725cd4d 100644 --- a/cpu/atmega8/include/default_timer_config.h +++ b/cpu/atmega8/include/default_timer_config.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega8 * @{ @@ -20,8 +22,6 @@ * @author Hugues Larrive */ -#ifndef DEFAULT_TIMER_CONFIG_H -#define DEFAULT_TIMER_CONFIG_H #ifdef __cplusplus extern "C" { @@ -42,5 +42,4 @@ extern "C" { } #endif -#endif /* DEFAULT_TIMER_CONFIG_H */ /** @} */ diff --git a/cpu/atmega8/include/periph_cpu.h b/cpu/atmega8/include/periph_cpu.h index 32b6c51ebf26..934129c8786e 100644 --- a/cpu/atmega8/include/periph_cpu.h +++ b/cpu/atmega8/include/periph_cpu.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega8 * @{ @@ -20,8 +22,6 @@ * @author Hugues Larrive */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -105,5 +105,4 @@ static inline bool atmega_has_pin_exti(uint8_t port_num, uint8_t pin_num) #include "periph_conf.h" #include "default_timer_config.h" -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/atmega_common/include/atmega_gpio.h b/cpu/atmega_common/include/atmega_gpio.h index c837a536b463..09e38b4f2116 100644 --- a/cpu/atmega_common/include/atmega_gpio.h +++ b/cpu/atmega_common/include/atmega_gpio.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @ingroup drivers_periph_gpio @@ -22,8 +24,6 @@ * @author Laurent Navet */ -#ifndef ATMEGA_GPIO_H -#define ATMEGA_GPIO_H #include #include @@ -83,5 +83,4 @@ static inline uint16_t atmega_port_addr(gpio_t pin) } #endif -#endif /* ATMEGA_GPIO_H */ /** @} */ diff --git a/cpu/atmega_common/include/atmega_regs_common.h b/cpu/atmega_common/include/atmega_regs_common.h index 4dc946fe2a55..f8f84c4fb403 100644 --- a/cpu/atmega_common/include/atmega_regs_common.h +++ b/cpu/atmega_common/include/atmega_regs_common.h @@ -9,6 +9,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @{ @@ -23,8 +25,6 @@ * */ -#ifndef ATMEGA_REGS_COMMON_H -#define ATMEGA_REGS_COMMON_H #include #include @@ -182,5 +182,4 @@ typedef struct { } #endif -#endif /* ATMEGA_REGS_COMMON_H */ /** @} */ diff --git a/cpu/atmega_common/include/cpu_clock.h b/cpu/atmega_common/include/cpu_clock.h index 09120281065e..73a20867bc75 100644 --- a/cpu/atmega_common/include/cpu_clock.h +++ b/cpu/atmega_common/include/cpu_clock.h @@ -9,6 +9,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @brief Common clock support for ATmega family based micro-controllers @@ -29,8 +31,6 @@ * */ -#ifndef CPU_CLOCK_H -#define CPU_CLOCK_H #include @@ -78,5 +78,4 @@ static inline void atmega_set_prescaler(uint8_t clk_scale) } #endif -#endif /* CPU_CLOCK_H */ /** @} */ diff --git a/cpu/atmega_common/include/cpu_conf.h b/cpu/atmega_common/include/cpu_conf.h index 13cea613fb12..e1eddc56ce4b 100644 --- a/cpu/atmega_common/include/cpu_conf.h +++ b/cpu/atmega_common/include/cpu_conf.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @{ @@ -22,8 +24,6 @@ * @author Matthew Blue */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "atmega_regs_common.h" @@ -87,5 +87,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/atmega_common/include/gpio_ll_arch.h b/cpu/atmega_common/include/gpio_ll_arch.h index 8f745b1fc88a..be590570aacc 100644 --- a/cpu/atmega_common/include/gpio_ll_arch.h +++ b/cpu/atmega_common/include/gpio_ll_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @ingroup drivers_periph_gpio_ll @@ -20,8 +22,6 @@ * @author Hauke Petersen */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include @@ -372,5 +372,4 @@ static inline bool is_gpio_port_num_valid(uint_fast8_t num) } #endif -#endif /* GPIO_LL_ARCH_H */ /** @} */ diff --git a/cpu/atmega_common/include/periph_cpu_common.h b/cpu/atmega_common/include/periph_cpu_common.h index 48e6c72f5d93..140b2d7041df 100644 --- a/cpu/atmega_common/include/periph_cpu_common.h +++ b/cpu/atmega_common/include/periph_cpu_common.h @@ -9,6 +9,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atmega_common * @{ @@ -22,8 +24,6 @@ * @author Hugues Larrive */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include "cpu.h" @@ -384,5 +384,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/atxmega/include/cpu_clock.h b/cpu/atxmega/include/cpu_clock.h index f65100c9cf8e..856a5cf0bc83 100644 --- a/cpu/atxmega/include/cpu_clock.h +++ b/cpu/atxmega/include/cpu_clock.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atxmega * @brief Common implementations and headers for ATxmega family based micro-controllers @@ -21,8 +23,6 @@ * */ -#ifndef CPU_CLOCK_H -#define CPU_CLOCK_H #include @@ -71,5 +71,4 @@ static inline void atxmega_set_prescaler(uint8_t clk_scale, uint8_t bus_scale) } #endif -#endif /* CPU_CLOCK_H */ /** @} */ diff --git a/cpu/atxmega/include/cpu_conf.h b/cpu/atxmega/include/cpu_conf.h index f0a590c34b3a..dcc2933c7227 100644 --- a/cpu/atxmega/include/cpu_conf.h +++ b/cpu/atxmega/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atxmega * @{ @@ -16,8 +18,6 @@ * @author Gerson Fernando Budke */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifdef __cplusplus extern "C" { @@ -72,5 +72,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/atxmega/include/cpu_ebi.h b/cpu/atxmega/include/cpu_ebi.h index b2b081fb8149..0d26fdc1fdd1 100644 --- a/cpu/atxmega/include/cpu_ebi.h +++ b/cpu/atxmega/include/cpu_ebi.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atxmega * @{ @@ -18,8 +20,6 @@ #include "periph_cpu.h" -#ifndef CPU_EBI_H -#define CPU_EBI_H #ifdef __cplusplus extern "C" { @@ -150,5 +150,4 @@ void hugemem_write_block(hugemem_ptr_t to, const void *from, size_t size); } #endif -#endif /* CPU_EBI_H */ /** @} */ diff --git a/cpu/atxmega/include/cpu_nvm.h b/cpu/atxmega/include/cpu_nvm.h index f3fb592ff44e..afaab2be3d5c 100644 --- a/cpu/atxmega/include/cpu_nvm.h +++ b/cpu/atxmega/include/cpu_nvm.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atxmega * @brief Non Volatile Memory (NVM) internal API @@ -15,8 +17,6 @@ * */ -#ifndef CPU_NVM_H -#define CPU_NVM_H #ifdef __cplusplus extern "C" { @@ -61,5 +61,4 @@ uint8_t nvm_read_production_signature_row(uint8_t address); } #endif -#endif /* CPU_NVM_H */ /** @} */ diff --git a/cpu/atxmega/include/cpu_pm.h b/cpu/atxmega/include/cpu_pm.h index f89cdd49eada..b2b7c5f36c7e 100644 --- a/cpu/atxmega/include/cpu_pm.h +++ b/cpu/atxmega/include/cpu_pm.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atxmega * @{ @@ -22,8 +24,6 @@ #include "periph_cpu.h" -#ifndef CPU_PM_H -#define CPU_PM_H #ifdef __cplusplus extern "C" { @@ -37,5 +37,4 @@ void pm_periph_power_off(void); } #endif -#endif /* CPU_PM_H */ /** @} */ diff --git a/cpu/atxmega/include/periph_cpu.h b/cpu/atxmega/include/periph_cpu.h index 72219bae38c5..fbb5e1d2ae08 100644 --- a/cpu/atxmega/include/periph_cpu.h +++ b/cpu/atxmega/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_atxmega * @{ @@ -16,8 +18,6 @@ * @author Gerson Fernando Budke */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include @@ -612,5 +612,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/avr8_common/avr_libc_extra/include/errno.h b/cpu/avr8_common/avr_libc_extra/include/errno.h index 231d1a3f44fa..fd2d4633e7f8 100644 --- a/cpu/avr8_common/avr_libc_extra/include/errno.h +++ b/cpu/avr8_common/avr_libc_extra/include/errno.h @@ -28,8 +28,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef ERRNO_H -#define ERRNO_H +#pragma once /** * @addtogroup cpu_atmega_common @@ -154,5 +153,3 @@ extern int errno; /** @} */ /** @} */ - -#endif /* ERRNO_H */ diff --git a/cpu/avr8_common/avr_libc_extra/include/inttypes.h b/cpu/avr8_common/avr_libc_extra/include/inttypes.h index b98eef4c8202..b7df8b97a469 100644 --- a/cpu/avr8_common/avr_libc_extra/include/inttypes.h +++ b/cpu/avr8_common/avr_libc_extra/include/inttypes.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_atmega_common * @{ @@ -15,8 +17,6 @@ * * @author Martine Lenders */ -#ifndef INTTYPES_H -#define INTTYPES_H #include_next @@ -33,5 +33,4 @@ extern "C" { } #endif -#endif /* INTTYPES_H */ /** @} */ diff --git a/cpu/avr8_common/avr_libc_extra/include/strings.h b/cpu/avr8_common/avr_libc_extra/include/strings.h index 2d67663a493d..731e2c9d1dce 100644 --- a/cpu/avr8_common/avr_libc_extra/include/strings.h +++ b/cpu/avr8_common/avr_libc_extra/include/strings.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @addtogroup cpu_atmega_common * @@ -22,8 +24,6 @@ #include -#ifndef STRINGS_H -#define STRINGS_H #ifdef __cplusplus extern "C" { @@ -78,5 +78,4 @@ static inline void bcopy(const void *src, void *dest, size_t n) } #endif -#endif /* STRINGS_H */ /** @} */ diff --git a/cpu/avr8_common/avr_libc_extra/include/sys/time.h b/cpu/avr8_common/avr_libc_extra/include/sys/time.h index 2dfa8b99bab2..2672010221a7 100644 --- a/cpu/avr8_common/avr_libc_extra/include/sys/time.h +++ b/cpu/avr8_common/avr_libc_extra/include/sys/time.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef SYS_TIME_H -#define SYS_TIME_H +#pragma once #include #include @@ -28,5 +27,3 @@ struct timeval { #ifdef __cplusplus } #endif - -#endif /* SYS_TIME_H */ diff --git a/cpu/avr8_common/avr_libc_extra/include/sys/types.h b/cpu/avr8_common/avr_libc_extra/include/sys/types.h index 81709d536a59..2817eab3a4e4 100644 --- a/cpu/avr8_common/avr_libc_extra/include/sys/types.h +++ b/cpu/avr8_common/avr_libc_extra/include/sys/types.h @@ -7,8 +7,7 @@ * directory for more details. */ -#ifndef SYS_TYPES_H -#define SYS_TYPES_H +#pragma once #include #include @@ -43,5 +42,3 @@ typedef uint32_t useconds_t; /**< Used for time in microseconds */ #ifdef __cplusplus } #endif - -#endif /* SYS_TYPES_H */ diff --git a/cpu/avr8_common/avr_libc_extra/include/unistd.h b/cpu/avr8_common/avr_libc_extra/include/unistd.h index dfe62e4ec07e..80514d4ca4d7 100644 --- a/cpu/avr8_common/avr_libc_extra/include/unistd.h +++ b/cpu/avr8_common/avr_libc_extra/include/unistd.h @@ -7,8 +7,7 @@ * directory for more details. */ -#ifndef UNISTD_H -#define UNISTD_H +#pragma once #include #include @@ -106,5 +105,3 @@ ssize_t write(int, const void *, size_t); #ifdef __cplusplus } #endif - -#endif /* UNISTD_H */ diff --git a/cpu/avr8_common/include/architecture_arch.h b/cpu/avr8_common/include/architecture_arch.h index 9cca5f336279..2ea2850b7477 100644 --- a/cpu/avr8_common/include/architecture_arch.h +++ b/cpu/avr8_common/include/architecture_arch.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @{ @@ -19,8 +21,6 @@ * */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -40,4 +40,3 @@ typedef uint32_t uinttxtptr_t; #endif /** @} */ -#endif /* ARCHITECTURE_ARCH_H */ diff --git a/cpu/avr8_common/include/atomic_utils_arch.h b/cpu/avr8_common/include/atomic_utils_arch.h index 3d3212801a63..9b8bf9219df3 100644 --- a/cpu/avr8_common/include/atomic_utils_arch.h +++ b/cpu/avr8_common/include/atomic_utils_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @@ -18,8 +20,6 @@ * @author Gerson Fernando Budke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #ifndef DOXYGEN #include "periph_cpu.h" @@ -50,5 +50,4 @@ static inline void atomic_store_u8(volatile uint8_t *dest, uint8_t val) #endif #endif /* DOXYGEN */ -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/avr8_common/include/cpu.h b/cpu/avr8_common/include/cpu.h index c9f5c63a3dc0..4172d2ce4bd2 100644 --- a/cpu/avr8_common/include/cpu.h +++ b/cpu/avr8_common/include/cpu.h @@ -9,6 +9,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @brief Common implementations and headers for AVR-8 family based micro-controllers @@ -29,8 +31,6 @@ * */ -#ifndef CPU_H -#define CPU_H #include #include @@ -181,5 +181,4 @@ void avr8_reset_cause(void); } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/avr8_common/include/flash_utils_arch.h b/cpu/avr8_common/include/flash_utils_arch.h index 43127e65e44a..40f0480bd121 100644 --- a/cpu/avr8_common/include/flash_utils_arch.h +++ b/cpu/avr8_common/include/flash_utils_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef FLASH_UTILS_ARCH_H -#define FLASH_UTILS_ARCH_H #include #include @@ -105,4 +105,3 @@ int flash_snprintf(char *buf, size_t buf_len, FLASH_ATTR const char *flash, ...) #endif /** @} */ -#endif /* FLASH_UTILS_ARCH_H */ diff --git a/cpu/avr8_common/include/irq_arch.h b/cpu/avr8_common/include/irq_arch.h index 5ec04ede5180..757aaf5e8ba6 100644 --- a/cpu/avr8_common/include/irq_arch.h +++ b/cpu/avr8_common/include/irq_arch.h @@ -9,6 +9,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @{ @@ -24,8 +26,6 @@ * */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include #include @@ -158,4 +158,3 @@ __attribute__((always_inline)) static inline bool irq_is_enabled(void) #endif /** @} */ -#endif /* IRQ_ARCH_H */ diff --git a/cpu/avr8_common/include/states_internal.h b/cpu/avr8_common/include/states_internal.h index 788c7c20993b..e84c152cf82b 100644 --- a/cpu/avr8_common/include/states_internal.h +++ b/cpu/avr8_common/include/states_internal.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef STATES_INTERNAL_H -#define STATES_INTERNAL_H #include @@ -109,5 +109,4 @@ extern uint8_t avr8_state_irq_count_sram; /**< IRQ state variable. } #endif -#endif /* STATES_INTERNAL_H */ /** @} */ diff --git a/cpu/avr8_common/include/stdio.h b/cpu/avr8_common/include/stdio.h index 28509e1609df..4ee1b4e1b100 100644 --- a/cpu/avr8_common/include/stdio.h +++ b/cpu/avr8_common/include/stdio.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @defgroup cpu_avr8_common_stdio_wrapper stdio wrapper for AVR8 * @ingroup cpu_avr8_common @@ -21,8 +23,6 @@ * @author Marian Buschsieweke */ -#ifndef STDIO_H -#define STDIO_H #include_next "stdio.h" /* C++ does not support __flash. Hence, only wrap printf() and friends for @@ -141,5 +141,4 @@ extern "C" { #endif -#endif /* STDIO_H */ /** @} */ diff --git a/cpu/avr8_common/include/thread_arch.h b/cpu/avr8_common/include/thread_arch.h index 3c4f8e1ac0f0..c0a59bed63d1 100644 --- a/cpu/avr8_common/include/thread_arch.h +++ b/cpu/avr8_common/include/thread_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_avr8_common * @{ @@ -17,8 +19,6 @@ * @author Koen Zandberg */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #ifdef __cplusplus extern "C" { @@ -28,5 +28,4 @@ extern "C" { } #endif -#endif /* THREAD_ARCH_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538.h b/cpu/cc2538/include/cc2538.h index 2d69cd16463e..6ba88d9325ff 100644 --- a/cpu/cc2538/include/cc2538.h +++ b/cpu/cc2538/include/cc2538.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc2538_regs * @{ @@ -16,8 +18,6 @@ * @author Ian Martin */ -#ifndef CC2538_H -#define CC2538_H #ifdef __cplusplus extern "C" { @@ -809,5 +809,4 @@ typedef volatile uint32_t cc2538_reg_t; /**< Least-significant 32 bits of the IE } #endif -#endif /* CC2538_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_eui_primary.h b/cpu/cc2538/include/cc2538_eui_primary.h index 14c0bd68b9c8..bfb2801c13f3 100644 --- a/cpu/cc2538/include/cc2538_eui_primary.h +++ b/cpu/cc2538/include/cc2538_eui_primary.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc2538 * @{ @@ -16,8 +18,6 @@ * @author Benjamin Valentin */ -#ifndef CC2538_EUI_PRIMARY_H -#define CC2538_EUI_PRIMARY_H #include "net/eui64.h" @@ -71,5 +71,4 @@ static inline int cc2538_get_eui64_primary(uint8_t index, eui64_t *addr) } /* end extern "C" */ #endif -#endif /* CC2538_EUI_PRIMARY_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_gpio.h b/cpu/cc2538/include/cc2538_gpio.h index c9cbfefaa666..539c9ccaec3b 100644 --- a/cpu/cc2538/include/cc2538_gpio.h +++ b/cpu/cc2538/include/cc2538_gpio.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cc2538_gpio CC2538 General-Purpose I/O * @ingroup cpu_cc2538_regs @@ -21,8 +23,6 @@ * @{ */ -#ifndef CC2538_GPIO_H -#define CC2538_GPIO_H #include @@ -344,7 +344,6 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC2538_GPIO_H */ /** @} */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_gptimer.h b/cpu/cc2538/include/cc2538_gptimer.h index 43e037370bfb..2018dc913e04 100644 --- a/cpu/cc2538/include/cc2538_gptimer.h +++ b/cpu/cc2538/include/cc2538_gptimer.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cc2538_gptimer CC2538 General Purpose Timer * @ingroup cpu_cc2538_regs @@ -19,8 +21,6 @@ * @author Sebastian Meiling */ -#ifndef CC2538_GPTIMER_H -#define CC2538_GPTIMER_H #include @@ -88,5 +88,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC2538_GPTIMER_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_rf.h b/cpu/cc2538/include/cc2538_rf.h index 4a24e438e752..6056a44aa900 100644 --- a/cpu/cc2538/include/cc2538_rf.h +++ b/cpu/cc2538/include/cc2538_rf.h @@ -8,6 +8,8 @@ * */ +#pragma once + /** * @ingroup cpu_cc2538 * @{ @@ -19,8 +21,6 @@ * @author Ian Martin */ -#ifndef CC2538_RF_H -#define CC2538_RF_H #include @@ -468,5 +468,4 @@ void cc2538_set_tx_power(int dBm); } #endif -#endif /* CC2538_RF_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_rf_internal.h b/cpu/cc2538/include/cc2538_rf_internal.h index 6f1430ed5a79..e4b2dbdd6a0c 100644 --- a/cpu/cc2538/include/cc2538_rf_internal.h +++ b/cpu/cc2538/include/cc2538_rf_internal.h @@ -7,6 +7,8 @@ * */ +#pragma once + /** * @ingroup cpu_cc2538 * @{ @@ -17,8 +19,6 @@ * @author Aaron Sowry */ -#ifndef CC2538_RF_INTERNAL_H -#define CC2538_RF_INTERNAL_H #ifdef __cplusplus extern "C" { @@ -100,5 +100,4 @@ bool RFCORE_ASSERT_failure(const char *expr, const char *func, int line); } #endif -#endif /* CC2538_RF_INTERNAL_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_rfcore.h b/cpu/cc2538/include/cc2538_rfcore.h index 2f549a404bc7..447d11ff8992 100644 --- a/cpu/cc2538/include/cc2538_rfcore.h +++ b/cpu/cc2538/include/cc2538_rfcore.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cc2538_rfcore CC2538 RF core interface * @ingroup cpu_cc2538_regs @@ -18,8 +20,6 @@ * */ -#ifndef CC2538_RFCORE_H -#define CC2538_RFCORE_H #include "cc2538.h" @@ -275,5 +275,4 @@ enum { } /* extern "C" */ #endif -#endif /* CC2538_RFCORE_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_soc_adc.h b/cpu/cc2538/include/cc2538_soc_adc.h index 6f2f835d82c3..259445814fd4 100644 --- a/cpu/cc2538/include/cc2538_soc_adc.h +++ b/cpu/cc2538/include/cc2538_soc_adc.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cc2538_adc CC2538 ADC * @ingroup cpu_cc2538_regs @@ -19,8 +21,6 @@ * @author Sebastian Meiling */ -#ifndef CC2538_SOC_ADC_H -#define CC2538_SOC_ADC_H #include "cc2538.h" @@ -47,6 +47,5 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC2538_SOC_ADC_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_ssi.h b/cpu/cc2538/include/cc2538_ssi.h index 8efd0f3ba68f..c3dbdacd8488 100644 --- a/cpu/cc2538/include/cc2538_ssi.h +++ b/cpu/cc2538/include/cc2538_ssi.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_cc2538 * @{ @@ -17,8 +19,6 @@ * @author Sebastian Meiling */ -#ifndef CC2538_SSI_H -#define CC2538_SSI_H #include "cc2538.h" @@ -61,5 +61,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC2538_SSI_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_sys_ctrl.h b/cpu/cc2538/include/cc2538_sys_ctrl.h index a7b16d97f602..a33f62967abf 100644 --- a/cpu/cc2538/include/cc2538_sys_ctrl.h +++ b/cpu/cc2538/include/cc2538_sys_ctrl.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cc2538_sysctrl CC2538 System Control * @ingroup cpu_cc2538_regs @@ -17,8 +19,6 @@ * @author Ian Martin */ -#ifndef CC2538_SYS_CTRL_H -#define CC2538_SYS_CTRL_H #include "cc2538.h" @@ -160,6 +160,5 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC2538_SYS_CTRL_H */ /** @} */ diff --git a/cpu/cc2538/include/cc2538_uart.h b/cpu/cc2538/include/cc2538_uart.h index 43fdb3beb9c3..e88737dd2a04 100644 --- a/cpu/cc2538/include/cc2538_uart.h +++ b/cpu/cc2538/include/cc2538_uart.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cc2538_uart CC2538 UART * @ingroup cpu_cc2538_regs @@ -17,8 +19,6 @@ * @author Ian Martin */ -#ifndef CC2538_UART_H -#define CC2538_UART_H #include "cc2538.h" @@ -187,5 +187,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC2538_UART_H */ /** @} */ diff --git a/cpu/cc2538/include/cpu_conf.h b/cpu/cc2538/include/cpu_conf.h index 5422bbd2ad1a..33e5429aa498 100644 --- a/cpu/cc2538/include/cpu_conf.h +++ b/cpu/cc2538/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc2538 * @{ @@ -16,8 +18,6 @@ * @author Ian Martin */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "kernel_defines.h" #include "cpu_conf_common.h" @@ -74,5 +74,4 @@ extern "C" { } /* end extern "C" */ #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/cc2538/include/openwsn_defs.h b/cpu/cc2538/include/openwsn_defs.h index 4004234d199a..1a1fef2b5e8e 100644 --- a/cpu/cc2538/include/openwsn_defs.h +++ b/cpu/cc2538/include/openwsn_defs.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu * @{ @@ -16,8 +18,6 @@ * @author Francisco Molina */ -#ifndef OPENWSN_DEFS_H -#define OPENWSN_DEFS_H #ifdef __cplusplus extern "C" { @@ -39,5 +39,4 @@ extern "C" { } #endif -#endif /* OPENWSN_DEFS_H */ /** @} */ diff --git a/cpu/cc2538/include/periph_cpu.h b/cpu/cc2538/include/periph_cpu.h index 4e29617b3607..303edc19136f 100644 --- a/cpu/cc2538/include/periph_cpu.h +++ b/cpu/cc2538/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc2538 * @{ @@ -18,8 +20,6 @@ * @author Sebastian Meiling */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include #include @@ -386,5 +386,4 @@ typedef gpio_t adc_conf_t; } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_aux.h b/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_aux.h index d6f4756cefe9..8a08fe783eb1 100644 --- a/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_aux.h +++ b/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_aux.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_cc26x0_cc13x0_definitions * @{ @@ -14,8 +16,6 @@ * @brief CC26x0/CC13x0 AUX register definitions */ -#ifndef CC26X0_CC13X0_AUX_H -#define CC26X0_CC13X0_AUX_H #include @@ -253,5 +253,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26X0_CC13X0_AUX_H */ /** @} */ diff --git a/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_fcfg.h b/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_fcfg.h index 7b83adcfc0a1..c66791c175fa 100644 --- a/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_fcfg.h +++ b/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_fcfg.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_cc26x0_cc13x0_definitions * @{ @@ -14,8 +16,6 @@ * @brief CC26x0/CC13x0 FCFG register definitions */ -#ifndef CC26X0_CC13X0_FCFG_H -#define CC26X0_CC13X0_FCFG_H #include @@ -142,5 +142,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26X0_CC13X0_FCFG_H */ /** @} */ diff --git a/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_prcm.h b/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_prcm.h index d99f5e165d5e..d94349a91a28 100644 --- a/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_prcm.h +++ b/cpu/cc26x0_cc13x0/include/cc26x0_cc13x0_prcm.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26x0_cc13x0_definitions * @{ @@ -14,8 +16,6 @@ * @brief CC26x0/CC13x0 PRCM register definitions */ -#ifndef CC26X0_CC13X0_PRCM_H -#define CC26X0_CC13X0_PRCM_H #include @@ -359,5 +359,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26X0_CC13X0_PRCM_H */ /** @} */ diff --git a/cpu/cc26x0_cc13x0/include/cpu_conf.h b/cpu/cc26x0_cc13x0/include/cpu_conf.h index 2e5a8506054f..f5ce022bdcc0 100644 --- a/cpu/cc26x0_cc13x0/include/cpu_conf.h +++ b/cpu/cc26x0_cc13x0/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_cc26x0_cc13x0 * @{ @@ -18,8 +20,6 @@ * */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifndef SET_MODE_CONF_1_ALT_DCDC_IPEAK #define SET_MODE_CONF_1_ALT_DCDC_IPEAK 0x2 /**< 32 mA */ @@ -50,5 +50,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/cc26x0_cc13x0/include/periph_cpu.h b/cpu/cc26x0_cc13x0/include/periph_cpu.h index d5836e45d30f..acb3002e2b51 100644 --- a/cpu/cc26x0_cc13x0/include/periph_cpu.h +++ b/cpu/cc26x0_cc13x0/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26x0_cc13x0 * @{ @@ -16,8 +18,6 @@ * @author Leon M. George */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -31,5 +31,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_aux.h b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_aux.h index 887e6fcdc674..b35d40d04b36 100644 --- a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_aux.h +++ b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_aux.h @@ -6,6 +6,9 @@ * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ + +#pragma once + /** * @ingroup cpu_cc26x2_cc13x2_definitions * @{ @@ -14,8 +17,6 @@ * @brief CC26x2, CC13x2 AUX register definitions */ -#ifndef CC26X2_CC13X2_AUX_H -#define CC26X2_CC13X2_AUX_H #include @@ -476,6 +477,5 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26X2_CC13X2_AUX_H */ /** @}*/ diff --git a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_fcfg.h b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_fcfg.h index e3052b7ec5be..bb2934460755 100644 --- a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_fcfg.h +++ b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_fcfg.h @@ -5,6 +5,9 @@ * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ + +#pragma once + /** * @ingroup cpu_cc26x2_cc13x2_definitions * @{ @@ -13,8 +16,6 @@ * @brief CC26x2, CC13x2 FCFG register definitions */ -#ifndef CC26X2_CC13X2_FCFG_H -#define CC26X2_CC13X2_FCFG_H #include @@ -156,6 +157,5 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26X2_CC13X2_FCFG_H */ /** @} */ diff --git a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_prcm.h b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_prcm.h index 77f0c5036c7d..83942595595a 100644 --- a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_prcm.h +++ b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_prcm.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26x2_cc13x2_definitions * @{ @@ -14,8 +16,6 @@ * @brief CC26x2, CC13x2 PRCM register definitions */ -#ifndef CC26X2_CC13X2_PRCM_H -#define CC26X2_CC13X2_PRCM_H #include @@ -385,5 +385,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26X2_CC13X2_PRCM_H */ /** @} */ diff --git a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_setup.h b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_setup.h index 2411f1a4d4ab..dce4b6f121b5 100644 --- a/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_setup.h +++ b/cpu/cc26x2_cc13x2/include/cc26x2_cc13x2_setup.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26x2_cc13x2 * @{ @@ -14,8 +16,6 @@ * @brief CC26x2/CC13x2 Device setup functions */ -#ifndef CC26X2_CC13X2_SETUP_H -#define CC26X2_CC13X2_SETUP_H #include @@ -117,5 +117,4 @@ void setup_trim_device(void); } /* end extern "C" */ #endif -#endif /* CC26X2_CC13X2_SETUP_H */ /** @} */ diff --git a/cpu/cc26x2_cc13x2/include/cpu_conf.h b/cpu/cc26x2_cc13x2/include/cpu_conf.h index 9e2a395755ce..4f1514e47008 100644 --- a/cpu/cc26x2_cc13x2/include/cpu_conf.h +++ b/cpu/cc26x2_cc13x2/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_cc26x2_cc13x2 * @{ @@ -18,8 +20,6 @@ * */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifndef SET_MODE_CONF_1_ALT_DCDC_IPEAK #define SET_MODE_CONF_1_ALT_DCDC_IPEAK 0x2 /**< 12 mA */ @@ -50,5 +50,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/cc26x2_cc13x2/include/periph_cpu.h b/cpu/cc26x2_cc13x2/include/periph_cpu.h index ab750f876538..69ab6ced64d8 100644 --- a/cpu/cc26x2_cc13x2/include/periph_cpu.h +++ b/cpu/cc26x2_cc13x2/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26x2_cc13x2 * @{ @@ -16,8 +18,6 @@ * @author Leon M. George */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -31,5 +31,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx.h index 7f3d1befa2e2..a03ad5f54f8b 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -17,8 +19,6 @@ * @author Anton Gerasimov */ -#ifndef CC26XX_CC13XX_H -#define CC26XX_CC13XX_H #include @@ -177,5 +177,4 @@ typedef enum IRQn { } #endif -#endif /* CC26XX_CC13XX_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_adi.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_adi.h index 7d3e0e757f14..1ef5a969f65e 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_adi.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_adi.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +18,6 @@ * @author Jean Pierre Dudey */ -#ifndef CC26XX_CC13XX_ADI_H -#define CC26XX_CC13XX_ADI_H #include "cc26xx_cc13xx.h" @@ -122,5 +122,4 @@ typedef struct { } #endif -#endif /* CC26XX_CC13XX_ADI_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ccfg.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ccfg.h index 7939b587dd71..983a6b44cd20 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ccfg.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ccfg.h @@ -5,6 +5,9 @@ * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ + +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -13,8 +16,6 @@ * @brief CC26xx/CC13xx CCFG register definitions */ -#ifndef CC26XX_CC13XX_CCFG_H -#define CC26XX_CC13XX_CCFG_H #include @@ -163,6 +164,5 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26XX_CC13XX_CCFG_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpio.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpio.h index 28acd5bde031..21ec94c4f9e7 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpio.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpio.h @@ -5,6 +5,9 @@ * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ + +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +19,6 @@ * */ -#ifndef CC26XX_CC13XX_GPIO_H -#define CC26XX_CC13XX_GPIO_H #include "cc26xx_cc13xx.h" @@ -58,6 +59,5 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26XX_CC13XX_GPIO_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpt.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpt.h index ebd47fe940ed..347b6d954f25 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpt.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_gpt.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +18,6 @@ * @author Leon George */ -#ifndef CC26XX_CC13XX_GPT_H -#define CC26XX_CC13XX_GPT_H #include "cc26xx_cc13xx.h" @@ -207,5 +207,4 @@ typedef struct { } #endif -#endif /* CC26XX_CC13XX_GPT_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_hard_api.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_hard_api.h index b27868781f12..6d27ae0764a4 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_hard_api.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_hard_api.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +18,6 @@ * @author Jean Pierre Dudey */ -#ifndef CC26XX_CC13XX_HARD_API_H -#define CC26XX_CC13XX_HARD_API_H #include "cc26xx_cc13xx.h" @@ -93,5 +93,4 @@ typedef struct { } #endif -#endif /* CC26XX_CC13XX_HARD_API_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_i2c.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_i2c.h index 07f40c1197f9..7fef616cd83b 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_i2c.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_i2c.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +18,6 @@ * @author Leon George */ -#ifndef CC26XX_CC13XX_I2C_H -#define CC26XX_CC13XX_I2C_H #include "cc26xx_cc13xx.h" @@ -198,5 +198,4 @@ cycle or continues on to a repeated START condition } #endif -#endif /* CC26XX_CC13XX_I2C_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ioc.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ioc.h index 6f121cc4c8af..747550ec2776 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ioc.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_ioc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +18,6 @@ * @author Leon George */ -#ifndef CC26XX_CC13XX_IOC_H -#define CC26XX_CC13XX_IOC_H #include "cc26xx_cc13xx.h" @@ -182,5 +182,4 @@ typedef struct { } #endif -#endif /* CC26XX_CC13XX_IOC_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_power.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_power.h index 05c7ffe8bbe6..d7d1fd15783a 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_power.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_power.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx * @{ @@ -16,8 +18,6 @@ * @author Jean Pierre Dudey */ -#ifndef CC26XX_CC13XX_POWER_H -#define CC26XX_CC13XX_POWER_H #include #include @@ -91,5 +91,4 @@ void power_clock_disable_uart(uart_t uart); } /* end extern "C" */ #endif -#endif /* CC26XX_CC13XX_POWER_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_rfc.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_rfc.h index 916a10dac188..e48886d774a4 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_rfc.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_rfc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -16,8 +18,6 @@ * @author Jean Pierre Dudey */ -#ifndef CC26XX_CC13XX_RFC_H -#define CC26XX_CC13XX_RFC_H #include "cc26xx_cc13xx.h" @@ -167,5 +167,4 @@ typedef struct { } #endif -#endif /* CC26XX_CC13XX_RFC_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_uart.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_uart.h index c62ec153420d..28b44aa379ef 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_uart.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_uart.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_cc26xx_cc13xx_definitions * @{ @@ -15,8 +17,6 @@ * */ -#ifndef CC26XX_CC13XX_UART_H -#define CC26XX_CC13XX_UART_H #include "cc26xx_cc13xx.h" @@ -141,5 +141,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26XX_CC13XX_UART_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_vims.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_vims.h index 4c432d748c2c..fdd1c577384c 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_vims.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_vims.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -14,8 +16,6 @@ * @brief CC26xx/CC13xx VIMS register definitions */ -#ifndef CC26XX_CC13XX_VIMS_H -#define CC26XX_CC13XX_VIMS_H #ifdef __cplusplus extern "C" { @@ -258,5 +258,4 @@ typedef struct { } #endif -#endif /* CC26XX_CC13XX_VIMS_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_wdt.h b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_wdt.h index 83f4d98c6e40..676107a8294c 100644 --- a/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_wdt.h +++ b/cpu/cc26xx_cc13xx/include/cc26xx_cc13xx_wdt.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx_definitions * @{ @@ -14,8 +16,6 @@ * @brief CC26xx/CC13xx WDT register definitions */ -#ifndef CC26XX_CC13XX_WDT_H -#define CC26XX_CC13XX_WDT_H #include @@ -53,5 +53,4 @@ typedef struct { } /* end extern "C" */ #endif -#endif /* CC26XX_CC13XX_WDT_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/cpu_conf_cc26xx_cc13xx.h b/cpu/cc26xx_cc13xx/include/cpu_conf_cc26xx_cc13xx.h index 8f899cbb56dd..610f4dcb199e 100644 --- a/cpu/cc26xx_cc13xx/include/cpu_conf_cc26xx_cc13xx.h +++ b/cpu/cc26xx_cc13xx/include/cpu_conf_cc26xx_cc13xx.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_cc26xx_cc13xx * @{ @@ -18,8 +20,6 @@ * @author Jean Pierre Dudey */ -#ifndef CPU_CONF_CC26XX_CC13XX_H -#define CPU_CONF_CC26XX_CC13XX_H #include "kernel_defines.h" @@ -534,5 +534,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_CC26XX_CC13XX_H */ /** @} */ diff --git a/cpu/cc26xx_cc13xx/include/periph_cpu_common.h b/cpu/cc26xx_cc13xx/include/periph_cpu_common.h index 2951108f7fd8..63b6cf49de86 100644 --- a/cpu/cc26xx_cc13xx/include/periph_cpu_common.h +++ b/cpu/cc26xx_cc13xx/include/periph_cpu_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cc26xx_cc13xx * @{ @@ -16,8 +18,6 @@ * @author Leon M. George */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include "cpu.h" @@ -166,5 +166,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/cortexm_common/include/architecture_arch.h b/cpu/cortexm_common/include/architecture_arch.h index 8bb889769173..a4ffaf9a0e49 100644 --- a/cpu/cortexm_common/include/architecture_arch.h +++ b/cpu/cortexm_common/include/architecture_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -35,4 +35,3 @@ extern "C" { #endif /** @} */ -#endif /* ARCHITECTURE_ARCH_H */ diff --git a/cpu/cortexm_common/include/atomic_utils_arch.h b/cpu/cortexm_common/include/atomic_utils_arch.h index 9f9f4eedbe10..4609bc9f73db 100644 --- a/cpu/cortexm_common/include/atomic_utils_arch.h +++ b/cpu/cortexm_common/include/atomic_utils_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #ifndef DOXYGEN #include "bit.h" @@ -188,5 +188,4 @@ static inline void atomic_clear_bit_u64(atomic_bit_u64_t bit) #endif #endif /* DOXYGEN */ -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/cortexm_common/include/cpu.h b/cpu/cortexm_common/include/cpu.h index e7abdc67f668..6266f3fc6666 100644 --- a/cpu/cortexm_common/include/cpu.h +++ b/cpu/cortexm_common/include/cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_cortexm_common ARM Cortex-M common * @ingroup cpu @@ -27,8 +29,6 @@ * @todo remove include irq.h once core was adjusted */ -#ifndef CPU_H -#define CPU_H #include "irq.h" #include "sched.h" @@ -250,5 +250,4 @@ bool cpu_check_address(volatile const char *address); } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/cortexm_common/include/cpu_conf_common.h b/cpu/cortexm_common/include/cpu_conf_common.h index d8ba582fb7e8..8a0a91ece91e 100644 --- a/cpu/cortexm_common/include/cpu_conf_common.h +++ b/cpu/cortexm_common/include/cpu_conf_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @{ @@ -16,8 +18,6 @@ * @author Kaspar Schleiser */ -#ifndef CPU_CONF_COMMON_H -#define CPU_CONF_COMMON_H #ifdef __cplusplus extern "C" { @@ -182,5 +182,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_COMMON_H */ /** @} */ diff --git a/cpu/cortexm_common/include/irq_arch.h b/cpu/cortexm_common/include/irq_arch.h index 8c5cc5efaa48..f47ddec8025f 100644 --- a/cpu/cortexm_common/include/irq_arch.h +++ b/cpu/cortexm_common/include/irq_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include #include @@ -129,5 +129,4 @@ bool irq_is_in(void) } #endif -#endif /* IRQ_ARCH_H */ /** @} */ diff --git a/cpu/cortexm_common/include/mpu.h b/cpu/cortexm_common/include/mpu.h index b93f22d49bd0..545b1df35980 100644 --- a/cpu/cortexm_common/include/mpu.h +++ b/cpu/cortexm_common/include/mpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef MPU_H -#define MPU_H #include #include @@ -159,5 +159,3 @@ int mpu_configure(uint_fast8_t region, uintptr_t base, uint_fast32_t attr); #ifdef __cplusplus } #endif - -#endif /* MPU_H */ diff --git a/cpu/cortexm_common/include/thread_arch.h b/cpu/cortexm_common/include/thread_arch.h index 84d67da0c4a6..9ea625440538 100644 --- a/cpu/cortexm_common/include/thread_arch.h +++ b/cpu/cortexm_common/include/thread_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @{ @@ -17,8 +19,6 @@ * @author Koen Zandberg */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #include "cpu_conf.h" @@ -46,5 +46,4 @@ static inline __attribute__((always_inline)) void thread_yield_higher(void) } #endif -#endif /* THREAD_ARCH_H */ /** @} */ diff --git a/cpu/cortexm_common/include/vectors_cortexm.h b/cpu/cortexm_common/include/vectors_cortexm.h index 398decb7b7ea..12be6cf0a07b 100644 --- a/cpu/cortexm_common/include/vectors_cortexm.h +++ b/cpu/cortexm_common/include/vectors_cortexm.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_cortexm_common * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef VECTORS_CORTEXM_H -#define VECTORS_CORTEXM_H #ifdef __cplusplus extern "C" { @@ -141,5 +141,4 @@ void dummy_handler_default(void); } #endif -#endif /* VECTORS_CORTEXM_H */ /** @} */ diff --git a/cpu/efm32/include/cpu_conf.h b/cpu/efm32/include/cpu_conf.h index 7a0ece3651b5..198640a21b31 100644 --- a/cpu/efm32/include/cpu_conf.h +++ b/cpu/efm32/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_efm32 * @{ @@ -17,8 +19,6 @@ * @author Bas Stottelaar */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" @@ -64,5 +64,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/efm32/include/drivers/coretemp.h b/cpu/efm32/include/drivers/coretemp.h index 3b28461ea904..923547f71305 100644 --- a/cpu/efm32/include/drivers/coretemp.h +++ b/cpu/efm32/include/drivers/coretemp.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_efm32_drivers_coretemp EFM32 internal temperature sensor * @ingroup cpu_efm32_drivers @@ -30,8 +32,6 @@ * @author Bas Stottelaar */ -#ifndef DRIVERS_CORETEMP_H -#define DRIVERS_CORETEMP_H #include @@ -64,5 +64,4 @@ int16_t coretemp_read(void); } #endif -#endif /* DRIVERS_CORETEMP_H */ /** @} */ diff --git a/cpu/efm32/include/gpio_ll_arch.h b/cpu/efm32/include/gpio_ll_arch.h index 731ac26d1505..1217f3ff1b7d 100644 --- a/cpu/efm32/include/gpio_ll_arch.h +++ b/cpu/efm32/include/gpio_ll_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_efm32 * @ingroup drivers_periph_gpio_ll @@ -34,8 +36,6 @@ * @author Christian Amsüss */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include "cpu.h" #include "periph_cpu.h" @@ -203,5 +203,4 @@ static inline void * gpio_port_unpack_addr(gpio_port_t port) } #endif -#endif /* GPIO_LL_ARCH_H */ /** @} */ diff --git a/cpu/efm32/include/periph_cpu.h b/cpu/efm32/include/periph_cpu.h index 48b209a330e2..e6830ef627b8 100644 --- a/cpu/efm32/include/periph_cpu.h +++ b/cpu/efm32/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_efm32 * @{ @@ -17,8 +19,6 @@ * @author Bas Stottelaar */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "kernel_defines.h" #include "mutex.h" @@ -745,5 +745,4 @@ typedef enum { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/esp32/bootloader/sdkconfig.h b/cpu/esp32/bootloader/sdkconfig.h index 1e9206b638af..9ee739b8328f 100644 --- a/cpu/esp32/bootloader/sdkconfig.h +++ b/cpu/esp32/bootloader/sdkconfig.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup pkg_esp32_sdk * @{ @@ -24,8 +26,6 @@ * @author iosabi */ -#ifndef SDKCONFIG_H -#define SDKCONFIG_H #ifndef DOXYGEN @@ -111,5 +111,3 @@ extern "C" { #endif /* DOXYGEN */ /** @} */ - -#endif /* SDKCONFIG_H */ diff --git a/cpu/esp32/bootloader/sdkconfig_default_common.h b/cpu/esp32/bootloader/sdkconfig_default_common.h index 9dcdd78d9328..c122fee08624 100644 --- a/cpu/esp32/bootloader/sdkconfig_default_common.h +++ b/cpu/esp32/bootloader/sdkconfig_default_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_DEFAULT_COMMON_H -#define SDKCONFIG_DEFAULT_COMMON_H #ifndef DOXYGEN @@ -47,5 +47,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_DEFAULT_COMMON_H */ /** @} */ diff --git a/cpu/esp32/bootloader/sdkconfig_default_esp32.h b/cpu/esp32/bootloader/sdkconfig_default_esp32.h index 059685c064bf..cdfd2fce56cb 100644 --- a/cpu/esp32/bootloader/sdkconfig_default_esp32.h +++ b/cpu/esp32/bootloader/sdkconfig_default_esp32.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_DEFAULT_ESP32_H -#define SDKCONFIG_DEFAULT_ESP32_H #ifndef DOXYGEN @@ -42,5 +42,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_DEFAULT_ESP32_H */ /** @} */ diff --git a/cpu/esp32/bootloader/sdkconfig_default_esp32c3.h b/cpu/esp32/bootloader/sdkconfig_default_esp32c3.h index 9af2f293ca75..e828f514e0d5 100644 --- a/cpu/esp32/bootloader/sdkconfig_default_esp32c3.h +++ b/cpu/esp32/bootloader/sdkconfig_default_esp32c3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_DEFAULT_ESP32C3_H -#define SDKCONFIG_DEFAULT_ESP32C3_H #ifndef DOXYGEN @@ -43,5 +43,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_DEFAULT_ESP32C3_H */ /** @} */ diff --git a/cpu/esp32/bootloader/sdkconfig_default_esp32s2.h b/cpu/esp32/bootloader/sdkconfig_default_esp32s2.h index 982e12ea4e07..b7c79c7ee101 100644 --- a/cpu/esp32/bootloader/sdkconfig_default_esp32s2.h +++ b/cpu/esp32/bootloader/sdkconfig_default_esp32s2.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_DEFAULT_ESP32S2_H -#define SDKCONFIG_DEFAULT_ESP32S2_H #ifndef DOXYGEN @@ -40,5 +40,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_DEFAULT_ESP32S2_H */ /** @} */ diff --git a/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h b/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h index 0d28f026514d..62f70d0f73c6 100644 --- a/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h +++ b/cpu/esp32/bootloader/sdkconfig_default_esp32s3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_DEFAULT_ESP32S3_H -#define SDKCONFIG_DEFAULT_ESP32S3_H #ifndef DOXYGEN @@ -42,5 +42,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_DEFAULT_ESP32S3_H */ /** @} */ diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.h b/cpu/esp32/esp-eth/esp_eth_netdev.h index 4e12de44c1fb..bbcb3aa2f067 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.h +++ b/cpu/esp32/esp-eth/esp_eth_netdev.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32_esp_eth * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef ESP_ETH_NETDEV_H -#define ESP_ETH_NETDEV_H #include @@ -59,5 +59,4 @@ typedef struct { } #endif -#endif /* ESP_ETH_NETDEV_H */ /** @} */ diff --git a/cpu/esp32/esp-eth/esp_eth_params.h b/cpu/esp32/esp-eth/esp_eth_params.h index b31b60c37c0d..d17ccefd52c7 100644 --- a/cpu/esp32/esp-eth/esp_eth_params.h +++ b/cpu/esp32/esp-eth/esp_eth_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32_esp_eth * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef ESP_ETH_PARAMS_H -#define ESP_ETH_PARAMS_H #if defined(MODULE_ESP_ETH) || defined(DOXYGEN) @@ -46,5 +46,4 @@ extern "C" { #endif /* MODULE_ESP_ETH || DOXYGEN */ -#endif /* ESP_ETH_PARAMS_H */ /** @} */ diff --git a/cpu/esp32/esp-idf/include/driver/gpio.h b/cpu/esp32/esp-idf/include/driver/gpio.h index 154519993c44..bd31b60acc29 100644 --- a/cpu/esp32/esp-idf/include/driver/gpio.h +++ b/cpu/esp32/esp-idf/include/driver/gpio.h @@ -1,5 +1,5 @@ -#ifndef DRIVER_GPIO_H -#define DRIVER_GPIO_H +#pragma once + #ifdef ESP_IDF_CODE @@ -20,5 +20,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* DRIVER_GPIO_H */ diff --git a/cpu/esp32/esp-idf/include/log/esp_log.h b/cpu/esp32/esp-idf/include/log/esp_log.h index f261c9a1dc26..39336f607054 100644 --- a/cpu/esp32/esp-idf/include/log/esp_log.h +++ b/cpu/esp32/esp-idf/include/log/esp_log.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef LOG_ESP_LOG_H -#define LOG_ESP_LOG_H #ifndef DOXYGEN /* Hide implementation details from doxygen */ @@ -98,4 +98,3 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* LOG_ESP_LOG_H */ diff --git a/cpu/esp32/include/adc_arch.h b/cpu/esp32/include/adc_arch.h index 783885685b0d..3815d16e5047 100644 --- a/cpu/esp32/include/adc_arch.h +++ b/cpu/esp32/include/adc_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -24,8 +26,6 @@ * @} */ -#ifndef ADC_ARCH_H -#define ADC_ARCH_H #ifdef __cplusplus extern "C" { @@ -120,5 +120,3 @@ static inline int adc_vref_to_gpio25(void) #ifdef __cplusplus } #endif - -#endif /* ADC_ARCH_H */ diff --git a/cpu/esp32/include/adc_arch_private.h b/cpu/esp32/include/adc_arch_private.h index f0b36854eefd..559e5d17456b 100644 --- a/cpu/esp32/include/adc_arch_private.h +++ b/cpu/esp32/include/adc_arch_private.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef ADC_ARCH_PRIVATE_H -#define ADC_ARCH_PRIVATE_H #ifdef __cplusplus extern "C" { @@ -61,5 +61,3 @@ extern const gpio_t _gpio_rtcio_map[]; #ifdef __cplusplus } #endif - -#endif /* ADC_ARCH_PRIVATE_H */ diff --git a/cpu/esp32/include/can_esp.h b/cpu/esp32/include/can_esp.h index 565d9788f5e1..3281d750289a 100644 --- a/cpu/esp32/include/can_esp.h +++ b/cpu/esp32/include/can_esp.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_esp32_esp_can ESP32 CAN controller * @ingroup cpu_esp32 @@ -42,8 +44,6 @@ * @file */ -#ifndef CAN_ESP_H -#define CAN_ESP_H #ifdef __cplusplus extern "C" { @@ -104,5 +104,4 @@ typedef struct { } #endif -#endif /* CAN_ESP_H */ /** @} */ diff --git a/cpu/esp32/include/can_params.h b/cpu/esp32/include/can_params.h index 0bdf8eefe06c..6d568eb1bf9f 100644 --- a/cpu/esp32/include/can_params.h +++ b/cpu/esp32/include/can_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32_esp_can * @{ @@ -17,8 +19,6 @@ * */ -#ifndef CAN_PARAMS_H -#define CAN_PARAMS_H #ifdef __cplusplus extern "C" { @@ -69,5 +69,4 @@ static const can_conf_t candev_conf[] = { } #endif -#endif /* CAN_PARAMS_H */ /** @} */ diff --git a/cpu/esp32/include/cpu_conf.h b/cpu/esp32/include/cpu_conf.h index 54eda06c519e..bf25701c5e5a 100644 --- a/cpu/esp32/include/cpu_conf.h +++ b/cpu/esp32/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_esp32_conf ESP32 compile configurations * @ingroup cpu_esp32 @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #if !defined(__ASSEMBLER__) #include @@ -120,5 +120,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/esp32/include/cpu_conf_esp32.h b/cpu/esp32/include/cpu_conf_esp32.h index c051c90903ca..43375743f232 100644 --- a/cpu/esp32/include/cpu_conf_esp32.h +++ b/cpu/esp32/include/cpu_conf_esp32.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @ingroup config @@ -18,8 +20,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_ESP32_H -#define CPU_CONF_ESP32_H /** Number of DRAM sections that can be used as heap. */ #define NUM_HEAPS (4) @@ -32,5 +32,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_ESP32_H */ /** @} */ diff --git a/cpu/esp32/include/cpu_conf_esp32c3.h b/cpu/esp32/include/cpu_conf_esp32c3.h index d28307c11b32..6ace2ebb5917 100644 --- a/cpu/esp32/include/cpu_conf_esp32c3.h +++ b/cpu/esp32/include/cpu_conf_esp32c3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @ingroup config @@ -18,8 +20,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_ESP32C3_H -#define CPU_CONF_ESP32C3_H #ifndef ESP_ISR_STACKSIZE /** Stack size used in interrupt context */ @@ -37,5 +37,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_ESP32C3_H */ /** @} */ diff --git a/cpu/esp32/include/cpu_conf_esp32s2.h b/cpu/esp32/include/cpu_conf_esp32s2.h index 57e8614ad809..93aa8c18162d 100644 --- a/cpu/esp32/include/cpu_conf_esp32s2.h +++ b/cpu/esp32/include/cpu_conf_esp32s2.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @ingroup config @@ -18,8 +20,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_ESP32S2_H -#define CPU_CONF_ESP32S2_H #ifndef ESP_ISR_STACKSIZE /** Stack size used in interrupt context */ @@ -37,5 +37,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_ESP32S2_H */ /** @} */ diff --git a/cpu/esp32/include/cpu_conf_esp32s3.h b/cpu/esp32/include/cpu_conf_esp32s3.h index d555289f93f6..e79837975ad8 100644 --- a/cpu/esp32/include/cpu_conf_esp32s3.h +++ b/cpu/esp32/include/cpu_conf_esp32s3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @ingroup config @@ -18,8 +20,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_ESP32S3_H -#define CPU_CONF_ESP32S3_H #ifndef ESP_ISR_STACKSIZE /** Stack size used in interrupt context */ @@ -37,5 +37,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_ESP32S3_H */ /** @} */ diff --git a/cpu/esp32/include/esp_ble_nimble/syscfg/syscfg.h b/cpu/esp32/include/esp_ble_nimble/syscfg/syscfg.h index d6950fab93d9..0fd29a6a34bf 100644 --- a/cpu/esp32/include/esp_ble_nimble/syscfg/syscfg.h +++ b/cpu/esp32/include/esp_ble_nimble/syscfg/syscfg.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32_esp_ble_nimble * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef ESP_BLE_NIMBLE_SYSCFG_SYSCFG_H -#define ESP_BLE_NIMBLE_SYSCFG_SYSCFG_H #if !DOXYGEN @@ -36,5 +36,4 @@ extern "C" { #endif #endif /* !DOXYGEN */ -#endif /* ESP_BLE_NIMBLE_SYSCFG_SYSCFG_H */ /** @} */ diff --git a/cpu/esp32/include/esp_idf_api/gpio.h b/cpu/esp32/include/esp_idf_api/gpio.h index e574002af079..fb44571f8480 100644 --- a/cpu/esp32/include/esp_idf_api/gpio.h +++ b/cpu/esp32/include/esp_idf_api/gpio.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32_esp_idf_api * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef ESP_IDF_API_GPIO_H -#define ESP_IDF_API_GPIO_H #include "esp_err.h" #include "hal/gpio_types.h" @@ -63,4 +63,3 @@ esp_err_t esp_idf_rtc_gpio_pulldown_dis(gpio_num_t gpio_num); #endif #endif /* DOXYGEN */ -#endif /* ESP_IDF_API_GPIO_H */ diff --git a/cpu/esp32/include/esp_idf_api/uart.h b/cpu/esp32/include/esp_idf_api/uart.h index 22b370cef721..2fa5c39b9e73 100644 --- a/cpu/esp32/include/esp_idf_api/uart.h +++ b/cpu/esp32/include/esp_idf_api/uart.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32_esp_idf_api * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef ESP_IDF_API_UART_H -#define ESP_IDF_API_UART_H #ifndef DOXYGEN /* Hide implementation details from doxygen */ @@ -33,4 +33,3 @@ void esp_idf_uart_set_wakeup_threshold(unsigned uart_num, uint32_t threshold); #endif #endif /* DOXYGEN */ -#endif /* ESP_IDF_API_UART_H */ diff --git a/cpu/esp32/include/freertos/FreeRTOSConfig.h b/cpu/esp32/include/freertos/FreeRTOSConfig.h index 184b0637743a..cdcf86bc4af3 100644 --- a/cpu/esp32/include/freertos/FreeRTOSConfig.h +++ b/cpu/esp32/include/freertos/FreeRTOSConfig.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ #include "sdkconfig.h" -#ifndef FREERTOS_FREERTOSCONFIG_H -#define FREERTOS_FREERTOSCONFIG_H #ifndef DOXYGEN @@ -33,4 +33,3 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_FREERTOSCONFIG_H */ diff --git a/cpu/esp32/include/gpio_arch.h b/cpu/esp32/include/gpio_arch.h index 9db8c87fac4a..ec5e631c14e1 100644 --- a/cpu/esp32/include/gpio_arch.h +++ b/cpu/esp32/include/gpio_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef GPIO_ARCH_H -#define GPIO_ARCH_H #include @@ -44,5 +44,3 @@ void gpio_pm_sleep_exit(uint32_t cause); #ifdef __cplusplus } #endif - -#endif /* GPIO_ARCH_H */ diff --git a/cpu/esp32/include/gpio_ll_arch.h b/cpu/esp32/include/gpio_ll_arch.h index a778a057ff2a..0acb15228531 100644 --- a/cpu/esp32/include/gpio_ll_arch.h +++ b/cpu/esp32/include/gpio_ll_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @ingroup drivers_periph_gpio_ll @@ -18,8 +20,6 @@ * @} */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include "gpio_arch.h" #include "irq.h" @@ -159,5 +159,3 @@ static inline bool is_gpio_port_num_valid(uint_fast8_t num) #ifdef __cplusplus } #endif - -#endif /* GPIO_LL_ARCH_H */ diff --git a/cpu/esp32/include/irq_arch.h b/cpu/esp32/include/irq_arch.h index 8d54971a8ccf..bb7db192854f 100644 --- a/cpu/esp32/include/irq_arch.h +++ b/cpu/esp32/include/irq_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include "irq_arch_common.h" @@ -64,5 +64,3 @@ void esp_irq_init(void); #ifdef __cplusplus } #endif - -#endif /* IRQ_ARCH_H */ diff --git a/cpu/esp32/include/newlib.h b/cpu/esp32/include/newlib.h index dc528543451c..28760acb7686 100644 --- a/cpu/esp32/include/newlib.h +++ b/cpu/esp32/include/newlib.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -20,8 +22,6 @@ * toolchains, ESP32x toolchains don't use different `newlib.h` versions. */ -#ifndef NEWLIB_H -#define NEWLIB_H #include "kernel_defines.h" @@ -43,5 +43,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* NEWLIB_H */ /** @} */ diff --git a/cpu/esp32/include/periph_cpu.h b/cpu/esp32/include/periph_cpu.h index 6bd48fd821b7..23d3489ee5b2 100644 --- a/cpu/esp32/include/periph_cpu.h +++ b/cpu/esp32/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include #include @@ -1022,5 +1022,4 @@ typedef struct { #include "can_esp.h" #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/esp32/include/periph_cpu_esp32.h b/cpu/esp32/include/periph_cpu_esp32.h index 0c4b353226cb..b6cc1140f902 100644 --- a/cpu/esp32/include/periph_cpu_esp32.h +++ b/cpu/esp32/include/periph_cpu_esp32.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_ESP32_H -#define PERIPH_CPU_ESP32_H #include "sdkconfig.h" @@ -249,5 +249,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_ESP32_H */ /** @} */ diff --git a/cpu/esp32/include/periph_cpu_esp32c3.h b/cpu/esp32/include/periph_cpu_esp32c3.h index 874ca9ce6ddf..178629b92469 100644 --- a/cpu/esp32/include/periph_cpu_esp32c3.h +++ b/cpu/esp32/include/periph_cpu_esp32c3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_ESP32C3_H -#define PERIPH_CPU_ESP32C3_H #include "sdkconfig.h" @@ -176,5 +176,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_ESP32C3_H */ /** @} */ diff --git a/cpu/esp32/include/periph_cpu_esp32s2.h b/cpu/esp32/include/periph_cpu_esp32s2.h index 1e1cdddda271..0cdbe48f7030 100644 --- a/cpu/esp32/include/periph_cpu_esp32s2.h +++ b/cpu/esp32/include/periph_cpu_esp32s2.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_ESP32S2_H -#define PERIPH_CPU_ESP32S2_H #include "sdkconfig.h" @@ -275,5 +275,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_ESP32S2_H */ /** @} */ diff --git a/cpu/esp32/include/periph_cpu_esp32s3.h b/cpu/esp32/include/periph_cpu_esp32s3.h index c9aaccb8a9c1..ace8b066a45e 100644 --- a/cpu/esp32/include/periph_cpu_esp32s3.h +++ b/cpu/esp32/include/periph_cpu_esp32s3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_ESP32S3_H -#define PERIPH_CPU_ESP32S3_H #ifdef __cplusplus extern "C" { @@ -275,5 +275,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_ESP32S3_H */ /** @} */ diff --git a/cpu/esp32/include/rtt_arch.h b/cpu/esp32/include/rtt_arch.h index 4aee0b4f5e14..ad4331c09e22 100644 --- a/cpu/esp32/include/rtt_arch.h +++ b/cpu/esp32/include/rtt_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -37,8 +39,6 @@ * @author Gunar Schorcht */ -#ifndef RTT_ARCH_H -#define RTT_ARCH_H #include "periph/rtt.h" @@ -120,5 +120,4 @@ void rtt_pm_sleep_exit(uint32_t cause); } #endif -#endif /* RTT_ARCH_H */ /** @} */ diff --git a/cpu/esp32/include/sdkconfig.h b/cpu/esp32/include/sdkconfig.h index 489f2796844b..36abe3c68e91 100644 --- a/cpu/esp32/include/sdkconfig.h +++ b/cpu/esp32/include/sdkconfig.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_H -#define SDKCONFIG_H /* * Some files in ESP-IDF use functions from `stdlib.h` without including the @@ -269,5 +269,4 @@ extern "C" { } #endif -#endif /* SDKCONFIG_H */ /** @} */ diff --git a/cpu/esp32/include/sdkconfig_esp32.h b/cpu/esp32/include/sdkconfig_esp32.h index 50171e000d27..0b25be5ca874 100644 --- a/cpu/esp32/include/sdkconfig_esp32.h +++ b/cpu/esp32/include/sdkconfig_esp32.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_ESP32_H -#define SDKCONFIG_ESP32_H #ifndef DOXYGEN @@ -216,5 +216,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_ESP32_H */ /** @} */ diff --git a/cpu/esp32/include/sdkconfig_esp32c3.h b/cpu/esp32/include/sdkconfig_esp32c3.h index f4f0d47068f1..1fcc653c0f83 100644 --- a/cpu/esp32/include/sdkconfig_esp32c3.h +++ b/cpu/esp32/include/sdkconfig_esp32c3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_ESP32C3_H -#define SDKCONFIG_ESP32C3_H #ifndef DOXYGEN @@ -142,5 +142,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_ESP32C3_H */ /** @} */ diff --git a/cpu/esp32/include/sdkconfig_esp32s2.h b/cpu/esp32/include/sdkconfig_esp32s2.h index 56b6eaed7191..ced69cc731ea 100644 --- a/cpu/esp32/include/sdkconfig_esp32s2.h +++ b/cpu/esp32/include/sdkconfig_esp32s2.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_ESP32S2_H -#define SDKCONFIG_ESP32S2_H #ifndef DOXYGEN @@ -145,5 +145,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_ESP32S2_H */ /** @} */ diff --git a/cpu/esp32/include/sdkconfig_esp32s3.h b/cpu/esp32/include/sdkconfig_esp32s3.h index d6e50c0efd47..81fa7d2ec8ba 100644 --- a/cpu/esp32/include/sdkconfig_esp32s3.h +++ b/cpu/esp32/include/sdkconfig_esp32s3.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef SDKCONFIG_ESP32S3_H -#define SDKCONFIG_ESP32S3_H #ifndef DOXYGEN @@ -190,5 +190,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDKCONFIG_ESP32S3_H */ /** @} */ diff --git a/cpu/esp32/include/sys/features.h b/cpu/esp32/include/sys/features.h index a8712f88269e..84794b219d34 100644 --- a/cpu/esp32/include/sys/features.h +++ b/cpu/esp32/include/sys/features.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * lead to compilation problems with newer GCC/newlib versions, see below. */ -#ifndef SYS_FEATURES_H -#define SYS_FEATURES_H #ifndef DOXYGEN @@ -53,5 +53,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SYS_FEATURES_H */ /** @} */ diff --git a/cpu/esp32/include/sys/lock.h b/cpu/esp32/include/sys/lock.h index 05773be70cea..fa1eedf2bdaf 100644 --- a/cpu/esp32/include/sys/lock.h +++ b/cpu/esp32/include/sys/lock.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -19,8 +21,6 @@ * even if retargetable locking is enabled in newlib. */ -#ifndef SYS_LOCK_H -#define SYS_LOCK_H #ifndef DOXYGEN @@ -59,5 +59,4 @@ void _lock_release_recursive(_lock_t *lock); #endif #endif /* DOXYGEN */ -#endif /* SYS_LOCK_H */ /** @} */ diff --git a/cpu/esp32/include/syscalls.h b/cpu/esp32/include/syscalls.h index 8b5489197f58..73103800b134 100644 --- a/cpu/esp32/include/syscalls.h +++ b/cpu/esp32/include/syscalls.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp32 * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef SYSCALLS_H -#define SYSCALLS_H #include "syscalls_common.h" @@ -45,5 +45,3 @@ void system_wdt_feed (void); #ifdef __cplusplus } #endif - -#endif /* SYSCALLS_H */ diff --git a/cpu/esp8266/include/cpu_conf.h b/cpu/esp8266/include/cpu_conf.h index e250af8aa25f..f4632873fe8f 100644 --- a/cpu/esp8266/include/cpu_conf.h +++ b/cpu/esp8266/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_esp8266_conf ESP8266 compile configurations * @ingroup cpu_esp8266 @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" #include "xtensa_conf.h" @@ -117,5 +117,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/esp8266/include/gpio_arch.h b/cpu/esp8266/include/gpio_arch.h index 16cf09d70207..d9d3cdb47dd1 100644 --- a/cpu/esp8266/include/gpio_arch.h +++ b/cpu/esp8266/include/gpio_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266 * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef GPIO_ARCH_H -#define GPIO_ARCH_H #include "gpio_arch_common.h" @@ -38,4 +38,3 @@ extern const uint8_t _iomux_to_gpio[]; #endif #endif /* DOXYGEN */ -#endif /* GPIO_ARCH_H */ diff --git a/cpu/esp8266/include/irq_arch.h b/cpu/esp8266/include/irq_arch.h index f6ef6533e954..d9c9b11eb614 100644 --- a/cpu/esp8266/include/irq_arch.h +++ b/cpu/esp8266/include/irq_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266 * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include "irq_arch_common.h" @@ -40,5 +40,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* IRQ_ARCH_H */ diff --git a/cpu/esp8266/include/periph_cpu.h b/cpu/esp8266/include/periph_cpu.h index 654fa8e57801..cbe57841d48f 100644 --- a/cpu/esp8266/include/periph_cpu.h +++ b/cpu/esp8266/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include #include @@ -333,5 +333,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/esp8266/include/sdk_conf.h b/cpu/esp8266/include/sdk_conf.h index 0fb8980a7273..576840933a28 100644 --- a/cpu/esp8266/include/sdk_conf.h +++ b/cpu/esp8266/include/sdk_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266 * @{ @@ -21,8 +23,6 @@ * @author Gunar Schorcht */ -#ifndef SDK_CONF_H -#define SDK_CONF_H #ifndef DOXYGEN @@ -85,5 +85,4 @@ extern "C" { #endif #endif /* DOXYGEN */ -#endif /* SDK_CONF_H */ /** @} */ diff --git a/cpu/esp8266/include/sys/types.h b/cpu/esp8266/include/sys/types.h index 32ff93c8e9a5..1322d5e0911e 100644 --- a/cpu/esp8266/include/sys/types.h +++ b/cpu/esp8266/include/sys/types.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -37,8 +39,6 @@ doesn't have a stat, and the necv70 doesn't matter.) -- eichin */ -#ifndef SYS_TYPES_H -#define SYS_TYPES_H #ifndef DOXYGEN @@ -325,7 +325,6 @@ typedef long suseconds_t; #undef __need_inttypes -#endif /* _SYS_TYPES_H */ #ifdef __cplusplus } diff --git a/cpu/esp8266/include/syscalls.h b/cpu/esp8266/include/syscalls.h index 77d3abca1f9d..1cae7d6ecdef 100644 --- a/cpu/esp8266/include/syscalls.h +++ b/cpu/esp8266/include/syscalls.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266 * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef SYSCALLS_H -#define SYSCALLS_H #include "syscalls_common.h" @@ -36,5 +36,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* SYSCALLS_H */ diff --git a/cpu/esp8266/sdk/ets.h b/cpu/esp8266/sdk/ets.h index f8abc8802940..d30b9e589bf5 100644 --- a/cpu/esp8266/sdk/ets.h +++ b/cpu/esp8266/sdk/ets.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266_sdk * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht * @} */ -#ifndef ETS_H -#define ETS_H #ifndef DOXYGEN @@ -71,4 +71,3 @@ extern void ets_wdt_enable (void); #endif #endif /* DOXYGEN */ -#endif /* ETS_H */ diff --git a/cpu/esp8266/sdk/phy.h b/cpu/esp8266/sdk/phy.h index 5909cdad0849..23fcab0c96ad 100644 --- a/cpu/esp8266/sdk/phy.h +++ b/cpu/esp8266/sdk/phy.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266_sdk * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef PHY_H -#define PHY_H #ifndef DOXYGEN @@ -36,4 +36,3 @@ extern uint32_t phy_get_mactime(void); #endif #endif /* DOXYGEN */ -#endif /* PHY_H */ diff --git a/cpu/esp8266/sdk/sdk.h b/cpu/esp8266/sdk/sdk.h index 0ac779c78143..55b02ce6720d 100644 --- a/cpu/esp8266/sdk/sdk.h +++ b/cpu/esp8266/sdk/sdk.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266_sdk * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef SDK_H -#define SDK_H #include @@ -33,5 +33,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* SDK_H */ diff --git a/cpu/esp8266/sdk/system.h b/cpu/esp8266/sdk/system.h index 56c4d3ade7db..79b04f028b9d 100644 --- a/cpu/esp8266/sdk/system.h +++ b/cpu/esp8266/sdk/system.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp8266_sdk * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef SYSTEM_H -#define SYSTEM_H #ifndef DOXYGEN @@ -55,4 +55,3 @@ extern void system_restart(void); #endif #endif /* DOXYGEN */ -#endif /* SYSTEM_H */ diff --git a/cpu/esp_common/esp-now/esp_now_gnrc.h b/cpu/esp_common/esp-now/esp_now_gnrc.h index 4376c679ba5e..f1301b6994f0 100644 --- a/cpu/esp_common/esp-now/esp_now_gnrc.h +++ b/cpu/esp_common/esp-now/esp_now_gnrc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common_esp_now * @{ @@ -15,8 +17,6 @@ * * @author Timo Rothenpieler */ -#ifndef ESP_NOW_GNRC_H -#define ESP_NOW_GNRC_H #include "net/gnrc/netif.h" @@ -44,5 +44,4 @@ int gnrc_netif_esp_now_create(gnrc_netif_t *netif, char *stack, int stacksize, c } #endif -#endif /* ESP_NOW_GNRC_H */ /** @} */ diff --git a/cpu/esp_common/esp-now/esp_now_netdev.h b/cpu/esp_common/esp-now/esp_now_netdev.h index f2154254b99a..8b29760a9356 100644 --- a/cpu/esp_common/esp-now/esp_now_netdev.h +++ b/cpu/esp_common/esp-now/esp_now_netdev.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common_esp_now * @{ @@ -17,8 +19,6 @@ * @author Timo Rothenpieler */ -#ifndef ESP_NOW_NETDEV_H -#define ESP_NOW_NETDEV_H #include "net/netdev.h" #include "mutex.h" @@ -122,5 +122,4 @@ int esp_now_set_channel(uint8_t channel); } #endif -#endif /* ESP_NOW_NETDEV_H */ /** @} */ diff --git a/cpu/esp_common/esp-now/esp_now_params.h b/cpu/esp_common/esp-now/esp_now_params.h index 63c5030c3bfb..ee84a5095063 100644 --- a/cpu/esp_common/esp-now/esp_now_params.h +++ b/cpu/esp_common/esp-now/esp_now_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common_esp_now * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef ESP_NOW_PARAMS_H -#define ESP_NOW_PARAMS_H #if defined(MODULE_ESP_NOW) || defined(DOXYGEN) @@ -125,5 +125,4 @@ static const esp_now_params_t esp_now_params = ESP_NOW_PARAMS; #endif /* MODULE_ESP_NOW || DOXYGEN */ -#endif /* ESP_NOW_PARAMS_H */ /**@}*/ diff --git a/cpu/esp_common/esp-wifi/esp_wifi_netdev.h b/cpu/esp_common/esp-wifi/esp_wifi_netdev.h index f7793e1397d7..cde693733ef6 100644 --- a/cpu/esp_common/esp-wifi/esp_wifi_netdev.h +++ b/cpu/esp_common/esp-wifi/esp_wifi_netdev.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common_esp_wifi * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef ESP_WIFI_NETDEV_H -#define ESP_WIFI_NETDEV_H #include @@ -73,5 +73,4 @@ typedef struct } #endif -#endif /* ESP_WIFI_NETDEV_H */ /** @} */ diff --git a/cpu/esp_common/esp-wifi/esp_wifi_params.h b/cpu/esp_common/esp-wifi/esp_wifi_params.h index a9d862b255f1..176c947d2020 100644 --- a/cpu/esp_common/esp-wifi/esp_wifi_params.h +++ b/cpu/esp_common/esp-wifi/esp_wifi_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common_esp_wifi * @ingroup cpu_esp_common_conf @@ -17,8 +19,6 @@ * @author Gunar Schorcht */ -#ifndef ESP_WIFI_PARAMS_H -#define ESP_WIFI_PARAMS_H #if defined(MODULE_ESP_WIFI) || defined(DOXYGEN) @@ -111,5 +111,4 @@ extern "C" { #endif /* MODULE_ESP_WIFI || DOXYGEN */ -#endif /* ESP_WIFI_PARAMS_H */ /**@}*/ diff --git a/cpu/esp_common/include/architecture_arch.h b/cpu/esp_common/include/architecture_arch.h index fe87dde8634e..01aec9ae95c9 100644 --- a/cpu/esp_common/include/architecture_arch.h +++ b/cpu/esp_common/include/architecture_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -34,4 +34,3 @@ extern "C" { #endif /** @} */ -#endif /* ARCHITECTURE_ARCH_H */ diff --git a/cpu/esp_common/include/atomic_utils_arch.h b/cpu/esp_common/include/atomic_utils_arch.h index 94fd669a9259..d415516fd11a 100644 --- a/cpu/esp_common/include/atomic_utils_arch.h +++ b/cpu/esp_common/include/atomic_utils_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_esp_common * @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #ifndef DOXYGEN #include "periph_cpu.h" @@ -72,5 +72,4 @@ static inline void atomic_store_u32(volatile uint32_t *dest, uint32_t val) #endif #endif /* DOXYGEN */ -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/esp_common/include/cpu.h b/cpu/esp_common/include/cpu.h index 4b385bda6c18..f94ccaf8a843 100644 --- a/cpu/esp_common/include/cpu.h +++ b/cpu/esp_common/include/cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_H -#define CPU_H #ifdef __cplusplus extern "C" { @@ -44,5 +44,4 @@ static inline uintptr_t cpu_get_caller_pc(void) } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/esp_common/include/cpu_conf_common.h b/cpu/esp_common/include/cpu_conf_common.h index 6b4f9c9d373d..9487dde715e3 100644 --- a/cpu/esp_common/include/cpu_conf_common.h +++ b/cpu/esp_common/include/cpu_conf_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_esp_common_conf ESP common compile configurations * @ingroup cpu_esp_common @@ -19,8 +21,6 @@ * @author Gunar Schorcht */ -#ifndef CPU_CONF_COMMON_H -#define CPU_CONF_COMMON_H /** * @brief Declare the heap_stats function as available @@ -52,5 +52,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_COMMON_H */ /** @} */ diff --git a/cpu/esp_common/include/esp_common.h b/cpu/esp_common/include/esp_common.h index 931cdadd98df..7b2a03624390 100644 --- a/cpu/esp_common/include/esp_common.h +++ b/cpu/esp_common/include/esp_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ESP_COMMON_H -#define ESP_COMMON_H #ifndef DOXYGEN @@ -121,5 +121,4 @@ extern "C" { #endif /* DOXYGEN */ -#endif /* ESP_COMMON_H */ /** @} */ diff --git a/cpu/esp_common/include/esp_common_log.h b/cpu/esp_common/include/esp_common_log.h index b8179feab1f4..75e0115f44e9 100644 --- a/cpu/esp_common/include/esp_common_log.h +++ b/cpu/esp_common/include/esp_common_log.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ESP_COMMON_LOG_H -#define ESP_COMMON_LOG_H #ifndef DOXYGEN @@ -140,5 +140,4 @@ extern int ets_printf(const char *fmt, ...); #endif /* DOXYGEN */ -#endif /* ESP_COMMON_LOG_H */ /** @} */ diff --git a/cpu/esp_common/include/exceptions.h b/cpu/esp_common/include/exceptions.h index 15d4dc729a04..02c107b386ad 100644 --- a/cpu/esp_common/include/exceptions.h +++ b/cpu/esp_common/include/exceptions.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef EXCEPTIONS_H -#define EXCEPTIONS_H #ifdef __cplusplus extern "C" { @@ -30,5 +30,3 @@ extern void init_exceptions(void); #ifdef __cplusplus } #endif - -#endif /* EXCEPTIONS_H */ diff --git a/cpu/esp_common/include/freertos/FreeRTOS.h b/cpu/esp_common/include/freertos/FreeRTOS.h index 6fda3e444a89..48788173a5d6 100644 --- a/cpu/esp_common/include/freertos/FreeRTOS.h +++ b/cpu/esp_common/include/freertos/FreeRTOS.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_FREERTOS_H -#define FREERTOS_FREERTOS_H +#pragma once #ifndef DOXYGEN @@ -76,4 +75,3 @@ void vPortClearInterruptMaskFromISR(UBaseType_t state); #include "freertos/queue.h" #endif /* DOXYGEN */ -#endif /* FREERTOS_FREERTOS_H */ diff --git a/cpu/esp_common/include/freertos/event_groups.h b/cpu/esp_common/include/freertos/event_groups.h index 1c70882f6c23..404f899111b0 100644 --- a/cpu/esp_common/include/freertos/event_groups.h +++ b/cpu/esp_common/include/freertos/event_groups.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_EVENT_GROUPS_H -#define FREERTOS_EVENT_GROUPS_H +#pragma once #ifndef DOXYGEN @@ -43,4 +42,3 @@ EventBits_t xEventGroupWaitBits (const EventGroupHandle_t xEventGroup, #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_EVENT_GROUPS_H */ diff --git a/cpu/esp_common/include/freertos/portable.h b/cpu/esp_common/include/freertos/portable.h index 98db50b4d48c..be6ff64b38aa 100644 --- a/cpu/esp_common/include/freertos/portable.h +++ b/cpu/esp_common/include/freertos/portable.h @@ -8,10 +8,10 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ +#pragma once + /* Empty file, only required for source code compatibility */ -#ifndef FREERTOS_PORTABLE_H -#define FREERTOS_PORTABLE_H #ifdef __cplusplus extern "C" { @@ -20,5 +20,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* FREERTOS_PORTABLE_H */ diff --git a/cpu/esp_common/include/freertos/portmacro.h b/cpu/esp_common/include/freertos/portmacro.h index 6a7a74ad665e..40431e9277e0 100644 --- a/cpu/esp_common/include/freertos/portmacro.h +++ b/cpu/esp_common/include/freertos/portmacro.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_PORTMACRO_H -#define FREERTOS_PORTMACRO_H +#pragma once #ifndef DOXYGEN @@ -80,4 +79,3 @@ bool xPortCanYield(void); #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_PORTMACRO_H */ diff --git a/cpu/esp_common/include/freertos/queue.h b/cpu/esp_common/include/freertos/queue.h index 2c38b0546b97..a7fc66e2c080 100644 --- a/cpu/esp_common/include/freertos/queue.h +++ b/cpu/esp_common/include/freertos/queue.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_QUEUE_H -#define FREERTOS_QUEUE_H +#pragma once #ifndef DOXYGEN @@ -123,4 +122,3 @@ UBaseType_t uxQueueMessagesWaiting( QueueHandle_t xQueue ); #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_QUEUE_H */ diff --git a/cpu/esp_common/include/freertos/ringbuf.h b/cpu/esp_common/include/freertos/ringbuf.h index 785ff70afe6a..4a3b08a26d4b 100644 --- a/cpu/esp_common/include/freertos/ringbuf.h +++ b/cpu/esp_common/include/freertos/ringbuf.h @@ -12,8 +12,7 @@ * such as `uart.h` even if they do not need definitions from `ringbuf.h`. */ -#ifndef FREERTOS_RINGBUF_H -#define FREERTOS_RINGBUF_H +#pragma once #ifndef DOXYGEN @@ -54,4 +53,3 @@ void vRingbufferReturnItemFromISR(RingbufHandle_t xRingbuffer, void *pvItem, #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_RINGBUF_H */ diff --git a/cpu/esp_common/include/freertos/semphr.h b/cpu/esp_common/include/freertos/semphr.h index ded9e5de923a..351b794532d2 100644 --- a/cpu/esp_common/include/freertos/semphr.h +++ b/cpu/esp_common/include/freertos/semphr.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_SEMPHR_H -#define FREERTOS_SEMPHR_H +#pragma once #ifndef DOXYGEN @@ -81,4 +80,3 @@ void vPortCPUReleaseMutex (portMUX_TYPE *mux); #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_SEMPHR_H */ diff --git a/cpu/esp_common/include/freertos/task.h b/cpu/esp_common/include/freertos/task.h index 2d10e11ce362..5f50e388d954 100644 --- a/cpu/esp_common/include/freertos/task.h +++ b/cpu/esp_common/include/freertos/task.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_TASK_H -#define FREERTOS_TASK_H +#pragma once #ifndef DOXYGEN @@ -104,4 +103,3 @@ uint32_t ulTaskNotifyTake(BaseType_t xClearCountOnExit, #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_TASK_H */ diff --git a/cpu/esp_common/include/freertos/timers.h b/cpu/esp_common/include/freertos/timers.h index b307286e5e36..096bda1dc36b 100644 --- a/cpu/esp_common/include/freertos/timers.h +++ b/cpu/esp_common/include/freertos/timers.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_TIMERS_H -#define FREERTOS_TIMERS_H +#pragma once #ifndef DOXYGEN @@ -40,4 +39,3 @@ void *pvTimerGetTimerID(const TimerHandle_t xTimer); #endif #endif /* DOXYGEN */ -#endif /* FREERTOS_TIMERS_H */ diff --git a/cpu/esp_common/include/freertos/xtensa_api.h b/cpu/esp_common/include/freertos/xtensa_api.h index 61f53a76733c..20d0f26ae27c 100644 --- a/cpu/esp_common/include/freertos/xtensa_api.h +++ b/cpu/esp_common/include/freertos/xtensa_api.h @@ -8,8 +8,7 @@ * FreeRTOS to RIOT-OS adaption module for source code compatibility */ -#ifndef FREERTOS_XTENSA_API_H -#define FREERTOS_XTENSA_API_H +#pragma once #include "xtensa/xtensa_api.h" @@ -20,5 +19,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* FREERTOS_XTENSA_API_H */ diff --git a/cpu/esp_common/include/gpio_arch_common.h b/cpu/esp_common/include/gpio_arch_common.h index 19dd77f20e2b..6910282c02a8 100644 --- a/cpu/esp_common/include/gpio_arch_common.h +++ b/cpu/esp_common/include/gpio_arch_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef GPIO_ARCH_COMMON_H -#define GPIO_ARCH_COMMON_H #include "periph/gpio.h" @@ -82,4 +82,3 @@ const char* gpio_get_pin_usage_str(gpio_t pin); #endif #endif /* DOXYGEN */ -#endif /* GPIO_ARCH_COMMON_H */ diff --git a/cpu/esp_common/include/irq_arch_common.h b/cpu/esp_common/include/irq_arch_common.h index 1cd811e5dca3..fd4c44b36f90 100644 --- a/cpu/esp_common/include/irq_arch_common.h +++ b/cpu/esp_common/include/irq_arch_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef IRQ_ARCH_COMMON_H -#define IRQ_ARCH_COMMON_H #include "irq.h" #include "sched.h" @@ -70,5 +70,3 @@ extern volatile uint32_t irq_interrupt_nesting; #ifdef __cplusplus } #endif - -#endif /* IRQ_ARCH_COMMON_H */ diff --git a/cpu/esp_common/include/log_module.h b/cpu/esp_common/include/log_module.h index d882d41d57dc..9b8dbd25b3f4 100644 --- a/cpu/esp_common/include/log_module.h +++ b/cpu/esp_common/include/log_module.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef LOG_MODULE_H -#define LOG_MODULE_H #ifdef __cplusplus extern "C" { @@ -57,4 +57,3 @@ static inline void log_write(unsigned level, const char *format, ...) { } #endif /**@}*/ -#endif /* LOG_MODULE_H */ diff --git a/cpu/esp_common/include/syscalls_common.h b/cpu/esp_common/include/syscalls_common.h index 2198194facfd..8170b510a588 100644 --- a/cpu/esp_common/include/syscalls_common.h +++ b/cpu/esp_common/include/syscalls_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef SYSCALLS_COMMON_H -#define SYSCALLS_COMMON_H #include #include @@ -50,5 +50,3 @@ void *system_secure_memset(void *s, int c, size_t n); #ifdef __cplusplus } #endif - -#endif /* SYSCALLS_COMMON_H */ diff --git a/cpu/esp_common/include/thread_arch.h b/cpu/esp_common/include/thread_arch.h index 436a64e6f1a8..caf712f5c04a 100644 --- a/cpu/esp_common/include/thread_arch.h +++ b/cpu/esp_common/include/thread_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -19,8 +21,6 @@ * @} */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #ifdef __cplusplus extern "C" { @@ -36,5 +36,3 @@ extern void thread_isr_stack_init(void); #ifdef __cplusplus } #endif - -#endif /* THREAD_ARCH_H */ diff --git a/cpu/esp_common/include/tools.h b/cpu/esp_common/include/tools.h index 2b5291dbf8fc..b98672ff85ad 100644 --- a/cpu/esp_common/include/tools.h +++ b/cpu/esp_common/include/tools.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef TOOLS_H -#define TOOLS_H #include #include @@ -40,5 +40,3 @@ void esp_hexdump (const void* addr, uint32_t num, char width, uint8_t per_line); #ifdef __cplusplus } #endif - -#endif /* TOOLS_H */ diff --git a/cpu/esp_common/include/xtensa_conf.h b/cpu/esp_common/include/xtensa_conf.h index b165c9d0ccb4..b404bfa03d28 100644 --- a/cpu/esp_common/include/xtensa_conf.h +++ b/cpu/esp_common/include/xtensa_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_esp_common * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef XTENSA_CONF_H -#define XTENSA_CONF_H #ifdef __cplusplus extern "C" { @@ -33,5 +33,4 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* XTENSA_CONF_H */ /** @} */ diff --git a/cpu/fe310/include/clk_conf.h b/cpu/fe310/include/clk_conf.h index 61f54bf4095a..e02a05cbc593 100644 --- a/cpu/fe310/include/clk_conf.h +++ b/cpu/fe310/include/clk_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_fe310 * @{ @@ -16,8 +18,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_CONF_H -#define CLK_CONF_H #include "macros/units.h" #include "kernel_defines.h" @@ -131,5 +131,4 @@ extern "C" { } #endif -#endif /* CLK_CONF_H */ /** @} */ diff --git a/cpu/fe310/include/cpu.h b/cpu/fe310/include/cpu.h index 6b2f2464dc1d..58aab46e80bf 100644 --- a/cpu/fe310/include/cpu.h +++ b/cpu/fe310/include/cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_fe310 * @{ @@ -14,8 +16,6 @@ * @brief CPU specific definitions */ -#ifndef CPU_H -#define CPU_H #include "cpu_common.h" @@ -27,5 +27,4 @@ extern "C" { } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/fe310/include/cpu_conf.h b/cpu/fe310/include/cpu_conf.h index f510fbcc5826..fb5273ced757 100644 --- a/cpu/fe310/include/cpu_conf.h +++ b/cpu/fe310/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_fe310 * @{ @@ -16,8 +18,6 @@ * @author Ken Rabold */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" #include "vendor/platform.h" @@ -46,5 +46,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/fe310/include/periph_cpu.h b/cpu/fe310/include/periph_cpu.h index ee9c02d89286..b7c82cca18b3 100644 --- a/cpu/fe310/include/periph_cpu.h +++ b/cpu/fe310/include/periph_cpu.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_fe310 * @{ @@ -16,8 +18,6 @@ * @author Ken Rabold */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include @@ -181,5 +181,4 @@ void fe310_clock_init(void); } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/gd32v/include/cpu.h b/cpu/gd32v/include/cpu.h index 313cb481af49..4f75e9afe00d 100644 --- a/cpu/gd32v/include/cpu.h +++ b/cpu/gd32v/include/cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_gd32v * @{ @@ -14,8 +16,6 @@ * @brief CPU specific definitions */ -#ifndef CPU_H -#define CPU_H #include "cpu_conf.h" #include "cpu_common.h" @@ -45,5 +45,4 @@ static inline void cpu_jump_to_image(uint32_t addr) } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/gd32v/include/cpu_conf.h b/cpu/gd32v/include/cpu_conf.h index 97e3f954139d..3de18d8e8d00 100644 --- a/cpu/gd32v/include/cpu_conf.h +++ b/cpu/gd32v/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_gd32v * @{ @@ -19,8 +21,6 @@ #include "vendor/gd32vf103_core.h" #include "cpu_conf_common.h" -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifdef __cplusplus extern "C" { @@ -78,5 +78,4 @@ typedef enum { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/gd32v/include/gpio_ll_arch.h b/cpu/gd32v/include/gpio_ll_arch.h index ddc388d68905..18d828a9e983 100644 --- a/cpu/gd32v/include/gpio_ll_arch.h +++ b/cpu/gd32v/include/gpio_ll_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_gd32v * @ingroup drivers_periph_gpio_ll @@ -17,8 +19,6 @@ * @author Gunar Schorcht */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include "architecture.h" #include "periph_cpu.h" @@ -165,5 +165,4 @@ static inline bool is_gpio_port_num_valid(uint_fast8_t num) } #endif -#endif /* GPIO_LL_ARCH_H */ /** @} */ diff --git a/cpu/gd32v/include/periph_cpu.h b/cpu/gd32v/include/periph_cpu.h index bec2001cb04d..408e2da08f35 100644 --- a/cpu/gd32v/include/periph_cpu.h +++ b/cpu/gd32v/include/periph_cpu.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_gd32v * @{ @@ -18,8 +20,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include @@ -570,5 +570,4 @@ void gd32v_disable_irc8(void); } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/kinetis/include/bme.h b/cpu/kinetis/include/bme.h index 1e10fd03f55c..3fcb5e871561 100644 --- a/cpu/kinetis/include/bme.h +++ b/cpu/kinetis/include/bme.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @defgroup cpu_kinetis_bme Kinetis Bit Manipulation Engine (BME) * @ingroup cpu_kinetis @@ -19,8 +21,6 @@ * @author Joakim Nohlgård */ -#ifndef BME_H -#define BME_H #include @@ -251,6 +251,5 @@ static inline void bit_clear8(volatile uint8_t *ptr, uint8_t bit) } #endif -#endif /* BME_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf.h b/cpu/kinetis/include/cpu_conf.h index ec8282b3e5b7..f62705570f31 100644 --- a/cpu/kinetis/include/cpu_conf.h +++ b/cpu/kinetis/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @{ @@ -16,8 +18,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_H -#define CPU_CONF_H /* This is needed to homogenize the symbolic IRQ names across different versions * of the vendor headers. These must be defined before any vendor headers are @@ -72,5 +72,4 @@ extern "C" } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis.h b/cpu/kinetis/include/cpu_conf_kinetis.h index fcf5d427d828..8ea70eca66a1 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis.h +++ b/cpu/kinetis/include/cpu_conf_kinetis.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_kinetis * @{ @@ -16,8 +18,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_KINETIS_H -#define CPU_CONF_KINETIS_H #include "cpu_conf_common.h" @@ -187,5 +187,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis_ea.h b/cpu/kinetis/include/cpu_conf_kinetis_ea.h index d360bcc07720..a55528e64319 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis_ea.h +++ b/cpu/kinetis/include/cpu_conf_kinetis_ea.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @brief CPU specific implementations for the NXP Kinetis EA series of @@ -20,8 +22,6 @@ * @author Anton Gerasimov */ -#ifndef CPU_CONF_KINETIS_EA_H -#define CPU_CONF_KINETIS_EA_H #if defined(KINETIS_CORE_Z) #if (KINETIS_ROMSIZE == 128) @@ -41,5 +41,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_EA_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis_k.h b/cpu/kinetis/include/cpu_conf_kinetis_k.h index fc681239ac9f..af4f62ac9783 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis_k.h +++ b/cpu/kinetis/include/cpu_conf_kinetis_k.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @brief CPU specific implementations for the NXP Kinetis K series of @@ -18,8 +20,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_KINETIS_K_H -#define CPU_CONF_KINETIS_K_H #if (KINETIS_FAMILY == 2) #if (KINETIS_SUBFAMILY == 2) @@ -163,5 +163,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_K_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis_l.h b/cpu/kinetis/include/cpu_conf_kinetis_l.h index af369ad5f271..23724d3871a5 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis_l.h +++ b/cpu/kinetis/include/cpu_conf_kinetis_l.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @brief CPU specific implementations for the NXP Kinetis L series of @@ -18,8 +20,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_KINETIS_L_H -#define CPU_CONF_KINETIS_L_H #if (KINETIS_FAMILY == 4) #if (KINETIS_SUBFAMILY == 3) @@ -41,5 +41,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_L_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis_m.h b/cpu/kinetis/include/cpu_conf_kinetis_m.h index 3df55c06517e..ef57538a7bad 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis_m.h +++ b/cpu/kinetis/include/cpu_conf_kinetis_m.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @brief CPU specific implementations for the NXP Kinetis M series of @@ -18,8 +20,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_KINETIS_M_H -#define CPU_CONF_KINETIS_M_H #if (KINETIS_FAMILY == 2) #if (KINETIS_SUBFAMILY == 2) @@ -36,5 +36,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_M_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis_v.h b/cpu/kinetis/include/cpu_conf_kinetis_v.h index bffb164cf146..cae7b504086f 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis_v.h +++ b/cpu/kinetis/include/cpu_conf_kinetis_v.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @brief CPU specific implementations for the NXP Kinetis V series of @@ -18,8 +20,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_KINETIS_V_H -#define CPU_CONF_KINETIS_V_H #if (KINETIS_FAMILY == 2) #if (KINETIS_SUBFAMILY == 2) @@ -36,5 +36,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_V_H */ /** @} */ diff --git a/cpu/kinetis/include/cpu_conf_kinetis_w.h b/cpu/kinetis/include/cpu_conf_kinetis_w.h index 89fec6c0923a..809ed0984086 100644 --- a/cpu/kinetis/include/cpu_conf_kinetis_w.h +++ b/cpu/kinetis/include/cpu_conf_kinetis_w.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @brief CPU specific implementations for the NXP Kinetis K series of @@ -18,8 +20,6 @@ * @author Joakim Nohlgård */ -#ifndef CPU_CONF_KINETIS_W_H -#define CPU_CONF_KINETIS_W_H #if defined(KINETIS_CORE_D) /* Kinetis KW2xD */ @@ -103,5 +103,4 @@ extern "C" } #endif -#endif /* CPU_CONF_KINETIS_W_H */ /** @} */ diff --git a/cpu/kinetis/include/mcg.h b/cpu/kinetis/include/mcg.h index 8af6f5061db7..98646a46118f 100644 --- a/cpu/kinetis/include/mcg.h +++ b/cpu/kinetis/include/mcg.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /* please doxygen by hiding dangling references */ #if defined(MODULE_PERIPH_MCG) || defined(MODULE_PERIPH_MCG_LITE) || defined(DOXYGEN) /** @@ -120,8 +122,6 @@ */ #endif /* MODULE_PERIPH_MCG */ -#ifndef MCG_H -#define MCG_H #include "periph_conf.h" @@ -171,5 +171,4 @@ void kinetis_mcg_init(void); } #endif -#endif /* MCG_H */ /** @} */ diff --git a/cpu/kinetis/include/periph_cpu.h b/cpu/kinetis/include/periph_cpu.h index 8cd14be66ba9..60604d5ea923 100644 --- a/cpu/kinetis/include/periph_cpu.h +++ b/cpu/kinetis/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_kinetis * @{ @@ -18,8 +20,6 @@ * @author Joakim Nohlgård */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include #include @@ -881,5 +881,4 @@ void gpio_init_port(gpio_t pin, uint32_t pcr); } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/kinetis/include/vectors_kinetis.h b/cpu/kinetis/include/vectors_kinetis.h index ceea27d221d2..42fcd02b43df 100644 --- a/cpu/kinetis/include/vectors_kinetis.h +++ b/cpu/kinetis/include/vectors_kinetis.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_kinetis * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef VECTORS_KINETIS_H -#define VECTORS_KINETIS_H #include #include "vectors_cortexm.h" @@ -178,5 +178,3 @@ void isr_wdog_ewm(void); /**< WDOG interrupt handler */ #ifdef __cplusplus } /* extern "C" */ #endif - -#endif /* VECTORS_KINETIS_H */ diff --git a/cpu/kinetis/include/wdog.h b/cpu/kinetis/include/wdog.h index 56870adb8e06..7d999ecad37f 100644 --- a/cpu/kinetis/include/wdog.h +++ b/cpu/kinetis/include/wdog.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @defgroup cpu_kinetis_wdog Kinetis WDOG * @ingroup cpu_kinetis @@ -36,8 +38,6 @@ * @author Joakim Nohlgård */ -#ifndef WDOG_H -#define WDOG_H #ifdef __cplusplus extern "C" @@ -53,5 +53,4 @@ void wdog_disable(void); } #endif -#endif /* WDOG_H */ /** @} */ diff --git a/cpu/lm4f120/include/cpu_conf.h b/cpu/lm4f120/include/cpu_conf.h index 1b758f3a4689..14ec083832cb 100644 --- a/cpu/lm4f120/include/cpu_conf.h +++ b/cpu/lm4f120/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @defgroup cpu_lm4f120 LM4F * @ingroup cpu @@ -18,8 +20,6 @@ * @author Rakendra Thapa */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" @@ -71,5 +71,4 @@ extern void cpu_clock_init(int); } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/lm4f120/include/periph_cpu.h b/cpu/lm4f120/include/periph_cpu.h index 9d39286d8ba0..446688fc964a 100644 --- a/cpu/lm4f120/include/periph_cpu.h +++ b/cpu/lm4f120/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_lm4f120 * @{ @@ -18,8 +20,6 @@ * @author Marc Poulhiès */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "cpu.h" @@ -187,5 +187,4 @@ typedef enum { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/lpc1768/include/cpu_conf.h b/cpu/lpc1768/include/cpu_conf.h index 127883be055d..61e486479576 100644 --- a/cpu/lpc1768/include/cpu_conf.h +++ b/cpu/lpc1768/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @defgroup cpu_lpc1768 NXP LPC1768 * @ingroup cpu @@ -18,8 +20,6 @@ * @author Hauke Petersen */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" @@ -50,5 +50,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/lpc1768/include/periph_cpu.h b/cpu/lpc1768/include/periph_cpu.h index 3d8dfdc561e3..6f7dae055c95 100644 --- a/cpu/lpc1768/include/periph_cpu.h +++ b/cpu/lpc1768/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_lpc1768 * @{ @@ -17,8 +19,6 @@ * @author Bas Stottelaar */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include @@ -91,5 +91,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/lpc23xx/include/cpu.h b/cpu/lpc23xx/include/cpu.h index 2a765943ebc7..07bd71c2c52f 100644 --- a/cpu/lpc23xx/include/cpu.h +++ b/cpu/lpc23xx/include/cpu.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef CPU_H -#define CPU_H +#pragma once /** * @defgroup cpu_lpc23xx NXP LPC23XX @@ -79,4 +78,3 @@ bool cpu_backup_ram_is_initialized(void); #endif /** @} */ -#endif /* CPU_H */ diff --git a/cpu/lpc23xx/include/cpu_conf.h b/cpu/lpc23xx/include/cpu_conf.h index 03890e98f35f..21dcfedf1954 100644 --- a/cpu/lpc23xx/include/cpu_conf.h +++ b/cpu/lpc23xx/include/cpu_conf.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef CPU_CONF_H -#define CPU_CONF_H +#pragma once #ifdef __cplusplus extern "C" { @@ -170,4 +169,3 @@ extern "C" { #endif /** @} */ -#endif /* CPU_CONF_H */ diff --git a/cpu/lpc23xx/include/lpc23xx.h b/cpu/lpc23xx/include/lpc23xx.h index d116246888ef..327ccff05500 100644 --- a/cpu/lpc23xx/include/lpc23xx.h +++ b/cpu/lpc23xx/include/lpc23xx.h @@ -8,8 +8,7 @@ * Parts taken from FeuerWhere-Project, lpc2387.h. */ -#ifndef LPC23XX_H -#define LPC23XX_H +#pragma once #include "vendor/lpc23xx.h" #include "arm7_common.h" @@ -152,5 +151,3 @@ extern "C" { #ifdef __cplusplus } #endif - -#endif /* LPC23XX_H */ diff --git a/cpu/lpc23xx/include/periph_cpu.h b/cpu/lpc23xx/include/periph_cpu.h index bb2429ed23d3..88af20b6ee61 100644 --- a/cpu/lpc23xx/include/periph_cpu.h +++ b/cpu/lpc23xx/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_lpc23xx * @{ @@ -16,8 +18,6 @@ * @author Kaspar Schleiser */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -252,5 +252,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/msp430/include/architecture_arch.h b/cpu/msp430/include/architecture_arch.h index 895724bb7d0e..54e786f91b89 100644 --- a/cpu/msp430/include/architecture_arch.h +++ b/cpu/msp430/include/architecture_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -34,4 +34,3 @@ extern "C" { #endif /** @} */ -#endif /* ARCHITECTURE_ARCH_H */ diff --git a/cpu/msp430/include/atomic_utils_arch.h b/cpu/msp430/include/atomic_utils_arch.h index ced1f326095e..406cd7bafc11 100644 --- a/cpu/msp430/include/atomic_utils_arch.h +++ b/cpu/msp430/include/atomic_utils_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_msp430 * @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #ifndef DOXYGEN #include "periph_cpu.h" @@ -60,5 +60,4 @@ static inline void atomic_store_u16(volatile uint16_t *dest, uint16_t val) #endif #endif /* DOXYGEN */ -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/msp430/include/cpu.h b/cpu/msp430/include/cpu.h index 6f3895cdcf2f..f0adc5c24cfe 100644 --- a/cpu/msp430/include/cpu.h +++ b/cpu/msp430/include/cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430 * @brief Texas Instruments MSP430 specific code @@ -17,8 +19,6 @@ * */ -#ifndef CPU_H -#define CPU_H #include @@ -140,5 +140,4 @@ static inline uintptr_t cpu_get_caller_pc(void) } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/msp430/include/cpu_conf.h b/cpu/msp430/include/cpu_conf.h index f8cac63c6a49..37bd17fe7ff0 100644 --- a/cpu/msp430/include/cpu_conf.h +++ b/cpu/msp430/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430 * @{ @@ -15,8 +17,6 @@ * */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifdef __cplusplus extern "C" { @@ -96,5 +96,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/msp430/include/f2xx_g2xx/msp430_regs.h b/cpu/msp430/include/f2xx_g2xx/msp430_regs.h index 9b4608553c93..396c560f1ced 100644 --- a/cpu/msp430/include/f2xx_g2xx/msp430_regs.h +++ b/cpu/msp430/include/f2xx_g2xx/msp430_regs.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430_f2xx_g2xx * @{ @@ -20,8 +22,6 @@ * @author Hauke Petersen */ -#ifndef F2XX_G2XX_MSP430_REGS_H -#define F2XX_G2XX_MSP430_REGS_H #include #include @@ -207,5 +207,4 @@ extern msp430_usci_b_t USCI_B1; } #endif -#endif /* F2XX_G2XX_MSP430_REGS_H */ /** @} */ diff --git a/cpu/msp430/include/f2xx_g2xx/periph_cpu.h b/cpu/msp430/include/f2xx_g2xx/periph_cpu.h index 65f39ed8a1a7..740ce33a67e8 100644 --- a/cpu/msp430/include/f2xx_g2xx/periph_cpu.h +++ b/cpu/msp430/include/f2xx_g2xx/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430_f2xx_g2xx * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef F2XX_G2XX_PERIPH_CPU_H -#define F2XX_G2XX_PERIPH_CPU_H #include @@ -268,5 +268,4 @@ extern const msp430_usci_spi_params_t usci_b1_as_spi; } #endif -#endif /* F2XX_G2XX_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/msp430/include/gpio_ll_arch.h b/cpu/msp430/include/gpio_ll_arch.h index 4fb1838d7a04..0fcf73b1025f 100644 --- a/cpu/msp430/include/gpio_ll_arch.h +++ b/cpu/msp430/include/gpio_ll_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430 * @ingroup drivers_periph_gpio_ll @@ -17,8 +19,6 @@ * @author Marian Buschsieweke */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include "cpu.h" #include "periph_cpu.h" @@ -204,5 +204,4 @@ uword_t gpio_port_num(gpio_port_t port); } #endif -#endif /* GPIO_LL_ARCH_H */ /** @} */ diff --git a/cpu/msp430/include/irq_arch.h b/cpu/msp430/include/irq_arch.h index 65199022d62b..8b95365bc793 100644 --- a/cpu/msp430/include/irq_arch.h +++ b/cpu/msp430/include/irq_arch.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430 * @{ @@ -20,8 +22,6 @@ * */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include #include @@ -107,4 +107,3 @@ __attribute__((always_inline)) static inline bool irq_is_enabled(void) #endif /** @} */ -#endif /* IRQ_ARCH_H */ diff --git a/cpu/msp430/include/msp430_regs_common.h b/cpu/msp430/include/msp430_regs_common.h index 1b57f4fddc18..3fc845aea59e 100644 --- a/cpu/msp430/include/msp430_regs_common.h +++ b/cpu/msp430/include/msp430_regs_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430 * @{ @@ -20,8 +22,6 @@ * @author Hauke Petersen */ -#ifndef MSP430_REGS_COMMON_H -#define MSP430_REGS_COMMON_H #include @@ -117,5 +117,4 @@ typedef struct { } #endif -#endif /* MSP430_REGS_COMMON_H */ /** @} */ diff --git a/cpu/msp430/include/periph_cpu_common.h b/cpu/msp430/include/periph_cpu_common.h index a3f5010d0169..d393caf31195 100644 --- a/cpu/msp430/include/periph_cpu_common.h +++ b/cpu/msp430/include/periph_cpu_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430_x1xx * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include @@ -507,5 +507,4 @@ void msp430_clock_release(msp430_clock_t clock); } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/msp430/include/thread_arch.h b/cpu/msp430/include/thread_arch.h index b27a394a27db..638e6ae61aa9 100644 --- a/cpu/msp430/include/thread_arch.h +++ b/cpu/msp430/include/thread_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_msp430 * @{ @@ -16,8 +18,6 @@ * * @author Koen Zandberg */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #ifdef __cplusplus extern "C" { @@ -27,5 +27,4 @@ extern "C" { } #endif -#endif /* THREAD_ARCH_H */ /** @} */ diff --git a/cpu/msp430/include/x1xx/msp430_regs.h b/cpu/msp430/include/x1xx/msp430_regs.h index 461a586a0e95..97ea436b5523 100644 --- a/cpu/msp430/include/x1xx/msp430_regs.h +++ b/cpu/msp430/include/x1xx/msp430_regs.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430_x1xx * @{ @@ -20,8 +22,6 @@ * @author Hauke Petersen */ -#ifndef X1XX_MSP430_REGS_H -#define X1XX_MSP430_REGS_H #include @@ -120,5 +120,4 @@ extern msp430_usart_t USART_1; } #endif -#endif /* X1XX_MSP430_REGS_H */ /** @} */ diff --git a/cpu/msp430/include/x1xx/periph_cpu.h b/cpu/msp430/include/x1xx/periph_cpu.h index d6dd0d2f6bea..be07793209cd 100644 --- a/cpu/msp430/include/x1xx/periph_cpu.h +++ b/cpu/msp430/include/x1xx/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_msp430_x1xx * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef X1XX_PERIPH_CPU_H -#define X1XX_PERIPH_CPU_H #include @@ -388,5 +388,4 @@ msp430_usart_prescaler_t msp430_usart_prescale(uint32_t clock, uint16_t min_br); } #endif -#endif /* X1XX_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/native/include/architecture_arch.h b/cpu/native/include/architecture_arch.h index 18f9a0870054..1d480801fdc2 100644 --- a/cpu/native/include/architecture_arch.h +++ b/cpu/native/include/architecture_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief Architecture details * @author Marian Buschsieweke */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -44,5 +44,4 @@ void native_breakpoint(void); } #endif -#endif /* ARCHITECTURE_ARCH_H */ /** @} */ diff --git a/cpu/native/include/async_read.h b/cpu/native/include/async_read.h index 0d6893c1b351..34af845a4c5f 100644 --- a/cpu/native/include/async_read.h +++ b/cpu/native/include/async_read.h @@ -6,6 +6,8 @@ * more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief Multiple asynchronous read on file descriptors * @author Takuo Yonezawa */ -#ifndef ASYNC_READ_H -#define ASYNC_READ_H #include #include @@ -102,5 +102,4 @@ void native_async_read_add_int_handler(int fd, void *arg, native_async_read_call } #endif -#endif /* ASYNC_READ_H */ /** @} */ diff --git a/cpu/native/include/atomic_utils_arch.h b/cpu/native/include/atomic_utils_arch.h index 32c52c9620b2..e0bf7b2d8ac4 100644 --- a/cpu/native/include/atomic_utils_arch.h +++ b/cpu/native/include/atomic_utils_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief Implementation of fast atomic utility functions * @author Marian Buschsieweke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #include "periph_cpu.h" @@ -73,5 +73,4 @@ static inline void atomic_store_u32(volatile uint32_t *dest, uint32_t val) } #endif -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/native/include/backtrace.h b/cpu/native/include/backtrace.h index 89e3f7bbb3d4..c519af6dad7b 100644 --- a/cpu/native/include/backtrace.h +++ b/cpu/native/include/backtrace.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup backtrace Stack backtrace (only under native) * @ingroup core_util @@ -21,8 +23,6 @@ * @brief Backtrace functionalitry * @author Martine Lenders */ -#ifndef BACKTRACE_H -#define BACKTRACE_H #ifdef __cplusplus extern "C" { @@ -57,5 +57,4 @@ int backtrace_len(void); } #endif -#endif /* BACKTRACE_H */ /** @} */ diff --git a/cpu/native/include/can_params.h b/cpu/native/include/can_params.h index 16d83249af7b..9e642af8437a 100644 --- a/cpu/native/include/can_params.h +++ b/cpu/native/include/can_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup drivers_candev_linux * @{ @@ -16,8 +18,6 @@ * @brief Default linux can config * @author Vincent Dupont */ -#ifndef CAN_PARAMS_H -#define CAN_PARAMS_H #include "candev_linux.h" #include "can/device.h" @@ -42,5 +42,4 @@ static const candev_params_t candev_params[] = { } #endif -#endif /* CAN_PARAMS_H */ /** @} */ diff --git a/cpu/native/include/candev_linux.h b/cpu/native/include/candev_linux.h index d5c082273f49..79f5c9e3e06d 100644 --- a/cpu/native/include/candev_linux.h +++ b/cpu/native/include/candev_linux.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_candev_linux SocketCAN driver * @ingroup drivers_can @@ -20,8 +22,6 @@ * @author Aurelien Gonce * @author Vincent Dupont */ -#ifndef CANDEV_LINUX_H -#define CANDEV_LINUX_H #ifdef __cplusplus extern "C" { @@ -91,5 +91,4 @@ extern can_conf_t candev_conf[CAN_DLL_NUMOF]; } #endif -#endif /* CANDEV_LINUX_H */ /** @} */ diff --git a/cpu/native/include/cpu.h b/cpu/native/include/cpu.h index 5eb3830d0776..0d857a7da7f7 100644 --- a/cpu/native/include/cpu.h +++ b/cpu/native/include/cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_native Native CPU * @ingroup cpu @@ -22,8 +24,6 @@ * @brief Native CPU header * @author Ludwig Knüpfer */ -#ifndef CPU_H -#define CPU_H #include #include @@ -60,5 +60,4 @@ __attribute__((always_inline)) static inline uintptr_t cpu_get_caller_pc(void) } #endif -#endif /* CPU_H */ /** @} */ diff --git a/cpu/native/include/cpu_conf.h b/cpu/native/include/cpu_conf.h index 84906bbe1d64..eaf78453ca2d 100644 --- a/cpu/native/include/cpu_conf.h +++ b/cpu/native/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief Native CPU configuration * @author Ludwig Knüpfer */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifdef __cplusplus extern "C" { @@ -154,5 +154,4 @@ extern char _native_flash[FLASHPAGE_SIZE * FLASHPAGE_NUMOF]; } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/native/include/eeprom_native.h b/cpu/native/include/eeprom_native.h index ee4acce5764a..7395687f123f 100644 --- a/cpu/native/include/eeprom_native.h +++ b/cpu/native/include/eeprom_native.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_eeprom_native Native extra API for EEPROM * @ingroup cpu_native @@ -17,8 +19,6 @@ * @file * @author Alexandre Abadie */ -#ifndef EEPROM_NATIVE_H -#define EEPROM_NATIVE_H #include "cpu.h" @@ -46,5 +46,4 @@ void eeprom_native_read(void); } #endif -#endif /* EEPROM_NATIVE_H */ /** @} */ diff --git a/cpu/native/include/gpiodev_linux.h b/cpu/native/include/gpiodev_linux.h index f65c11990872..b7d482706608 100644 --- a/cpu/native/include/gpiodev_linux.h +++ b/cpu/native/include/gpiodev_linux.h @@ -6,6 +6,8 @@ * more details. */ +#pragma once + /** * @defgroup drivers_gpio_linux Linux User Mode GPIO Driver * @ingroup cpu_native @@ -42,8 +44,6 @@ * @brief Implementation of GPIO access from Linux User Space * @author Benjamin Valentin */ -#ifndef GPIODEV_LINUX_H -#define GPIODEV_LINUX_H #ifdef __cplusplus extern "C" { @@ -69,5 +69,4 @@ void gpio_linux_teardown(void); } #endif -#endif /* GPIODEV_LINUX_H */ /** @} */ diff --git a/cpu/native/include/mtd_native.h b/cpu/native/include/mtd_native.h index 0eee28017634..9f2fdaab0bf0 100644 --- a/cpu/native/include/mtd_native.h +++ b/cpu/native/include/mtd_native.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup drivers_mtd * @defgroup drivers_mtd_native Native MTD @@ -17,8 +19,6 @@ * @file * @author Vincent Dupont */ -#ifndef MTD_NATIVE_H -#define MTD_NATIVE_H #ifdef __cplusplus extern "C" { @@ -41,5 +41,4 @@ extern const mtd_desc_t native_flash_driver; } #endif -#endif /* MTD_NATIVE_H */ /** @} */ diff --git a/cpu/native/include/native_cli_eui_provider.h b/cpu/native/include/native_cli_eui_provider.h index a019c739866a..605ed3b5978c 100644 --- a/cpu/native/include/native_cli_eui_provider.h +++ b/cpu/native/include/native_cli_eui_provider.h @@ -6,6 +6,8 @@ * more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief Command-line EUI provider for native * @author Benjamin Valentin */ -#ifndef NATIVE_CLI_EUI_PROVIDER_H -#define NATIVE_CLI_EUI_PROVIDER_H #include "net/eui64.h" @@ -46,5 +46,4 @@ int native_cli_get_eui64(uint8_t index, eui64_t *addr); } #endif -#endif /* NATIVE_CLI_EUI_PROVIDER_H */ /** @} */ diff --git a/cpu/native/include/native_internal.h b/cpu/native/include/native_internal.h index 16e64e276a35..162b989ba69d 100644 --- a/cpu/native/include/native_internal.h +++ b/cpu/native/include/native_internal.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_native_stdio STDIO for native * @ingroup sys_stdio @@ -32,8 +34,6 @@ * @author Ludwig Knüpfer * @author carl-tud */ -#ifndef NATIVE_INTERNAL_H -#define NATIVE_INTERNAL_H #include "util/ucontext.h" #include @@ -332,5 +332,4 @@ ssize_t _native_writev(int fildes, const struct iovec *iov, int iovcnt); } #endif -#endif /* NATIVE_INTERNAL_H */ /** @} */ diff --git a/cpu/native/include/netdev_tap.h b/cpu/native/include/netdev_tap.h index ef242808873c..9100892b0273 100644 --- a/cpu/native/include/netdev_tap.h +++ b/cpu/native/include/netdev_tap.h @@ -6,6 +6,8 @@ * more details. */ +#pragma once + /** * @addtogroup drivers_netdev * @{ @@ -17,8 +19,6 @@ * TAP interfaces * @author Kaspar Schleiser */ -#ifndef NETDEV_TAP_H -#define NETDEV_TAP_H #ifdef __cplusplus extern "C" { @@ -74,5 +74,4 @@ void netdev_tap_setup(netdev_tap_t *dev, const netdev_tap_params_t *params, int } #endif -#endif /* NETDEV_TAP_H */ /** @} */ diff --git a/cpu/native/include/netdev_tap_params.h b/cpu/native/include/netdev_tap_params.h index 766a714647cc..d4b072e77ba9 100644 --- a/cpu/native/include/netdev_tap_params.h +++ b/cpu/native/include/netdev_tap_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup drivers_netdev * @{ @@ -16,8 +18,6 @@ * @brief Default configuration for the netdev_tap driver * @author Martine Lenders */ -#ifndef NETDEV_TAP_PARAMS_H -#define NETDEV_TAP_PARAMS_H #include "netdev_tap.h" @@ -46,5 +46,4 @@ extern netdev_tap_params_t netdev_tap_params[NETDEV_TAP_MAX]; } #endif -#endif /* NETDEV_TAP_PARAMS_H */ /** @} */ diff --git a/cpu/native/include/periph_conf.h b/cpu/native/include/periph_conf.h index cf8aa132ce18..ac808ed2403f 100644 --- a/cpu/native/include/periph_conf.h +++ b/cpu/native/include/periph_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief Native CPU peripheral configuration * @author Ludwig Knüpfer */ -#ifndef PERIPH_CONF_H -#define PERIPH_CONF_H #include "macros/units.h" @@ -130,5 +130,4 @@ extern "C" { } #endif -#endif /* PERIPH_CONF_H */ /** @} */ diff --git a/cpu/native/include/periph_cpu.h b/cpu/native/include/periph_cpu.h index f77e6272333a..32c0f5ccf027 100644 --- a/cpu/native/include/periph_cpu.h +++ b/cpu/native/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief CPU specific definitions for internal peripheral handling * @author Hauke Petersen */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_conf.h" @@ -234,5 +234,4 @@ typedef enum { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/native/include/socket_zep.h b/cpu/native/include/socket_zep.h index 86d85b144407..71d4091d64c1 100644 --- a/cpu/native/include/socket_zep.h +++ b/cpu/native/include/socket_zep.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_socket_zep Socket-based ZEP * @ingroup drivers_netdev @@ -54,8 +56,6 @@ * @brief Socket ZEP definitions * @author Martine Lenders */ -#ifndef SOCKET_ZEP_H -#define SOCKET_ZEP_H #include "net/netdev.h" #include "net/netdev/ieee802154.h" @@ -150,5 +150,4 @@ void socket_zep_hal_setup(socket_zep_t *dev, ieee802154_dev_t *hal); } #endif -#endif /* SOCKET_ZEP_H */ /** @} */ diff --git a/cpu/native/include/socket_zep_params.h b/cpu/native/include/socket_zep_params.h index 8736ce548f72..ba6f4847ae8e 100644 --- a/cpu/native/include/socket_zep_params.h +++ b/cpu/native/include/socket_zep_params.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @addtogroup drivers_socket_zep * @{ @@ -16,8 +18,6 @@ * @brief Configuration parameters for the @ref drivers_socket_zep driver * @author Martine Lenders */ -#ifndef SOCKET_ZEP_PARAMS_H -#define SOCKET_ZEP_PARAMS_H #include "socket_zep.h" @@ -44,5 +44,4 @@ extern socket_zep_params_t socket_zep_params[SOCKET_ZEP_MAX]; } #endif -#endif /* SOCKET_ZEP_PARAMS_H */ /** @} */ diff --git a/cpu/native/include/spidev_linux.h b/cpu/native/include/spidev_linux.h index 084930210373..28cad2de4ccb 100644 --- a/cpu/native/include/spidev_linux.h +++ b/cpu/native/include/spidev_linux.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_spidev_linux Linux User Mode SPI Driver * @ingroup cpu_native @@ -58,8 +60,6 @@ * @brief Implementation of SPI access from Linux User Space * @author Frank Hessel */ -#ifndef SPIDEV_LINUX_H -#define SPIDEV_LINUX_H #if defined(__linux__) || defined(DOXYGEN) /* Linux-only */ @@ -129,5 +129,4 @@ void spidev_linux_teardown(void); #endif #endif /* defined(__linux__) || defined(DOXYGEN) */ -#endif /* SPIDEV_LINUX_H */ /** @} */ diff --git a/cpu/native/include/syscalls.h b/cpu/native/include/syscalls.h index 3a9f3c720fd1..d50034a315a0 100644 --- a/cpu/native/include/syscalls.h +++ b/cpu/native/include/syscalls.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef SYSCALLS_H -#define SYSCALLS_H +#pragma once #include #include @@ -114,5 +113,3 @@ __SPECIFIER int (*real_statvfs)(const char *restrict path, struct statvfs *restr #endif /** @} */ - -#endif /* SYSCALLS_H */ diff --git a/cpu/native/include/thread_arch.h b/cpu/native/include/thread_arch.h index 83ab0385e6e8..52fe60819a0c 100644 --- a/cpu/native/include/thread_arch.h +++ b/cpu/native/include/thread_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -17,8 +19,6 @@ * @brief Implementation of the kernels thread interface * @author Koen Zandberg */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #ifdef __cplusplus extern "C" { @@ -28,5 +28,4 @@ extern "C" { } #endif -#endif /* THREAD_ARCH_H */ /** @} */ diff --git a/cpu/native/include/tty_uart.h b/cpu/native/include/tty_uart.h index 62871721cf15..768dca2ec981 100644 --- a/cpu/native/include/tty_uart.h +++ b/cpu/native/include/tty_uart.h @@ -6,6 +6,8 @@ * more details. */ +#pragma once + /** * @addtogroup cpu_native * @{ @@ -16,8 +18,6 @@ * @brief UART implementation based on /dev/tty devices on host * @author Takuo Yonezawa */ -#ifndef TTY_UART_H -#define TTY_UART_H #include "periph/uart.h" @@ -37,5 +37,4 @@ void tty_uart_setup(uart_t uart, const char *name); } #endif -#endif /* TTY_UART_H */ /** @} */ diff --git a/cpu/native/include/util/ucontext.h b/cpu/native/include/util/ucontext.h index 1e11e8b8465e..2b43640c1d66 100644 --- a/cpu/native/include/util/ucontext.h +++ b/cpu/native/include/util/ucontext.h @@ -7,8 +7,7 @@ * directory for more details. */ -#ifndef UTIL_UCONTEXT_H -#define UTIL_UCONTEXT_H +#pragma once #if USE_LIBUCONTEXT # include @@ -132,5 +131,3 @@ static inline void makecontext64(ucontext_t *context, void (*func)(void), void* #ifdef __cplusplus } #endif - -#endif /* UTIL_UCONTEXT_H */ diff --git a/cpu/native/include/util/valgrind.h b/cpu/native/include/util/valgrind.h index f5323aec48fe..ad4985226fd3 100644 --- a/cpu/native/include/util/valgrind.h +++ b/cpu/native/include/util/valgrind.h @@ -6,8 +6,7 @@ * directory for more details. */ -#ifndef UTIL_VALGRIND_H -#define UTIL_VALGRIND_H +#pragma once #ifdef HAVE_VALGRIND_H # include @@ -23,5 +22,3 @@ #ifdef __cplusplus extern "C" {} #endif - -#endif /* UTIL_VALGRIND_H */ diff --git a/cpu/nrf51/include/cpu_conf.h b/cpu/nrf51/include/cpu_conf.h index 76acd7b1dcd6..714770d426f9 100644 --- a/cpu/nrf51/include/cpu_conf.h +++ b/cpu/nrf51/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @defgroup cpu_nrf51 Nordic nRF51 MCU * @ingroup cpu @@ -18,8 +20,6 @@ * @author Hauke Petersen */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" #include "vendor/nrf51.h" @@ -81,5 +81,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/nrf51/include/periph_cpu.h b/cpu/nrf51/include/periph_cpu.h index f09ba7dbeff6..3f4aa207e575 100644 --- a/cpu/nrf51/include/periph_cpu.h +++ b/cpu/nrf51/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf51 * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -112,5 +112,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/nrf52/include/cpu_conf.h b/cpu/nrf52/include/cpu_conf.h index 990665b84478..39ade036c2c3 100644 --- a/cpu/nrf52/include/cpu_conf.h +++ b/cpu/nrf52/include/cpu_conf.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_nrf52 Nordic nRF52 MCU * @ingroup cpu @@ -21,8 +23,6 @@ * */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" @@ -143,5 +143,4 @@ static inline void nrf52_sleep(void) } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/nrf52/include/nrf802154.h b/cpu/nrf52/include/nrf802154.h index d607ed84f891..8643fbe567d7 100644 --- a/cpu/nrf52/include/nrf802154.h +++ b/cpu/nrf52/include/nrf802154.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_nrf52_802154 IEEE802.15.4 Driver for nRF52840 SoCs * @ingroup drivers_netdev @@ -33,8 +35,6 @@ * @author Semjon Kerner */ -#ifndef NRF802154_H -#define NRF802154_H #include "net/ieee802154/radio.h" @@ -102,5 +102,4 @@ void nrf802154_setup(nrf802154_t *dev); } #endif -#endif /* NRF802154_H */ /** @} */ diff --git a/cpu/nrf52/include/openwsn_defs.h b/cpu/nrf52/include/openwsn_defs.h index dbf55b99ba9b..b61ca90d9a60 100644 --- a/cpu/nrf52/include/openwsn_defs.h +++ b/cpu/nrf52/include/openwsn_defs.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu * @{ @@ -16,8 +18,6 @@ * @author Francisco Molina */ -#ifndef OPENWSN_DEFS_H -#define OPENWSN_DEFS_H #ifdef __cplusplus extern "C" { @@ -44,5 +44,4 @@ extern "C" { } #endif -#endif /* OPENWSN_DEFS_H */ /** @} */ diff --git a/cpu/nrf52/include/periph_cpu.h b/cpu/nrf52/include/periph_cpu.h index 32c24a8a077c..775d7c0d95a3 100644 --- a/cpu/nrf52/include/periph_cpu.h +++ b/cpu/nrf52/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf52 * @{ @@ -18,8 +20,6 @@ * @author Philipp-Alexander Blum */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" @@ -151,5 +151,4 @@ void nrf5x_spi_release(NRF_SPIM_Type *bus); } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/nrf53/include/cpu_conf.h b/cpu/nrf53/include/cpu_conf.h index 74858fde8100..eabf7cfa0157 100644 --- a/cpu/nrf53/include/cpu_conf.h +++ b/cpu/nrf53/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_nrf53 Nordic nRF53 MCU * @ingroup cpu @@ -19,8 +21,6 @@ * */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #ifdef CPU_MODEL_NRF5340_APP #include "vendor/nrf5340_application.h" @@ -71,5 +71,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/nrf53/include/periph_cpu.h b/cpu/nrf53/include/periph_cpu.h index 46bd07ce5873..776420963625 100644 --- a/cpu/nrf53/include/periph_cpu.h +++ b/cpu/nrf53/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf53 * @{ @@ -16,8 +18,6 @@ * @author Dylan Laduranty */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" #include "macros/units.h" @@ -63,5 +63,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/gpio_ll_arch.h b/cpu/nrf5x_common/include/gpio_ll_arch.h index e1d13485e410..130e5d6c871f 100644 --- a/cpu/nrf5x_common/include/gpio_ll_arch.h +++ b/cpu/nrf5x_common/include/gpio_ll_arch.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf5x_common * @ingroup drivers_periph_gpio_ll @@ -26,8 +28,6 @@ * @author Alexandre Abadie */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include @@ -174,5 +174,4 @@ static inline bool is_gpio_port_num_valid(uint_fast8_t num) } #endif -#endif /* GPIO_LL_ARCH_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/nrf_clock.h b/cpu/nrf5x_common/include/nrf_clock.h index a2a3fd3ff951..451224316358 100644 --- a/cpu/nrf5x_common/include/nrf_clock.h +++ b/cpu/nrf5x_common/include/nrf_clock.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf5x_common * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef NRF_CLOCK_H -#define NRF_CLOCK_H #ifdef __cplusplus extern "C" { @@ -69,5 +69,4 @@ void clock_stop_lf(void); } #endif -#endif /* NRF_CLOCK_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/nrfble.h b/cpu/nrf5x_common/include/nrfble.h index 9c41b3ee443d..b371c36a5a6f 100644 --- a/cpu/nrf5x_common/include/nrfble.h +++ b/cpu/nrf5x_common/include/nrfble.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_nrf5x_nrfble NRF BLE radio driver * @ingroup drivers_netdev @@ -18,8 +20,6 @@ * @author Hauke Petersen */ -#ifndef NRFBLE_H -#define NRFBLE_H #include "net/netdev.h" @@ -51,5 +51,4 @@ netdev_t *nrfble_setup(void); } #endif -#endif /* NRFBLE_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/nrfmin.h b/cpu/nrf5x_common/include/nrfmin.h index fcb8c5baddbd..a6f590f200ae 100644 --- a/cpu/nrf5x_common/include/nrfmin.h +++ b/cpu/nrf5x_common/include/nrfmin.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_nrf5x_nrfmin NRF minimal radio driver * @ingroup drivers_netdev @@ -69,8 +71,6 @@ * @author Hauke Petersen */ -#ifndef NRFMIN_H -#define NRFMIN_H #include "net/netdev.h" @@ -221,5 +221,4 @@ void nrfmin_set_txpower(int16_t power); } #endif -#endif /* NRFMIN_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/nrfmin_gnrc.h b/cpu/nrf5x_common/include/nrfmin_gnrc.h index 432dff0189a5..81ae3634eaac 100644 --- a/cpu/nrf5x_common/include/nrfmin_gnrc.h +++ b/cpu/nrf5x_common/include/nrfmin_gnrc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup drivers_nrf5x_nrfmin_gnrc GNRC adapter for nrfmin * @ingroup drivers_nrf5x_nrfmin @@ -19,8 +21,6 @@ * @author Hauke Petersen */ -#ifndef NRFMIN_GNRC_H -#define NRFMIN_GNRC_H #include "nrfmin.h" @@ -44,5 +44,4 @@ void gnrc_netdev_nrfmin_init(void); } #endif -#endif /* NRFMIN_GNRC_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/nrfusb.h b/cpu/nrf5x_common/include/nrfusb.h index 07239fc02149..e9c0a02af43b 100644 --- a/cpu/nrf5x_common/include/nrfusb.h +++ b/cpu/nrf5x_common/include/nrfusb.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_nrf52_nrfusb NRF usb peripheral implementation * @ingroup cpu_nrf52 @@ -19,8 +21,6 @@ * @author Koen Zandberg */ -#ifndef NRFUSB_H -#define NRFUSB_H #include #include @@ -66,5 +66,4 @@ typedef struct { #ifdef __cplusplus } #endif -#endif /* NRFUSB_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/nrfx_riot.h b/cpu/nrf5x_common/include/nrfx_riot.h index f5889aafa1ad..089e502e22df 100644 --- a/cpu/nrf5x_common/include/nrfx_riot.h +++ b/cpu/nrf5x_common/include/nrfx_riot.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf5x_common * @{ @@ -19,8 +21,6 @@ * @author Koen Zandberg */ -#ifndef NRFX_RIOT_H -#define NRFX_RIOT_H #include "kernel_defines.h" #include "cpu_conf.h" @@ -63,5 +63,4 @@ static inline void nrfx_dcdc_init(void) } #endif -#endif /* NRFX_RIOT_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/periph_cpu_common.h b/cpu/nrf5x_common/include/periph_cpu_common.h index a42826aba084..86dd5fbed162 100644 --- a/cpu/nrf5x_common/include/periph_cpu_common.h +++ b/cpu/nrf5x_common/include/periph_cpu_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf5x_common * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include "cpu.h" @@ -622,5 +622,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/nrf5x_common/include/timer_arch.h b/cpu/nrf5x_common/include/timer_arch.h index 325145215888..007d4378101e 100644 --- a/cpu/nrf5x_common/include/timer_arch.h +++ b/cpu/nrf5x_common/include/timer_arch.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf5x_common * @ingroup drivers_periph_timer @@ -19,8 +21,6 @@ * @author Christian Amsüss */ -#ifndef TIMER_ARCH_H -#define TIMER_ARCH_H #ifdef __cplusplus extern "C" { @@ -38,5 +38,4 @@ static inline bool timer_poll_channel(tim_t tim, int channel) } #endif -#endif /* TIMER_ARCH_H */ /** @} */ diff --git a/cpu/nrf9160/include/cpu_conf.h b/cpu/nrf9160/include/cpu_conf.h index b210b7d807cc..18add780ac2b 100644 --- a/cpu/nrf9160/include/cpu_conf.h +++ b/cpu/nrf9160/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_nrf9160 Nordic nRF9160 MCU * @ingroup cpu @@ -19,8 +21,6 @@ * */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "vendor/nrf9160.h" #include "vendor/nrf9160_bitfields.h" @@ -61,5 +61,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/nrf9160/include/periph_cpu.h b/cpu/nrf9160/include/periph_cpu.h index 9f9dce141eff..21176bc8a364 100644 --- a/cpu/nrf9160/include/periph_cpu.h +++ b/cpu/nrf9160/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_nrf9160 * @{ @@ -16,8 +18,6 @@ * @author Dylan Laduranty */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "periph_cpu_common.h" #include "macros/units.h" @@ -40,5 +40,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/qn908x/include/cpu_conf.h b/cpu/qn908x/include/cpu_conf.h index 3cf7d63b5f9e..667230686c28 100644 --- a/cpu/qn908x/include/cpu_conf.h +++ b/cpu/qn908x/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_qn908x * @{ @@ -16,8 +18,6 @@ * @author iosabi */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" @@ -328,5 +328,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/qn908x/include/flexcomm.h b/cpu/qn908x/include/flexcomm.h index 5d7f2421b256..f046a3c12901 100644 --- a/cpu/qn908x/include/flexcomm.h +++ b/cpu/qn908x/include/flexcomm.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_qn908x * @@ -22,8 +24,6 @@ * @author iosabi */ -#ifndef FLEXCOMM_H -#define FLEXCOMM_H #include #include "periph_cpu.h" @@ -63,5 +63,4 @@ int flexcomm_instance_from_addr(const FLEXCOMM_Type *dev); } #endif -#endif /* FLEXCOMM_H */ /** @} */ diff --git a/cpu/qn908x/include/gpio_mux.h b/cpu/qn908x/include/gpio_mux.h index 19c77b80ef8a..460a2aa44d6f 100644 --- a/cpu/qn908x/include/gpio_mux.h +++ b/cpu/qn908x/include/gpio_mux.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_qn908x * @@ -20,8 +22,6 @@ * @author iosabi */ -#ifndef GPIO_MUX_H -#define GPIO_MUX_H #include #include "periph_cpu.h" @@ -77,5 +77,4 @@ void gpio_init_mux(gpio_t pin, uint32_t func); } #endif -#endif /* GPIO_MUX_H */ /** @} */ diff --git a/cpu/qn908x/include/periph_cpu.h b/cpu/qn908x/include/periph_cpu.h index cb805032f3ac..43836eaafc8e 100644 --- a/cpu/qn908x/include/periph_cpu.h +++ b/cpu/qn908x/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_qn908x * @{ @@ -16,8 +18,6 @@ * @author iosabi */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include #include @@ -542,5 +542,4 @@ typedef enum { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/qn908x/include/vectors_qn908x.h b/cpu/qn908x/include/vectors_qn908x.h index 4c25a74f18a4..8ab93eca69e1 100644 --- a/cpu/qn908x/include/vectors_qn908x.h +++ b/cpu/qn908x/include/vectors_qn908x.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_qn908x * @{ @@ -18,8 +20,6 @@ * @} */ -#ifndef VECTORS_QN908X_H -#define VECTORS_QN908X_H #include #include "vectors_cortexm.h" @@ -114,5 +114,3 @@ extern const uint32_t isp_configuration; #ifdef __cplusplus } /* extern "C" */ #endif - -#endif /* VECTORS_QN908X_H */ diff --git a/cpu/riscv_common/include/architecture_arch.h b/cpu/riscv_common/include/architecture_arch.h index b2f1b7f9d2a2..f2e5c1601e80 100644 --- a/cpu/riscv_common/include/architecture_arch.h +++ b/cpu/riscv_common/include/architecture_arch.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_fe310 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef ARCHITECTURE_ARCH_H -#define ARCHITECTURE_ARCH_H #ifdef __cplusplus extern "C" { @@ -34,4 +34,3 @@ extern "C" { #endif /** @} */ -#endif /* ARCHITECTURE_ARCH_H */ diff --git a/cpu/riscv_common/include/atomic_utils_arch.h b/cpu/riscv_common/include/atomic_utils_arch.h index 5f2b8a861809..6689d3a00dc4 100644 --- a/cpu/riscv_common/include/atomic_utils_arch.h +++ b/cpu/riscv_common/include/atomic_utils_arch.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_fe310 * @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef ATOMIC_UTILS_ARCH_H -#define ATOMIC_UTILS_ARCH_H #include "periph_cpu.h" @@ -74,5 +74,4 @@ static inline void atomic_store_u32(volatile uint32_t *dest, uint32_t val) } #endif -#endif /* ATOMIC_UTILS_ARCH_H */ /** @} */ diff --git a/cpu/riscv_common/include/clic.h b/cpu/riscv_common/include/clic.h index acf7e7c2f983..72341ee2737f 100644 --- a/cpu/riscv_common/include/clic.h +++ b/cpu/riscv_common/include/clic.h @@ -5,6 +5,9 @@ * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ + +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -18,8 +21,6 @@ * * @author Koen Zandberg */ -#ifndef CLIC_H -#define CLIC_H #include "cpu_conf.h" @@ -93,5 +94,4 @@ void clic_isr_handler(uint32_t irq); } #endif -#endif /* CLIC_H */ /** @} */ diff --git a/cpu/riscv_common/include/context_frame.h b/cpu/riscv_common/include/context_frame.h index c0ff962c8690..6b7d087bb851 100644 --- a/cpu/riscv_common/include/context_frame.h +++ b/cpu/riscv_common/include/context_frame.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -16,8 +18,6 @@ * @author JP Bonn */ -#ifndef CONTEXT_FRAME_H -#define CONTEXT_FRAME_H #if !defined(__ASSEMBLER__) #include @@ -126,5 +126,4 @@ struct context_switch_frame { } #endif -#endif /* CONTEXT_FRAME_H */ /** @} */ diff --git a/cpu/riscv_common/include/cpu_common.h b/cpu/riscv_common/include/cpu_common.h index 8329b71748cf..b3ffbbba8542 100644 --- a/cpu/riscv_common/include/cpu_common.h +++ b/cpu/riscv_common/include/cpu_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_riscv_common RISC-V common * @ingroup cpu @@ -22,8 +24,6 @@ #include "irq_arch.h" -#ifndef CPU_COMMON_H -#define CPU_COMMON_H #ifdef __cplusplus extern "C" { @@ -85,5 +85,4 @@ void cpu_reg_disable_bits(volatile uint32_t *reg, uint32_t mask) } #endif -#endif /* CPU_COMMON_H */ /** @} */ diff --git a/cpu/riscv_common/include/cpu_conf_common.h b/cpu/riscv_common/include/cpu_conf_common.h index 1ae376a65010..8c458f711948 100644 --- a/cpu/riscv_common/include/cpu_conf_common.h +++ b/cpu/riscv_common/include/cpu_conf_common.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -16,8 +18,6 @@ * @author Koen Zandberg */ -#ifndef CPU_CONF_COMMON_H -#define CPU_CONF_COMMON_H #include "vendor/riscv_csr.h" #include "cpu_conf_common.h" @@ -60,5 +60,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_COMMON_H */ /** @} */ diff --git a/cpu/riscv_common/include/cpucycle.h b/cpu/riscv_common/include/cpucycle.h index 105995e370ac..c2f1dd7e37aa 100644 --- a/cpu/riscv_common/include/cpucycle.h +++ b/cpu/riscv_common/include/cpucycle.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -16,8 +18,6 @@ * @author JP Bonn */ -#ifndef CPUCYCLE_H -#define CPUCYCLE_H #include @@ -36,5 +36,4 @@ uint64_t get_cycle_count(void); } #endif -#endif /* CPUCYCLE_H */ /** @} */ diff --git a/cpu/riscv_common/include/irq_arch.h b/cpu/riscv_common/include/irq_arch.h index 88f5bc6b350c..5ddcf714f56f 100644 --- a/cpu/riscv_common/include/irq_arch.h +++ b/cpu/riscv_common/include/irq_arch.h @@ -8,6 +8,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -20,8 +22,6 @@ * @author Marian Buschsieweke */ -#ifndef IRQ_ARCH_H -#define IRQ_ARCH_H #include @@ -114,5 +114,4 @@ static inline __attribute__((always_inline)) bool irq_is_enabled(void) } #endif -#endif /* IRQ_ARCH_H */ /** @} */ diff --git a/cpu/riscv_common/include/periph_cpu_common.h b/cpu/riscv_common/include/periph_cpu_common.h index e573b8589e83..64bc1e769281 100644 --- a/cpu/riscv_common/include/periph_cpu_common.h +++ b/cpu/riscv_common/include/periph_cpu_common.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -16,8 +18,6 @@ * @author Koen Zandberg */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include @@ -43,5 +43,4 @@ typedef unsigned irqn_t; } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/riscv_common/include/plic.h b/cpu/riscv_common/include/plic.h index 388799931f49..287071ea08b4 100644 --- a/cpu/riscv_common/include/plic.h +++ b/cpu/riscv_common/include/plic.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -16,8 +18,6 @@ * @author Koen Zandberg */ -#ifndef PLIC_H -#define PLIC_H #ifdef __cplusplus extern "C" { @@ -81,5 +81,4 @@ void plic_isr_handler(void); } #endif -#endif /* PLIC_H */ /** @} */ diff --git a/cpu/riscv_common/include/pmp.h b/cpu/riscv_common/include/pmp.h index 31e8f147c940..efc5652e6eba 100644 --- a/cpu/riscv_common/include/pmp.h +++ b/cpu/riscv_common/include/pmp.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_riscv_common * @{ @@ -19,8 +21,6 @@ * @author Bennet Blischke */ -#ifndef PMP_H -#define PMP_H #include #include @@ -121,5 +121,4 @@ void print_pmpcfg(uint8_t entry); } #endif -#endif /* PMP_H */ /** @} */ diff --git a/cpu/riscv_common/include/thread_arch.h b/cpu/riscv_common/include/thread_arch.h index e4750d03b2b6..3196484600e6 100644 --- a/cpu/riscv_common/include/thread_arch.h +++ b/cpu/riscv_common/include/thread_arch.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_fe310 * @{ @@ -17,8 +19,6 @@ * @author Koen Zandberg */ -#ifndef THREAD_ARCH_H -#define THREAD_ARCH_H #include "irq.h" @@ -59,5 +59,4 @@ static inline __attribute__((always_inline)) void thread_yield_higher(void) } #endif -#endif /* THREAD_ARCH_H */ /** @} */ diff --git a/cpu/rpx0xx/include/cpu_conf.h b/cpu/rpx0xx/include/cpu_conf.h index 8b14d664c64b..9e956f1674c1 100644 --- a/cpu/rpx0xx/include/cpu_conf.h +++ b/cpu/rpx0xx/include/cpu_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_rpx0xx * @{ @@ -16,8 +18,6 @@ * @author Fabian Hüßler */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include @@ -42,5 +42,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/rpx0xx/include/io_reg.h b/cpu/rpx0xx/include/io_reg.h index ff0ee5a3af3c..fe3f59b04f1f 100644 --- a/cpu/rpx0xx/include/io_reg.h +++ b/cpu/rpx0xx/include/io_reg.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_rpx0xx * @{ @@ -24,8 +26,6 @@ * @author Fabian Hüßler */ -#ifndef IO_REG_H -#define IO_REG_H #include @@ -134,5 +134,4 @@ static inline void io_reg_write_dont_corrupt(volatile uint32_t *reg, uint32_t va } #endif -#endif /* IO_REG_H */ /** @} */ diff --git a/cpu/rpx0xx/include/periph_cpu.h b/cpu/rpx0xx/include/periph_cpu.h index 4aeb36fef6ce..c42a99a8a3db 100644 --- a/cpu/rpx0xx/include/periph_cpu.h +++ b/cpu/rpx0xx/include/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_rpx0xx * @{ @@ -17,8 +19,6 @@ * @author Marian Buschsieweke */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include "cpu.h" #include "vendor/RP2040.h" @@ -816,5 +816,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/rpx0xx/include/pio/pio.h b/cpu/rpx0xx/include/pio/pio.h index 23385f26bd54..447ea5fb4f96 100644 --- a/cpu/rpx0xx/include/pio/pio.h +++ b/cpu/rpx0xx/include/pio/pio.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_rpx0xx * @{ @@ -16,8 +18,6 @@ * @author Fabian Hüßler */ -#ifndef PIO_PIO_H -#define PIO_PIO_H #include "periph_conf.h" #include "periph/gpio.h" @@ -1332,5 +1332,4 @@ static inline bool pio_sm_rx_fifo_full(pio_t pio, pio_sm_t sm) } #endif -#endif /* PIO_PIO_H */ /** @} */ diff --git a/cpu/sam0_common/sam0_eth/sam0_eth_netdev.h b/cpu/sam0_common/sam0_eth/sam0_eth_netdev.h index 61dc05da5f4e..ff6f0a9e4624 100644 --- a/cpu/sam0_common/sam0_eth/sam0_eth_netdev.h +++ b/cpu/sam0_common/sam0_eth/sam0_eth_netdev.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_sam0_common_eth sam0 Ethernet peripheral * @ingroup cpu_sam0_common @@ -17,8 +19,6 @@ * @author Dylan Laduranty */ -#ifndef SAM0_ETH_NETDEV_H -#define SAM0_ETH_NETDEV_H #include @@ -53,5 +53,4 @@ void sam0_eth_setup(netdev_t* dev); } #endif -#endif /* SAM0_ETH_NETDEV_H */ /** @} */ diff --git a/cpu/sam_common/include/cpu_conf.h b/cpu/sam_common/include/cpu_conf.h index 8aae7203dc69..6d6cd1a6f2bc 100644 --- a/cpu/sam_common/include/cpu_conf.h +++ b/cpu/sam_common/include/cpu_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_sam_common * @brief Implementation specific CPU configuration options @@ -17,8 +19,6 @@ * @author Sebastian Meiling */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include "cpu_conf_common.h" #include "vendor/sam.h" @@ -41,5 +41,4 @@ extern "C" { } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/sam_common/include/periph_cpu_common.h b/cpu/sam_common/include/periph_cpu_common.h index 688f2c9c9629..5958e6038909 100644 --- a/cpu/sam_common/include/periph_cpu_common.h +++ b/cpu/sam_common/include/periph_cpu_common.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_sam_common * @brief Common CPU specific definitions for all SAM3/SAM4x based CPUs @@ -17,8 +19,6 @@ * @author Dylan Laduranty */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include "cpu.h" @@ -130,5 +130,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/stm32/dist/clk_conf/clk_conf.h b/cpu/stm32/dist/clk_conf/clk_conf.h index cdc45b720690..ac0bd73705ab 100644 --- a/cpu/stm32/dist/clk_conf/clk_conf.h +++ b/cpu/stm32/dist/clk_conf/clk_conf.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @brief Compute clock constants for STM32F[2|4|7] CPUs * @@ -14,8 +16,6 @@ * @{ */ -#ifndef CLK_CONF_H -#define CLK_CONF_H #include @@ -655,5 +655,4 @@ static const clk_cfg_t stm32_mp_clk_cfg[] = { } #endif -#endif /* CLK_CONF_H */ /** @} */ diff --git a/cpu/stm32/include/can_params.h b/cpu/stm32/include/can_params.h index bbf5ab485b55..770f972a4d5f 100644 --- a/cpu/stm32/include/can_params.h +++ b/cpu/stm32/include/can_params.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup candev_stm32 * @{ @@ -17,8 +19,6 @@ * @} */ -#ifndef CAN_PARAMS_H -#define CAN_PARAMS_H #include "can/device.h" #include "periph/can.h" @@ -162,5 +162,3 @@ static const candev_params_t candev_params[] = { #ifdef __cplusplus } #endif - -#endif /* CAN_PARAMS_H */ diff --git a/cpu/stm32/include/candev_stm32.h b/cpu/stm32/include/candev_stm32.h index 5e6a67fccbf0..b73ec3367461 100644 --- a/cpu/stm32/include/candev_stm32.h +++ b/cpu/stm32/include/candev_stm32.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_stm32 * @ingroup drivers_can @@ -28,8 +30,6 @@ * @} */ -#ifndef CANDEV_STM32_H -#define CANDEV_STM32_H #ifdef __cplusplus extern "C" { @@ -199,5 +199,3 @@ void candev_stm32_set_pins(can_t *dev, gpio_t tx_pin, gpio_t rx_pin); #ifdef __cplusplus } #endif - -#endif /* CANDEV_STM32_H */ diff --git a/cpu/stm32/include/clk/c0/cfg_clock_default.h b/cpu/stm32/include/clk/c0/cfg_clock_default.h index 6b3975886450..c9f21216c470 100644 --- a/cpu/stm32/include/clk/c0/cfg_clock_default.h +++ b/cpu/stm32/include/clk/c0/cfg_clock_default.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Jason Parker */ -#ifndef CLK_C0_CFG_CLOCK_DEFAULT_H -#define CLK_C0_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_fx_gx_mp1_c0.h" #include "kernel_defines.h" @@ -66,5 +66,4 @@ extern "C" { } #endif -#endif /* CLK_C0_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/cfg_clock_common_fx_gx_mp1_c0.h b/cpu/stm32/include/clk/cfg_clock_common_fx_gx_mp1_c0.h index 7d0d59b2823c..f0588fa4b7ea 100644 --- a/cpu/stm32/include/clk/cfg_clock_common_fx_gx_mp1_c0.h +++ b/cpu/stm32/include/clk/cfg_clock_common_fx_gx_mp1_c0.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_CFG_CLOCK_COMMON_FX_GX_MP1_C0_H -#define CLK_CFG_CLOCK_COMMON_FX_GX_MP1_C0_H #include "kernel_defines.h" @@ -89,5 +89,4 @@ extern "C" { } #endif -#endif /* CLK_CFG_CLOCK_COMMON_FX_GX_MP1_C0_H */ /** @} */ diff --git a/cpu/stm32/include/clk/cfg_clock_common_lx_u5_wx.h b/cpu/stm32/include/clk/cfg_clock_common_lx_u5_wx.h index bd6b0ef9ece0..346cd92909ce 100644 --- a/cpu/stm32/include/clk/cfg_clock_common_lx_u5_wx.h +++ b/cpu/stm32/include/clk/cfg_clock_common_lx_u5_wx.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_CFG_CLOCK_COMMON_LX_U5_WX_H -#define CLK_CFG_CLOCK_COMMON_LX_U5_WX_H #include "kernel_defines.h" @@ -92,5 +92,4 @@ extern "C" { } #endif -#endif /* CLK_CFG_CLOCK_COMMON_LX_U5_WX_H */ /** @} */ diff --git a/cpu/stm32/include/clk/clk_conf.h b/cpu/stm32/include/clk/clk_conf.h index c1636444a79d..acd898d3f5df 100644 --- a/cpu/stm32/include/clk/clk_conf.h +++ b/cpu/stm32/include/clk/clk_conf.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_CLK_CONF_H -#define CLK_CLK_CONF_H #if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F1) || \ defined(CPU_FAM_STM32F3) @@ -50,5 +50,4 @@ extern "C" { } #endif -#endif /* CLK_CLK_CONF_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f0f1f3/cfg_clock_default.h b/cpu/stm32/include/clk/f0f1f3/cfg_clock_default.h index 48df118e2fb2..d43fa1331115 100644 --- a/cpu/stm32/include/clk/f0f1f3/cfg_clock_default.h +++ b/cpu/stm32/include/clk/f0f1f3/cfg_clock_default.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -23,8 +25,6 @@ * */ -#ifndef CLK_F0F1F3_CFG_CLOCK_DEFAULT_H -#define CLK_F0F1F3_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_fx_gx_mp1_c0.h" #include "kernel_defines.h" @@ -145,5 +145,4 @@ extern "C" { } #endif -#endif /* CLK_F0F1F3_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default.h b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default.h index d9cd275c9b9e..72b5b73bb7be 100644 --- a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default.h +++ b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_F2F4F7_CFG_CLOCK_DEFAULT_H -#define CLK_F2F4F7_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_fx_gx_mp1_c0.h" #include "kernel_defines.h" @@ -87,5 +87,4 @@ extern "C" { } #endif -#endif /* CLK_F2F4F7_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_100.h b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_100.h index 873413a80cf2..f51b021736a0 100644 --- a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_100.h +++ b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_100.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_F2F4F7_CFG_CLOCK_DEFAULT_100_H -#define CLK_F2F4F7_CFG_CLOCK_DEFAULT_100_H #include "kernel_defines.h" #include "macros/units.h" @@ -97,5 +97,4 @@ extern "C" { } #endif -#endif /* CLK_F2F4F7_CFG_CLOCK_DEFAULT_100_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_120.h b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_120.h index 6424db0ef021..ad469100c45d 100644 --- a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_120.h +++ b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_120.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_F2F4F7_CFG_CLOCK_DEFAULT_120_H -#define CLK_F2F4F7_CFG_CLOCK_DEFAULT_120_H #include "kernel_defines.h" #include "macros/units.h" @@ -74,5 +74,4 @@ extern "C" { } #endif -#endif /* CLK_F2F4F7_CFG_CLOCK_DEFAULT_120_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_180.h b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_180.h index ab74b945ba2b..ae6d098ee2f1 100644 --- a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_180.h +++ b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_180.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_F2F4F7_CFG_CLOCK_DEFAULT_180_H -#define CLK_F2F4F7_CFG_CLOCK_DEFAULT_180_H #include "kernel_defines.h" #include "macros/units.h" @@ -112,5 +112,4 @@ extern "C" { } #endif -#endif /* CLK_F2F4F7_CFG_CLOCK_DEFAULT_180_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_216.h b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_216.h index 47921c51967a..6b0c01faffdd 100644 --- a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_216.h +++ b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_216.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_F2F4F7_CFG_CLOCK_DEFAULT_216_H -#define CLK_F2F4F7_CFG_CLOCK_DEFAULT_216_H #include "kernel_defines.h" #include "macros/units.h" @@ -83,5 +83,4 @@ extern "C" { } #endif -#endif /* CLK_F2F4F7_CFG_CLOCK_DEFAULT_216_H */ /** @} */ diff --git a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_84.h b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_84.h index bc7f57d39fcd..dfc2d2c22a76 100644 --- a/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_84.h +++ b/cpu/stm32/include/clk/f2f4f7/cfg_clock_default_84.h @@ -8,6 +8,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_F2F4F7_CFG_CLOCK_DEFAULT_84_H -#define CLK_F2F4F7_CFG_CLOCK_DEFAULT_84_H #include "kernel_defines.h" #include "macros/units.h" @@ -83,5 +83,4 @@ extern "C" { } #endif -#endif /* CLK_F2F4F7_CFG_CLOCK_DEFAULT_84_H */ /** @} */ diff --git a/cpu/stm32/include/clk/g0g4/cfg_clock_default.h b/cpu/stm32/include/clk/g0g4/cfg_clock_default.h index 6d3be7793821..eddcd5ab9926 100644 --- a/cpu/stm32/include/clk/g0g4/cfg_clock_default.h +++ b/cpu/stm32/include/clk/g0g4/cfg_clock_default.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -20,8 +22,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_G0G4_CFG_CLOCK_DEFAULT_H -#define CLK_G0G4_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_fx_gx_mp1_c0.h" #include "kernel_defines.h" @@ -120,5 +120,4 @@ extern "C" { } #endif -#endif /* CLK_G0G4_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/l0l1/cfg_clock_default.h b/cpu/stm32/include/clk/l0l1/cfg_clock_default.h index db02568c1919..f49e05543e6e 100644 --- a/cpu/stm32/include/clk/l0l1/cfg_clock_default.h +++ b/cpu/stm32/include/clk/l0l1/cfg_clock_default.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_L0L1_CFG_CLOCK_DEFAULT_H -#define CLK_L0L1_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_lx_u5_wx.h" #include "kernel_defines.h" @@ -96,5 +96,4 @@ extern "C" { } #endif -#endif /* CLK_L0L1_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/l4l5wx/cfg_clock_default.h b/cpu/stm32/include/clk/l4l5wx/cfg_clock_default.h index a10365ac9396..fd505e4a0739 100644 --- a/cpu/stm32/include/clk/l4l5wx/cfg_clock_default.h +++ b/cpu/stm32/include/clk/l4l5wx/cfg_clock_default.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_L4L5WX_CFG_CLOCK_DEFAULT_H -#define CLK_L4L5WX_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_lx_u5_wx.h" #include "kernel_defines.h" @@ -185,5 +185,4 @@ extern "C" { } #endif -#endif /* CLK_L4L5WX_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/mp1/cfg_clock_default.h b/cpu/stm32/include/clk/mp1/cfg_clock_default.h index 44b5254ed315..ce4eea576afc 100644 --- a/cpu/stm32/include/clk/mp1/cfg_clock_default.h +++ b/cpu/stm32/include/clk/mp1/cfg_clock_default.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Gilles DOFFE */ -#ifndef CLK_MP1_CFG_CLOCK_DEFAULT_H -#define CLK_MP1_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_fx_gx_mp1_c0.h" #include "kernel_defines.h" @@ -115,5 +115,4 @@ extern "C" { } #endif -#endif /* CLK_MP1_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/clk/u5/cfg_clock_default.h b/cpu/stm32/include/clk/u5/cfg_clock_default.h index 4b2f94252d86..c82af2a2f17b 100644 --- a/cpu/stm32/include/clk/u5/cfg_clock_default.h +++ b/cpu/stm32/include/clk/u5/cfg_clock_default.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Alexandre Abadie */ -#ifndef CLK_U5_CFG_CLOCK_DEFAULT_H -#define CLK_U5_CFG_CLOCK_DEFAULT_H #include "cfg_clock_common_lx_u5_wx.h" #include "kernel_defines.h" @@ -130,5 +130,4 @@ extern "C" { } #endif -#endif /* CLK_U5_CFG_CLOCK_DEFAULT_H */ /** @} */ diff --git a/cpu/stm32/include/cpu_conf.h b/cpu/stm32/include/cpu_conf.h index d7785a38c92a..1dd0264ef7ba 100644 --- a/cpu/stm32/include/cpu_conf.h +++ b/cpu/stm32/include/cpu_conf.h @@ -7,6 +7,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Alexandre Abadie */ -#ifndef CPU_CONF_H -#define CPU_CONF_H #include #include "cpu_conf_common.h" @@ -259,5 +259,4 @@ typedef uint16_t stm32_flashpage_block_t; } #endif -#endif /* CPU_CONF_H */ /** @} */ diff --git a/cpu/stm32/include/fdcandev_stm32.h b/cpu/stm32/include/fdcandev_stm32.h index 6473d20418b3..bacf2b3c3a74 100644 --- a/cpu/stm32/include/fdcandev_stm32.h +++ b/cpu/stm32/include/fdcandev_stm32.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @ingroup drivers_can @@ -28,8 +30,6 @@ * @} */ -#ifndef FDCANDEV_STM32_H -#define FDCANDEV_STM32_H #ifdef __cplusplus extern "C" { @@ -423,5 +423,3 @@ void candev_stm32_set_pins(can_t *dev, gpio_t tx_pin, gpio_t rx_pin, #ifdef __cplusplus } #endif - -#endif /* FDCANDEV_STM32_H */ diff --git a/cpu/stm32/include/gpio_ll_arch.h b/cpu/stm32/include/gpio_ll_arch.h index 429dfee91831..5b769aa75be6 100644 --- a/cpu/stm32/include/gpio_ll_arch.h +++ b/cpu/stm32/include/gpio_ll_arch.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @ingroup drivers_periph_gpio_ll @@ -19,8 +21,6 @@ * @author Vincent Dupont */ -#ifndef GPIO_LL_ARCH_H -#define GPIO_LL_ARCH_H #include "architecture.h" #include "periph_cpu.h" @@ -283,5 +283,4 @@ static inline bool is_gpio_port_num_valid(uint_fast8_t num) } #endif -#endif /* GPIO_LL_ARCH_H */ /** @} */ diff --git a/cpu/stm32/include/lcd_fmc.h b/cpu/stm32/include/lcd_fmc.h index c95b95126f1c..8509209248c2 100644 --- a/cpu/stm32/include/lcd_fmc.h +++ b/cpu/stm32/include/lcd_fmc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_stm32_lcd_fmc STM32 FMC/FSMC LCD low-level parallel interface driver * @ingroup cpu_stm32 @@ -13,8 +15,6 @@ * @{ */ -#ifndef LCD_FMC_H -#define LCD_FMC_H #ifdef __cplusplus extern "C" { @@ -56,5 +56,4 @@ typedef struct { } #endif -#endif /* LCD_FMC_H */ /** @} */ diff --git a/cpu/stm32/include/periph/c0/periph_cpu.h b/cpu/stm32/include/periph/c0/periph_cpu.h index ab6e7cf69b04..caf4822cf269 100644 --- a/cpu/stm32/include/periph/c0/periph_cpu.h +++ b/cpu/stm32/include/periph/c0/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Jason Parker */ -#ifndef PERIPH_C0_PERIPH_CPU_H -#define PERIPH_C0_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -60,5 +60,4 @@ typedef enum { } #endif -#endif /* PERIPH_C0_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_backup_ram.h b/cpu/stm32/include/periph/cpu_backup_ram.h index 0f5c0c9f0ecf..950e227cd945 100644 --- a/cpu/stm32/include/periph/cpu_backup_ram.h +++ b/cpu/stm32/include/periph/cpu_backup_ram.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Fabian Hüßler */ -#ifndef PERIPH_CPU_BACKUP_RAM_H -#define PERIPH_CPU_BACKUP_RAM_H #ifdef __cplusplus extern "C" { @@ -42,5 +42,4 @@ bool cpu_woke_from_backup(void); } #endif -#endif /* PERIPH_CPU_BACKUP_RAM_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_common.h b/cpu/stm32/include/periph/cpu_common.h index 89094f07273a..0aa38057cff4 100644 --- a/cpu/stm32/include/periph/cpu_common.h +++ b/cpu/stm32/include/periph/cpu_common.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_COMMON_H -#define PERIPH_CPU_COMMON_H #include @@ -268,5 +268,4 @@ void periph_lpclk_dis(bus_t bus, uint32_t mask); } #endif -#endif /* PERIPH_CPU_COMMON_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_dma.h b/cpu/stm32/include/periph/cpu_dma.h index 4a0ad7082e7b..6de19be90e9b 100644 --- a/cpu/stm32/include/periph/cpu_dma.h +++ b/cpu/stm32/include/periph/cpu_dma.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -19,8 +21,6 @@ * @author Joshua DeWeese */ -#ifndef PERIPH_CPU_DMA_H -#define PERIPH_CPU_DMA_H #ifdef __cplusplus extern "C" { @@ -270,5 +270,4 @@ void dma_prepare(dma_t dma, void *mem, size_t len, bool incr_mem); } #endif -#endif /* PERIPH_CPU_DMA_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_eth.h b/cpu/stm32/include/periph/cpu_eth.h index c2888f502c2b..c0395c5d7686 100644 --- a/cpu/stm32/include/periph/cpu_eth.h +++ b/cpu/stm32/include/periph/cpu_eth.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_ETH_H -#define PERIPH_CPU_ETH_H #include @@ -165,5 +165,4 @@ void stm32_eth_common_init(void); } #endif -#endif /* PERIPH_CPU_ETH_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_fmc.h b/cpu/stm32/include/periph/cpu_fmc.h index 221d4de820ab..a92543757bd4 100644 --- a/cpu/stm32/include/periph/cpu_fmc.h +++ b/cpu/stm32/include/periph/cpu_fmc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_stm32_periph_fmc STM32 FMC/FSMC peripheral driver * @ingroup cpu_stm32 @@ -52,8 +54,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_FMC_H -#define PERIPH_CPU_FMC_H #include @@ -376,5 +376,4 @@ typedef uint8_t fmc_bank_id_t; /**< FMC bank identifier */ } #endif -#endif /* PERIPH_CPU_FMC_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_gpio.h b/cpu/stm32/include/periph/cpu_gpio.h index fb0f3e730c2e..0fd38d83887f 100644 --- a/cpu/stm32/include/periph/cpu_gpio.h +++ b/cpu/stm32/include/periph/cpu_gpio.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_GPIO_H -#define PERIPH_CPU_GPIO_H #include #include "cpu.h" @@ -226,5 +226,4 @@ void gpio_init_analog(gpio_t pin); } #endif -#endif /* PERIPH_CPU_GPIO_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_gpio_ll.h b/cpu/stm32/include/periph/cpu_gpio_ll.h index 793f0e750f26..c0fd0df94faa 100644 --- a/cpu/stm32/include/periph/cpu_gpio_ll.h +++ b/cpu/stm32/include/periph/cpu_gpio_ll.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Marian Buschsieweke */ -#ifndef PERIPH_CPU_GPIO_LL_H -#define PERIPH_CPU_GPIO_LL_H #include #include @@ -195,5 +195,4 @@ union gpio_conf_stm32 { } #endif -#endif /* PERIPH_CPU_GPIO_LL_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_i2c.h b/cpu/stm32/include/periph/cpu_i2c.h index 53f864faaddc..a05c8f4912a1 100644 --- a/cpu/stm32/include/periph/cpu_i2c.h +++ b/cpu/stm32/include/periph/cpu_i2c.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_I2C_H -#define PERIPH_CPU_I2C_H #include @@ -179,5 +179,4 @@ static const i2c_timing_param_t timing_params[] = { } #endif -#endif /* PERIPH_CPU_I2C_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_ltdc.h b/cpu/stm32/include/periph/cpu_ltdc.h index 02c0c6b64c61..348d6a2b5774 100644 --- a/cpu/stm32/include/periph/cpu_ltdc.h +++ b/cpu/stm32/include/periph/cpu_ltdc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Alexandre Abadie */ -#ifndef PERIPH_CPU_LTDC_H -#define PERIPH_CPU_LTDC_H #include @@ -92,5 +92,4 @@ void ltdc_fill(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2, const uint16_ } #endif -#endif /* PERIPH_CPU_LTDC_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_pm.h b/cpu/stm32/include/periph/cpu_pm.h index 70ca505c667b..1fb7aef22f9e 100644 --- a/cpu/stm32/include/periph/cpu_pm.h +++ b/cpu/stm32/include/periph/cpu_pm.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_PM_H -#define PERIPH_CPU_PM_H #ifdef __cplusplus extern "C" { @@ -71,5 +71,4 @@ void pm_backup_regulator_off(void); } #endif -#endif /* PERIPH_CPU_PM_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_pwm.h b/cpu/stm32/include/periph/cpu_pwm.h index f22c1048f046..056bed80004d 100644 --- a/cpu/stm32/include/periph/cpu_pwm.h +++ b/cpu/stm32/include/periph/cpu_pwm.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_PWM_H -#define PERIPH_CPU_PWM_H #include @@ -71,5 +71,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_PWM_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_qdec.h b/cpu/stm32/include/periph/cpu_qdec.h index cf5dbe3250a1..72ff5427d03e 100644 --- a/cpu/stm32/include/periph/cpu_qdec.h +++ b/cpu/stm32/include/periph/cpu_qdec.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_QDEC_H -#define PERIPH_CPU_QDEC_H #include @@ -66,5 +66,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_QDEC_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_sdmmc.h b/cpu/stm32/include/periph/cpu_sdmmc.h index 4048c55655b6..2ea3d0c027ae 100644 --- a/cpu/stm32/include/periph/cpu_sdmmc.h +++ b/cpu/stm32/include/periph/cpu_sdmmc.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Gunar Schorcht */ -#ifndef PERIPH_CPU_SDMMC_H -#define PERIPH_CPU_SDMMC_H #include @@ -96,5 +96,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_SDMMC_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_spi.h b/cpu/stm32/include/periph/cpu_spi.h index 5d8c1a675de8..5ca8f3afc88c 100644 --- a/cpu/stm32/include/periph/cpu_spi.h +++ b/cpu/stm32/include/periph/cpu_spi.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_SPI_H -#define PERIPH_CPU_SPI_H #include @@ -135,5 +135,4 @@ gpio_t spi_pin_clk(spi_t bus); } #endif -#endif /* PERIPH_CPU_SPI_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_timer.h b/cpu/stm32/include/periph/cpu_timer.h index 252be33e7051..c4e73cc643a8 100644 --- a/cpu/stm32/include/periph/cpu_timer.h +++ b/cpu/stm32/include/periph/cpu_timer.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_TIMER_H -#define PERIPH_CPU_TIMER_H #include @@ -61,5 +61,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_TIMER_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_uart.h b/cpu/stm32/include/periph/cpu_uart.h index ecc45aaaa93c..30eaf487cc81 100644 --- a/cpu/stm32/include/periph/cpu_uart.h +++ b/cpu/stm32/include/periph/cpu_uart.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_UART_H -#define PERIPH_CPU_UART_H #include @@ -138,5 +138,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_UART_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_usbdev.h b/cpu/stm32/include/periph/cpu_usbdev.h index bd978c9422f5..49eadc07a4e7 100644 --- a/cpu/stm32/include/periph/cpu_usbdev.h +++ b/cpu/stm32/include/periph/cpu_usbdev.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_USBDEV_H -#define PERIPH_CPU_USBDEV_H #include @@ -57,5 +57,4 @@ typedef struct { } #endif -#endif /* PERIPH_CPU_USBDEV_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_vbat.h b/cpu/stm32/include/periph/cpu_vbat.h index 082d6a14b496..4acfd0aee8d7 100644 --- a/cpu/stm32/include/periph/cpu_vbat.h +++ b/cpu/stm32/include/periph/cpu_vbat.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Fabian Hüßler */ -#ifndef PERIPH_CPU_VBAT_H -#define PERIPH_CPU_VBAT_H #ifdef __cplusplus extern "C" { @@ -37,5 +37,4 @@ void vbat_disable(void); } #endif -#endif /* PERIPH_CPU_VBAT_H */ /** @} */ diff --git a/cpu/stm32/include/periph/cpu_wdt.h b/cpu/stm32/include/periph/cpu_wdt.h index 86a774bbf9d0..c269a4f9c148 100644 --- a/cpu/stm32/include/periph/cpu_wdt.h +++ b/cpu/stm32/include/periph/cpu_wdt.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_WDT_H -#define PERIPH_CPU_WDT_H #include "timex.h" #include "periph/cpu_common.h" @@ -53,5 +53,4 @@ extern "C" { } #endif -#endif /* PERIPH_CPU_WDT_H */ /** @} */ diff --git a/cpu/stm32/include/periph/f0/periph_cpu.h b/cpu/stm32/include/periph/f0/periph_cpu.h index 9323084b3adf..4eb699d1bb2f 100644 --- a/cpu/stm32/include/periph/f0/periph_cpu.h +++ b/cpu/stm32/include/periph/f0/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_F0_PERIPH_CPU_H -#define PERIPH_F0_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -76,5 +76,4 @@ typedef enum { } #endif -#endif /* PERIPH_F0_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/f1/periph_cpu.h b/cpu/stm32/include/periph/f1/periph_cpu.h index 9a4d33608b17..c52d427dc017 100644 --- a/cpu/stm32/include/periph/f1/periph_cpu.h +++ b/cpu/stm32/include/periph/f1/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_F1_PERIPH_CPU_H -#define PERIPH_F1_PERIPH_CPU_H #include "cpu_conf.h" @@ -172,5 +172,4 @@ static inline void afio_mapr_write(uint32_t new_value) } #endif -#endif /* PERIPH_F1_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/f2/periph_cpu.h b/cpu/stm32/include/periph/f2/periph_cpu.h index a43eebeb9628..af668a9ac169 100644 --- a/cpu/stm32/include/periph/f2/periph_cpu.h +++ b/cpu/stm32/include/periph/f2/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Aurelien Gonce */ -#ifndef PERIPH_F2_PERIPH_CPU_H -#define PERIPH_F2_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -77,5 +77,4 @@ typedef enum { } #endif -#endif /* PERIPH_F2_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/f3/periph_cpu.h b/cpu/stm32/include/periph/f3/periph_cpu.h index 03afd1fa4b8f..6eb8f5900a12 100644 --- a/cpu/stm32/include/periph/f3/periph_cpu.h +++ b/cpu/stm32/include/periph/f3/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_F3_PERIPH_CPU_H -#define PERIPH_F3_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -84,5 +84,4 @@ typedef enum { } #endif -#endif /* PERIPH_F3_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/f4/periph_cpu.h b/cpu/stm32/include/periph/f4/periph_cpu.h index d57130610e68..8708eb86ea79 100644 --- a/cpu/stm32/include/periph/f4/periph_cpu.h +++ b/cpu/stm32/include/periph/f4/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -16,8 +18,6 @@ * @author Hauke Petersen */ -#ifndef PERIPH_F4_PERIPH_CPU_H -#define PERIPH_F4_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -84,5 +84,4 @@ typedef enum { } #endif -#endif /* PERIPH_F4_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/f7/periph_cpu.h b/cpu/stm32/include/periph/f7/periph_cpu.h index 043a3906ad05..a83e937fed24 100644 --- a/cpu/stm32/include/periph/f7/periph_cpu.h +++ b/cpu/stm32/include/periph/f7/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_F7_PERIPH_CPU_H -#define PERIPH_F7_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -72,5 +72,4 @@ typedef enum { } #endif -#endif /* PERIPH_F7_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/g0/periph_cpu.h b/cpu/stm32/include/periph/g0/periph_cpu.h index ce04edd5c4f8..3a0c52600752 100644 --- a/cpu/stm32/include/periph/g0/periph_cpu.h +++ b/cpu/stm32/include/periph/g0/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_G0_PERIPH_CPU_H -#define PERIPH_G0_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -69,5 +69,4 @@ typedef enum { } #endif -#endif /* PERIPH_G0_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/g4/periph_cpu.h b/cpu/stm32/include/periph/g4/periph_cpu.h index ad86b3ae7f78..64d2e6e51e60 100644 --- a/cpu/stm32/include/periph/g4/periph_cpu.h +++ b/cpu/stm32/include/periph/g4/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_G4_PERIPH_CPU_H -#define PERIPH_G4_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -46,5 +46,4 @@ extern "C" { } #endif -#endif /* PERIPH_G4_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/l0/periph_cpu.h b/cpu/stm32/include/periph/l0/periph_cpu.h index 8dd8510cbfb0..7e90436e2c4b 100644 --- a/cpu/stm32/include/periph/l0/periph_cpu.h +++ b/cpu/stm32/include/periph/l0/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -19,8 +21,6 @@ * */ -#ifndef PERIPH_L0_PERIPH_CPU_H -#define PERIPH_L0_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -77,5 +77,4 @@ typedef enum { } #endif -#endif /* PERIPH_L0_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/l1/periph_cpu.h b/cpu/stm32/include/periph/l1/periph_cpu.h index 3893860340c9..b9391fa954a6 100644 --- a/cpu/stm32/include/periph/l1/periph_cpu.h +++ b/cpu/stm32/include/periph/l1/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Katja Kirstein */ -#ifndef PERIPH_L1_PERIPH_CPU_H -#define PERIPH_L1_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -73,5 +73,4 @@ typedef enum { } #endif -#endif /* PERIPH_L1_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/l4/periph_cpu.h b/cpu/stm32/include/periph/l4/periph_cpu.h index 768952f283f5..7e8a68c7915f 100644 --- a/cpu/stm32/include/periph/l4/periph_cpu.h +++ b/cpu/stm32/include/periph/l4/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_L4_PERIPH_CPU_H -#define PERIPH_L4_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -84,5 +84,4 @@ typedef enum { } #endif -#endif /* PERIPH_L4_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/l5/periph_cpu.h b/cpu/stm32/include/periph/l5/periph_cpu.h index 3d47d6a667e8..952fe5f65d15 100644 --- a/cpu/stm32/include/periph/l5/periph_cpu.h +++ b/cpu/stm32/include/periph/l5/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_L5_PERIPH_CPU_H -#define PERIPH_L5_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -46,5 +46,4 @@ extern "C" { } #endif -#endif /* PERIPH_L5_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/u5/periph_cpu.h b/cpu/stm32/include/periph/u5/periph_cpu.h index bdc4c279b6a8..faefaa0beca4 100644 --- a/cpu/stm32/include/periph/u5/periph_cpu.h +++ b/cpu/stm32/include/periph/u5/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_U5_PERIPH_CPU_H -#define PERIPH_U5_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -46,5 +46,4 @@ extern "C" { } #endif -#endif /* PERIPH_U5_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/wb/periph_cpu.h b/cpu/stm32/include/periph/wb/periph_cpu.h index 636262b9f397..249d852ed514 100644 --- a/cpu/stm32/include/periph/wb/periph_cpu.h +++ b/cpu/stm32/include/periph/wb/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_WB_PERIPH_CPU_H -#define PERIPH_WB_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -81,5 +81,4 @@ typedef enum { } #endif -#endif /* PERIPH_WB_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph/wl/periph_cpu.h b/cpu/stm32/include/periph/wl/periph_cpu.h index ad63d8945941..aed7b479f707 100644 --- a/cpu/stm32/include/periph/wl/periph_cpu.h +++ b/cpu/stm32/include/periph/wl/periph_cpu.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -17,8 +19,6 @@ * */ -#ifndef PERIPH_WL_PERIPH_CPU_H -#define PERIPH_WL_PERIPH_CPU_H #ifdef __cplusplus extern "C" { @@ -160,5 +160,4 @@ typedef enum { } #endif -#endif /* PERIPH_WL_PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/periph_cpu.h b/cpu/stm32/include/periph_cpu.h index 0207019da87a..7160d80cf5cb 100644 --- a/cpu/stm32/include/periph_cpu.h +++ b/cpu/stm32/include/periph_cpu.h @@ -7,6 +7,8 @@ * directory for more details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -18,8 +20,6 @@ * @author Vincent Dupont */ -#ifndef PERIPH_CPU_H -#define PERIPH_CPU_H #include @@ -213,5 +213,4 @@ typedef enum { } #endif -#endif /* PERIPH_CPU_H */ /** @} */ diff --git a/cpu/stm32/include/stmclk.h b/cpu/stm32/include/stmclk.h index b949f41a8a10..887487d8ac7e 100644 --- a/cpu/stm32/include/stmclk.h +++ b/cpu/stm32/include/stmclk.h @@ -6,6 +6,8 @@ * details. */ +#pragma once + /** * @ingroup cpu_stm32 * @{ @@ -19,8 +21,6 @@ * @author Hauke Petersen */ -#ifndef STMCLK_H -#define STMCLK_H #include @@ -98,5 +98,4 @@ bool stmclk_dbp_is_locked(void); } #endif -#endif /* STMCLK_H */ /** @} */ diff --git a/cpu/stm32/include/tinyusb_hw_defaults.h b/cpu/stm32/include/tinyusb_hw_defaults.h index a7a0a51eeb70..08a3ed197742 100644 --- a/cpu/stm32/include/tinyusb_hw_defaults.h +++ b/cpu/stm32/include/tinyusb_hw_defaults.h @@ -20,6 +20,8 @@ * THE SOFTWARE. */ +#pragma once + /** * @ingroup pkg_tinyusb * @ingroup cpu_stm32 @@ -31,8 +33,6 @@ * @author Gunar Schorcht */ -#ifndef TINYUSB_HW_DEFAULTS_H -#define TINYUSB_HW_DEFAULTS_H #include "periph_conf.h" @@ -137,5 +137,4 @@ extern "C" { #endif #endif /* !DOXYGEN */ -#endif /* TINYUSB_HW_DEFAULTS_H */ /** @} */ diff --git a/cpu/stm32/include/usbdev_stm32.h b/cpu/stm32/include/usbdev_stm32.h index be9de98732ef..0f06e1f014a5 100644 --- a/cpu/stm32/include/usbdev_stm32.h +++ b/cpu/stm32/include/usbdev_stm32.h @@ -6,6 +6,8 @@ * directory for more details. */ +#pragma once + /** * @defgroup cpu_stm32_usbdev stm32 USB OTG FS/HS peripheral * @ingroup cpu_stm32 @@ -35,8 +37,6 @@ * @author Koen Zandberg */ -#ifndef USBDEV_STM32_H -#define USBDEV_STM32_H #include #include @@ -128,5 +128,4 @@ typedef struct { #ifdef __cplusplus } #endif -#endif /* USBDEV_STM32_H */ /** @} */