Skip to content

Commit 371ad85

Browse files
authored
Add configuration option LPC_SWSERIAL_IRQ_PRIORITY. (#50)
1 parent c1b0348 commit 371ad85

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cores/arduino/SoftwareSerial.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535

3636

3737
#define FORCE_BAUD_RATE 19200
38-
#define INTERRUPT_PRIORITY 0
38+
#ifndef LPC_SWSERIAL_IRQ_PRIORITY
39+
#define LPC_SWSERIAL_IRQ_PRIORITY 1
40+
#endif
3941
#define OVERSAMPLE 3
4042
//
4143
// Statics
@@ -274,7 +276,7 @@ void SoftwareSerial::begin(long speed) {
274276
_speed = speed;
275277
if (!initialised) {
276278
RIT_Init(LPC_RIT);
277-
NVIC_SetPriority(RIT_IRQn, NVIC_EncodePriority(0, INTERRUPT_PRIORITY, 0));
279+
NVIC_SetPriority(RIT_IRQn, NVIC_EncodePriority(0, LPC_SWSERIAL_IRQ_PRIORITY, 0));
278280
initialised = true;
279281
}
280282
if (!_half_duplex) {

0 commit comments

Comments
 (0)