diff --git a/cpu/sam0_common/periph/adc.c b/cpu/sam0_common/periph/adc.c index 35290389b2..a9ad2127ac 100644 --- a/cpu/sam0_common/periph/adc.c +++ b/cpu/sam0_common/periph/adc.c @@ -28,9 +28,6 @@ #define ENABLE_DEBUG (0) #include "debug.h" -/* Only if we actually have any ADCs */ -#if ADC_NUMOF - /* ADC 0 device configuration */ #define ADC_0_DEV ADC #define ADC_0_IRQ ADC_IRQn @@ -190,5 +187,3 @@ int adc_sample(adc_t line, adc_res_t res) _done(); return result; } - -#endif /* #if ADC_NUMOF */ diff --git a/cpu/sam0_common/periph/i2c.c b/cpu/sam0_common/periph/i2c.c index 4fdda7d24a..bc34d6a551 100644 --- a/cpu/sam0_common/periph/i2c.c +++ b/cpu/sam0_common/periph/i2c.c @@ -34,9 +34,6 @@ #define ENABLE_DEBUG (0) #include "debug.h" -/* guard file in case no I2C device is defined */ -#if I2C_NUMOF - #define SAMD21_I2C_TIMEOUT (65535) #define BUSSTATE_UNKNOWN SERCOM_I2CM_STATUS_BUSSTATE(0) @@ -535,5 +532,3 @@ static inline int _wait_for_response(SercomI2cm *dev, uint32_t max_timeout_count } return 0; } - -#endif /* I2C_NUMOF */ diff --git a/cpu/sam0_common/periph/uart.c b/cpu/sam0_common/periph/uart.c index 86da678d5c..6b2ae0c7a5 100644 --- a/cpu/sam0_common/periph/uart.c +++ b/cpu/sam0_common/periph/uart.c @@ -31,9 +31,6 @@ #define ENABLE_DEBUG (0) #include "debug.h" -/* do not build the file in case no UART is defined */ -#ifdef UART_NUMOF - /** * @brief Allocate memory to store the callback functions */ @@ -195,5 +192,3 @@ void UART_5_ISR(void) irq_handler(5); } #endif - -#endif /* UART_NUMOF */ diff --git a/cpu/samd21/periph/pwm.c b/cpu/samd21/periph/pwm.c index 9f681d8332..68fb66e51e 100644 --- a/cpu/samd21/periph/pwm.c +++ b/cpu/samd21/periph/pwm.c @@ -30,9 +30,6 @@ #include "periph/gpio.h" #include "periph/pwm.h" -/* guard file in case no PWM device was specified */ -#ifdef PWM_NUMOF - static inline int _num(pwm_t dev) { return ((int)(pwm_config[dev].dev) & 0xc00) >> 10; @@ -189,5 +186,3 @@ void pwm_poweroff(pwm_t dev) GCLK_CLKCTRL_ID(_clk_id(dev))); while (GCLK->STATUS.bit.SYNCBUSY) {} } - -#endif /* PWM_NUMOF */ diff --git a/cpu/samd21/periph/rtc.c b/cpu/samd21/periph/rtc.c index 96bf878d2b..d9513a5591 100644 --- a/cpu/samd21/periph/rtc.c +++ b/cpu/samd21/periph/rtc.c @@ -24,9 +24,6 @@ #include "periph/rtc.h" #include "periph_conf.h" -/* guard file in case no RTC device was specified */ -#if RTC_NUMOF - typedef struct { rtc_alarm_cb_t cb; /**< callback called from RTC interrupt */ void *arg; /**< argument passed to the callback */ @@ -199,5 +196,3 @@ void isr_rtc(void) } cortexm_isr_end(); } - -#endif /* RTC_NUMOF */ diff --git a/cpu/samd21/periph/rtt.c b/cpu/samd21/periph/rtt.c index a4d0bc2352..f3563b8ab8 100644 --- a/cpu/samd21/periph/rtt.c +++ b/cpu/samd21/periph/rtt.c @@ -24,9 +24,6 @@ #include "periph/rtt.h" #include "periph_conf.h" -/* guard file in case no RTT device was specified */ -#if RTT_NUMOF - /* if RTT_PRESCALER is not set, then set it to DIV1 */ #ifndef RTT_PRESCALER #define RTT_PRESCALER RTC_MODE0_CTRL_PRESCALER_DIV1 @@ -211,6 +208,3 @@ void RTT_ISR(void) cortexm_isr_end(); } - - -#endif /* RTT_NUMOF */ diff --git a/cpu/saml21/periph/rtc.c b/cpu/saml21/periph/rtc.c index 987969b277..5c31c67ed7 100644 --- a/cpu/saml21/periph/rtc.c +++ b/cpu/saml21/periph/rtc.c @@ -22,9 +22,6 @@ #include "periph/rtc.h" #include "periph_conf.h" -/* guard file in case no RTC device was specified */ -#if RTC_NUMOF - typedef struct { rtc_alarm_cb_t cb; /**< callback called from RTC interrupt */ void *arg; /**< argument passed to the callback */ @@ -234,5 +231,3 @@ void isr_rtc(void) } cortexm_isr_end(); } - -#endif /* RTC_NUMOF */