Skip to content

Commit

Permalink
Add preprocessing directives to header files
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Apr 6, 2024
1 parent d6f515c commit eeb0424
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/ExtensionIOXL9555.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2022-12-27
*
*/

#pragma once

#include "REG/XL9555Constants.h"
#include "SensorCommon.tpp"
Expand Down
1 change: 1 addition & 0 deletions src/ExtensionSPI.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @date 2024-01-19
*
*/
#pragma once

#include "SensorLib.h"

Expand Down
6 changes: 2 additions & 4 deletions src/REG/BMA423Constants.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __BAM423_CONSTANT_H_
#define __BAM423_CONSTANT_H_
#pragma once


#define BMA423_SLAVE_ADDRESS (0x19)

Expand Down Expand Up @@ -724,5 +724,3 @@ static const unsigned char bma423_config_file[] = {
#define BMA423_WAKEUP_INT (0x20)
#define BMA423_ANY_NO_MOTION_INT (0x40)
#define BMA423_ERROR_INT (0x80)

#endif
1 change: 1 addition & 0 deletions src/REG/LTR533Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @author Lewis He (lewishe@outlook.com)
* @date 2023-09-09
*/
#pragma once

#define LTR553_SLAVE_ADDRESS (0x23)

Expand Down
2 changes: 1 addition & 1 deletion src/SensorBMA423.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @note Most source code references come from the https://github.com/boschsensortec/BMA423-Sensor-API
* Simplification for Arduino
*/

#pragma once

#include "REG/BMA423Constants.h"
#include "SensorCommon.tpp"
Expand Down
1 change: 1 addition & 0 deletions src/SensorBMM150.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @note Most source code references come from the https://github.com/boschsensortec/BMM150-Sensor-API
* Simplification for Arduino
*/
#pragma once

#include "bosch/common/bosch_interfaces.h"
#include "bosch/BMM150/bmm150.h"
Expand Down
2 changes: 1 addition & 1 deletion src/SensorCM32181.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2023-04-14
*
*/

#pragma once

#include "REG/CM32181Constants.h"
#include "SensorCommon.tpp"
Expand Down
1 change: 1 addition & 0 deletions src/SensorDRV2605.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @date 2023-04-03
* @note Source code from https://github.com/adafruit/Adafruit_DRV2605_Library
*/
#pragma once

#include "REG/DRV2605Constants.h"
#include "SensorCommon.tpp"
Expand Down
2 changes: 2 additions & 0 deletions src/SensorLTR553.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* @date 2023-09-09
*
*/
#pragma once

#include "REG/LTR533Constants.h"
#include "SensorCommon.tpp"

Expand Down
3 changes: 1 addition & 2 deletions src/SensorPCF85063.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
* @date 2023-09-07
*
*/


#pragma once
#include "REG/PCF85063Constants.h"
#include "SensorCommon.tpp"
#include "SensorRTC.h"
Expand Down
2 changes: 1 addition & 1 deletion src/SensorPCF8563.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2022-12-09
*
*/

#pragma once

#include "REG/PCF8563Constants.h"
#include "SensorCommon.tpp"
Expand Down
2 changes: 1 addition & 1 deletion src/SensorQMC6310.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2022-10-16
*
*/

#pragma once

#include "REG/QMC6310Constants.h"
#include "SensorCommon.tpp"
Expand Down
1 change: 1 addition & 0 deletions src/SensorQMI8658.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @date 2022-10-16
*
*/
#pragma once

#include "REG/QMI8658Constants.h"
#include "SensorCommon.tpp"
Expand Down
2 changes: 2 additions & 0 deletions src/SensorRTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* @date 2023-09-07
*
*/
#pragma once

#ifdef ARDUINO
#include <Arduino.h>
#else
Expand Down
1 change: 1 addition & 0 deletions src/SensorWireHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @date 2023-09-10
*
*/
#pragma once

#if defined(ARDUINO)
#include <Arduino.h>
Expand Down
2 changes: 1 addition & 1 deletion src/TouchDrvCHSC5816.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2023-04-12
*
*/

#pragma once

#include "REG/CHSC5816Constants.h"
#include "TouchDrvInterface.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/TouchDrvCSTXXX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* @date last 2023-10-05
*
*/
#pragma once

#include "REG/CSTxxxConstants.h"
#include "touch/TouchClassCST226.h"
#include "touch/TouchClassCST816.h"
Expand Down
2 changes: 1 addition & 1 deletion src/TouchDrvFT6X36.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2023-04-01
*
*/

#pragma once

#include "REG/FT6X36Constants.h"
#include "TouchDrvInterface.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/TouchDrvGT911.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @date 2023-04-12
*
*/

#pragma once

#include "REG/GT911Constants.h"
#include "TouchDrvInterface.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/touch/TouchClassCST226.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @author Lewis He (lewishe@outlook.com)
* @date 2023-10-06
*/
#pragma once

#include "../TouchDrvInterface.hpp"
#include "../SensorCommon.tpp"
Expand Down
2 changes: 2 additions & 0 deletions src/touch/TouchClassCST816.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* @author Lewis He (lewishe@outlook.com)
* @date 2023-10-06
*/
#pragma once

#include "../TouchDrvInterface.hpp"
#include "../SensorCommon.tpp"
#include "../SensorLib.h"
Expand Down

0 comments on commit eeb0424

Please sign in to comment.