From 1d1d5da43f86d9dded47c66afec94991d623f114 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 26 Dec 2020 15:56:11 +1100 Subject: Change include guards in tmk_core/ and drivers/ to pragma once (#11240) --- tmk_core/protocol/chibios/usb_driver.h | 43 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'tmk_core/protocol/chibios/usb_driver.h') 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 +#include /*===========================================================================*/ /* 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 /** @} */ -- cgit v1.2.3