riot_sys::bindgen

Function mtd_read

Source
pub unsafe extern "C" fn mtd_read(
    mtd: *mut mtd_dev_t,
    dest: *mut c_void,
    addr: u32,
    count: u32,
) -> c_int
Expand description

@brief Read data from a MTD device

No alignment is required on @p addr and @p count.

@param mtd the device to read from @param[out] dest the buffer to fill in @param[in] addr the start address to read from @param[in] count the number of bytes to read

@retval 0 on success @retval <0 if an error occurred @retval -ENODEV if @p mtd is not a valid device @retval -ENOTSUP if operation is not supported on @p mtd @retval -EOVERFLOW if @p addr or @p count are not valid, i.e. outside memory @retval -EIO if I/O error occurred