Read an 16-bit value from the specified address.

    Corresponds to viPeek16 function of the VISA library.

    :param library: the visa library wrapped by ctypes.
    :param session: Unique logical identifier to a session.
    :param address: Source address to read the value.
    :return: Data read from bus, return value of the library call.
    :rtype: bytes, :class:`pyvisa.constants.StatusCode`

def peek_16(library, session, address):
    """Read an 16-bit value from the specified address.

    Corresponds to viPeek16 function of the VISA library.

    :param library: the visa library wrapped by ctypes.
    :param session: Unique logical identifier to a session.
    :param address: Source address to read the value.
    :return: Data read from bus, return value of the library call.
    :rtype: bytes, :class:`pyvisa.constants.StatusCode`
    """
    value_16 = ViUInt16()
    ret = library.viPeek16(session, address, byref(value_16))
    return value_16.value, ret