52 lines
1.5 KiB
Python
52 lines
1.5 KiB
Python
#
|
|
# Import UniTAP module.
|
|
#
|
|
import time
|
|
|
|
import UniTAP
|
|
|
|
#
|
|
# To initialize UniTAP library wrapper user should create UniTAP.TsiLib() object.
|
|
#
|
|
lUniTAP = UniTAP.TsiLib()
|
|
|
|
#
|
|
# For opening device, please, put serial number of the device as 8 symbol str or put index of device.
|
|
#
|
|
# dev = lUniTAP.open("NNNNNNNN")
|
|
dev = lUniTAP.open(0)
|
|
|
|
# After opening device as in UCD Console device role should be selected.
|
|
|
|
# role = dev.select_role(UniTAP.dev.UCD400.DPSourceDPSink)
|
|
role = dev.select_role(UniTAP.dev.UCD323.DPSink)
|
|
|
|
print(f"AUX Controller(before), Routed LT status\n{role.dprx.link.aux_controller.status()}")
|
|
|
|
routed_lt_config = UniTAP.RoutedLTConfig()
|
|
routed_lt_config.lane_count = 4
|
|
routed_lt_config.pe = 1
|
|
routed_lt_config.vs = 1
|
|
routed_lt_config.link_bw = 10 # 2.7 Gbps
|
|
routed_lt_config.is128b132b = False
|
|
routed_lt_config.is_old_dp20_lt = False
|
|
routed_lt_config.is_edp_lt = False
|
|
|
|
use_ta_request = True
|
|
|
|
role.dprx.link.aux_controller.enable(True)
|
|
role.dprx.link.aux_controller.exec_routed_lt(config=routed_lt_config,
|
|
use_ta_request=use_ta_request)
|
|
|
|
time.sleep(5)
|
|
print(f"AUX Controller(after), Routed LT status\n{role.dprx.link.aux_controller.status()}")
|
|
#
|
|
# Since the 3.5 version, TsiLib and TSIDevice objects have the option to be closed earlier.
|
|
# TSIDevice can be closed with the TsiLib method close(). TsiLib can be closed with cleanup().
|
|
# Clean up will close all opened devices and block ability to open any devices
|
|
# with same TsiLib object.
|
|
#
|
|
lUniTAP.close(dev)
|
|
|
|
lUniTAP.cleanup()
|