cpu/sam0: removed guards form periph drivers
This commit is contained in:
parent
50ad7e523f
commit
b3962f8d2c
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user