diff options
author | Ryan <fauxpark@gmail.com> | 2020-12-26 15:56:11 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-26 15:56:11 +1100 |
commit | 1d1d5da43f86d9dded47c66afec94991d623f114 (patch) | |
tree | 5f0d4d303a1f5dd67a3d9a19b0f99b8e3f06a4e6 /tmk_core/protocol/chibios | |
parent | 48f4768d33313e6a6ed48c31f95eb44feda10a51 (diff) |
Change include guards in tmk_core/ and drivers/ to pragma once (#11240)
Diffstat (limited to 'tmk_core/protocol/chibios')
-rw-r--r-- | tmk_core/protocol/chibios/usb_driver.h | 43 | ||||
-rw-r--r-- | tmk_core/protocol/chibios/usb_main.h | 5 |
2 files changed, 21 insertions, 27 deletions
diff --git a/tmk_core/protocol/chibios/usb_driver.h b/tmk_core/protocol/chibios/usb_driver.h index 6d71bcec4f..f94387debd 100644 --- a/tmk_core/protocol/chibios/usb_driver.h +++ b/tmk_core/protocol/chibios/usb_driver.h @@ -22,10 +22,9 @@ * @{ */ -#ifndef USB_DRIVER_H -# define USB_DRIVER_H +#pragma once -# include <hal_usb_cdc.h> +#include <hal_usb_cdc.h> /*===========================================================================*/ /* Driver constants. */ @@ -35,9 +34,9 @@ /* Derived constants and error checks. */ /*===========================================================================*/ -# if HAL_USE_USB == FALSE -# error "The USB Driver requires HAL_USE_USB" -# endif +#if HAL_USE_USB == FALSE +# error "The USB Driver requires HAL_USE_USB" +#endif /*===========================================================================*/ /* Driver data structures and types. */ @@ -112,21 +111,21 @@ typedef struct { /** * @brief @p SerialDriver specific data. */ -# define _qmk_usb_driver_data \ - _base_asynchronous_channel_data /* Driver state.*/ \ - qmkusbstate_t state; \ - /* Input buffers queue.*/ \ - input_buffers_queue_t ibqueue; \ - /* Output queue.*/ \ - output_buffers_queue_t obqueue; \ - /* End of the mandatory fields.*/ \ - /* Current configuration data.*/ \ - const QMKUSBConfig *config; +#define _qmk_usb_driver_data \ + _base_asynchronous_channel_data /* Driver state.*/ \ + qmkusbstate_t state; \ + /* Input buffers queue.*/ \ + input_buffers_queue_t ibqueue; \ + /* Output queue.*/ \ + output_buffers_queue_t obqueue; \ + /* End of the mandatory fields.*/ \ + /* Current configuration data.*/ \ + const QMKUSBConfig *config; /** * @brief @p SerialUSBDriver specific methods. */ -# define _qmk_usb_driver_methods _base_asynchronous_channel_methods +#define _qmk_usb_driver_methods _base_asynchronous_channel_methods /** * @extends BaseAsynchronousChannelVMT @@ -158,9 +157,9 @@ struct QMKUSBDriver { /* External declarations. */ /*===========================================================================*/ -# ifdef __cplusplus +#ifdef __cplusplus extern "C" { -# endif +#endif void qmkusbInit(void); void qmkusbObjectInit(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); void qmkusbStart(QMKUSBDriver *qmkusbp, const QMKUSBConfig *config); @@ -173,10 +172,8 @@ void qmkusbSOFHookI(QMKUSBDriver *qmkusbp); void qmkusbDataTransmitted(USBDriver *usbp, usbep_t ep); void qmkusbDataReceived(USBDriver *usbp, usbep_t ep); void qmkusbInterruptTransmitted(USBDriver *usbp, usbep_t ep); -# ifdef __cplusplus +#ifdef __cplusplus } -# endif - -#endif /* USB_DRIVER_H */ +#endif /** @} */ diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h index 1381d07654..eaa08d8f79 100644 --- a/tmk_core/protocol/chibios/usb_main.h +++ b/tmk_core/protocol/chibios/usb_main.h @@ -15,8 +15,7 @@ * GPL v2 or later. */ -#ifndef _USB_MAIN_H_ -#define _USB_MAIN_H_ +#pragma once // TESTING // extern uint8_t blinkLed; @@ -89,5 +88,3 @@ int8_t sendchar(uint8_t c); void console_flush_output(void); #endif /* CONSOLE_ENABLE */ - -#endif /* _USB_MAIN_H_ */ |