board_inspector: add conversion to hex string from buffer fields
Occasionally buffer fields (which are typically integers) are converted to hexadecimal strings for debugging purposes. This patch adds the conversion to suppress interpretation errors of these debugging calls. This patch is added in v3 of the series. Tracked-On: #6287 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
d66c62aad1
commit
5d44640515
|
@ -221,6 +221,9 @@ class BufferField(Object):
|
||||||
def to_string(self):
|
def to_string(self):
|
||||||
return f"BufferField({self.__field})"
|
return f"BufferField({self.__field})"
|
||||||
|
|
||||||
|
def to_hex_string(self):
|
||||||
|
return String(hex(self.get())[2:])
|
||||||
|
|
||||||
# DebugObject
|
# DebugObject
|
||||||
|
|
||||||
class Device(Object):
|
class Device(Object):
|
||||||
|
|
Loading…
Reference in New Issue