summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ports/cc3200/hal/cc3200_asm.h12
-rw-r--r--ports/cc3200/hal/cc3200_hal.c1
-rw-r--r--ports/cc3200/mpthreadport.c1
-rw-r--r--ports/cc3200/telnet/telnet.c1
4 files changed, 10 insertions, 5 deletions
diff --git a/ports/cc3200/hal/cc3200_asm.h b/ports/cc3200/hal/cc3200_asm.h
index 742c9a6f7f..2a9fc506ce 100644
--- a/ports/cc3200/hal/cc3200_asm.h
+++ b/ports/cc3200/hal/cc3200_asm.h
@@ -32,8 +32,11 @@
//
// Note on IRQ state: you should not need to know the specific
// value of the state variable, but rather just pass the return
-// value from disable_irq back to enable_irq. If you really need
-// to know the machine-specific values, see irq.h.
+// value from disable_irq back to enable_irq.
+
+// these states correspond to values from query_irq, enable_irq and disable_irq
+#define IRQ_STATE_DISABLED (0x00000001)
+#define IRQ_STATE_ENABLED (0x00000000)
#ifndef __disable_irq
#define __disable_irq() __asm__ volatile ("cpsid i");
@@ -80,6 +83,11 @@ static inline void __set_BASEPRI(uint32_t value) {
}
__attribute__(( always_inline ))
+static inline uint32_t query_irq(void) {
+ return __get_PRIMASK();
+}
+
+__attribute__(( always_inline ))
static inline void enable_irq(mp_uint_t state) {
__set_PRIMASK(state);
}
diff --git a/ports/cc3200/hal/cc3200_hal.c b/ports/cc3200/hal/cc3200_hal.c
index b75a40151f..56dd2b2b82 100644
--- a/ports/cc3200/hal/cc3200_hal.c
+++ b/ports/cc3200/hal/cc3200_hal.c
@@ -49,7 +49,6 @@
#include "telnet.h"
#include "pybuart.h"
#include "utils.h"
-#include "irq.h"
#ifdef USE_FREERTOS
#include "FreeRTOS.h"
diff --git a/ports/cc3200/mpthreadport.c b/ports/cc3200/mpthreadport.c
index 5b4771f395..c3f5f38d06 100644
--- a/ports/cc3200/mpthreadport.c
+++ b/ports/cc3200/mpthreadport.c
@@ -32,7 +32,6 @@
#include "py/mphal.h"
#include "mptask.h"
#include "task.h"
-#include "irq.h"
#if MICROPY_PY_THREAD
diff --git a/ports/cc3200/telnet/telnet.c b/ports/cc3200/telnet/telnet.c
index 86843c78f6..595be06f2f 100644
--- a/ports/cc3200/telnet/telnet.c
+++ b/ports/cc3200/telnet/telnet.c
@@ -37,7 +37,6 @@
#include "debug.h"
#include "serverstask.h"
#include "genhdr/mpversion.h"
-#include "irq.h"
/******************************************************************************
DEFINE PRIVATE CONSTANTS