diff options
-rw-r--r-- | README.rst | 3 | ||||
-rw-r--r-- | cm3cpp/irq/irq.cpp | 4 | ||||
-rw-r--r-- | cm3cpp/irq/irq.hpp | 2 |
3 files changed, 9 insertions, 0 deletions
@@ -31,3 +31,6 @@ Library defines: - ``CM3CPP_ENABLE_IMPLISIT_DESTRUCTOR_CALLS`` — do not call ``assert(false)`` if dangerous destructor of library class is called. + + - ``CM3CPP_CUSTOM_INTERRUPT_SERVICE`` — disable IInterruptable + and leave all opencm3 interrupt functions undeclared. diff --git a/cm3cpp/irq/irq.cpp b/cm3cpp/irq/irq.cpp index bc7320a..bcff9ff 100644 --- a/cm3cpp/irq/irq.cpp +++ b/cm3cpp/irq/irq.cpp @@ -11,6 +11,8 @@ namespace cm3cpp { +#ifndef CM3CPP_CUSTOM_INTERRUPT_SERVICE + struct EmptyInterrupt : public IInterruptable { void call() {} @@ -223,4 +225,6 @@ DEFINE_CALLBACK(dma2d_isr, ISR_DMA2D) END_DECLS +#endif // CM3CPP_CUSTOM_INTERRUPT_SERVICE + } // namespace cm3cpp diff --git a/cm3cpp/irq/irq.hpp b/cm3cpp/irq/irq.hpp index 1f09bdf..69b6fd4 100644 --- a/cm3cpp/irq/irq.hpp +++ b/cm3cpp/irq/irq.hpp @@ -193,6 +193,7 @@ enum Interrupt : uint32_t }; #endif +#ifndef CM3CPP_CUSTOM_INTERRUPT_SERVICE class IInterruptable { public: @@ -203,5 +204,6 @@ class IInterruptable IInterruptable* interrupt_owner); virtual void call() = 0; }; +#endif } /* namespace cm3cpp */ |