Skip to content

Commit ab1c2be

Browse files
authored
Merge pull request #8957 from InfernoEmbedded/fix-8913
Fix incorrect #ifdefs on DEVICE_FOO macros
2 parents 911720e + 2617c5d commit ab1c2be

File tree

45 files changed

+55
-55
lines changed

Some content is hidden

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

45 files changed

+55
-55
lines changed

TESTS/mbed_hal/sleep/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void sleep_usticker_test()
9595
TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep());
9696
}
9797

98-
#ifdef DEVICE_LPTICKER
98+
#if DEVICE_LPTICKER
9999

100100
/* Test that wake-up time from sleep should be less than 10 ms and
101101
* low power ticker interrupt can wake-up target from sleep. */

TESTS/mbed_hal/sleep/sleep_test_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void us_ticker_isr(const ticker_data_t *const ticker_data)
105105
us_ticker_clear_interrupt();
106106
}
107107

108-
#ifdef DEVICE_LPTICKER
108+
#if DEVICE_LPTICKER
109109
void lp_ticker_isr(const ticker_data_t *const ticker_data)
110110
{
111111
lp_ticker_clear_interrupt();

TESTS/mbed_platform/stats_cpu/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "mbed.h"
2323

24-
#if !defined(MBED_CPU_STATS_ENABLED) || !defined(DEVICE_LPTICKER) || !defined(DEVICE_SLEEP)
24+
#if !defined(MBED_CPU_STATS_ENABLED) || !DEVICE_LPTICKER || !DEVICE_SLEEP
2525
#error [NOT_SUPPORTED] test not supported
2626
#endif
2727

components/storage/blockdevice/COMPONENT_FLASHIAP/FlashIAPBlockDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#ifdef DEVICE_FLASH
17+
#if DEVICE_FLASH
1818

1919
#include "FlashIAPBlockDevice.h"
2020
#include "mbed_critical.h"

components/storage/blockdevice/COMPONENT_FLASHIAP/FlashIAPBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef MBED_FLASHIAP_BLOCK_DEVICE_H
1818
#define MBED_FLASHIAP_BLOCK_DEVICE_H
1919

20-
#ifdef DEVICE_FLASH
20+
#if DEVICE_FLASH
2121

2222
#include "FlashIAP.h"
2323
#include "BlockDevice.h"

components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
*/
137137

138138
/* If the target has no SPI support then SDCard is not supported */
139-
#ifdef DEVICE_SPI
139+
#if DEVICE_SPI
140140

141141
#include "SDBlockDevice.h"
142142
#include "platform/mbed_debug.h"

components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define MBED_SD_BLOCK_DEVICE_H
1919

2020
/* If the target has no SPI support then SDCard is not supported */
21-
#ifdef DEVICE_SPI
21+
#if DEVICE_SPI
2222

2323
#include "BlockDevice.h"
2424
#include "drivers/SPI.h"

components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/fopen/fopen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ using namespace utest::v1;
6868
* <<< lines removed >>>
6969
*/
7070

71-
#if defined(DEVICE_SPI) && ( defined(MBED_CONF_APP_FSFAT_SDCARD_INSTALLED) || (MBED_CONF_SD_FSFAT_SDCARD_INSTALLED))
71+
#if DEVICE_SPI && ( defined(MBED_CONF_APP_FSFAT_SDCARD_INSTALLED) || (MBED_CONF_SD_FSFAT_SDCARD_INSTALLED))
7272
static char fsfat_fopen_utest_msg_g[FSFAT_UTEST_MSG_BUF_SIZE];
7373
#define FSFAT_FOPEN_TEST_MOUNT_PT_NAME "sd"
7474
#define FSFAT_FOPEN_TEST_MOUNT_PT_PATH "/" FSFAT_FOPEN_TEST_MOUNT_PT_NAME

drivers/AnalogIn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "platform/platform.h"
2121

22-
#if defined (DEVICE_ANALOGIN) || defined(DOXYGEN_ONLY)
22+
#if DEVICE_ANALOGIN || defined(DOXYGEN_ONLY)
2323

2424
#include "hal/analogin_api.h"
2525
#include "platform/SingletonPtr.h"

drivers/AnalogOut.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "platform/platform.h"
2121

22-
#if defined (DEVICE_ANALOGOUT) || defined(DOXYGEN_ONLY)
22+
#if DEVICE_ANALOGOUT || defined(DOXYGEN_ONLY)
2323

2424
#include "hal/analogout_api.h"
2525
#include "platform/PlatformMutex.h"

0 commit comments

Comments
 (0)