Skip to content

Commit 63eca29

Browse files
authored
Merge pull request #9163 from InfernoEmbedded/fix-8913-partner
Don't use define checks on DEVICE_FOO macros (partner code)
2 parents 17b0d4e + aa80b7c commit 63eca29

File tree

92 files changed

+127
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+127
-138
lines changed

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/api/flash_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* POSSIBILITY OF SUCH DAMAGE.
3939
******************************************************************************/
4040

41-
#ifdef DEVICE_FLASH
41+
#if DEVICE_FLASH
4242
#include "flash_api.h"
4343
#include "flash_data.h"
4444
#include "mbed_critical.h"

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/api/gpio_irq_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include "adi_gpio_def.h"
4444
#include "ADuCM302x_device.h"
4545

46-
#ifdef DEVICE_INTERRUPTIN
46+
#if DEVICE_INTERRUPTIN
4747

4848
#define MAX_GPIO_LINES 16
4949
#define MAX_GPIO_PORTS ADI_GPIO_NUM_PORTS
@@ -327,4 +327,4 @@ void gpio_irq_disable(gpio_irq_t *obj)
327327
channel_ids[port][pin_num].int_enable = 0;
328328
}
329329

330-
#endif // #ifdef DEVICE_INTERRUPTIN
330+
#endif // #if DEVICE_INTERRUPTIN

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/api/sleep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#include "sleep_api.h"
4242

43-
#ifdef DEVICE_SLEEP
43+
#if DEVICE_SLEEP
4444

4545
#include "adi_pwr.h"
4646
#include "adi_pwr_def.h"
@@ -218,4 +218,4 @@ void hal_deepsleep(void)
218218
pADI_CLKG0_CLK->CTL5 = 0;
219219
}
220220

221-
#endif // #ifdef DEVICE_SLEEP
221+
#endif // #if DEVICE_SLEEP

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/api/trng_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* POSSIBILITY OF SUCH DAMAGE.
3939
******************************************************************************/
4040

41-
#if defined(DEVICE_TRNG)
41+
#if DEVICE_TRNG
4242

4343
#include <stdlib.h>
4444
#include <drivers/rng/adi_rng.h>

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/api/flash_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* POSSIBILITY OF SUCH DAMAGE.
3939
******************************************************************************/
4040

41-
#ifdef DEVICE_FLASH
41+
#if DEVICE_FLASH
4242
#include "flash_api.h"
4343
#include "flash_data.h"
4444
#include "mbed_critical.h"

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/api/gpio_irq_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include "adi_gpio.h"
4343
#include "adi_gpio_def.h"
4444

45-
#ifdef DEVICE_INTERRUPTIN
45+
#if DEVICE_INTERRUPTIN
4646

4747
#define MAX_GPIO_LINES 16
4848
#define MAX_GPIO_PORTS ADI_GPIO_NUM_PORTS
@@ -326,4 +326,4 @@ void gpio_irq_disable(gpio_irq_t *obj)
326326
channel_ids[port][pin_num].int_enable = 0;
327327
}
328328

329-
#endif // #ifdef DEVICE_INTERRUPTIN
329+
#endif // #if DEVICE_INTERRUPTIN

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/api/sleep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
#include "sleep_api.h"
4242

43-
#ifdef DEVICE_SLEEP
43+
#if DEVICE_SLEEP
4444

4545
#include "adi_pwr.h"
4646
#include "adi_pwr_def.h"
@@ -253,4 +253,4 @@ void hal_deepsleep(void)
253253
pADI_CLKG0_CLK->CTL5 = 0;
254254
}
255255

256-
#endif // #ifdef DEVICE_SLEEP
256+
#endif // #if DEVICE_SLEEP

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/api/trng_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* POSSIBILITY OF SUCH DAMAGE.
3939
******************************************************************************/
4040

41-
#if defined(DEVICE_TRNG)
41+
#if DEVICE_TRNG
4242

4343
#include <stdlib.h>
4444
#include <adi_rng.h>

targets/TARGET_Atmel/TARGET_SAM_CortexM0P/serial_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
503503
enable_usart(obj);
504504
}
505505

506-
#ifdef DEVICE_SERIAL_FC
506+
#if DEVICE_SERIAL_FC
507507

508508
void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow)
509509
{

targets/TARGET_Atmel/TARGET_SAM_CortexM4/serial_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
283283
sysclk_enable_peripheral_clock(clockid);
284284
}
285285

286-
#ifdef DEVICE_SERIAL_FC
286+
#if DEVICE_SERIAL_FC
287287

288288
void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow)
289289
{
@@ -783,4 +783,4 @@ void serial_rx_abort_asynch(serial_t *obj)
783783
pSERIAL_S(obj)->actrec = false;
784784
}
785785

786-
#endif
786+
#endif

0 commit comments

Comments
 (0)