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

lint: fix unassignedVariable warnings in stm32f1

This commit is contained in:
Hinnerk van Bruinehsen 2014-10-16 10:11:43 +02:00
parent 9ba48e409f
commit 2103249815
4 changed files with 12 additions and 6 deletions

View File

@ -33,7 +33,7 @@
#include "debug.h" #include "debug.h"
/* guard file in case no I2C device is defined */ /* guard file in case no I2C device is defined */
#if I2C_NUMOF #if I2C_0_EN
/* static function definitions */ /* static function definitions */
static void _start(I2C_TypeDef *dev, uint8_t address, uint8_t rw_flag); static void _start(I2C_TypeDef *dev, uint8_t address, uint8_t rw_flag);
@ -392,4 +392,4 @@ static inline void _stop(I2C_TypeDef *dev)
dev->CR1 |= I2C_CR1_STOP; dev->CR1 |= I2C_CR1_STOP;
} }
#endif /* I2C_NUMOF */ #endif /* I2C_0_EN */

View File

@ -29,7 +29,7 @@
#include "debug.h" #include "debug.h"
/* guard file in case no SPI device is defined */ /* guard file in case no SPI device is defined */
#if SPI_NUMOF #if SPI_0_EN
int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed) int spi_init_master(spi_t dev, spi_conf_t conf, spi_speed_t speed)
{ {
@ -231,4 +231,4 @@ void spi_poweroff(spi_t dev)
} }
} }
#endif /* SPI_NUMOF */ #endif /* SPI_0_EN */

View File

@ -31,6 +31,8 @@
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#include "debug.h" #include "debug.h"
/* guard file in case no TIMER device is defined */
#if TIMER_0_EN || TIMER_1_EN
static inline void irq_handler(tim_t timer, TIM_TypeDef *dev0, TIM_TypeDef *dev1); static inline void irq_handler(tim_t timer, TIM_TypeDef *dev0, TIM_TypeDef *dev1);
@ -119,8 +121,8 @@ int timer_set(tim_t dev, int channel, unsigned int timeout)
int timer_set_absolute(tim_t dev, int channel, unsigned int value) int timer_set_absolute(tim_t dev, int channel, unsigned int value)
{ {
TIM_TypeDef *timer0 = NULL; TIM_TypeDef *timer0;
TIM_TypeDef *timer1 = NULL; TIM_TypeDef *timer1;
switch (dev) { switch (dev) {
#if TIMER_0_EN #if TIMER_0_EN
@ -406,3 +408,4 @@ static inline void irq_handler(tim_t timer, TIM_TypeDef *dev0, TIM_TypeDef *dev1
thread_yield(); thread_yield();
} }
} }
#endif /* TIMER_0_EN || TIMER_1_EN */

View File

@ -29,6 +29,9 @@
#include "sched.h" #include "sched.h"
#include "thread.h" #include "thread.h"
/* guard file in case no UART device is defined */
#if UART_0_EN || UART_1_EN
/** /**
* @brief Each UART device has to store two callbacks. * @brief Each UART device has to store two callbacks.
*/ */