riot_sys::bindgen

Function nanocbor_get_float

Source
pub unsafe extern "C" fn nanocbor_get_float(
    cvalue: *mut nanocbor_value_t,
    value: *mut f32,
) -> c_int
Expand description

@brief Retrieve a float value from the stream.

This function automatically converts CBOR half floats into 32 bit floating points.

@note This function assumes the host uses ieee754 to represent floating point numbers

@param[in] cvalue CBOR value to decode from @param[out] value Simple value retrieved from the stream

@return number of bytes read on success @return negative on error