Function riot_sys::mtd_erase

source ·
pub unsafe extern "C" fn mtd_erase(
    mtd: *mut mtd_dev_t,
    addr: u32,
    count: u32
) -> c_int
Expand description

@brief Erase sectors of a MTD device

@p addr must be aligned on a sector boundary. @p count must be a multiple of a sector size.

@param mtd the device to erase @param[in] addr the address of the first sector to erase @param[in] count the number of bytes to erase

@retval 0 if erase successful @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