Page 1 of 1

RS485 Library

Posted: Mon Nov 09, 2020 12:35 pm
by Vimes45
Hello,

I'm working in a RS485 project for Arduino IDE. But I don't find how to define correctly the interrupts. I need only one interrupt that to activate the reception Rx (normally is in LOW mode, and I want activate the HIGH mode when the transmission Tx has finished).

I has searched in the directories, but i don't find where define (which file, which code, which interrupt) this. I think it's necessary modificate the cores (HardwareSerial, esp32-hal), but i don't sure. And of top of that, we need use HardwareSerial.

Thanks for their help :lol: .

Pd: I'm going craizy searching in the codes.

Re: RS485 Library

Posted: Thu Nov 12, 2020 2:07 pm
by Vimes45
In the end, I didn’t need to modificate the cores. The form of enable interrupts are very simple:

Code: Select all

bool interrupt() {
	bool ret = UART1.int_raw.txfifo_empty;
	UART1.int_clr.txfifo_empty = 1;
	return ret
}
All interrupts and registers bits are in uart_struct.h, in tools/.../soc.