pub unsafe extern "C" fn phydat_unit_write(
dest: *mut c_char,
max_size: size_t,
unit: u8,
) -> ssize_t
Expand description
@brief Write the string representation of the given unit into the given buffer
@param[out] dest destination buffer to write to @param[in] max_size size of the buffer at @p dest @param[in] unit unit to convert
@return Number of bytes written @retval -EOVERFLOW buffer at @p dest is too small @retval -EINVAL invalid unit in @p unit
@warning The function will never write a terminating zero byte
@note If you pass NULL
for @p dest, it will return the number of bytes
it would write (regardless of @p max_size)