esptool-js icon indicating copy to clipboard operation
esptool-js copied to clipboard

set device signals at the same time

Open brianignacio5 opened this issue 2 months ago • 1 comments

Description

This pull request refactors how device signals are set during the classic reset process to improve code clarity and maintainability. The main change is the introduction of a new method to set multiple device signals at once, replacing several individual signal-setting calls.

Refactoring and API improvements:

  • Added a new setSignals method to the Transport class in src/webserial.ts that allows setting dataTerminalReady, requestToSend, and break signals together, streamlining signal control.
  • Updated the ClassicReset strategy in src/reset.ts to use the new setSignals method, replacing multiple calls to individual signal setters for a more concise and readable reset sequence.

Fix #222

Testing

Manual testing using different devices like esp32 wrover kit and esp32h2 devkitM-1

Checklist

Before submitting a Pull Request, please ensure the following:

  • [ ] 🚨 This PR does not introduce breaking changes.
  • [ ] All CI checks (GH Actions) pass.
  • [ ] Documentation is updated as needed.
  • [ ] Tests are updated or added as necessary.
  • [ ] Code is well-commented, especially in complex areas.
  • [ ] Git history is clean — commits are squashed to the minimum necessary.

brianignacio5 avatar Dec 09 '25 06:12 brianignacio5