Files
ATtiny814-USB-PD-Adapter/software/tools/pymcuprog/libs/pyedbglib/util/print_helpers.py
2022-09-11 11:42:08 +02:00

9 lines
334 B
Python

"""Generating string representations of variables for nice printouts"""
def bytelist_to_hex_string(bytelist):
"""
:param bytelist: list of byte values
:return: String representation of the bytelist with each item as a byte value on the format 0xXX
"""
return '[' + ', '.join("0x%02X" % x for x in bytelist) + ']'