ISR disable only works for UART0
DMX Library and usage examples for Arduino
Status: Beta
Brought to you by:
dvandermeeren
There is a bug in disabling the UART interrupts. Only UART0 interrupt routine is disabled. The wrapper define DMX_UCSRB should be used. This define will disable the correct (selected) UART interrupt.
Patch:
diff --git a/Conceptinetics.cpp b/Conceptinetics.cpp
index e3c901f..a3f2610 100644
--- a/Conceptinetics.cpp
+++ b/Conceptinetics.cpp
@@ -1024,11 +1024,7 @@ void SetISRMode ( isr::isrMode mode )
switch ( mode )
{
case isr::Disabled:
- #if defined(UCSRB)
- UCSRB = 0x0;
- #elif defined(UCSR0B)
- UCSR0B = 0x0;
- #endif
+ DMX_UCSRB = 0x0;
readEnable = LOW;
break;