board_inspector: add a property to reflect the encoded IRQs in RDT
This patch adds the property `irqs` to the class SmallResourceitemIRQ so
that the list of IRQs encoded in this resource item can be retrieved
easily.
@@ -43,6 +43,10 @@ def SmallResourceItemIRQ_factory(_len):
('_WKC', ctypes.c_uint8, 1),
('reserved', ctypes.c_uint8, 2),
] if (_len > 2) else [])
+
+ @property
+ def irqs(self):
+ return [i for i in range(0, 16) if ((self._INT & (1 << i)) != 0)]
return SmallResourceItemIRQ
# 6.4.2.2 DMA Descriptor
