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
288 stars 108 forks source link

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

Closed RushikeshPatange closed 1 year ago

RushikeshPatange commented 1 year ago

What Does This PR Do ?

@brianignacio5 Could you please take a look into this ?

balloob commented 1 year 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 1 year 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.