sofubi 2c69d0e197 Start work on types
Bring in typings folder for adafruit_ble and micropython
2021-08-13 23:10:43 -04:00

78 lines
2.0 KiB
Python

"""
This type stub file was generated by pyright.
"""
from . import Service
"""
`nordic`
====================================================
This module provides Services used by Nordic Semiconductors.
"""
__version__ = ...
__repo__ = ...
class UARTService(Service):
"""
Provide UART-like functionality via the Nordic NUS service.
:param int timeout: the timeout in seconds to wait
for the first character and between subsequent characters.
:param int buffer_size: buffer up to this many bytes.
If more bytes are received, older bytes will be discarded.
See ``examples/ble_uart_echo_test.py`` for a usage example.
"""
uuid = ...
_server_tx = ...
_server_rx = ...
def __init__(self, service=...) -> None:
...
def read(self, nbytes=...):
"""
Read characters. If ``nbytes`` is specified then read at most that many bytes.
Otherwise, read everything that arrives until the connection times out.
Providing the number of bytes expected is highly recommended because it will be faster.
:return: Data read
:rtype: bytes or None
"""
...
def readinto(self, buf, nbytes=...):
"""
Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
that many bytes. Otherwise, read at most ``len(buf)`` bytes.
:return: number of bytes read and stored into ``buf``
:rtype: int or None (on a non-blocking error)
"""
...
def readline(self):
"""
Read a line, ending in a newline character.
:return: the line read
:rtype: bytes or None
"""
...
@property
def in_waiting(self):
"""The number of bytes in the input buffer, available to be read."""
...
def reset_input_buffer(self): # -> None:
"""Discard any unread characters in the input buffer."""
...
def write(self, buf): # -> None:
"""Write a buffer of bytes."""
...