diff --git a/targets/TARGET_STM/TARGET_STM32H7/can_device.h b/targets/TARGET_STM/TARGET_STM32H7/can_device.h index 6499b59c86..1652fb9491 100644 --- a/targets/TARGET_STM/TARGET_STM32H7/can_device.h +++ b/targets/TARGET_STM/TARGET_STM32H7/can_device.h @@ -23,7 +23,7 @@ extern "C" { #endif -#ifdef DEVICE_CAN +#if DEVICE_CAN #if defined(CAN3_BASE) diff --git a/targets/TARGET_STM/TARGET_STM32H7/common_objects.h b/targets/TARGET_STM/TARGET_STM32H7/common_objects.h index 9a82422e6b..480e29dbe0 100644 --- a/targets/TARGET_STM/TARGET_STM32H7/common_objects.h +++ b/targets/TARGET_STM/TARGET_STM32H7/common_objects.h @@ -57,7 +57,7 @@ struct spi_s { PinName pin_mosi; PinName pin_sclk; PinName pin_ssel; -#ifdef DEVICE_SPI_ASYNCH +#if DEVICE_SPI_ASYNCH uint32_t event; uint8_t transfer_type; #endif diff --git a/targets/TARGET_STM/TARGET_STM32H7/i2c_device.h b/targets/TARGET_STM/TARGET_STM32H7/i2c_device.h index 778ef1ab3b..78fab11d60 100644 --- a/targets/TARGET_STM/TARGET_STM32H7/i2c_device.h +++ b/targets/TARGET_STM/TARGET_STM32H7/i2c_device.h @@ -36,7 +36,7 @@ extern "C" { #endif -#ifdef DEVICE_I2C +#if DEVICE_I2C #define I2C_IP_VERSION_V2 diff --git a/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c b/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c index 49bae343a2..058d4c88d7 100644 --- a/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c +++ b/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c @@ -31,7 +31,7 @@ #include "pwmout_api.h" #include "pwmout_device.h" -#ifdef DEVICE_PWMOUT +#if DEVICE_PWMOUT const pwm_apb_map_t pwm_apb_map_table[] = { #if defined(TIM2_BASE) diff --git a/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.h b/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.h index 0d81dd547a..070149e480 100644 --- a/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.h +++ b/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.h @@ -36,7 +36,7 @@ extern "C" { #endif -#ifdef DEVICE_PWMOUT +#if DEVICE_PWMOUT typedef enum { PWMOUT_ON_APB1 = 0, diff --git a/targets/TARGET_STM/TARGET_STM32L0/common_objects.h b/targets/TARGET_STM/TARGET_STM32L0/common_objects.h index 31306f48e4..5f0acc6132 100644 --- a/targets/TARGET_STM/TARGET_STM32L0/common_objects.h +++ b/targets/TARGET_STM/TARGET_STM32L0/common_objects.h @@ -57,7 +57,7 @@ struct spi_s { PinName pin_mosi; PinName pin_sclk; PinName pin_ssel; -#ifdef DEVICE_SPI_ASYNCH +#if DEVICE_SPI_ASYNCH uint32_t event; uint8_t transfer_type; #endif