1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/saul/auto_init: remove useless preprocessor directives

The files are now built only when the corresponding module is used
This commit is contained in:
Alexandre Abadie 2020-06-07 18:49:13 +02:00
parent e9a23325e1
commit f585b53d03
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
60 changed files with 0 additions and 344 deletions

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_AD7746
#include "assert.h"
#include "log.h"
@ -87,7 +85,3 @@ void auto_init_ad7746(void)
saul_reg_add(&(saul_entries[i + 2]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_AD7746 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_ADCXX1C
#include "assert.h"
#include "log.h"
@ -70,7 +68,3 @@ void auto_init_adcxx1c(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_ADCXX1C */

View File

@ -21,8 +21,6 @@
* @}
*/
#ifdef MODULE_ADS101X
#include "assert.h"
#include "log.h"
@ -72,7 +70,3 @@ void auto_init_ads101x(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_ADS101X */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_ADXL345
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -70,7 +68,3 @@ void auto_init_adxl345(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_ADXL345 */

View File

@ -16,8 +16,6 @@
* @}
*/
#ifdef MODULE_APDS99XX
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -102,7 +100,3 @@ void auto_init_apds99xx(void)
#endif
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_APDS99XX */

View File

@ -13,8 +13,6 @@
* @file
*/
#ifdef MODULE_BME680
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -86,6 +84,3 @@ void auto_init_bme680(void)
saul_reg_add(&(saul_entries[(i * 4) + 3]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_BME680 */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_BMP180
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -82,6 +80,3 @@ void auto_init_bmp180(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_BMP180 */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_BMX055
#include "log.h"
#include "saul_reg.h"
#include "bmx055.h"
@ -82,7 +80,3 @@ void auto_init_bmx055(void)
saul_reg_add(&(saul_entries[(i * 3) + 2]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_BMX055 */

View File

@ -20,8 +20,6 @@
* @}
*/
#ifdef MODULE_BMX280
#include "log.h"
#include "saul_reg.h"
@ -78,7 +76,3 @@ void auto_init_bmx280(void)
#endif
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_BMX280 */

View File

@ -13,8 +13,6 @@
* @file
*/
#ifdef MODULE_CCS811
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -77,6 +75,3 @@ void auto_init_ccs811(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_CCS811 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_DHT
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -77,7 +75,3 @@ void auto_init_dht(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_DHT */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_DS18
#include "log.h"
#include "saul_reg.h"
@ -69,6 +67,3 @@ void auto_init_ds18(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_DS18 */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_DS75LX
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -74,6 +72,3 @@ void auto_init_ds75lx(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_DS75LX */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_FXOS8700
#include "log.h"
#include "saul_reg.h"
#include "fxos8700_params.h"
@ -70,7 +68,3 @@ void auto_init_fxos8700(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_FXOS8700 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_GROVE_LEDBAR
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_grove_ledbar(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_GROVE_LEDBAR */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_HDC1000
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -79,7 +77,3 @@ void auto_init_hdc1000(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_HDC1000 */

View File

@ -13,8 +13,6 @@
* @file
*/
#ifdef MODULE_HMC5883L
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -66,7 +64,3 @@ void auto_init_hmc5883l(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_HMC5883L */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_HTS221
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -83,7 +81,3 @@ void auto_init_hts221(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_HTS221 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_INA2XX
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -76,7 +74,3 @@ void auto_init_ina2xx(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_INA2XX */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_INA3221
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -60,6 +58,3 @@ void auto_init_ina3221(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_INA3221 */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_IO1_XPLAINED
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -84,6 +82,3 @@ void auto_init_io1_xplained(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_IO1_XPLAINED */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_ISL29020
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -72,7 +70,3 @@ void auto_init_isl29020(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_ISL29020 */

View File

@ -15,8 +15,6 @@
* @{
*/
#ifdef MODULE_ITG320X
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -73,7 +71,3 @@ void auto_init_itg320x(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_ITG320X */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_JC42
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -72,6 +70,3 @@ void auto_init_jc42(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_JC42 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_L3G4200D
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_l3g4200d(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_L3G4200D */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LIS2DH12
#include "log.h"
#include "assert.h"
#include "saul_reg.h"
@ -70,7 +68,3 @@ void auto_init_lis2dh12(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LIS2DH12 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LIS3DH
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -76,7 +74,3 @@ void auto_init_lis3dh(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LIS3DH */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LIS3MDL
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -70,7 +68,3 @@ void auto_init_lis3mdl(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LIS3MDL */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LPSXXX
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -78,7 +76,3 @@ void auto_init_lpsxxx(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LPSXXX */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LSM303DLHC
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -77,7 +75,3 @@ void auto_init_lsm303dlhc(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LSM303DLHC */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LSM6DSL
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -83,7 +81,3 @@ void auto_init_lsm6dsl(void)
saul_reg_add(&(saul_entries[(i * 3) + 2]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LSM6DSL */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_LTC4150
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -77,7 +75,3 @@ void auto_init_ltc4150(void)
saul_reg_add(&(saul_entries[i * 2 + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_LTC4150 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_MAG3110
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_mag3110(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_MAG3110 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_MMA7660
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -72,7 +70,3 @@ void auto_init_mma7660(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_MMA7660 */

View File

@ -20,8 +20,6 @@
* @}
*/
#ifdef MODULE_MMA8X5X
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_mma8x5x(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_MMA8X5X */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_MPL3115A2
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -84,7 +82,3 @@ void auto_init_mpl3115a2(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_MPL3115A2 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_MPU9X50
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -83,7 +81,3 @@ void auto_init_mpu9x50(void)
saul_reg_add(&(saul_entries[(i * 3) + 2]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_MPU9X50 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_OPT3001
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -70,7 +68,3 @@
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_OPT3001 */

View File

@ -15,8 +15,6 @@
* @file
*/
#if MODULE_PCA9685 && MODULE_SAUL
#include "assert.h"
#include "log.h"
@ -90,6 +88,3 @@ void auto_init_pca9685(void)
saul_reg_add(&(pca9685_saul_reg_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_PCA9685 && MODULE_SAUL */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_PH_OEM
#include "assert.h"
#include "log.h"
@ -70,7 +68,3 @@ void auto_init_ph_oem(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_PH_OEM */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_PIR
#include "log.h"
#include "saul_reg.h"
#include "pir_params.h"
@ -65,7 +63,3 @@ void auto_init_pir(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_PIR */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_PULSE_COUNTER
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -69,7 +67,3 @@ void auto_init_pulse_counter(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_PULSE_COUNTER */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_QMC5883L
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_qmc5883l(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_QMC5883L */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_SAUL_ADC
#include "log.h"
#include "saul_reg.h"
#include "saul/periph.h"
@ -67,7 +65,3 @@ void auto_init_adc(void)
saul_reg_add(&(saul_reg_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SAUL_ADC */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_SAUL_GPIO
#include "log.h"
#include "saul_reg.h"
#include "saul/periph.h"
@ -86,6 +84,3 @@ void auto_init_gpio(void)
}
}
#endif
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SAUL_GPIO */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_SAUL_NRF_TEMPERATURE
#include "cpu.h"
#include "log.h"
#include "saul_reg.h"
@ -49,7 +47,3 @@ void auto_init_nrf_temperature(void)
/* add to registry */
saul_reg_add(&(saul_reg_entry));
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SAUL_NRF_TEMPERATURE */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_SDS011
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -82,7 +80,3 @@ void auto_init_sds011(void)
saul_reg_add(&saul_entries[i]);
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SDS011 */

View File

@ -24,8 +24,6 @@
* @}
*/
#ifdef MODULE_SHT1X
#include "log.h"
#include "sht1x_params.h"
#include "sht1x.h"
@ -101,7 +99,3 @@ void auto_init_sht1x(void)
#endif /* MODULE_AUTO_INIT_SAUL */
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SHT1X */

View File

@ -18,8 +18,6 @@
* @}
*/
#if defined(MODULE_SHT2X)
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_sht2x(void)
se_ix++;
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SHT2X */

View File

@ -13,8 +13,6 @@
* @file
*/
#ifdef MODULE_SHT3X
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -77,6 +75,3 @@ void auto_init_sht3x(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SHT3X */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_SHTC1
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -79,7 +77,3 @@
saul_reg_add(&(saul_entries[(i * 2)+1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SHTC1 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_SI114X
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -95,7 +93,3 @@ void auto_init_si114x(void)
saul_reg_add(&saul_entries[(i * 4) + 3]);
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SI114X */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_SI70XX
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -81,7 +79,3 @@ void auto_init_si70xx(void)
saul_reg_add(&saul_entries[(i * 2) + 1]);
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SI70XX */

View File

@ -13,8 +13,6 @@
* @file
*/
#ifdef MODULE_SPS30
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -74,6 +72,3 @@ void auto_init_sps30(void)
}
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_SPS30 */

View File

@ -19,8 +19,6 @@
* @}
*/
#ifdef MODULE_TCS37727
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -71,7 +69,3 @@ void auto_init_tcs37727(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_TCS37727 */

View File

@ -20,8 +20,6 @@
* @}
*/
#ifdef MODULE_TMP00X
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -82,7 +80,3 @@ void auto_init_tmp00x(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_TMP00X */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_TSL2561
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -73,6 +71,3 @@ void auto_init_tsl2561(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_TSL2561 */

View File

@ -22,8 +22,6 @@
* @}
*/
#ifdef MODULE_TSL4531X
#include "log.h"
#include "saul_reg.h"
#include "tsl4531x.h"
@ -79,6 +77,3 @@ void auto_init_tsl4531x(void)
saul_reg_add(&(saul_entries[i]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_TSL4531X */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_VCNL40X0
#include "log.h"
#include "saul_reg.h"
@ -76,6 +74,3 @@ void auto_init_vcnl40x0(void)
saul_reg_add(&(saul_entries[(i * 2) + 1]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_VCNL40X0 */

View File

@ -18,8 +18,6 @@
* @}
*/
#ifdef MODULE_VEML6070
#include "assert.h"
#include "log.h"
#include "saul_reg.h"
@ -72,6 +70,3 @@ void auto_init_veml6070(void)
saul_reg_add(&(saul_entries[(i)]));
}
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_VEML6070 */