更新UCD-API库及文档
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import re
|
||||
from typing import Union, Optional
|
||||
from enum import IntEnum
|
||||
|
||||
from UniTAP.dev import *
|
||||
from UniTAP.libs.lib_tsi import BaseIO, DeviceMaskInternal
|
||||
from UniTAP.libs.lib_tsi import BaseIO
|
||||
import UniTAP.libs.lib_tsi.tsi_private_types as p_ci
|
||||
from UniTAP.utils import tsi_logging as logging
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ class TsiLib:
|
||||
- Open selected device `open`.
|
||||
"""
|
||||
|
||||
__device_mask_convert = {DeviceMask.Sink: DeviceMaskInternal.Sink,
|
||||
DeviceMask.Source: DeviceMaskInternal.Source,
|
||||
DeviceMask.All: DeviceMaskInternal.All,
|
||||
DeviceMask.Nothing: DeviceMaskInternal.Nothing}
|
||||
__device_mask_convert = {DeviceMask.Sink: p_ci.DeviceMaskInternal.Sink,
|
||||
DeviceMask.Source: p_ci.DeviceMaskInternal.Source,
|
||||
DeviceMask.All: p_ci.DeviceMaskInternal.All,
|
||||
DeviceMask.Nothing: p_ci.DeviceMaskInternal.Nothing}
|
||||
|
||||
def __init__(self):
|
||||
logging.info(f"[UniTAP] TsiLib.init {self}")
|
||||
@@ -70,11 +70,6 @@ class TsiLib:
|
||||
self.__io.cleanup()
|
||||
logging.info(f"[UniTAP] TsiLib.cleanup {self}")
|
||||
|
||||
def rescan_devices(self):
|
||||
"""Rescan USB for newly connected TSI devices without tearing down the library."""
|
||||
self.__io.rescan_devices()
|
||||
logging.info(f"[UniTAP] TsiLib.rescan_devices {self}")
|
||||
|
||||
def __del__(self):
|
||||
"""
|
||||
Automatically call the destructor after the script completes.
|
||||
|
||||
Reference in New Issue
Block a user