serial icon indicating copy to clipboard operation
serial copied to clipboard

Check for zero-sentinel on Windows

Open lachlanm-git opened this issue 7 months ago • 0 comments

For Windows COM ports, check whether the last byte is a zero-sentinel or not instead of assuming.

Closes https://github.com/ZigEmbeddedGroup/serial/issues/43

list.exe [master] Note the BthModem COM ports are one character too short
  path=\\.\COM,   name=COM,       driver=\Device\BthModem6 
  path=\\.\COM3,  name=COM3,      driver=\Device\BthModem4  
  path=\\.\COM,   name=COM,       driver=\Device\BthModem2 
  path=\\.\COM3,  name=COM3,      driver=\Device\BthModem0 
  path=\\.\COM2,  name=COM2,      driver=\Device\BthModem1 
  path=\\.\COM2,  name=COM2,      driver=\Device\BthModem3 
  path=\\.\COM26, name=COM26,     driver=\Device\VCP0
list.exe [branch]
  path=\\.\COM24, name=COM24,     driver=\Device\BthModem5
  path=\\.\COM3,  name=COM3,      driver=\Device\BthModem6
  path=\\.\COM30, name=COM30,     driver=\Device\BthModem4
  path=\\.\COM5,  name=COM5,      driver=\Device\BthModem2
  path=\\.\COM31, name=COM31,     driver=\Device\BthModem0
  path=\\.\COM29, name=COM29,     driver=\Device\BthModem1
  path=\\.\COM22, name=COM22,     driver=\Device\BthModem3
  path=\\.\COM26, name=COM26,     driver=\Device\VCP0

lachlanm-git avatar May 24 '25 05:05 lachlanm-git