You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
By clicking “Sign up for GitHub”, you agree to our
terms of service
and
privacy statement
. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
let
pins = peripherals
.
pins
;
let
config = serial
::
config
::
Config
::
default
(
)
.
baudrate
(
Hertz
(
115_200
)
)
;
match
serial
::
Serial
::
new
(
peripherals
.
uart1
,
serial
::
Pins
{
tx
:
pins
.
gpio27
.
into_output
(
)
?
,
rx
:
pins
.
gpio26
.
into_input
(
)
?
,
cts
:
Option
::
<
gpio
::
Gpio21
<
gpio
::
Unknown
>
>
::
None
,
rts
:
Option
::
<
gpio
::
Gpio22
<
gpio
::
Unknown
>
>
::
None
,
config
,
Ok
(
serial
)
=>
{
}
Err
(
e
)
=>
error
!
(
"uart {:?}"
, e
)
,
E (658) uart: uart_driver_install(1323): uart rx buffer length error
E (658) esp32rogue: uart EspError(-1)
Buffer must be >128
:
https://github.com/espressif/esp-idf/blob/master/components/driver/uart.c#L1522
https://github.com/espressif/esp-idf/blob/b86fe0c66ca17d5907ae26ecdffc9d4eb79cec07/components/soc/esp32/include/soc/soc_caps.h#L255
I am preparing a PR to fix this and also update serial docs.
* serial: fix write()
if success idf uart_write_bytes() function returns number of bytes sent
* serial: fix uart_write_bytes error handling
* serial: fix setting optional RTS and CTS pins
* serial: fix read()
* serial: fix write()
if success idf uart_write_bytes() function returns number of bytes sent
* serial: fix uart_write_bytes error handling
* serial: fix setting optional RTS and CTS pins
* serial: fix read()