Updated copyright headers and removed trailing whitespace

This commit is contained in:
Frédéric Desbiens
2026-03-05 09:17:20 +01:00
parent fa1a8e5ff4
commit b9ba4a97bf
71 changed files with 3124 additions and 3739 deletions
+35 -40
View File
@@ -1,18 +1,19 @@
/***************************************************************************
* Copyright (c) 2024 Microsoft Corporation
*
* Copyright (c) 2024 Microsoft Corporation
* Copyright (c) 2026-present Eclipse ThreadX contributors
*
* This program and the accompanying materials are made available under the
* terms of the MIT License which is available at
* https://opensource.org/licenses/MIT.
*
*
* SPDX-License-Identifier: MIT
**************************************************************************/
/**************************************************************************/
/**************************************************************************/
/** */
/** LevelX Component */
/** */
/** LevelX Component */
/** */
/** NAND Flash */
/** */
@@ -34,50 +35,44 @@
#include "lx_api.h"
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_metadata_allocate PORTABLE C */
/**************************************************************************/
/* */
/* FUNCTION RELEASE */
/* */
/* _lx_nand_flash_metadata_allocate PORTABLE C */
/* 6.2.1 */
/* AUTHOR */
/* */
/* Xiuwen Cai, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* DESCRIPTION */
/* */
/* This function allocates new blocks for metadata if current metadata */
/* block is full. This function also frees metadata blocks if the chain*/
/* is too long. */
/* */
/* INPUT */
/* */
/* nand_flash NAND flash instance */
/* */
/* OUTPUT */
/* */
/* return status */
/* */
/* CALLS */
/* */
/* _lx_nand_flash_metadata_build Build metadata */
/* _lx_nand_flash_driver_block_erase Erase block */
/* _lx_nand_flash_block_data_move Move block data */
/* _lx_nand_flash_free_block_list_add Add free block list */
/* _lx_nand_flash_block_allocate Allocate block */
/* */
/* INPUT */
/* */
/* nand_flash NAND flash instance */
/* */
/* OUTPUT */
/* */
/* return status */
/* */
/* CALLS */
/* */
/* _lx_nand_flash_metadata_build Build metadata */
/* _lx_nand_flash_driver_block_erase Erase block */
/* _lx_nand_flash_block_data_move Move block data */
/* _lx_nand_flash_free_block_list_add Add free block list */
/* _lx_nand_flash_block_allocate Allocate block */
/* _lx_nand_flash_block_status_set Set block status */
/* _lx_nand_flash_metadata_write Write metadata */
/* _lx_nand_flash_system_error Internal system error handler */
/* */
/* CALLED BY */
/* */
/* Internal LevelX */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* _lx_nand_flash_system_error Internal system error handler */
/* */
/* 03-08-2023 Xiuwen Cai Initial Version 6.2.1 */
/* CALLED BY */
/* */
/* Internal LevelX */
/* */
/**************************************************************************/
UINT _lx_nand_flash_metadata_allocate(LX_NAND_FLASH *nand_flash)
@@ -150,7 +145,7 @@ UCHAR min_erase_count;
/* Exclude erase count of bad block. */
if(nand_flash -> lx_nand_flash_block_status_table[j] != LX_NAND_BLOCK_STATUS_BAD)
{
{
/* Check if it has less erase count. */
if (nand_flash -> lx_nand_flash_erase_count_table[j] < min_erase_count)
@@ -239,7 +234,7 @@ UCHAR min_erase_count;
/* Erase the block. */
status = _lx_nand_flash_driver_block_erase(nand_flash, block, nand_flash -> lx_nand_flash_base_erase_count + nand_flash -> lx_nand_flash_erase_count_table[block]);
/* Check for an error from flash driver. */
if (status)
{