From 1195ee609ff9266b601fa155b57d9d042a87d5d2 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 14 Apr 2018 22:53:46 +0200 Subject: [PATCH] cpu/atmega_common: remove useless periph file guard --- cpu/atmega_common/periph/i2c.c | 5 ----- cpu/atmega_common/periph/timer.c | 7 ------- cpu/atmega_common/periph/uart.c | 6 ------ 3 files changed, 18 deletions(-) diff --git a/cpu/atmega_common/periph/i2c.c b/cpu/atmega_common/periph/i2c.c index bf3a8c4ad3..809a9e5d43 100644 --- a/cpu/atmega_common/periph/i2c.c +++ b/cpu/atmega_common/periph/i2c.c @@ -32,9 +32,6 @@ #include "debug.h" #define ENABLE_DEBUG (0) -/* guard file in case no I2C device is defined */ -#if I2C_NUMOF - #define MT_START 0x08 #define MT_START_REPEATED 0x10 #define MT_ADDRESS_ACK 0x18 @@ -369,5 +366,3 @@ static void _stop(void) DEBUG("STOP condition transmitted\n"); TWCR = 0; } - -#endif /* I2C_NUMOF */ diff --git a/cpu/atmega_common/periph/timer.c b/cpu/atmega_common/periph/timer.c index 9eb2b1a87f..f5e44d2112 100644 --- a/cpu/atmega_common/periph/timer.c +++ b/cpu/atmega_common/periph/timer.c @@ -62,9 +62,7 @@ typedef struct { /** * @brief Allocate memory for saving the device states - * @{ */ -#ifdef TIMER_NUMOF static ctx_t ctx[] = { #ifdef TIMER_0 { TIMER_0, TIMER_0_MASK, TIMER_0_FLAG, NULL, NULL, 0, 0 }, @@ -79,11 +77,6 @@ static ctx_t ctx[] = { { TIMER_3, TIMER_3_MASK, TIMER_3_FLAG, NULL, NULL, 0, 0 }, #endif }; -#else -/* fallback if no timer is configured */ -static ctx_t *ctx[] = {{ NULL }}; -#endif -/** @} */ /** * @brief Setup the given timer diff --git a/cpu/atmega_common/periph/uart.c b/cpu/atmega_common/periph/uart.c index c1abacd068..7face67d90 100644 --- a/cpu/atmega_common/periph/uart.c +++ b/cpu/atmega_common/periph/uart.c @@ -58,9 +58,7 @@ /** * @brief Configured device map - * @{ */ -#if UART_NUMOF static mega_uart_t *dev[] = { #ifdef UART_0 UART_0, @@ -75,10 +73,6 @@ static mega_uart_t *dev[] = { UART_3 #endif }; -#else -/* fallback if no UART is defined */ -static const mega_uart_t *dev[] = { NULL }; -#endif /** * @brief Allocate memory to store the callback functions.