diff options
| author | zvecr <git@zvecr.com> | 2019-02-22 21:10:16 +0000 |
|---|---|---|
| committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-04-12 14:04:40 -0700 |
| commit | 6832a067ef8966993319f07f34a4a08b39c2ded4 (patch) | |
| tree | d73e59a920aa0170e179f9d79c17b38fb2fae217 /util/atmega32a_program.py | |
| parent | 0e88d756f92d1254c58e66f9538c07b68ded489c (diff) | |
| download | qmk_firmware-6832a067ef8966993319f07f34a4a08b39c2ded4.tar.gz qmk_firmware-6832a067ef8966993319f07f34a4a08b39c2ded4.zip | |
Add vendor and product arguments to atmega32a_program.py - fix hex print
Diffstat (limited to 'util/atmega32a_program.py')
| -rwxr-xr-x | util/atmega32a_program.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/atmega32a_program.py b/util/atmega32a_program.py index 324614aff..9438c7e77 100755 --- a/util/atmega32a_program.py +++ b/util/atmega32a_program.py | |||
| @@ -42,8 +42,8 @@ def flash_keyboard(firmware_file): | |||
| 42 | def print_device_info(dev): | 42 | def print_device_info(dev): |
| 43 | """Prints all infos for a given USB device""" | 43 | """Prints all infos for a given USB device""" |
| 44 | print('Device Information:') | 44 | print('Device Information:') |
| 45 | print(' idVendor: %d (0x%02x)' % (dev.idVendor, dev.idVendor)) | 45 | print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) |
| 46 | print(' idProduct: %d (0x%02x)' % (dev.idProduct, dev.idProduct)) | 46 | print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) |
| 47 | print('Manufacturer: %s' % (dev.iManufacturer)) | 47 | print('Manufacturer: %s' % (dev.iManufacturer)) |
| 48 | print('Serial: %s' % (dev.iSerialNumber)) | 48 | print('Serial: %s' % (dev.iSerialNumber)) |
| 49 | print('Product: %s' % (dev.iProduct), end='\n\n') | 49 | print('Product: %s' % (dev.iProduct), end='\n\n') |
| @@ -71,8 +71,8 @@ def auto_int(value): | |||
| 71 | return int(value, 0) | 71 | return int(value, 0) |
| 72 | 72 | ||
| 73 | parser = argparse.ArgumentParser(description='Flash bootloadHID device') | 73 | parser = argparse.ArgumentParser(description='Flash bootloadHID device') |
| 74 | parser.add_argument('--vendor', type=auto_int, default=0x20A0, help='Non bootloader idVendor to search for (default: 0x%(default)02x)') | 74 | parser.add_argument('--vendor', type=auto_int, default=0x20A0, help='Non bootloader idVendor to search for (default: 0x%(default)04x)') |
| 75 | parser.add_argument('--product', type=auto_int, default=0x422D, help='Non bootloader idProduct to search for (default: 0x%(default)02x)') | 75 | parser.add_argument('--product', type=auto_int, default=0x422D, help='Non bootloader idProduct to search for (default: 0x%(default)04x)') |
| 76 | parser.add_argument('firmware_hex', type=argparse.FileType('r'), help='Firmware hex file to flash') | 76 | parser.add_argument('firmware_hex', type=argparse.FileType('r'), help='Firmware hex file to flash') |
| 77 | args = parser.parse_args() | 77 | args = parser.parse_args() |
| 78 | 78 | ||
