Menu

#11 ISR disable only works for UART0

2.0
open
None
2017-09-05
2017-09-05
Duccan
No

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;

Discussion


Log in to post a comment.