espressif / esptool-js

Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
https://espressif.github.io/esptool-js/
Apache License 2.0
251 stars 101 forks source link

Enhancement(web-serial): Enable Serial Options During Port Initialization #115

Closed RushikeshPatange closed 8 months ago

RushikeshPatange commented 8 months ago

What Does This PR Do ?

@brianignacio5 Could you please take a look into this ?

balloob commented 8 months ago

Since you're already able to pass in a port, is this PR still necessary? You can create/configure your port accordingly before passing it to esptool.

adwait-esp commented 8 months ago

Since you're already able to pass in a port, is this PR still necessary? You can create/configure your port accordingly before passing it to esptool.

With reference to the Weberial API Documentation - the SerialPort open method supports SerialOptions dictionary. https://wicg.github.io/serial/#serialoptions-dictionary.

We currently support passing only baudrate, where as other options would come handy as well. This PR still maintains baudrate as primary parameter (to preserve compatibility and not introduce any breaking changes). However we can phase it out later and make use of serialoptions dict to be passed instead in future.