# (generated with --quick)

import lithi.core.logger
import lithi.interface.target
import pylink
import threading
import time
from typing import Any, Callable, Optional, TypeVar

BaseModel: Any
BaseTarget: type[lithi.interface.target.BaseTarget]
CoreRegister: type[lithi.interface.target.CoreRegister]
MemoryArea: type[lithi.interface.target.MemoryArea]
logger: lithi.core.logger._GlobalLoggerProxy

_T = TypeVar('_T', bound=lithi.interface.target.BaseTarget)

class JLinkConfig(Any):
    __doc__: str
    autoconnect: Optional[bool]
    device: str
    speed: int

class JLinkTarget(lithi.interface.target.BaseTarget):
    __doc__: str
    core_registers: dict[str, int]
    device: str
    is_auto_connect_enabled: Any
    jlink: Any
    lock: threading._RLock
    speed: int
    thread: threading.Thread
    def __del__(self) -> None: ...
    def __init__(self, config: JLinkConfig) -> None: ...
    def __str__(self) -> str: ...
    def _connector_loop(self) -> None: ...
    def _populate_core_regs(self) -> None: ...
    def _read_coreregister(self, register: lithi.interface.target.CoreRegister) -> int: ...
    def _read_memoryarea(self, memory: lithi.interface.target.MemoryArea) -> list[int]: ...
    def connect(self) -> None: ...
    def disconnect(self) -> None: ...
    def get_core_registers(self) -> list[lithi.interface.target.CoreRegister]: ...
    def is_connected(self) -> bool: ...
    def is_stopped(self) -> bool: ...
    def run(self) -> None: ...
    def stop(self) -> None: ...

def register_target(name: str, config_cls: Optional[type] = ...) -> Callable[[type[_T]], type[_T]]: ...
