diff options
| author | Glenn Ruben Bakke <glennbakke@gmail.com> | 2018-12-23 16:23:32 +0100 |
|---|---|---|
| committer | Glenn Ruben Bakke <glennbakke@gmail.com> | 2019-10-02 21:15:48 +0200 |
| commit | 02a8c31eef3778941da378b315033d6fde19c73c (patch) | |
| tree | 5ffe2152d8dfc772be70759b375e863aa224163a | |
| parent | d2e730b727fe5522e8b70b3af48bc4504545eb3b (diff) | |
nrf/temp: Move module configuration guard.
This patch moves the check for MICROPY_PY_MACHINE_TEMP to come
before the inclusion of nrf_temp.h. The nrf_temp.h depends on
the NRF_TEMP_Type which might not be defined for all nRF devices.
| -rw-r--r-- | ports/nrf/modules/machine/temp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ports/nrf/modules/machine/temp.c b/ports/nrf/modules/machine/temp.c index 007a7e5fd..047514967 100644 --- a/ports/nrf/modules/machine/temp.c +++ b/ports/nrf/modules/machine/temp.c @@ -30,6 +30,9 @@ #include "py/nlr.h" #include "py/runtime.h" #include "py/mphal.h" + +#if MICROPY_PY_MACHINE_TEMP + #include "temp.h" #include "nrf_temp.h" @@ -40,8 +43,6 @@ #define BLUETOOTH_STACK_ENABLED() (ble_drv_stack_enabled()) #endif // BLUETOOTH_SD -#if MICROPY_PY_MACHINE_TEMP - typedef struct _machine_temp_obj_t { mp_obj_base_t base; } machine_temp_obj_t; |
