pub unsafe extern "C" fn iio_device_attr_write(
    dev: *const iio_device,
    attr: *const c_char,
    src: *const c_char
) -> isize
Expand description

@brief Set the value of the given device-specific attribute @param dev A pointer to an iio_device structure @param attr A NULL-terminated string corresponding to the name of the attribute @param src A NULL-terminated string to set the attribute to @return On success, the number of bytes written @return On error, a negative errno code is returned

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

The buffer must contain one block of data per 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, the attribute is not written; if positive, it corresponds to the length of the data to write. In that case, the rest of the block must contain the data.