poseyctrl.patch.nordic

nordic

This module provides Services used by Nordic Semiconductors.

Classes

UARTService([service])

Provide UART-like functionality via the Nordic NUS service.

class poseyctrl.patch.nordic.UARTService(service=None)[source]

Provide UART-like functionality via the Nordic NUS service.

property in_waiting

The number of bytes in the input buffer, available to be read.

read(nbytes=None)[source]

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.

Returns:

Data read

Return type:

bytes or None

readinto(buf, nbytes=None)[source]

Read bytes into the buf. If nbytes is specified then read at most that many bytes. Otherwise, read at most len(buf) bytes.

Returns:

number of bytes read and stored into buf

Return type:

int or None (on a non-blocking error)

readline()[source]

Read a line, ending in a newline character.

Returns:

the line read

Return type:

bytes or None

reset_input_buffer()[source]

Discard any unread characters in the input buffer.

uuid = <adafruit_ble.uuid.VendorUUID object>
write(buf)[source]

Write a buffer of bytes.


Last update: May 05, 2023