0

Serial1 interrupt
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Serial1 interrupt

by Hirochan on Mon Jun 21, 2021 9:06 am

Hello
I'm not sure this is the right place or not.
I need help for using itsybitsy nrf52840 express.
I'd like to get interrupt call from Serial1 of TX buffer empty to support RS485 buffer direction.
But I don't know how to write code for this.
Please let me know how.
below is my image but never work.
Code: Select all | TOGGLE FULL SIZE
void serialEvent1(){
 digitalwrite(RS485DIR,LOW);  //TX Empty
  Serial1.IrqHandler();
}

send(){
 digitalwrite(RS485DIR,HIGH);
 Serial1.write(buf,len);

}

are there any example?

Best regard

Hirochan
 
Posts: 1
Joined: Mon Jun 21, 2021 8:49 am

Please be positive and constructive with your questions and comments.