Lines Matching +full:non +full:- +full:uniform
2 * Copyright (c) 2017-2024 Nordic Semiconductor ASA
5 * SPDX-License-Identifier: Apache-2.0
85 #define FLASH_ERASE_CAPS_UNSET (int)-1
110 return (p->caps.no_explicit_erase) ? 0 : FLASH_ERASE_C_EXPLICIT; in flash_params_get_erase_cap()
135 * the driver, with the driver responsible for ensuring the "write-protect"
136 * after the operation completes (successfully or not) matches the write-protect
146 * the driver, with the driver responsible for ensuring the "erase-protect"
147 * after the operation completes (successfully or not) matches the erase-protect
150 * The callback is optional for RAM non-volatile devices, which do not
176 * A flash device layout is a run-length encoded description of the
180 * For flash memories which have uniform page sizes, this routine
253 (const struct flash_driver_api *)dev->api; in z_impl_flash_read()
255 return api->read(dev, offset, data, len); in z_impl_flash_read()
284 (const struct flash_driver_api *)dev->api; in z_impl_flash_write()
287 rc = api->write(dev, offset, data, len); in z_impl_flash_write()
296 * hardware-specific multiples of page size and offset. Please check
306 * device, i.e. setting it to erase-value, prior to some operations,
307 * but should work with explicit erase and RAM non-volatile devices,
325 int rc = -ENOSYS; in z_impl_flash_erase()
328 (const struct flash_driver_api *)dev->api; in z_impl_flash_erase()
330 if (api->erase != NULL) { in z_impl_flash_erase()
331 rc = api->erase(dev, offset, size); in z_impl_flash_erase()
341 * returning size, specifically those with non uniform page layouts or banked,
342 * in which case the function will return -ENOTSUP, and user has to rely
354 int rc = -ENOSYS; in z_impl_flash_get_size()
355 const struct flash_driver_api *api = (const struct flash_driver_api *)dev->api; in z_impl_flash_get_size()
357 if (api->get_size != NULL) { in z_impl_flash_get_size()
358 rc = api->get_size(dev, size); in z_impl_flash_get_size()
388 * it has no erase at all or has auto-erase/erase-on-write,
396 * will return on, if these constrains are not met, -EINVAL for
397 * paged device, but may succeed on non-explicit erase devices.
398 * For RAM non-volatile devices the erase pages are emulated,
405 * function; but if your code can work with non-volatile RAM type devices,
407 * of execution for page-erase, i.e. Flash, devices and call
434 * @return 0 on success, -EINVAL if page of the offset doesn't exist.
447 * @return 0 on success, -EINVAL if page of the index doesn't exist.
508 * @retval -ENOTSUP if the flash driver does not support SFDP access
518 int rv = -ENOTSUP; in z_impl_flash_sfdp_read()
520 (const struct flash_driver_api *)dev->api; in z_impl_flash_sfdp_read()
522 if (api->sfdp_read != NULL) { in z_impl_flash_sfdp_read()
523 rv = api->sfdp_read(dev, offset, data, len); in z_impl_flash_sfdp_read()
535 * @retval 0 on successful store of 3-byte JEDEC id
536 * @retval -ENOTSUP if flash driver doesn't support this function
544 int rv = -ENOTSUP; in z_impl_flash_read_jedec_id()
546 (const struct flash_driver_api *)dev->api; in z_impl_flash_read_jedec_id()
548 if (api->read_jedec_id != NULL) { in z_impl_flash_read_jedec_id()
549 rv = api->read_jedec_id(dev, id); in z_impl_flash_read_jedec_id()
559 * block size of memory used because the driver might implements write-modify
571 (const struct flash_driver_api *)dev->api; in z_impl_flash_get_write_block_size()
573 return api->get_parameters(dev)->write_block_size; in z_impl_flash_get_write_block_size()
593 (const struct flash_driver_api *)dev->api; in z_impl_flash_get_parameters()
595 return api->get_parameters(dev); in z_impl_flash_get_parameters()
619 * @retval -ENOTSUP if given device doesn't support extended operation.
620 * @retval -ENOSYS if support for extended operations is not enabled in Kconfig
650 * @retval -EINVAL if an argument is invalid.
651 * @retval -EIO if an I/O error occurs.
652 * @retval -ENODEV if either @a src_dev or @a dst_dev are not ready.
688 (const struct flash_driver_api *)dev->api; in z_impl_flash_ex_op()
690 if (api->ex_op == NULL) { in z_impl_flash_ex_op()
691 return -ENOTSUP; in z_impl_flash_ex_op()
694 return api->ex_op(dev, code, in, out); in z_impl_flash_ex_op()
701 return -ENOSYS; in z_impl_flash_ex_op()