lx_nand_flash_driver_page_erased_verify.c
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*************************************************************************** | ||
| 2 | * Copyright (c) 2024 Microsoft Corporation | ||
| 3 | * Copyright (c) 2026-present Eclipse ThreadX contributors | ||
| 4 | * | ||
| 5 | * This program and the accompanying materials are made available under the | ||
| 6 | * terms of the MIT License which is available at | ||
| 7 | * https://opensource.org/licenses/MIT. | ||
| 8 | * | ||
| 9 | * SPDX-License-Identifier: MIT | ||
| 10 | **************************************************************************/ | ||
| 11 | |||
| 12 | |||
| 13 | /**************************************************************************/ | ||
| 14 | /**************************************************************************/ | ||
| 15 | /** */ | ||
| 16 | /** LevelX Component */ | ||
| 17 | /** */ | ||
| 18 | /** NAND Flash */ | ||
| 19 | /** */ | ||
| 20 | /**************************************************************************/ | ||
| 21 | /**************************************************************************/ | ||
| 22 | |||
| 23 | #define LX_SOURCE_CODE | ||
| 24 | |||
| 25 | |||
| 26 | /* Disable ThreadX error checking. */ | ||
| 27 | |||
| 28 | #ifndef LX_DISABLE_ERROR_CHECKING | ||
| 29 | #define LX_DISABLE_ERROR_CHECKING | ||
| 30 | #endif | ||
| 31 | |||
| 32 | |||
| 33 | /* Include necessary system files. */ | ||
| 34 | |||
| 35 | #include "lx_api.h" | ||
| 36 | |||
| 37 | |||
| 38 | /**************************************************************************/ | ||
| 39 | /* */ | ||
| 40 | /* FUNCTION RELEASE */ | ||
| 41 | /* */ | ||
| 42 | /* _lx_nand_flash_driver_page_erased_verify PORTABLE C */ | ||
| 43 | /* 6.2.1 */ | ||
| 44 | /* AUTHOR */ | ||
| 45 | /* */ | ||
| 46 | /* William E. Lamie, Microsoft Corporation */ | ||
| 47 | /* */ | ||
| 48 | /* DESCRIPTION */ | ||
| 49 | /* */ | ||
| 50 | /* This function calls the driver to verify the page was erased. */ | ||
| 51 | /* */ | ||
| 52 | /* INPUT */ | ||
| 53 | /* */ | ||
| 54 | /* nand_flash NAND flash instance */ | ||
| 55 | /* block Block number */ | ||
| 56 | /* page Page number */ | ||
| 57 | /* */ | ||
| 58 | /* OUTPUT */ | ||
| 59 | /* */ | ||
| 60 | /* Completion Status */ | ||
| 61 | /* */ | ||
| 62 | /* CALLS */ | ||
| 63 | /* */ | ||
| 64 | /* (lx_nand_flash_driver_page_erased_verify) */ | ||
| 65 | /* Driver verify page erased */ | ||
| 66 | /* */ | ||
| 67 | /* CALLED BY */ | ||
| 68 | /* */ | ||
| 69 | /* Internal LevelX */ | ||
| 70 | /* */ | ||
| 71 | /**************************************************************************/ | ||
| 72 | ✗ | UINT _lx_nand_flash_driver_page_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page) | |
| 73 | { | ||
| 74 | |||
| 75 | UINT status; | ||
| 76 | |||
| 77 | /* Increment the page erased verify count. */ | ||
| 78 | ✗ | nand_flash -> lx_nand_flash_diagnostic_page_erased_verifies++; | |
| 79 | |||
| 80 | /* Call driver page erased verify function. */ | ||
| 81 | #ifdef LX_NAND_ENABLE_CONTROL_BLOCK_FOR_DRIVER_INTERFACE | ||
| 82 | ✗ | status = (nand_flash -> lx_nand_flash_driver_page_erased_verify)(nand_flash, block, page); | |
| 83 | #else | ||
| 84 | ✗ | status = (nand_flash -> lx_nand_flash_driver_page_erased_verify)(block, page); | |
| 85 | #endif | ||
| 86 | /* Return status. */ | ||
| 87 | ✗ | return(status); | |
| 88 | } | ||
| 89 | |||
| 90 |