Closed xiaguangbo closed 5 days ago
If you want to work on RS485 support in the public API feel free to send a PR. Though we have to be mindful to not break the usage for everyone else.
@Vollbrecht update, https://github.com/esp-rs/esp-idf-hal/pull/456
@xiaguangbo thank you for this, I was manually toggling the direction pin on an RS485 driver before this.
Is it possible to use a different pin for this?
@xiaguangbo thank you for this, I was manually toggling the direction pin on an RS485 driver before this.
Is it possible to use a different pin for this?
The master
has merge last change, If crate.io esp-idf-hal not update: copy master
src/uart.rs cover local code, cleaned rebuild
Link this, rts/dir
can be any pin.
let uart = UartDriver::new(
peripherals.uart1,
peripherals.pins.gpio5,
peripherals.pins.gpio6,
Option::<AnyIOPin>::None,
Some(peripherals.pins.gpio7), // rts/dir
&config::Config::new()
.mode(config::Mode::RS485HalfDuplex)
.baudrate(baudrate),
);
RTS for RS485 Half-Duplex Mode manages DE/~RE, tested
in esp-idf-hal/src/uart.rs: fn new_common