esptool-js
esptool-js copied to clipboard
set device signals at the same time
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
setSignalsmethod to theTransportclass insrc/webserial.tsthat allows settingdataTerminalReady,requestToSend, andbreaksignals together, streamlining signal control. - Updated the
ClassicResetstrategy insrc/reset.tsto use the newsetSignalsmethod, 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.