Skip to content
Snippets Groups Projects
Select Git revision
  • e11fddfe66fcd6fa5b783bb5f1c39dfb5687538d
  • master default protected
  • LUFA-170418
  • LUFA-151115
  • LUFA-140928
  • LUFA-140302
  • LUFA-130901
  • LUFA-130901-BETA
  • LUFA-130303
  • LUFA-120730
  • LUFA-120730-BETA
  • LUFA-120219
  • LUFA-120219-BETA
  • LUFA-111009
  • LUFA-111009-BETA
  • LUFA-110528
  • LUFA-110528-BETA
17 results

Serial.c

Blame
  • serial_list.py 666 B
    import serial.tools.list_ports
    
    def list_serial_ports():
        ports = serial.tools.list_ports.comports()
        for port in ports:
            print(f"Port: {port.device}")
            print(f" - Description: {port.description}")
            if port.serial_number:
                print(f" - Serial Number: {port.serial_number}")
            if port.manufacturer:
                print(f" - Manufacturer: {port.manufacturer}")
            if port.product:
                print(f" - Product: {port.product}")
            if port.vid is not None:
                print(f" - VID: {port.vid:04X}")
            if port.pid is not None:
                print(f" - PID: {port.pid:04X}")
            print()
    
    list_serial_ports()