更新UCD-API库及文档
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from UniTAP.libs.lib_tsi.tsi_io import PortIO
|
||||
from UniTAP.libs.lib_tsi.tsi import *
|
||||
import UniTAP.libs.lib_tsi.tsi as tsi
|
||||
import UniTAP.libs.lib_tsi.tsi_types as ci
|
||||
import UniTAP.libs.lib_tsi.tsi_private_types as p_ci
|
||||
from .pr_types import *
|
||||
from .pr_private_types import *
|
||||
|
||||
@@ -35,7 +37,7 @@ class PanelReplayConfig:
|
||||
"""
|
||||
caps = self.pr_caps
|
||||
|
||||
self.__io.set(TSI_PG_STREAM_SELECT, 0)
|
||||
self.__io.set(ci.TSI_PG_STREAM_SELECT, 0)
|
||||
pr_config, _ = self.__read_config()
|
||||
|
||||
pr_config.early_transport = config.flags.early_transport if caps.pr_flags().early_transport else 0
|
||||
@@ -60,7 +62,7 @@ class PanelReplayConfig:
|
||||
region = RegionConfig(0)
|
||||
region.value = item
|
||||
data.extend(region.value)
|
||||
self.__io.set(TSI_PG_PR_CFG, data, data_count=len(data))
|
||||
self.__io.set(p_ci.TSI_PG_PR_CFG, data, data_count=len(data))
|
||||
|
||||
def get(self) -> PrSettings:
|
||||
"""
|
||||
@@ -114,8 +116,8 @@ class PanelReplayConfig:
|
||||
def __read_config(self):
|
||||
caps = self.pr_caps
|
||||
|
||||
self.__io.set(TSI_PG_STREAM_SELECT, 0)
|
||||
result = self.__io.get(TSI_PG_PR_CFG, c_uint32, caps.calculate_size())[1]
|
||||
self.__io.set(ci.TSI_PG_STREAM_SELECT, 0)
|
||||
result = self.__io.get(p_ci.TSI_PG_PR_CFG, c_uint32, caps.calculate_size())[1]
|
||||
if not isinstance(result, list):
|
||||
result = [0]
|
||||
pr_config = PrConfig(result[0])
|
||||
@@ -128,5 +130,5 @@ class PanelReplayConfig:
|
||||
return pr_config, pr_regions
|
||||
|
||||
def __read_caps(self) -> PRCaps:
|
||||
self.__io.set(TSI_PG_STREAM_SELECT, 0)
|
||||
return self.__io.get(TSI_PG_PR_CAPS_R, PRCaps)[1]
|
||||
self.__io.set(ci.TSI_PG_STREAM_SELECT, 0)
|
||||
return self.__io.get(p_ci.TSI_PG_PR_CAPS_R, PRCaps)[1]
|
||||
|
||||
Reference in New Issue
Block a user