Merge pull request #4775 from c1728p9/fix_defines

Fix non-portable defines
pull/4803/head
Jimmy Brisson 2017-07-24 10:58:05 -05:00 committed by GitHub
commit 3ed697a36a
2 changed files with 11 additions and 2 deletions

View File

@ -21,7 +21,12 @@
#include<stdint.h>
#define MBED_APPLICATION_SUPPORT defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)
#if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)
#define MBED_APPLICATION_SUPPORT 1
#else
#define MBED_APPLICATION_SUPPORT 0
#endif
#if MBED_APPLICATION_SUPPORT
#ifdef __cplusplus
extern "C" {

View File

@ -23,7 +23,11 @@
#include "platform/mbed_assert.h"
#include "platform/mbed_toolchain.h"
#define EXCLUSIVE_ACCESS (!defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS))
#if !defined (__CORTEX_M0) && !defined (__CORTEX_M0PLUS)
#define EXCLUSIVE_ACCESS 1
#else
#define EXCLUSIVE_ACCESS 0
#endif
static volatile uint32_t interrupt_enable_counter = 0;
static volatile bool critical_interrupts_disabled = false;