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. Tracked-On: #6287 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
0991f7f03b
commit
127e12a56a
|
@ -43,6 +43,10 @@ def SmallResourceItemIRQ_factory(_len):
|
||||||
('_WKC', ctypes.c_uint8, 1),
|
('_WKC', ctypes.c_uint8, 1),
|
||||||
('reserved', ctypes.c_uint8, 2),
|
('reserved', ctypes.c_uint8, 2),
|
||||||
] if (_len > 2) else [])
|
] if (_len > 2) else [])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def irqs(self):
|
||||||
|
return [i for i in range(0, 16) if ((self._INT & (1 << i)) != 0)]
|
||||||
return SmallResourceItemIRQ
|
return SmallResourceItemIRQ
|
||||||
|
|
||||||
# 6.4.2.2 DMA Descriptor
|
# 6.4.2.2 DMA Descriptor
|
||||||
|
|
Loading…
Reference in New Issue