diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e3d198..f61f05e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ project(levelx LANGUAGES C ASM ) +option(LX_STANDALONE_ENABLE "Enable LevelX in standalone mode" OFF) + if(NOT DEFINED THREADX_ARCH) message(FATAL_ERROR "Error: THREADX_ARCH not defined") endif() @@ -19,14 +21,38 @@ add_library(${PROJECT_NAME}) add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME}) # Define any required dependencies between this library and others -target_link_libraries(${PROJECT_NAME} PUBLIC - "azrtos::threadx" - "azrtos::filex" -) +if(NOT LX_STANDALONE_ENABLE) + target_link_libraries(${PROJECT_NAME} PUBLIC + "azrtos::threadx") +endif() + +# A place for generated/copied include files (no need to change) +set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc) # Pick up the common stuff add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common) +# Include the user's override file if required +if (NOT LX_USER_FILE) + message(STATUS "Using default lx_user.h file") + set(LX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/lx_user_sample.h) +else() + message(STATUS "Using custom lx_user.h file from ${LX_USER_FILE}") +endif() +configure_file(${LX_USER_FILE} ${CUSTOM_INC_DIR}/lx_user.h COPYONLY) +target_include_directories(${PROJECT_NAME} + PUBLIC + ${CUSTOM_INC_DIR} +) + +if(NOT LX_STANDALONE_ENABLE) + target_compile_definitions(${PROJECT_NAME} PUBLIC "LX_INCLUDE_USER_DEFINE_FILE" ) +else() + # Enable LevelX and FileX standalone support (No Azure RTOS support) + set(FX_STANDALONE_ENABLE ON CACHE BOOL "Standalone enable") + target_compile_definitions(${PROJECT_NAME} PUBLIC "LX_INCLUDE_USER_DEFINE_FILE" -DLX_STANDALONE_ENABLE -DFX_STANDALONE_ENABLE) +endif() + # Enable a build target that produces a ZIP file of all sources set(CPACK_SOURCE_GENERATOR "ZIP") set(CPACK_SOURCE_IGNORE_FILES @@ -39,4 +65,5 @@ set(CPACK_SOURCE_IGNORE_FILES ".*~$" ) set(CPACK_VERBATIM_VARIABLES YES) -include(CPack) \ No newline at end of file +include(CPack) + diff --git a/common/inc/lx_api.h b/common/inc/lx_api.h index 4f75fd6..3a82f2b 100644 --- a/common/inc/lx_api.h +++ b/common/inc/lx_api.h @@ -26,7 +26,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* lx_api.h PORTABLE C */ -/* 6.1.3 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -52,6 +52,9 @@ /* 12-31-2020 William E. Lamie Modified comment(s), and */ /* updated product constants, */ /* resulting in version 6.1.3 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* added standalone support, */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ @@ -71,7 +74,9 @@ extern "C" { /* Include necessary system files. */ +#ifndef LX_STANDALONE_ENABLE #include "tx_api.h" +#endif /* Determine if the optional LevelX user define file should be used. */ @@ -85,6 +90,65 @@ extern "C" { #endif +#ifdef LX_STANDALONE_ENABLE + +/* Define compiler library include files. */ + +#include +#include +#include + +#ifndef VOID +#define VOID void +typedef char CHAR; +typedef char BOOL; +typedef unsigned char UCHAR; +typedef int INT; +typedef unsigned int UINT; +typedef long LONG; +typedef unsigned long ULONG; +typedef short SHORT; +typedef unsigned short USHORT; +#endif + +#ifndef ULONG64_DEFINED +#define ULONG64_DEFINED +typedef unsigned long long ULONG64; +#endif + +/* Define basic alignment type used in block and byte pool operations. This data type must + be at least 32-bits in size and also be large enough to hold a pointer type. */ + +#ifndef ALIGN_TYPE_DEFINED +#define ALIGN_TYPE_DEFINED +#define ALIGN_TYPE ULONG +#endif + +/* Define the LX_MEMSET macro to the standard library function, if not already defined. */ +#ifndef LX_MEMSET +#define LX_MEMSET(a,b,c) memset((a),(b),(c)) +#endif + +/* Disable usage of ThreadX mutex in standalone mode */ +#ifdef LX_THREAD_SAFE_ENABLE +#undef LX_THREAD_SAFE_ENABLE +#endif + +#define LX_INTERRUPT_SAVE_AREA +#define LX_DISABLE +#define LX_RESTORE + +#else + +#define LX_MEMSET TX_MEMSET + +#define LX_INTERRUPT_SAVE_AREA TX_INTERRUPT_SAVE_AREA +#define LX_DISABLE TX_DISABLE +#define LX_RESTORE TX_RESTORE + +#endif + + /* Disable warning of parameter not used. */ #ifndef LX_PARAMETER_NOT_USED #define LX_PARAMETER_NOT_USED(p) ((void)(p)) @@ -95,7 +159,7 @@ extern "C" { #define AZURE_RTOS_LEVELX #define LEVELX_MAJOR_VERSION 6 #define LEVELX_MINOR_VERSION 1 -#define LEVELX_PATCH_VERSION 3 +#define LEVELX_PATCH_VERSION 7 /* Define general LevelX Constants. */ diff --git a/common/inc/lx_user_sample.h b/common/inc/lx_user_sample.h index f388c10..315aaf3 100644 --- a/common/inc/lx_user_sample.h +++ b/common/inc/lx_user_sample.h @@ -26,7 +26,7 @@ /* PORT SPECIFIC C INFORMATION RELEASE */ /* */ /* lx_user.h PORTABLE C */ -/* 6.1.2 */ +/* 6.1.7 */ /* */ /* AUTHOR */ /* */ @@ -45,6 +45,9 @@ /* DATE NAME DESCRIPTION */ /* */ /* 11-09-2020 William E. Lamie Initial Version 6.1.2 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), and */ +/* added standalone support, */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ @@ -113,6 +116,10 @@ #define LX_THREAD_SAFE_ENABLE */ +/* Defined, LevelX will be used in standalone mode (without Azure RTOS ThreadX) */ + +/* #define LX_STANDALONE_ENABLE */ + #endif diff --git a/common/src/fx_nand_flash_simulated_driver.c b/common/src/fx_nand_flash_simulated_driver.c index 8c96a5f..a06d9a3 100644 --- a/common/src/fx_nand_flash_simulated_driver.c +++ b/common/src/fx_nand_flash_simulated_driver.c @@ -23,7 +23,6 @@ /* Include necessary system files. */ -#include "tx_api.h" #include "fx_api.h" #include "lx_api.h" @@ -69,7 +68,7 @@ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr); /* FUNCTION RELEASE */ /* */ /* _fx_nand_simulator_driver PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -122,6 +121,8 @@ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr); /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr) diff --git a/common/src/fx_nor_flash_simulator_driver.c b/common/src/fx_nor_flash_simulator_driver.c index 2c98702..304e80b 100644 --- a/common/src/fx_nor_flash_simulator_driver.c +++ b/common/src/fx_nor_flash_simulator_driver.c @@ -23,7 +23,6 @@ /* Include necessary system files. */ -#include "tx_api.h" #include "fx_api.h" #include "lx_api.h" @@ -65,7 +64,7 @@ VOID _fx_nor_flash_simulator_driver(FX_MEDIA *media_ptr); /* FUNCTION RELEASE */ /* */ /* _fx_nor_flash_simulator_driver PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -118,6 +117,8 @@ VOID _fx_nor_flash_simulator_driver(FX_MEDIA *media_ptr); /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _fx_nor_flash_simulator_driver(FX_MEDIA *media_ptr) diff --git a/common/src/lx_nand_flash_256byte_ecc_check.c b/common/src/lx_nand_flash_256byte_ecc_check.c index 0d73004..ba59449 100644 --- a/common/src/lx_nand_flash_256byte_ecc_check.c +++ b/common/src/lx_nand_flash_256byte_ecc_check.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_256byte_ecc_check PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_256byte_ecc_check(UCHAR *page_buffer, UCHAR *ecc_buffer) diff --git a/common/src/lx_nand_flash_256byte_ecc_compute.c b/common/src/lx_nand_flash_256byte_ecc_compute.c index bf915cc..3c9319f 100644 --- a/common/src/lx_nand_flash_256byte_ecc_compute.c +++ b/common/src/lx_nand_flash_256byte_ecc_compute.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_256byte_ecc_compute PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_256byte_ecc_compute(UCHAR *page_buffer, UCHAR *ecc_buffer) diff --git a/common/src/lx_nand_flash_block_full_update.c b/common/src/lx_nand_flash_block_full_update.c index b3a9d58..698b8ff 100644 --- a/common/src/lx_nand_flash_block_full_update.c +++ b/common/src/lx_nand_flash_block_full_update.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_block_full_update PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -78,6 +78,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_block_full_update(LX_NAND_FLASH *nand_flash, ULONG block, ULONG erase_count) diff --git a/common/src/lx_nand_flash_block_obsoleted_check.c b/common/src/lx_nand_flash_block_obsoleted_check.c index d2661fc..c339f82 100644 --- a/common/src/lx_nand_flash_block_obsoleted_check.c +++ b/common/src/lx_nand_flash_block_obsoleted_check.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_block_obsoleted_check PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -84,6 +84,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _lx_nand_flash_block_obsoleted_check(LX_NAND_FLASH *nand_flash, ULONG block) diff --git a/common/src/lx_nand_flash_block_reclaim.c b/common/src/lx_nand_flash_block_reclaim.c index 53650ca..716adf9 100644 --- a/common/src/lx_nand_flash_block_reclaim.c +++ b/common/src/lx_nand_flash_block_reclaim.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_block_reclaim PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -86,6 +86,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_block_reclaim(LX_NAND_FLASH *nand_flash) diff --git a/common/src/lx_nand_flash_close.c b/common/src/lx_nand_flash_close.c index f594f83..911c20f 100644 --- a/common/src/lx_nand_flash_close.c +++ b/common/src/lx_nand_flash_close.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_close PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -72,16 +72,18 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_close(LX_NAND_FLASH *nand_flash) { -TX_INTERRUPT_SAVE_AREA +LX_INTERRUPT_SAVE_AREA /* Lockout interrupts for NAND flash close. */ - TX_DISABLE + LX_DISABLE /* See if the media is the only one on the media opened list. */ if ((_lx_nand_flash_opened_ptr == nand_flash) && @@ -117,7 +119,7 @@ TX_INTERRUPT_SAVE_AREA nand_flash -> lx_nand_flash_state = LX_NAND_FLASH_CLOSED; /* Restore interrupt posture. */ - TX_RESTORE + LX_RESTORE #ifdef LX_THREAD_SAFE_ENABLE diff --git a/common/src/lx_nand_flash_defragment.c b/common/src/lx_nand_flash_defragment.c index 304661d..48b2099 100644 --- a/common/src/lx_nand_flash_defragment.c +++ b/common/src/lx_nand_flash_defragment.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_defragment PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_defragment(LX_NAND_FLASH *nand_flash) diff --git a/common/src/lx_nand_flash_driver_block_erase.c b/common/src/lx_nand_flash_driver_block_erase.c index e10cb23..0c34be8 100644 --- a/common/src/lx_nand_flash_driver_block_erase.c +++ b/common/src/lx_nand_flash_driver_block_erase.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_block_erase PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_block_erase(LX_NAND_FLASH *nand_flash, ULONG block, ULONG erase_count) diff --git a/common/src/lx_nand_flash_driver_block_erased_verify.c b/common/src/lx_nand_flash_driver_block_erased_verify.c index b38f93c..20330d9 100644 --- a/common/src/lx_nand_flash_driver_block_erased_verify.c +++ b/common/src/lx_nand_flash_driver_block_erased_verify.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_block_erased_verify PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_block_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block) diff --git a/common/src/lx_nand_flash_driver_block_status_get.c b/common/src/lx_nand_flash_driver_block_status_get.c index 754404e..0644e3f 100644 --- a/common/src/lx_nand_flash_driver_block_status_get.c +++ b/common/src/lx_nand_flash_driver_block_status_get.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_block_status_get PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_block_status_get(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR *bad_block_flag) diff --git a/common/src/lx_nand_flash_driver_block_status_set.c b/common/src/lx_nand_flash_driver_block_status_set.c index cfade7d..68e2ed2 100644 --- a/common/src/lx_nand_flash_driver_block_status_set.c +++ b/common/src/lx_nand_flash_driver_block_status_set.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_block_status_set PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_block_status_set(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR bad_block_flag) diff --git a/common/src/lx_nand_flash_driver_extra_bytes_get.c b/common/src/lx_nand_flash_driver_extra_bytes_get.c index 07c5f00..07aef5d 100644 --- a/common/src/lx_nand_flash_driver_extra_bytes_get.c +++ b/common/src/lx_nand_flash_driver_extra_bytes_get.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_extra_bytes_get PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -77,6 +77,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_extra_bytes_get(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, UCHAR *destination, UINT size) diff --git a/common/src/lx_nand_flash_driver_extra_bytes_set.c b/common/src/lx_nand_flash_driver_extra_bytes_set.c index 4139234..7921250 100644 --- a/common/src/lx_nand_flash_driver_extra_bytes_set.c +++ b/common/src/lx_nand_flash_driver_extra_bytes_set.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_extra_bytes_set PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -78,6 +78,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_extra_bytes_set(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, UCHAR *source, UINT size) diff --git a/common/src/lx_nand_flash_driver_page_erased_verify.c b/common/src/lx_nand_flash_driver_page_erased_verify.c index d918cb6..5744ec7 100644 --- a/common/src/lx_nand_flash_driver_page_erased_verify.c +++ b/common/src/lx_nand_flash_driver_page_erased_verify.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_page_erased_verify PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_page_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page) diff --git a/common/src/lx_nand_flash_driver_read.c b/common/src/lx_nand_flash_driver_read.c index 91649b2..c4d8d81 100644 --- a/common/src/lx_nand_flash_driver_read.c +++ b/common/src/lx_nand_flash_driver_read.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_read PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_read(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, ULONG *destination, ULONG words) diff --git a/common/src/lx_nand_flash_driver_write.c b/common/src/lx_nand_flash_driver_write.c index aa17eea..f52ec04 100644 --- a/common/src/lx_nand_flash_driver_write.c +++ b/common/src/lx_nand_flash_driver_write.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_driver_write PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -76,6 +76,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_driver_write(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, ULONG *source, ULONG words) diff --git a/common/src/lx_nand_flash_extended_cache_enable.c b/common/src/lx_nand_flash_extended_cache_enable.c index a2f0011..ec8262d 100644 --- a/common/src/lx_nand_flash_extended_cache_enable.c +++ b/common/src/lx_nand_flash_extended_cache_enable.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_extended_cache_enable PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -77,6 +77,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_extended_cache_enable(LX_NAND_FLASH *nand_flash, VOID *memory, ULONG size) @@ -91,13 +93,13 @@ ULONG i; working_ptr = (UCHAR *) memory; /* Check for a NULL pointer. If NULL, disable all the caches. */ - if (working_ptr == TX_NULL) + if (working_ptr == LX_NULL) { /* Disable all extended caches. */ - nand_flash -> lx_nand_flash_block_status_cache = TX_NULL; - nand_flash -> lx_nand_flash_page_extra_bytes_cache = TX_NULL; - nand_flash -> lx_nand_flash_page_0_cache = TX_NULL; + nand_flash -> lx_nand_flash_block_status_cache = LX_NULL; + nand_flash -> lx_nand_flash_page_extra_bytes_cache = LX_NULL; + nand_flash -> lx_nand_flash_page_0_cache = LX_NULL; /* Return success! */ return(LX_SUCCESS); diff --git a/common/src/lx_nand_flash_logical_sector_find.c b/common/src/lx_nand_flash_logical_sector_find.c index a00329f..c60323b 100644 --- a/common/src/lx_nand_flash_logical_sector_find.c +++ b/common/src/lx_nand_flash_logical_sector_find.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_logical_sector_find PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_logical_sector_find(LX_NAND_FLASH *nand_flash, ULONG logical_sector, ULONG superceded_check, ULONG *block, ULONG *page) diff --git a/common/src/lx_nand_flash_next_block_to_erase_find.c b/common/src/lx_nand_flash_next_block_to_erase_find.c index f90d430..ecc6916 100644 --- a/common/src/lx_nand_flash_next_block_to_erase_find.c +++ b/common/src/lx_nand_flash_next_block_to_erase_find.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_next_block_to_erase_find PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -82,6 +82,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_next_block_to_erase_find(LX_NAND_FLASH *nand_flash, ULONG *return_erase_block, ULONG *return_erase_count, ULONG *return_mapped_pages, ULONG *return_obsolete_pages) diff --git a/common/src/lx_nand_flash_open.c b/common/src/lx_nand_flash_open.c index c4c8809..68ad779 100644 --- a/common/src/lx_nand_flash_open.c +++ b/common/src/lx_nand_flash_open.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_open PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -92,6 +92,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_open(LX_NAND_FLASH *nand_flash, CHAR *name, UINT (*nand_driver_initialize)(LX_NAND_FLASH *)) @@ -115,12 +117,12 @@ LX_NAND_FLASH *tail_ptr; ULONG logical_sector; #endif -TX_INTERRUPT_SAVE_AREA +LX_INTERRUPT_SAVE_AREA LX_PARAMETER_NOT_USED(name); /* Clear the NAND flash control block. */ - TX_MEMSET(nand_flash, 0, sizeof(LX_NAND_FLASH)); + LX_MEMSET(nand_flash, 0, sizeof(LX_NAND_FLASH)); /* Call the flash driver's initialization function. */ (nand_driver_initialize)(nand_flash); @@ -905,7 +907,7 @@ TX_INTERRUPT_SAVE_AREA status = tx_mutex_create(&nand_flash -> lx_nand_flash_mutex, "NAND Flash Mutex", TX_NO_INHERIT); /* Determine if the mutex creation encountered an error. */ - if (status != TX_SUCCESS) + if (status != LX_SUCCESS) { /* Call system error handler, since this should not happen. */ @@ -927,7 +929,7 @@ TX_INTERRUPT_SAVE_AREA nand_flash -> lx_nand_flash_max_mapped_sector = max_mapped_sector; /* Lockout interrupts. */ - TX_DISABLE + LX_DISABLE /* At this point, the NAND flash has been opened successfully. Place the NAND flash control block on the linked list of currently opened NAND flashes. */ @@ -966,7 +968,7 @@ TX_INTERRUPT_SAVE_AREA _lx_nand_flash_opened_count++; /* Restore interrupts. */ - TX_RESTORE + LX_RESTORE /* Return a successful completion. */ return(LX_SUCCESS); diff --git a/common/src/lx_nand_flash_page_ecc_check.c b/common/src/lx_nand_flash_page_ecc_check.c index 5e5601a..7829e08 100644 --- a/common/src/lx_nand_flash_page_ecc_check.c +++ b/common/src/lx_nand_flash_page_ecc_check.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_page_ecc_check PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_page_ecc_check(LX_NAND_FLASH *nand_flash, UCHAR *page_buffer, UCHAR *ecc_buffer) diff --git a/common/src/lx_nand_flash_page_ecc_compute.c b/common/src/lx_nand_flash_page_ecc_compute.c index 2191703..9352635 100644 --- a/common/src/lx_nand_flash_page_ecc_compute.c +++ b/common/src/lx_nand_flash_page_ecc_compute.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_page_ecc_compute PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_page_ecc_compute(LX_NAND_FLASH *nand_flash, UCHAR *page_buffer, UCHAR *ecc_buffer) diff --git a/common/src/lx_nand_flash_partial_defragment.c b/common/src/lx_nand_flash_partial_defragment.c index ea5ac00..a5fa144 100644 --- a/common/src/lx_nand_flash_partial_defragment.c +++ b/common/src/lx_nand_flash_partial_defragment.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_partial_defragment PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -78,6 +78,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_partial_defragment(LX_NAND_FLASH *nand_flash, UINT max_blocks) diff --git a/common/src/lx_nand_flash_physical_page_allocate.c b/common/src/lx_nand_flash_physical_page_allocate.c index 5753c3b..1d46f43 100644 --- a/common/src/lx_nand_flash_physical_page_allocate.c +++ b/common/src/lx_nand_flash_physical_page_allocate.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_physical_page_allocate PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_physical_page_allocate(LX_NAND_FLASH *nand_flash, ULONG *block, ULONG *page, ULONG *erase_count) diff --git a/common/src/lx_nand_flash_sector_mapping_cache_invalidate.c b/common/src/lx_nand_flash_sector_mapping_cache_invalidate.c index d795623..b54b6ff 100644 --- a/common/src/lx_nand_flash_sector_mapping_cache_invalidate.c +++ b/common/src/lx_nand_flash_sector_mapping_cache_invalidate.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_sector_mapping_cache_invalidate PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _lx_nand_flash_sector_mapping_cache_invalidate(LX_NAND_FLASH *nand_flash, ULONG logical_sector) diff --git a/common/src/lx_nand_flash_sector_read.c b/common/src/lx_nand_flash_sector_read.c index 1782a16..416f34a 100644 --- a/common/src/lx_nand_flash_sector_read.c +++ b/common/src/lx_nand_flash_sector_read.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_sector_read PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -80,6 +80,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_sector_read(LX_NAND_FLASH *nand_flash, ULONG logical_sector, VOID *buffer) diff --git a/common/src/lx_nand_flash_sector_release.c b/common/src/lx_nand_flash_sector_release.c index 22df4ee..871cb93 100644 --- a/common/src/lx_nand_flash_sector_release.c +++ b/common/src/lx_nand_flash_sector_release.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_sector_release PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_sector_release(LX_NAND_FLASH *nand_flash, ULONG logical_sector) diff --git a/common/src/lx_nand_flash_sector_write.c b/common/src/lx_nand_flash_sector_write.c index 9df8dfb..e6e6d0f 100644 --- a/common/src/lx_nand_flash_sector_write.c +++ b/common/src/lx_nand_flash_sector_write.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_sector_write PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -90,6 +90,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nand_flash_sector_write(LX_NAND_FLASH *nand_flash, ULONG logical_sector, VOID *buffer) diff --git a/common/src/lx_nand_flash_simulator.c b/common/src/lx_nand_flash_simulator.c index 8368daa..e69449f 100644 --- a/common/src/lx_nand_flash_simulator.c +++ b/common/src/lx_nand_flash_simulator.c @@ -23,7 +23,6 @@ /* Include necessary files. */ -#include "tx_api.h" #include "lx_api.h" /* Define constants for the NAND flash simulation. */ diff --git a/common/src/lx_nand_flash_system_error.c b/common/src/lx_nand_flash_system_error.c index 78994fb..b5021cc 100644 --- a/common/src/lx_nand_flash_system_error.c +++ b/common/src/lx_nand_flash_system_error.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nand_flash_system_error PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _lx_nand_flash_system_error(LX_NAND_FLASH *nand_flash, UINT error_code, ULONG block, ULONG page) diff --git a/common/src/lx_nor_flash_block_reclaim.c b/common/src/lx_nor_flash_block_reclaim.c index f0ac18e..eea676d 100644 --- a/common/src/lx_nor_flash_block_reclaim.c +++ b/common/src/lx_nor_flash_block_reclaim.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_block_reclaim PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -81,6 +81,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_block_reclaim(LX_NOR_FLASH *nor_flash) diff --git a/common/src/lx_nor_flash_close.c b/common/src/lx_nor_flash_close.c index 8235d44..fd3fe8c 100644 --- a/common/src/lx_nor_flash_close.c +++ b/common/src/lx_nor_flash_close.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_close PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -72,16 +72,18 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_close(LX_NOR_FLASH *nor_flash) { -TX_INTERRUPT_SAVE_AREA +LX_INTERRUPT_SAVE_AREA /* Lockout interrupts for NOR flash close. */ - TX_DISABLE + LX_DISABLE /* See if the media is the only one on the media opened list. */ if ((_lx_nor_flash_opened_ptr == nor_flash) && @@ -117,7 +119,7 @@ TX_INTERRUPT_SAVE_AREA nor_flash -> lx_nor_flash_state = LX_NOR_FLASH_CLOSED; /* Restore interrupt posture. */ - TX_RESTORE + LX_RESTORE #ifdef LX_THREAD_SAFE_ENABLE diff --git a/common/src/lx_nor_flash_defragment.c b/common/src/lx_nor_flash_defragment.c index 52624e5..07c5ac1 100644 --- a/common/src/lx_nor_flash_defragment.c +++ b/common/src/lx_nor_flash_defragment.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_defragment PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_defragment(LX_NOR_FLASH *nor_flash) diff --git a/common/src/lx_nor_flash_driver_block_erase.c b/common/src/lx_nor_flash_driver_block_erase.c index a9509fe..c867b36 100644 --- a/common/src/lx_nor_flash_driver_block_erase.c +++ b/common/src/lx_nor_flash_driver_block_erase.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_driver_block_erase PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_driver_block_erase(LX_NOR_FLASH *nor_flash, ULONG block, ULONG erase_count) diff --git a/common/src/lx_nor_flash_driver_read.c b/common/src/lx_nor_flash_driver_read.c index 8a6a404..b659289 100644 --- a/common/src/lx_nor_flash_driver_read.c +++ b/common/src/lx_nor_flash_driver_read.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_extended_cache_read PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_driver_read(LX_NOR_FLASH *nor_flash, ULONG *flash_address, ULONG *destination, ULONG words) diff --git a/common/src/lx_nor_flash_driver_write.c b/common/src/lx_nor_flash_driver_write.c index 38d8879..0dec68f 100644 --- a/common/src/lx_nor_flash_driver_write.c +++ b/common/src/lx_nor_flash_driver_write.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_driver_write PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -75,6 +75,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_driver_write(LX_NOR_FLASH *nor_flash, ULONG *flash_address, ULONG *source, ULONG words) diff --git a/common/src/lx_nor_flash_extended_cache_enable.c b/common/src/lx_nor_flash_extended_cache_enable.c index d01196f..3408de5 100644 --- a/common/src/lx_nor_flash_extended_cache_enable.c +++ b/common/src/lx_nor_flash_extended_cache_enable.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_extended_cache_enable PORTABLE C */ -/* 6.1.3 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -77,6 +77,9 @@ /* 12-31-2020 William E. Lamie Modified comment(s), */ /* fixed compiler warnings, */ /* resulting in version 6.1.3 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), and */ +/* updated product constants */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_extended_cache_enable(LX_NOR_FLASH *nor_flash, VOID *memory, ULONG size) diff --git a/common/src/lx_nor_flash_initialize.c b/common/src/lx_nor_flash_initialize.c index 7d4fbcb..242ce75 100644 --- a/common/src/lx_nor_flash_initialize.c +++ b/common/src/lx_nor_flash_initialize.c @@ -39,7 +39,7 @@ ULONG _lx_nor_flash_opened_count; /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_initialize PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -71,6 +71,8 @@ ULONG _lx_nor_flash_opened_count; /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_initialize(void) diff --git a/common/src/lx_nor_flash_logical_sector_find.c b/common/src/lx_nor_flash_logical_sector_find.c index ea4df19..f467724 100644 --- a/common/src/lx_nor_flash_logical_sector_find.c +++ b/common/src/lx_nor_flash_logical_sector_find.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_logical_sector_find PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -83,6 +83,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_logical_sector_find(LX_NOR_FLASH *nor_flash, ULONG logical_sector, ULONG superceded_check, ULONG **physical_sector_map_entry, ULONG **physical_sector_address) diff --git a/common/src/lx_nor_flash_next_block_to_erase_find.c b/common/src/lx_nor_flash_next_block_to_erase_find.c index dbc92bd..51d5b4a 100644 --- a/common/src/lx_nor_flash_next_block_to_erase_find.c +++ b/common/src/lx_nor_flash_next_block_to_erase_find.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_next_block_to_erase_find PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -79,6 +79,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_next_block_to_erase_find(LX_NOR_FLASH *nor_flash, ULONG *return_erase_block, ULONG *return_erase_count, ULONG *return_mapped_sectors, ULONG *return_obsolete_sectors) diff --git a/common/src/lx_nor_flash_open.c b/common/src/lx_nor_flash_open.c index 681871c..2b805dd 100644 --- a/common/src/lx_nor_flash_open.c +++ b/common/src/lx_nor_flash_open.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_open PORTABLE C */ -/* 6.1.3 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -89,6 +89,9 @@ /* 12-30-2020 William E. Lamie Modified comment(s), */ /* fixed compiler warnings, */ /* resulting in version 6.1.3 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), and */ +/* updated product constants */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_open(LX_NOR_FLASH *nor_flash, CHAR *name, UINT (*nor_driver_initialize)(LX_NOR_FLASH *)) @@ -114,12 +117,12 @@ ULONG *sector_word_ptr; ULONG sector_word; #endif LX_NOR_FLASH *tail_ptr; -TX_INTERRUPT_SAVE_AREA +LX_INTERRUPT_SAVE_AREA LX_PARAMETER_NOT_USED(name); /* Clear the NOR flash control block. */ - TX_MEMSET(nor_flash, 0, sizeof(LX_NOR_FLASH)); + LX_MEMSET(nor_flash, 0, sizeof(LX_NOR_FLASH)); /* Call the flash driver's initialization function. */ (nor_driver_initialize)(nor_flash); @@ -814,7 +817,7 @@ TX_INTERRUPT_SAVE_AREA status = tx_mutex_create(&nor_flash -> lx_nor_flash_mutex, "NOR Flash Mutex", TX_NO_INHERIT); /* Determine if the mutex creation encountered an error. */ - if (status != TX_SUCCESS) + if (status != LX_SUCCESS) { /* Call system error handler, since this should not happen. */ @@ -833,7 +836,7 @@ TX_INTERRUPT_SAVE_AREA nor_flash -> lx_nor_flash_found_sector_search = 0; /* Lockout interrupts. */ - TX_DISABLE + LX_DISABLE /* At this point, the NOR flash has been opened successfully. Place the NOR flash control block on the linked list of currently opened NOR flashes. */ @@ -872,7 +875,7 @@ TX_INTERRUPT_SAVE_AREA _lx_nor_flash_opened_count++; /* Restore interrupts. */ - TX_RESTORE + LX_RESTORE /* Return a successful completion. */ return(LX_SUCCESS); diff --git a/common/src/lx_nor_flash_partial_defragment.c b/common/src/lx_nor_flash_partial_defragment.c index 9592412..d8c29c1 100644 --- a/common/src/lx_nor_flash_partial_defragment.c +++ b/common/src/lx_nor_flash_partial_defragment.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_partial_defragment PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -78,6 +78,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_partial_defragment(LX_NOR_FLASH *nor_flash, UINT max_blocks) diff --git a/common/src/lx_nor_flash_physical_sector_allocate.c b/common/src/lx_nor_flash_physical_sector_allocate.c index 73debcc..b384341 100644 --- a/common/src/lx_nor_flash_physical_sector_allocate.c +++ b/common/src/lx_nor_flash_physical_sector_allocate.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_physical_sector_allocate PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -78,6 +78,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_physical_sector_allocate(LX_NOR_FLASH *nor_flash, ULONG logical_sector, ULONG **physical_sector_map_entry, ULONG **physical_sector_address) diff --git a/common/src/lx_nor_flash_sector_mapping_cache_invalidate.c b/common/src/lx_nor_flash_sector_mapping_cache_invalidate.c index 5b49a76..15028b1 100644 --- a/common/src/lx_nor_flash_sector_mapping_cache_invalidate.c +++ b/common/src/lx_nor_flash_sector_mapping_cache_invalidate.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_sector_mapping_cache_invalidate PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -74,6 +74,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _lx_nor_flash_sector_mapping_cache_invalidate(LX_NOR_FLASH *nor_flash, ULONG logical_sector) diff --git a/common/src/lx_nor_flash_sector_read.c b/common/src/lx_nor_flash_sector_read.c index 7e0ee17..fb85068 100644 --- a/common/src/lx_nor_flash_sector_read.c +++ b/common/src/lx_nor_flash_sector_read.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_sector_read PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -82,6 +82,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_sector_read(LX_NOR_FLASH *nor_flash, ULONG logical_sector, VOID *buffer) diff --git a/common/src/lx_nor_flash_sector_release.c b/common/src/lx_nor_flash_sector_release.c index 8eead9f..0f3e326 100644 --- a/common/src/lx_nor_flash_sector_release.c +++ b/common/src/lx_nor_flash_sector_release.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_sector_release PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -82,6 +82,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_sector_release(LX_NOR_FLASH *nor_flash, ULONG logical_sector) diff --git a/common/src/lx_nor_flash_sector_write.c b/common/src/lx_nor_flash_sector_write.c index edff9eb..0889bb8 100644 --- a/common/src/lx_nor_flash_sector_write.c +++ b/common/src/lx_nor_flash_sector_write.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_sector_write PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -85,6 +85,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ UINT _lx_nor_flash_sector_write(LX_NOR_FLASH *nor_flash, ULONG logical_sector, VOID *buffer) diff --git a/common/src/lx_nor_flash_simulator.c b/common/src/lx_nor_flash_simulator.c index 634b1f8..2063a70 100644 --- a/common/src/lx_nor_flash_simulator.c +++ b/common/src/lx_nor_flash_simulator.c @@ -23,7 +23,6 @@ /* Include necessary files. */ -#include "tx_api.h" #include "lx_api.h" /* Define constants for the NOR flash simulation. */ diff --git a/common/src/lx_nor_flash_system_error.c b/common/src/lx_nor_flash_system_error.c index 58de13d..746e868 100644 --- a/common/src/lx_nor_flash_system_error.c +++ b/common/src/lx_nor_flash_system_error.c @@ -25,8 +25,8 @@ /* Disable ThreadX error checking. */ -#ifndef TX_DISABLE_ERROR_CHECKING -#define TX_DISABLE_ERROR_CHECKING +#ifndef LX_DISABLE_ERROR_CHECKING +#define LX_DISABLE_ERROR_CHECKING #endif @@ -40,7 +40,7 @@ /* FUNCTION RELEASE */ /* */ /* _lx_nor_flash_system_error PORTABLE C */ -/* 6.1 */ +/* 6.1.7 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -73,6 +73,8 @@ /* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 09-30-2020 William E. Lamie Modified comment(s), */ /* resulting in version 6.1 */ +/* 06-02-2021 Bhupendra Naphade Modified comment(s), */ +/* resulting in version 6.1.7 */ /* */ /**************************************************************************/ VOID _lx_nor_flash_system_error(LX_NOR_FLASH *nor_flash, UINT error_code) diff --git a/samples/demo_filex_nand_flash.c b/samples/demo_filex_nand_flash.c index da9f801..e7c1a45 100644 --- a/samples/demo_filex_nand_flash.c +++ b/samples/demo_filex_nand_flash.c @@ -40,20 +40,34 @@ FX_FILE my_file1; /* Define ThreadX global data structures. */ +#ifndef LX_STANDALONE_ENABLE TX_THREAD thread_0; +#endif ULONG thread_0_counter; int main(void) { - /* Enter the ThreadX kernel. */ +#ifndef LX_STANDALONE_ENABLE tx_kernel_enter(); +#else + + /* Initialize NAND flash. */ + lx_nand_flash_initialize(); + + /* Initialize FileX. */ + fx_system_initialize(); + + thread_0_entry(0); +#endif + } /* Define what the initial system looks like. */ +#ifndef LX_STANDALONE_ENABLE void tx_application_define(void *first_unused_memory) { @@ -72,7 +86,7 @@ void tx_application_define(void *first_unused_memory) /* Initialize FileX. */ fx_system_initialize(); } - +#endif void thread_0_entry(ULONG thread_input) diff --git a/samples/demo_filex_nor_flash.c b/samples/demo_filex_nor_flash.c index 2125bbd..3dbca69 100644 --- a/samples/demo_filex_nor_flash.c +++ b/samples/demo_filex_nor_flash.c @@ -39,20 +39,34 @@ FX_FILE my_file; /* Define ThreadX global data structures. */ +#ifndef LX_STANDALONE_ENABLE TX_THREAD thread_0; +#endif ULONG thread_0_counter; int main(void) { - /* Enter the ThreadX kernel. */ +#ifndef LX_STANDALONE_ENABLE tx_kernel_enter(); +#else + + /* Initialize NAND flash. */ + lx_nand_flash_initialize(); + + /* Initialize FileX. */ + fx_system_initialize(); + + thread_0_entry(0); +#endif + } /* Define what the initial system looks like. */ +#ifndef LX_STANDALONE_ENABLE void tx_application_define(void *first_unused_memory) { @@ -70,6 +84,7 @@ void tx_application_define(void *first_unused_memory) /* Initialize FileX. */ fx_system_initialize(); } +#endif