RS485 Library

Vimes45
Posts: 2
Joined: Tue Nov 03, 2020 5:42 pm

RS485 Library

Postby Vimes45 » Mon Nov 09, 2020 12:35 pm

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.

Vimes45
Posts: 2
Joined: Tue Nov 03, 2020 5:42 pm

Re: RS485 Library

Postby Vimes45 » Thu Nov 12, 2020 2:07 pm

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.

Who is online

Users browsing this forum: Bing [Bot], Kuralmozhi and 89 guests