summaryrefslogtreecommitdiff
path: root/stmhal/irq.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-06-22 16:18:42 +1000
committerDamien George <damien.p.george@gmail.com>2017-06-22 16:18:42 +1000
commit8ed7155828a44d6fc1055cc1745ec329f867ca12 (patch)
tree8f4d0dd994d4ef434db6ff328307aa4b2fab0119 /stmhal/irq.h
parenteeaab1897b1f8eafe6cf8db12c9fe1c4a0c78532 (diff)
stmhal: Add "quiet timing" enter/exit functions.
They disable all interrupts except for SysTick and are useful for doing certain low-level timing operations.
Diffstat (limited to 'stmhal/irq.h')
-rw-r--r--stmhal/irq.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/stmhal/irq.h b/stmhal/irq.h
index a56f23652..35187520a 100644
--- a/stmhal/irq.h
+++ b/stmhal/irq.h
@@ -24,6 +24,9 @@
* THE SOFTWARE.
*/
+#ifndef MICROPY_INCLUDED_STMHAL_IRQ_H
+#define MICROPY_INCLUDED_STMHAL_IRQ_H
+
// these states correspond to values from query_irq, enable_irq and disable_irq
#define IRQ_STATE_DISABLED (0x00000001)
#define IRQ_STATE_ENABLED (0x00000000)
@@ -147,4 +150,4 @@ MP_DECLARE_CONST_FUN_OBJ_0(pyb_irq_stats_obj);
#define IRQ_PRI_RTC_WKUP 15
#define IRQ_SUBPRI_RTC_WKUP 0
-
+#endif // MICROPY_INCLUDED_STMHAL_IRQ_H