New proposal for improved approach to handle MCU reset with RTS and DTR sequence · Issue #824 · cncjs/cncjs · GitHub
More Web Proxy on the site http://driver.im/
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.Dismiss alert
The code seems solid but I think there is a better approach. Some MCUs, including ESP32, require a pulse on RTS with DTR held in a particular state. To handle this, I propose a string whose characters define a sequence of states:
d means DTR low
D means DTR high
r means RTS low
R means RTS high
nnn (a decimal number) means delay that many milliseconds
optional spaces for readability
An ESP32 reset would thus be "Dr50R". The existing cases could be handled with, for example, "", "d", "D", "r", "R", "dR", etc. There would only need to be one variable that could handle all situations. It could even handle delay-after-open with just a number, like "1000" for wait one second before proceeding.
A little more refinement:
empty string means "perform the controller-specific default reset sequence"
"0" means "do nothing, overriding the controller's default sequence". It is equivalent to "delay 0 milliseconds", so does not require a special case in the parser
The text was updated successfully, but these errors were encountered:
See #813 (review)
The text was updated successfully, but these errors were encountered: