cli() (aka "noInterrupts()") is called multiple times in the NeoSWSerial code, but only once is sei() (aka "interrupts()") called to reenable the interrupts. This appears to be a significant error in a number of places.
Now I'm not sure if this is necessary, for example, in the ignore() function where only cli() is called. However in the write() function, a missing sei() is definitely messing with accuracy of written code, particularly after patching with the long-standing pull-request to properly handle writes from multiple serial ports (https://github.com/SlashDevin/NeoSWSerial/pull/48).
cli() (aka "noInterrupts()") is called multiple times in the NeoSWSerial code, but only once is sei() (aka "interrupts()") called to reenable the interrupts. This appears to be a significant error in a number of places.
Now I'm not sure if this is necessary, for example, in the ignore() function where only cli() is called. However in the write() function, a missing sei() is definitely messing with accuracy of written code, particularly after patching with the long-standing pull-request to properly handle writes from multiple serial ports (https://github.com/SlashDevin/NeoSWSerial/pull/48).