Lines Matching +full:flash +full:- +full:id

2  * Copyright (c) 2017-2024 Nordic Semiconductor ASA
6 * SPDX-License-Identifier: Apache-2.0
11 * @brief Public API for flash map
18 * @brief Abstraction over flash partitions/areas and their drivers
20 * @defgroup flash_area_api flash area Interface
28 * This API makes it possible to operate on flash areas easily and
31 * The system contains global data about flash areas. Every area
32 * contains an ID number, offset, and length.
49 * @brief Flash partition
51 * This structure represents a fixed-size partition on a flash device.
52 * Each partition contains one or more flash sectors.
55 /** ID number */
58 /** Start offset from the beginning of the flash device */
62 /** Backing flash device */
71 * @brief Structure for transfer flash sector boundaries
73 * This template is used for presentation of flash memory structure. It
77 /** Sector offset from the beginning of the flash device */
85 * @brief Structure for verify flash region integrity
87 * This is used to pass data to be used to check flash integrity using SHA-256
99 * Verify flash memory length bytes integrity from a flash area. The start
102 * @param[in] fa Flash area
103 * @param[in] fic Flash area check integrity data
112 * @brief Retrieve partitions flash area from the flash_map.
116 * @param[in] id ID of the flash partition.
118 * @p ID is unknown, it will be NULL on output.
120 * @return 0 on success, -EACCES if the flash_map is not available ,
121 * -ENOENT if @p ID is unknown, -ENODEV if there is no driver attached
124 int flash_area_open(uint8_t id, const struct flash_area **fa);
132 * @param[in] fa Flash area to be closed.
137 * @brief Verify that a device assigned to flash area is ready for use.
139 * Indicates whether the provided flash area has a device known to be
140 * in a state where it can be used with Flash Map API.
149 * passed as flash area pointer or device pointer within flash area object
154 return (fa != NULL && device_is_ready(fa->fa_dev)); in flash_area_device_is_ready()
158 * @brief Read flash area data
160 * Read data from flash area. Area readout boundaries are asserted before read
161 * request. API has the same limitation regard read-block alignment and size
162 * as wrapped flash driver.
164 * @param[in] fa Flash area
165 * @param[in] off Offset relative from beginning of flash area to read
175 * @brief Write data to flash area
177 * Write data to flash area. Area write boundaries are asserted before write
178 * request. API has the same limitation regard write-block alignment and size
179 * as wrapped flash driver.
181 * @param[in] fa Flash area
182 * @param[in] off Offset relative from beginning of flash area to write
192 * @brief Erase flash area
194 * Erase given flash area range. Area boundaries are asserted before erase
195 * request. API has the same limitation regard erase-block alignment and size
196 * as wrapped flash driver.
198 * @param[in] fa Flash area
199 * @param[in] off Offset relative from beginning of flash area.
207 * @brief Erase flash area or fill with erase-value
209 * On program-erase devices this function behaves exactly like flash_area_erase.
210 * On RAM non-volatile device it will call erase, if driver provides such
211 * callback, or will fill given range with erase-value defined by driver.
221 * @param[in] fa Flash area
222 * @param[in] off Offset relative from beginning of flash area.
230 * @brief Get write block size of the flash area
235 * @param[in] fa Flash area
237 * @return Alignment restriction for flash writes in [B].
244 * @param[in] fa_id Given flash area ID
250 * -ENOMEM if There are too many flash pages on the flash_area to fit in the
259 * @param[in] fa pointer to flash area object.
265 * -ENOMEM if There are too many flash pages on the flash_area to fit in the
271 * Flash map iteration callback
273 * @param fa flash area
281 * Iterate over flash map
289 * Check whether given flash area has supporting flash driver
292 * @param[in] fa Flash area.
294 * @return 1 On success. -ENODEV if no driver match.
299 * Get driver for given flash area.
301 * @param[in] fa Flash area.
311 * @param[in] fa Flash area.
320 * flash byte.
323 * @param fa Flash area.
330 * Returns non-0 value if fixed-partition of given DTS node label exists.
334 * @return non-0 if fixed-partition node exists and is enabled;
335 * 0 if node does not exist, is not enabled or is not fixed-partition.
340 * Get flash area ID from fixed-partition DTS node label
344 * @return flash area ID
349 * Get fixed-partition offset from DTS node label
353 * @return fixed-partition offset, as defined for the partition in DTS.
358 * Get fixed-partition offset from DTS node
362 * @return fixed-partition offset, as defined for the partition in DTS.
367 * Get fixed-partition size for DTS node label
371 * @return fixed-partition offset, as defined for the partition in DTS.
376 * Get fixed-partition size for DTS node
380 * @return fixed-partition size, as defined for the partition in DTS.