diff --git a/drivers/flash/flash_gecko.c b/drivers/flash/flash_gecko.c index 9f365db3e72..817e72d0b6e 100644 --- a/drivers/flash/flash_gecko.c +++ b/drivers/flash/flash_gecko.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #define LOG_LEVEL CONFIG_FLASH_LOG_LEVEL diff --git a/drivers/flash/flash_handlers.c b/drivers/flash/flash_handlers.c index 206e867e778..1b76a2d92b0 100644 --- a/drivers/flash/flash_handlers.c +++ b/drivers/flash/flash_handlers.c @@ -5,7 +5,7 @@ */ #include -#include +#include Z_SYSCALL_HANDLER(flash_read, dev, offset, data, len) { diff --git a/drivers/flash/flash_native_posix.c b/drivers/flash/flash_native_posix.c index e0dc564b49b..ea1d6988bdf 100644 --- a/drivers/flash/flash_native_posix.c +++ b/drivers/flash/flash_native_posix.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/drivers/flash/flash_page_layout.c b/drivers/flash/flash_page_layout.c index 36d0c678362..1ac9f216058 100644 --- a/drivers/flash/flash_page_layout.c +++ b/drivers/flash/flash_page_layout.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include static int flash_get_page_info(struct device *dev, off_t offs, bool use_addr, struct flash_pages_info *info) diff --git a/drivers/flash/flash_sam.c b/drivers/flash/flash_sam.c index 75826730789..fd050c7a299 100644 --- a/drivers/flash/flash_sam.c +++ b/drivers/flash/flash_sam.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/flash/flash_sam0.c b/drivers/flash/flash_sam0.c index 0bcd040d728..96c6546ffee 100644 --- a/drivers/flash/flash_sam0.c +++ b/drivers/flash/flash_sam0.c @@ -9,7 +9,7 @@ LOG_MODULE_REGISTER(flash_sam0); #include -#include +#include #include #include #include diff --git a/drivers/flash/flash_shell.c b/drivers/flash/flash_shell.c index 21e2f4f437a..599dd57a219 100644 --- a/drivers/flash/flash_shell.c +++ b/drivers/flash/flash_shell.c @@ -11,7 +11,7 @@ #include #include -#include "flash.h" +#include #include #define FLASH_SHELL_MODULE "flash" diff --git a/drivers/flash/flash_simulator.c b/drivers/flash/flash_simulator.c index 367fbe429dc..2362509cfc5 100644 --- a/drivers/flash/flash_simulator.c +++ b/drivers/flash/flash_simulator.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/drivers/flash/flash_stm32.c b/drivers/flash/flash_stm32.c index 21ebb1ae2bb..ced2fd71fee 100644 --- a/drivers/flash/flash_stm32.c +++ b/drivers/flash/flash_stm32.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/flash/flash_stm32f0x.c b/drivers/flash/flash_stm32f0x.c index d8cdae89249..187499415df 100644 --- a/drivers/flash/flash_stm32f0x.c +++ b/drivers/flash/flash_stm32f0x.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN); #include #include #include -#include +#include #include #include diff --git a/drivers/flash/flash_stm32f3x.c b/drivers/flash/flash_stm32f3x.c index 8cfa2744890..b7e5475efb4 100644 --- a/drivers/flash/flash_stm32f3x.c +++ b/drivers/flash/flash_stm32f3x.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN); #include #include #include -#include +#include #include #include diff --git a/drivers/flash/flash_stm32f4x.c b/drivers/flash/flash_stm32f4x.c index cb828f8aa06..86a7c88ef50 100644 --- a/drivers/flash/flash_stm32f4x.c +++ b/drivers/flash/flash_stm32f4x.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/flash/flash_stm32f7x.c b/drivers/flash/flash_stm32f7x.c index 58c719f61f5..0b58aa2be39 100644 --- a/drivers/flash/flash_stm32f7x.c +++ b/drivers/flash/flash_stm32f7x.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/flash/flash_stm32l4x.c b/drivers/flash/flash_stm32l4x.c index fc3cbcd3078..33468f7d313 100644 --- a/drivers/flash/flash_stm32l4x.c +++ b/drivers/flash/flash_stm32l4x.c @@ -13,7 +13,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN); #include #include #include -#include +#include #include #include diff --git a/drivers/flash/flash_stm32wbx.c b/drivers/flash/flash_stm32wbx.c index f849db9762e..a44d977857c 100644 --- a/drivers/flash/flash_stm32wbx.c +++ b/drivers/flash/flash_stm32wbx.c @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN); #include #include #include -#include +#include #include #include #include diff --git a/drivers/flash/soc_flash_mcux.c b/drivers/flash/soc_flash_mcux.c index f027b5afda9..b202b378bd4 100644 --- a/drivers/flash/soc_flash_mcux.c +++ b/drivers/flash/soc_flash_mcux.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/flash/soc_flash_nios2_qspi.c b/drivers/flash/soc_flash_nios2_qspi.c index 357ce817a83..f8458c3352e 100644 --- a/drivers/flash/soc_flash_nios2_qspi.c +++ b/drivers/flash/soc_flash_nios2_qspi.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/flash/soc_flash_nrf.c b/drivers/flash/soc_flash_nrf.c index ae80e751007..03668061bd7 100644 --- a/drivers/flash/soc_flash_nrf.c +++ b/drivers/flash/soc_flash_nrf.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/flash/soc_flash_qmsi.c b/drivers/flash/soc_flash_qmsi.c index f5b0270cb45..68369b16cc0 100644 --- a/drivers/flash/soc_flash_qmsi.c +++ b/drivers/flash/soc_flash_qmsi.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include "flash_priv.h" diff --git a/drivers/flash/soc_flash_rv32m1.c b/drivers/flash/soc_flash_rv32m1.c index 89dcfaea0c5..8d8a1dd0c35 100644 --- a/drivers/flash/soc_flash_rv32m1.c +++ b/drivers/flash/soc_flash_rv32m1.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/flash/spi_flash_w25qxxdv.c b/drivers/flash/spi_flash_w25qxxdv.c index 22d7a65d170..ff44659621a 100644 --- a/drivers/flash/spi_flash_w25qxxdv.c +++ b/drivers/flash/spi_flash_w25qxxdv.c @@ -6,7 +6,7 @@ #include -#include +#include #include #include #include diff --git a/drivers/flash/spi_nor.c b/drivers/flash/spi_nor.c index 0936170d6d8..30f2d4ae81b 100644 --- a/drivers/flash/spi_nor.c +++ b/drivers/flash/spi_nor.c @@ -7,7 +7,7 @@ */ #include -#include +#include #include #include #include diff --git a/include/drivers/flash.h b/include/drivers/flash.h new file mode 100644 index 00000000000..ed4bdfec503 --- /dev/null +++ b/include/drivers/flash.h @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2017 Nordic Semiconductor ASA + * Copyright (c) 2016 Intel Corporation + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file + * @brief Public API for FLASH drivers + */ + +#ifndef ZEPHYR_INCLUDE_DRIVERS_FLASH_H_ +#define ZEPHYR_INCLUDE_DRIVERS_FLASH_H_ + +/** + * @brief FLASH Interface + * @defgroup flash_interface FLASH Interface + * @ingroup io_interfaces + * @{ + */ + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(CONFIG_FLASH_PAGE_LAYOUT) +struct flash_pages_layout { + size_t pages_count; /* count of pages sequence of the same size */ + size_t pages_size; +}; +#endif /* CONFIG_FLASH_PAGE_LAYOUT */ + +typedef int (*flash_api_read)(struct device *dev, off_t offset, void *data, + size_t len); +typedef int (*flash_api_write)(struct device *dev, off_t offset, + const void *data, size_t len); +typedef int (*flash_api_erase)(struct device *dev, off_t offset, size_t size); +typedef int (*flash_api_write_protection)(struct device *dev, bool enable); + +#if defined(CONFIG_FLASH_PAGE_LAYOUT) +/** + * @brief Retrieve a flash device's layout. + * + * A flash device layout is a run-length encoded description of the + * pages on the device. (Here, "page" means the smallest erasable + * area on the flash device.) + * + * For flash memories which have uniform page sizes, this routine + * returns an array of length 1, which specifies the page size and + * number of pages in the memory. + * + * Layouts for flash memories with nonuniform page sizes will be + * returned as an array with multiple elements, each of which + * describes a group of pages that all have the same size. In this + * case, the sequence of array elements specifies the order in which + * these groups occur on the device. + * + * @param dev Flash device whose layout to retrieve. + * @param layout The flash layout will be returned in this argument. + * @param layout_size The number of elements in the returned layout. + */ +typedef void (*flash_api_pages_layout)(struct device *dev, + const struct flash_pages_layout **layout, + size_t *layout_size); +#endif /* CONFIG_FLASH_PAGE_LAYOUT */ + +struct flash_driver_api { + flash_api_read read; + flash_api_write write; + flash_api_erase erase; + flash_api_write_protection write_protection; +#if defined(CONFIG_FLASH_PAGE_LAYOUT) + flash_api_pages_layout page_layout; +#endif /* CONFIG_FLASH_PAGE_LAYOUT */ + const size_t write_block_size; +}; + +/** + * @brief Read data from flash + * + * @param dev : flash dev + * @param offset : Offset (byte aligned) to read + * @param data : Buffer to store read data + * @param len : Number of bytes to read. + * + * @return 0 on success, negative errno code on fail. + */ +__syscall int flash_read(struct device *dev, off_t offset, void *data, + size_t len); + +static inline int z_impl_flash_read(struct device *dev, off_t offset, void *data, + size_t len) +{ + const struct flash_driver_api *api = dev->driver_api; + + return api->read(dev, offset, data, len); +} + +/** + * @brief Write buffer into flash memory. + * + * Prior to the invocation of this API, the flash_write_protection_set needs + * to be called first to disable the write protection. + * + * @param dev : flash device + * @param offset : starting offset for the write + * @param data : data to write + * @param len : Number of bytes to write + * + * @return 0 on success, negative errno code on fail. + */ +__syscall int flash_write(struct device *dev, off_t offset, const void *data, + size_t len); + +static inline int z_impl_flash_write(struct device *dev, off_t offset, + const void *data, size_t len) +{ + const struct flash_driver_api *api = dev->driver_api; + + return api->write(dev, offset, data, len); +} + +/** + * @brief Erase part or all of a flash memory + * + * Acceptable values of erase size and offset are subject to + * hardware-specific multiples of page size and offset. Please check + * the API implemented by the underlying sub driver, for example by + * using flash_get_page_info_by_offs() if that is supported by your + * flash driver. + * + * Prior to the invocation of this API, the flash_write_protection_set needs + * to be called first to disable the write protection. + * + * @param dev : flash device + * @param offset : erase area starting offset + * @param size : size of area to be erased + * + * @return 0 on success, negative errno code on fail. + * + * @see flash_get_page_info_by_offs() + * @see flash_get_page_info_by_idx() + */ +__syscall int flash_erase(struct device *dev, off_t offset, size_t size); + +static inline int z_impl_flash_erase(struct device *dev, off_t offset, + size_t size) +{ + const struct flash_driver_api *api = dev->driver_api; + + return api->erase(dev, offset, size); +} + +/** + * @brief Enable or disable write protection for a flash memory + * + * This API is required to be called before the invocation of write or erase + * API. Please note that on some flash components, the write protection is + * automatically turned on again by the device after the completion of each + * write or erase calls. Therefore, on those flash parts, write protection needs + * to be disabled before each invocation of the write or erase API. Please refer + * to the sub-driver API or the data sheet of the flash component to get details + * on the write protection behavior. + * + * @param dev : flash device + * @param enable : enable or disable flash write protection + * + * @return 0 on success, negative errno code on fail. + */ +__syscall int flash_write_protection_set(struct device *dev, bool enable); + +static inline int z_impl_flash_write_protection_set(struct device *dev, + bool enable) +{ + const struct flash_driver_api *api = dev->driver_api; + + return api->write_protection(dev, enable); +} + +struct flash_pages_info { + off_t start_offset; /* offset from the base of flash address */ + size_t size; + u32_t index; +}; + +#if defined(CONFIG_FLASH_PAGE_LAYOUT) +/** + * @brief Get the size and start offset of flash page at certain flash offset. + * + * @param dev flash device + * @param offset Offset within the page + * @param info Page Info structure to be filled + * + * @return 0 on success, -EINVAL if page of the offset doesn't exist. + */ +__syscall int flash_get_page_info_by_offs(struct device *dev, off_t offset, + struct flash_pages_info *info); + +/** + * @brief Get the size and start offset of flash page of certain index. + * + * @param dev flash device + * @param page_index Index of the page. Index are counted from 0. + * @param info Page Info structure to be filled + * + * @return 0 on success, -EINVAL if page of the index doesn't exist. + */ +__syscall int flash_get_page_info_by_idx(struct device *dev, u32_t page_index, + struct flash_pages_info *info); + +/** + * @brief Get the total number of flash pages. + * + * @param dev flash device + * + * @return Number of flash pages. + */ +__syscall size_t flash_get_page_count(struct device *dev); + +/** + * @brief Callback type for iterating over flash pages present on a device. + * + * The callback should return true to continue iterating, and false to halt. + * + * @param info Information for current page + * @param data Private data for callback + * @return True to continue iteration, false to halt iteration. + * @see flash_page_foreach() + */ +typedef bool (*flash_page_cb)(const struct flash_pages_info *info, void *data); + +/** + * @brief Iterate over all flash pages on a device + * + * This routine iterates over all flash pages on the given device, + * ordered by increasing start offset. For each page, it invokes the + * given callback, passing it the page's information and a private + * data object. + * + * @param dev Device whose pages to iterate over + * @param cb Callback to invoke for each flash page + * @param data Private data for callback function + */ +void flash_page_foreach(struct device *dev, flash_page_cb cb, void *data); +#endif /* CONFIG_FLASH_PAGE_LAYOUT */ + +/** + * @brief Get the minimum write block size supported by the driver + * + * The write block size supported by the driver might differ from the write + * block size of memory used because the driver might implements write-modify + * algorithm. + * + * @param dev flash device + * + * @return write block size in bytes. + */ +__syscall size_t flash_get_write_block_size(struct device *dev); + +static inline size_t z_impl_flash_get_write_block_size(struct device *dev) +{ + const struct flash_driver_api *api = dev->driver_api; + + return api->write_block_size; +} + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#include + +#endif /* ZEPHYR_INCLUDE_DRIVERS_FLASH_H_ */ diff --git a/include/flash.h b/include/flash.h index 198609716b9..b9140584c5d 100644 --- a/include/flash.h +++ b/include/flash.h @@ -1,283 +1,15 @@ /* - * Copyright (c) 2017 Nordic Semiconductor ASA - * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2019 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ - -/** - * @file - * @brief Public API for FLASH drivers - */ - #ifndef ZEPHYR_INCLUDE_FLASH_H_ #define ZEPHYR_INCLUDE_FLASH_H_ -/** - * @brief FLASH Interface - * @defgroup flash_interface FLASH Interface - * @ingroup io_interfaces - * @{ - */ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { +#ifndef CONFIG_COMPAT_INCLUDES +#warning "This header file has moved, include instead." #endif -#if defined(CONFIG_FLASH_PAGE_LAYOUT) -struct flash_pages_layout { - size_t pages_count; /* count of pages sequence of the same size */ - size_t pages_size; -}; -#endif /* CONFIG_FLASH_PAGE_LAYOUT */ - -typedef int (*flash_api_read)(struct device *dev, off_t offset, void *data, - size_t len); -typedef int (*flash_api_write)(struct device *dev, off_t offset, - const void *data, size_t len); -typedef int (*flash_api_erase)(struct device *dev, off_t offset, size_t size); -typedef int (*flash_api_write_protection)(struct device *dev, bool enable); - -#if defined(CONFIG_FLASH_PAGE_LAYOUT) -/** - * @brief Retrieve a flash device's layout. - * - * A flash device layout is a run-length encoded description of the - * pages on the device. (Here, "page" means the smallest erasable - * area on the flash device.) - * - * For flash memories which have uniform page sizes, this routine - * returns an array of length 1, which specifies the page size and - * number of pages in the memory. - * - * Layouts for flash memories with nonuniform page sizes will be - * returned as an array with multiple elements, each of which - * describes a group of pages that all have the same size. In this - * case, the sequence of array elements specifies the order in which - * these groups occur on the device. - * - * @param dev Flash device whose layout to retrieve. - * @param layout The flash layout will be returned in this argument. - * @param layout_size The number of elements in the returned layout. - */ -typedef void (*flash_api_pages_layout)(struct device *dev, - const struct flash_pages_layout **layout, - size_t *layout_size); -#endif /* CONFIG_FLASH_PAGE_LAYOUT */ - -struct flash_driver_api { - flash_api_read read; - flash_api_write write; - flash_api_erase erase; - flash_api_write_protection write_protection; -#if defined(CONFIG_FLASH_PAGE_LAYOUT) - flash_api_pages_layout page_layout; -#endif /* CONFIG_FLASH_PAGE_LAYOUT */ - const size_t write_block_size; -}; - -/** - * @brief Read data from flash - * - * @param dev : flash dev - * @param offset : Offset (byte aligned) to read - * @param data : Buffer to store read data - * @param len : Number of bytes to read. - * - * @return 0 on success, negative errno code on fail. - */ -__syscall int flash_read(struct device *dev, off_t offset, void *data, - size_t len); - -static inline int z_impl_flash_read(struct device *dev, off_t offset, void *data, - size_t len) -{ - const struct flash_driver_api *api = dev->driver_api; - - return api->read(dev, offset, data, len); -} - -/** - * @brief Write buffer into flash memory. - * - * Prior to the invocation of this API, the flash_write_protection_set needs - * to be called first to disable the write protection. - * - * @param dev : flash device - * @param offset : starting offset for the write - * @param data : data to write - * @param len : Number of bytes to write - * - * @return 0 on success, negative errno code on fail. - */ -__syscall int flash_write(struct device *dev, off_t offset, const void *data, - size_t len); - -static inline int z_impl_flash_write(struct device *dev, off_t offset, - const void *data, size_t len) -{ - const struct flash_driver_api *api = dev->driver_api; - - return api->write(dev, offset, data, len); -} - -/** - * @brief Erase part or all of a flash memory - * - * Acceptable values of erase size and offset are subject to - * hardware-specific multiples of page size and offset. Please check - * the API implemented by the underlying sub driver, for example by - * using flash_get_page_info_by_offs() if that is supported by your - * flash driver. - * - * Prior to the invocation of this API, the flash_write_protection_set needs - * to be called first to disable the write protection. - * - * @param dev : flash device - * @param offset : erase area starting offset - * @param size : size of area to be erased - * - * @return 0 on success, negative errno code on fail. - * - * @see flash_get_page_info_by_offs() - * @see flash_get_page_info_by_idx() - */ -__syscall int flash_erase(struct device *dev, off_t offset, size_t size); - -static inline int z_impl_flash_erase(struct device *dev, off_t offset, - size_t size) -{ - const struct flash_driver_api *api = dev->driver_api; - - return api->erase(dev, offset, size); -} - -/** - * @brief Enable or disable write protection for a flash memory - * - * This API is required to be called before the invocation of write or erase - * API. Please note that on some flash components, the write protection is - * automatically turned on again by the device after the completion of each - * write or erase calls. Therefore, on those flash parts, write protection needs - * to be disabled before each invocation of the write or erase API. Please refer - * to the sub-driver API or the data sheet of the flash component to get details - * on the write protection behavior. - * - * @param dev : flash device - * @param enable : enable or disable flash write protection - * - * @return 0 on success, negative errno code on fail. - */ -__syscall int flash_write_protection_set(struct device *dev, bool enable); - -static inline int z_impl_flash_write_protection_set(struct device *dev, - bool enable) -{ - const struct flash_driver_api *api = dev->driver_api; - - return api->write_protection(dev, enable); -} - -struct flash_pages_info { - off_t start_offset; /* offset from the base of flash address */ - size_t size; - u32_t index; -}; - -#if defined(CONFIG_FLASH_PAGE_LAYOUT) -/** - * @brief Get the size and start offset of flash page at certain flash offset. - * - * @param dev flash device - * @param offset Offset within the page - * @param info Page Info structure to be filled - * - * @return 0 on success, -EINVAL if page of the offset doesn't exist. - */ -__syscall int flash_get_page_info_by_offs(struct device *dev, off_t offset, - struct flash_pages_info *info); - -/** - * @brief Get the size and start offset of flash page of certain index. - * - * @param dev flash device - * @param page_index Index of the page. Index are counted from 0. - * @param info Page Info structure to be filled - * - * @return 0 on success, -EINVAL if page of the index doesn't exist. - */ -__syscall int flash_get_page_info_by_idx(struct device *dev, u32_t page_index, - struct flash_pages_info *info); - -/** - * @brief Get the total number of flash pages. - * - * @param dev flash device - * - * @return Number of flash pages. - */ -__syscall size_t flash_get_page_count(struct device *dev); - -/** - * @brief Callback type for iterating over flash pages present on a device. - * - * The callback should return true to continue iterating, and false to halt. - * - * @param info Information for current page - * @param data Private data for callback - * @return True to continue iteration, false to halt iteration. - * @see flash_page_foreach() - */ -typedef bool (*flash_page_cb)(const struct flash_pages_info *info, void *data); - -/** - * @brief Iterate over all flash pages on a device - * - * This routine iterates over all flash pages on the given device, - * ordered by increasing start offset. For each page, it invokes the - * given callback, passing it the page's information and a private - * data object. - * - * @param dev Device whose pages to iterate over - * @param cb Callback to invoke for each flash page - * @param data Private data for callback function - */ -void flash_page_foreach(struct device *dev, flash_page_cb cb, void *data); -#endif /* CONFIG_FLASH_PAGE_LAYOUT */ - -/** - * @brief Get the minimum write block size supported by the driver - * - * The write block size supported by the driver might differ from the write - * block size of memory used because the driver might implements write-modify - * algorithm. - * - * @param dev flash device - * - * @return write block size in bytes. - */ -__syscall size_t flash_get_write_block_size(struct device *dev); - -static inline size_t z_impl_flash_get_write_block_size(struct device *dev) -{ - const struct flash_driver_api *api = dev->driver_api; - - return api->write_block_size; -} - -#ifdef __cplusplus -} -#endif - -/** - * @} - */ - -#include +#include #endif /* ZEPHYR_INCLUDE_FLASH_H_ */ diff --git a/lib/updatehub/shell.c b/lib/updatehub/shell.c index a3ef3f9f9c0..604ff1126e4 100644 --- a/lib/updatehub/shell.c +++ b/lib/updatehub/shell.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/lib/updatehub/updatehub.c b/lib/updatehub/updatehub.c index 0073df028db..a44c0f267c0 100644 --- a/lib/updatehub/updatehub.c +++ b/lib/updatehub/updatehub.c @@ -17,7 +17,7 @@ LOG_MODULE_REGISTER(updatehub); #include #include #include -#include +#include #include #include #include diff --git a/lib/updatehub/updatehub_firmware.h b/lib/updatehub/updatehub_firmware.h index 1c7a90d90c1..063747a2b7e 100644 --- a/lib/updatehub/updatehub_firmware.h +++ b/lib/updatehub/updatehub_firmware.h @@ -7,7 +7,7 @@ #ifndef __UPDATEHUB_FIRMWARE_H__ #define __UPDATEHUB_FIRMWARE_H__ -#include +#include #include #include diff --git a/samples/boards/reel_board/mesh_badge/src/reel_board.c b/samples/boards/reel_board/mesh_badge/src/reel_board.c index 4acda72089b..03ca895a9be 100644 --- a/samples/boards/reel_board/mesh_badge/src/reel_board.c +++ b/samples/boards/reel_board/mesh_badge/src/reel_board.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/samples/drivers/flash_shell/src/main.c b/samples/drivers/flash_shell/src/main.c index 033c279fce1..77efba157a1 100644 --- a/samples/drivers/flash_shell/src/main.c +++ b/samples/drivers/flash_shell/src/main.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/samples/drivers/soc_flash_nrf/src/main.c b/samples/drivers/soc_flash_nrf/src/main.c index f38d0ea86b6..f1d43bdc2f0 100644 --- a/samples/drivers/soc_flash_nrf/src/main.c +++ b/samples/drivers/soc_flash_nrf/src/main.c @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include diff --git a/samples/drivers/spi_flash/src/main.c b/samples/drivers/spi_flash/src/main.c index 82837027114..2546cac84e2 100644 --- a/samples/drivers/spi_flash/src/main.c +++ b/samples/drivers/spi_flash/src/main.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include diff --git a/samples/mpu/mpu_test/src/main.c b/samples/mpu/mpu_test/src/main.c index de6b03f66fc..87fef194ff3 100644 --- a/samples/mpu/mpu_test/src/main.c +++ b/samples/mpu/mpu_test/src/main.c @@ -7,7 +7,7 @@ #include #include -#include +#include #include #define PR_SHELL(shell, fmt, ...) \ diff --git a/samples/subsys/nvs/src/main.c b/samples/subsys/nvs/src/main.c index 24ecf360f57..b08ffd01c66 100644 --- a/samples/subsys/nvs/src/main.c +++ b/samples/subsys/nvs/src/main.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include static struct nvs_fs fs; diff --git a/subsys/dfu/boot/mcuboot.c b/subsys/dfu/boot/mcuboot.c index 0d896e1b24e..93bcafae2e9 100644 --- a/subsys/dfu/boot/mcuboot.c +++ b/subsys/dfu/boot/mcuboot.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/subsys/dfu/img_util/flash_img.c b/subsys/dfu/img_util/flash_img.c index 085cee589bd..6d747db6d9a 100644 --- a/subsys/dfu/img_util/flash_img.c +++ b/subsys/dfu/img_util/flash_img.c @@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #ifdef CONFIG_IMG_ERASE_PROGRESSIVELY #include -#include +#include #endif #include diff --git a/subsys/disk/disk_access_flash.c b/subsys/disk/disk_access_flash.c index 5397c93a242..563197a3571 100644 --- a/subsys/disk/disk_access_flash.c +++ b/subsys/disk/disk_access_flash.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #define SECTOR_SIZE 512 diff --git a/subsys/fs/nffs_fs.c b/subsys/fs/nffs_fs.c index 98787202915..83738cae0a7 100644 --- a/subsys/fs/nffs_fs.c +++ b/subsys/fs/nffs_fs.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/subsys/fs/nvs/nvs.c b/subsys/fs/nvs/nvs.c index 42da021b450..b7ce1755910 100644 --- a/subsys/fs/nvs/nvs.c +++ b/subsys/fs/nvs/nvs.c @@ -5,7 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include #include #include diff --git a/subsys/net/lib/openthread/platform/flash.c b/subsys/net/lib/openthread/platform/flash.c index 1704bfd0e63..fda082a5e78 100644 --- a/subsys/net/lib/openthread/platform/flash.c +++ b/subsys/net/lib/openthread/platform/flash.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include "platform-zephyr.h" diff --git a/subsys/storage/flash_map/flash_map.c b/subsys/storage/flash_map/flash_map.c index 785411e7119..28441f45196 100644 --- a/subsys/storage/flash_map/flash_map.c +++ b/subsys/storage/flash_map/flash_map.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/usb/class/usb_dfu.c b/subsys/usb/class/usb_dfu.c index c54a9db34a4..d0e66e7c6e7 100644 --- a/subsys/usb/class/usb_dfu.c +++ b/subsys/usb/class/usb_dfu.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/boards/altera_max10/qspi/src/qspi_flash.c b/tests/boards/altera_max10/qspi/src/qspi_flash.c index bec6892e696..7aece6ecb53 100644 --- a/tests/boards/altera_max10/qspi/src/qspi_flash.c +++ b/tests/boards/altera_max10/qspi/src/qspi_flash.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include diff --git a/tests/boards/intel_s1000_crb/src/spi_flash.c b/tests/boards/intel_s1000_crb/src/spi_flash.c index 5119ec2edeb..5f476784620 100644 --- a/tests/boards/intel_s1000_crb/src/spi_flash.c +++ b/tests/boards/intel_s1000_crb/src/spi_flash.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/tests/drivers/flash_simulator/src/main.c b/tests/drivers/flash_simulator/src/main.c index 922194a6671..1951bd974ba 100644 --- a/tests/drivers/flash_simulator/src/main.c +++ b/tests/drivers/flash_simulator/src/main.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include /* configuration derived from DT */ diff --git a/tests/subsys/fs/multi-fs/src/nffs_test_utils.c b/tests/subsys/fs/multi-fs/src/nffs_test_utils.c index d91e763c51f..e15b6bdf5d9 100644 --- a/tests/subsys/fs/multi-fs/src/nffs_test_utils.c +++ b/tests/subsys/fs/multi-fs/src/nffs_test_utils.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include "nffs_test_utils.h" diff --git a/tests/subsys/fs/multi-fs/src/test_ram_backend.c b/tests/subsys/fs/multi-fs/src/test_ram_backend.c index 21ffb30cb47..e7ddbd6e760 100644 --- a/tests/subsys/fs/multi-fs/src/test_ram_backend.c +++ b/tests/subsys/fs/multi-fs/src/test_ram_backend.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/subsys/fs/nffs_fs_api/common/nffs_test_utils.c b/tests/subsys/fs/nffs_fs_api/common/nffs_test_utils.c index e599b5a65a6..ed6473f77f6 100644 --- a/tests/subsys/fs/nffs_fs_api/common/nffs_test_utils.c +++ b/tests/subsys/fs/nffs_fs_api/common/nffs_test_utils.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include "nffs_test_utils.h" diff --git a/tests/subsys/fs/nffs_fs_api/ram_backend/test_ram_backend.c b/tests/subsys/fs/nffs_fs_api/ram_backend/test_ram_backend.c index 21ffb30cb47..e7ddbd6e760 100644 --- a/tests/subsys/fs/nffs_fs_api/ram_backend/test_ram_backend.c +++ b/tests/subsys/fs/nffs_fs_api/ram_backend/test_ram_backend.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/subsys/fs/nvs/src/main.c b/tests/subsys/fs/nvs/src/main.c index 8aac7683221..a671773c50e 100644 --- a/tests/subsys/fs/nvs/src/main.c +++ b/tests/subsys/fs/nvs/src/main.c @@ -19,7 +19,7 @@ #include #include -#include "flash.h" +#include #include #include #include diff --git a/tests/subsys/storage/flash_map/src/main.c b/tests/subsys/storage/flash_map/src/main.c index ff28a27888e..24450d7a6c1 100644 --- a/tests/subsys/storage/flash_map/src/main.c +++ b/tests/subsys/storage/flash_map/src/main.c @@ -6,7 +6,7 @@ */ #include -#include +#include #include extern int flash_map_entries;