mirror of
https://github.com/wagiminator/ATtiny814-USB-PD-Adapter.git
synced 2025-08-06 12:47:16 +03:00
9 lines
334 B
Python
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) + ']'
|