pub unsafe extern "C" fn iio_device_debug_attr_read(
    dev: *const iio_device,
    attr: *const c_char,
    dst: *mut c_char,
    len: usize
) -> isize
Expand description

@brief Read the content of the given debug attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the debug attribute @param dst A pointer to the memory area where the NULL-terminated string corresponding to the value read will be stored @param len The available length of the memory area, in bytes @return On success, the number of bytes written to the buffer @return On error, a negative errno code is returned

NOTE:By passing NULL as the “attr” argument to iio_device_debug_attr_read, it is now possible to read all of the debug attributes of a device.

The buffer is filled with one block of data per debug attribute of the device, by the order they appear in the iio_device structure.

The first four bytes of one block correspond to a 32-bit signed value in network order. If negative, it corresponds to the errno code that were returned when reading the debug attribute; if positive, it corresponds to the length of the data read. In that case, the rest of the block contains the data.