Skip to content

Commit

Permalink
Change all include guards to pragma once
Browse files Browse the repository at this point in the history
  • Loading branch information
Master92 committed Nov 20, 2023
1 parent db381c1 commit e2d707f
Show file tree
Hide file tree
Showing 78 changed files with 80 additions and 326 deletions.
5 changes: 1 addition & 4 deletions src/bmi270/accel_gyro.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _ACCEL_GYRO_H
#define _ACCEL_GYRO_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -24,5 +23,3 @@ float gyr_to_dps(int16_t gyr);
#ifdef __cplusplus
}
#endif

#endif //_ACCEL_GYRO_H
5 changes: 1 addition & 4 deletions src/bmi270/bmi2.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
* @brief Sensor driver for BMI2 sensor
*/

#ifndef BMI2_H_
#define BMI2_H_
#pragma once

/*! CPP guard */
#ifdef __cplusplus
Expand Down Expand Up @@ -1481,5 +1480,3 @@ int8_t bmi2_get_feat_config(uint8_t sw_page, uint8_t *feat_config, struct bmi2_d
#ifdef __cplusplus
}
#endif /* End of CPP guard */

#endif /* BMI2_H_ */
5 changes: 1 addition & 4 deletions src/bmi270/bmi270.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
* @brief Sensor driver for BMI270 sensor
*/

#ifndef BMI270_H_
#define BMI270_H_
#pragma once

/*! CPP guard */
#ifdef __cplusplus
Expand Down Expand Up @@ -416,5 +415,3 @@ int8_t bmi270_map_feat_int(const struct bmi2_sens_int_config *sens_int, uint8_t
#ifdef __cplusplus
}
#endif /* End of CPP guard */

#endif /* BMI270_H_ */
6 changes: 1 addition & 5 deletions src/bmi270/bmi2_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
*
*/

#ifndef BMI2_DEFS_H_
#define BMI2_DEFS_H_

#pragma once
/******************************************************************************/
/*! @name Header includes */
/******************************************************************************/
Expand Down Expand Up @@ -2654,5 +2652,3 @@ struct bmi2_hc_act_recg_sett
/*! Minimum segments belonging to a certain activity type */
uint16_t min_seg_conf;
};

#endif /* BMI2_DEFS_H_ */
5 changes: 1 addition & 4 deletions src/bmi270/common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _COMMON_H
#define _COMMON_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -110,5 +109,3 @@ void bmi2_error_codes_print_result(int8_t rslt);
#ifdef __cplusplus
}
#endif

#endif /* _COMMON_H */
4 changes: 1 addition & 3 deletions src/core/MadgwickAHRS.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
// 02/10/2011 SOH Madgwick Optimised for reduced CPU load
//
//=====================================================================================================
#ifndef MadgwickAHRS_h
#define MadgwickAHRS_h
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -31,7 +30,6 @@ float getYaw();
}
#endif

#endif
//=====================================================================================================
// End of file
//=====================================================================================================
5 changes: 1 addition & 4 deletions src/core/common.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __COMMON_HH__
#define __COMMON_HH__
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -38,5 +37,3 @@ extern pthread_mutex_t lvgl_mutex;
#ifdef __cplusplus
}
#endif

#endif //__COMMON_HH__
5 changes: 1 addition & 4 deletions src/core/elrs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __ELRS_H__
#define __ELRS_H__
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -89,5 +88,3 @@ void msp_channel_update();
#ifdef __cplusplus
}
#endif

#endif //__ELRS_H__
5 changes: 1 addition & 4 deletions src/core/esp32_flash.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __ESP32_FLASH_H__
#define __ESP32_FLASH_H__
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -14,5 +13,3 @@ void loader_port_close();
#ifdef __cplusplus
}
#endif

#endif //__ESP32_FLASH_H__
5 changes: 1 addition & 4 deletions src/core/ht.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __HT_C__
#define __HT_C__
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -62,5 +61,3 @@ int16_t *ht_get_channels();
#ifdef __cplusplus
}
#endif

#endif //__HT_C__
5 changes: 1 addition & 4 deletions src/core/input_device.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _INPUT_DEVICE_H
#define _INPUT_DEVICE_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -21,5 +20,3 @@ void rbtn_click(right_button_t click_type);
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/core/msp_displayport.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __MSP_DISPLAYPORT_H
#define __MSP_DISPLAYPORT_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -83,5 +82,3 @@ extern uint16_t last_rcv_seconds1;
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/core/osd.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _OSD_H
#define _OSD_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -105,5 +104,3 @@ void osd_resource_path(char *buf, const char *fmt, osd_resource_t osd_resource_t
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/core/thread.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _THREAD_H
#define _THREAD_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -23,5 +22,3 @@ int create_threads();
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/TP2825.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _TP2825_H
#define _TP2825_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -18,5 +17,3 @@ void TP2825_Set_Clamp(int);
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/dm5680.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _DM5680_H
#define _DM5680_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -64,5 +63,3 @@ void DM5680_OSD_parse(uint8_t *buf, uint8_t len);
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/dm6302.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __DM6302_H_
#define __DM6302_H_
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -43,5 +42,3 @@ void SPI_Read(uint8_t page, uint16_t addr, uint32_t *dat0, uint32_t *dat1);
#ifdef __cplusplus
}
#endif

#endif // __DM6302_H_
5 changes: 1 addition & 4 deletions src/driver/esp32.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __ESP32_H__
#define __ESP32_H__
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -22,5 +21,3 @@ void esp32_handler_timeout(); // handle a character read timeout
#ifdef __cplusplus
}
#endif

#endif //__ESP32_H__
5 changes: 1 addition & 4 deletions src/driver/fans.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _FANS_H
#define _FANS_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -22,5 +21,3 @@ extern fan_speed_t fan_speed;
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/hardware.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _HARDWARE_H
#define _HARDWARE_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -95,5 +94,3 @@ int Get_HAN_status(); // ret: 0=error; 1=ok
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/it66021.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _IT66021_H
#define _IT66021_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -18,5 +17,3 @@ void IT66021_edid();
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/it66121.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _IT66121_H
#define _IT66121_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -11,5 +10,3 @@ void IT66121_init();
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/nct75.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _NCT75_H
#define _NCT75_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -26,5 +25,3 @@ int nct_read_temperature(nct_type_t type);
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/oled.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _OLED_H
#define _OLED_H
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -30,5 +29,3 @@ void MFPGA_SetRatio(int ratio);
#ifdef __cplusplus
}
#endif

#endif
5 changes: 1 addition & 4 deletions src/driver/uart.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __UART_H_
#define __UART_H_
#pragma once

#ifdef __cplusplus
extern "C" {
Expand All @@ -19,5 +18,3 @@ int uart_write(int fd, uint8_t *data, int len);
#ifdef __cplusplus
}
#endif

#endif // __UART_H_
5 changes: 1 addition & 4 deletions src/player/adec2ao.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __ADEC2AO_H_
#define __ADEC2AO_H_
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -72,5 +71,3 @@ bool adec2ao_isEOF(Adec2AoContext_t *aa);
#ifdef __cplusplus
}
#endif

#endif /* __AI2AENC_H_ */
6 changes: 1 addition & 5 deletions src/player/appmsg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __APPMSG_H_
#define __APPMSG_H_
#pragma once

#if defined (__cplusplus)
extern "C" {
Expand Down Expand Up @@ -54,6 +53,3 @@ typedef struct
#if defined (__cplusplus)
}
#endif

#endif //__APPMSG_H_

5 changes: 1 addition & 4 deletions src/player/awdmx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __AWDMX_H_
#define __AWDMX_H_
#pragma once

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -54,5 +53,3 @@ bool awdmx_isEOF(AwdmxContext_t *dmxCtx);
#ifdef __cplusplus
}
#endif /* End of #ifdef __cplusplus */

#endif //__AWDMX_H_
6 changes: 1 addition & 5 deletions src/player/gogglemsg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __GOGGLEMSG_H_
#define __GOGGLEMSG_H_
#pragma once

#if defined (__cplusplus)
extern "C" {
Expand Down Expand Up @@ -48,6 +47,3 @@ int gogglemsg_flush( GoggleMsgType_e mtype );
#if defined (__cplusplus)
}
#endif

#endif //__GOGGLEMSG_H_

Loading

0 comments on commit e2d707f

Please sign in to comment.