mirror of
https://github.com/eclipse-threadx/levelx.git
synced 2026-09-14 20:48:51 +08:00
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4089f56e3 | ||
|
|
d42808cdeb | ||
|
|
c1d0fb9275 | ||
|
|
6eadbd6d97 | ||
|
|
f11f115a41 | ||
|
|
ce04276ace | ||
|
|
6b20a667e3 | ||
|
|
2af719ed1a | ||
|
|
71a3152556 | ||
|
|
d5a5b7f13e | ||
|
|
79f18aa137 | ||
|
|
b2faa5eabe | ||
|
|
e9a11fbba9 | ||
|
|
e75d8c5fb0 | ||
|
|
c88e35d9f8 | ||
|
|
aa7076b48c | ||
|
|
c731776882 | ||
|
|
d0145d66c3 | ||
|
|
8ce5b14c53 | ||
|
|
d328a38362 |
+31
-4
@@ -6,6 +6,8 @@ project(levelx
|
|||||||
LANGUAGES C ASM
|
LANGUAGES C ASM
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(LX_STANDALONE_ENABLE "Enable LevelX in standalone mode" OFF)
|
||||||
|
|
||||||
if(NOT DEFINED THREADX_ARCH)
|
if(NOT DEFINED THREADX_ARCH)
|
||||||
message(FATAL_ERROR "Error: THREADX_ARCH not defined")
|
message(FATAL_ERROR "Error: THREADX_ARCH not defined")
|
||||||
endif()
|
endif()
|
||||||
@@ -19,14 +21,38 @@ add_library(${PROJECT_NAME})
|
|||||||
add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME})
|
add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME})
|
||||||
|
|
||||||
# Define any required dependencies between this library and others
|
# Define any required dependencies between this library and others
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC
|
if(NOT LX_STANDALONE_ENABLE)
|
||||||
"azrtos::threadx"
|
target_link_libraries(${PROJECT_NAME} PUBLIC
|
||||||
"azrtos::filex"
|
"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
|
# Pick up the common stuff
|
||||||
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
|
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
|
# Enable a build target that produces a ZIP file of all sources
|
||||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||||
set(CPACK_SOURCE_IGNORE_FILES
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
@@ -40,3 +66,4 @@ set(CPACK_SOURCE_IGNORE_FILES
|
|||||||
)
|
)
|
||||||
set(CPACK_VERBATIM_VARIABLES YES)
|
set(CPACK_VERBATIM_VARIABLES YES)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
|||||||
+39
-39
@@ -12,29 +12,29 @@ apply prospectively and do not alter your or Microsoft’s rights relating to
|
|||||||
pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU
|
pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU
|
||||||
HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
|
HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.
|
||||||
|
|
||||||
INSTALLATION AND USE RIGHTS.
|
1. INSTALLATION AND USE RIGHTS.
|
||||||
|
|
||||||
General. You may install and use the software and the included Microsoft
|
a) General. You may install and use the software and the included Microsoft
|
||||||
applications solely for internal development, testing and evaluation purposes.
|
applications solely for internal development, testing and evaluation purposes.
|
||||||
Any distribution or production use requires a separate license as set forth in
|
Any distribution or production use requires a separate license as set forth in
|
||||||
Section 2.
|
Section 2.
|
||||||
|
|
||||||
Contributions. Microsoft welcomes contributions to this software. In the event
|
b) Contributions. Microsoft welcomes contributions to this software. In the event
|
||||||
that you make a contribution to this software you will be required to agree to a
|
that you make a contribution to this software you will be required to agree to a
|
||||||
Contributor License Agreement (CLA) declaring that you have the right to, and
|
Contributor License Agreement (CLA) declaring that you have the right to, and
|
||||||
actually do, grant Microsoft the rights to use your contribution. For details,
|
actually do, grant Microsoft the rights to use your contribution. For details,
|
||||||
visit https://cla.microsoft.com.
|
visit https://cla.microsoft.com.
|
||||||
|
|
||||||
Included Microsoft Applications. The software includes other Microsoft
|
c) Included Microsoft Applications. The software includes other Microsoft
|
||||||
applications which are governed by the licenses embedded in or made available
|
applications which are governed by the licenses embedded in or made available
|
||||||
with those applications.
|
with those applications.
|
||||||
|
|
||||||
Third Party Components. The software may include third party components with
|
d) Third Party Components. The software may include third party components with
|
||||||
separate legal notices or governed by other agreements, as may be described
|
separate legal notices or governed by other agreements, as may be described
|
||||||
within the software or in the ThirdPartyNotices file(s) accompanying the
|
within the software or in the ThirdPartyNotices file(s) accompanying the
|
||||||
software.
|
software.
|
||||||
|
|
||||||
Competitive Benchmarking. If you are a direct competitor, and you access or use
|
e) Competitive Benchmarking. If you are a direct competitor, and you access or use
|
||||||
the software for purposes of competitive benchmarking, analysis, or intelligence
|
the software for purposes of competitive benchmarking, analysis, or intelligence
|
||||||
gathering, you waive as against Microsoft, its subsidiaries, and its affiliated
|
gathering, you waive as against Microsoft, its subsidiaries, and its affiliated
|
||||||
companies (including prospectively) any competitive use, access, and
|
companies (including prospectively) any competitive use, access, and
|
||||||
@@ -44,100 +44,100 @@ Microsoft’s terms. If you do not waive any such purported restrictions in the
|
|||||||
terms governing your software, you are not allowed to access or use this
|
terms governing your software, you are not allowed to access or use this
|
||||||
software, and will not do so.
|
software, and will not do so.
|
||||||
|
|
||||||
DISTRIBUTION AND PRODUCTION USE. If you have obtained and/or are developing on
|
2. DISTRIBUTION AND PRODUCTION USE. If you have obtained and/or are developing on
|
||||||
microprocessor(s) and/or microcontroller(s) (“hardware”) listed in the file
|
microprocessor(s) and/or microcontroller(s) (“hardware”) listed in the file
|
||||||
named “LICENSED-HARDWARE.txt” included in the repository and/or distributed with
|
named “LICENSED-HARDWARE.txt” included in the repository and/or distributed with
|
||||||
the software you have the following rights in and to the software solely when
|
the software you have the following rights in and to the software solely when
|
||||||
used in combination with the hardware. In the event hardware is not listed in
|
used in combination with the hardware. In the event hardware is not listed in
|
||||||
the LICENSED-HARDWARE.txt file, you do not have the rights in this Section 2.
|
the LICENSED-HARDWARE.txt file, you do not have the rights in this Section 2.
|
||||||
|
|
||||||
Distribution and Production Use Rights.
|
a) Distribution and Production Use Rights.
|
||||||
|
|
||||||
You may use the software in production (e.g. program the modified or unmodified
|
i. You may use the software in production (e.g. program the modified or unmodified
|
||||||
software to devices you own or control) and distribute (i.e. make available to
|
software to devices you own or control) and distribute (i.e. make available to
|
||||||
third parties) the modified or unmodified binary image produced from this code.
|
third parties) the modified or unmodified binary image produced from this code.
|
||||||
|
|
||||||
|
|
||||||
You may permit your device distributors or developers to copy and distribute the
|
ii. You may permit your device distributors or developers to copy and distribute the
|
||||||
binary image as programmed or to be programmed to your devices.
|
binary image as programmed or to be programmed to your devices.
|
||||||
|
|
||||||
You may redistribute the unmodified or modified source to your device
|
iii. You may redistribute the unmodified or modified source to your device
|
||||||
distributors or developers. Modifications must be clearly marked. Any
|
distributors or developers. Modifications must be clearly marked. Any
|
||||||
redistribution in source code form must contain this license and any other
|
redistribution in source code form must contain this license and any other
|
||||||
licenses that accompany the software.
|
licenses that accompany the software.
|
||||||
|
|
||||||
Requirements. For any code you distribute, you must:
|
b) Requirements. For any code you distribute, you must:
|
||||||
|
|
||||||
when distributed in binary form, except as embedded in a device, include with
|
i. when distributed in binary form, except as embedded in a device, include with
|
||||||
such distribution the terms of this agreement;
|
such distribution the terms of this agreement;
|
||||||
|
|
||||||
when distributed in source code form to distributors or developers of your
|
ii. when distributed in source code form to distributors or developers of your
|
||||||
devices, include with such distribution the terms of this agreement; and
|
devices, include with such distribution the terms of this agreement; and
|
||||||
|
|
||||||
indemnify, defend and hold harmless Microsoft from any claims, including
|
iii. indemnify, defend and hold harmless Microsoft from any claims, including
|
||||||
attorneys’ fees, related to the distribution or use of your devices, except to
|
attorneys’ fees, related to the distribution or use of your devices, except to
|
||||||
the extent that any claim is based solely on the unmodified software.
|
the extent that any claim is based solely on the unmodified software.
|
||||||
|
|
||||||
Restrictions. You may not:
|
c) Restrictions. You may not:
|
||||||
|
|
||||||
use or modify the software to create a competing real time operating system
|
i. use or modify the software to create a competing real time operating system
|
||||||
software;
|
software;
|
||||||
|
|
||||||
remove any copyright notices or licenses contained in the software;
|
ii. remove any copyright notices or licenses contained in the software;
|
||||||
|
|
||||||
use Microsoft’s trademarks or trade dress in your application in any way that
|
iii. use Microsoft’s trademarks or trade dress in your application in any way that
|
||||||
suggests your device or application comes from or is endorsed by Microsoft;
|
suggests your device or application comes from or is endorsed by Microsoft;
|
||||||
|
|
||||||
transfer individual components, specific libraries, classes, functions or code
|
iv. transfer individual components, specific libraries, classes, functions or code
|
||||||
fragments of the software separately for purposes unrelated to the software; or
|
fragments of the software separately for purposes unrelated to the software; or
|
||||||
|
|
||||||
use or distribute the software in any way that would subject the software or
|
v. use or distribute the software in any way that would subject the software or
|
||||||
Microsoft’s intellectual property or technology to any other license terms.
|
Microsoft’s intellectual property or technology to any other license terms.
|
||||||
|
|
||||||
SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all
|
3. SCOPE OF LICENSE. The software is licensed, not sold. Microsoft reserves all
|
||||||
other rights. Unless applicable law gives you more rights despite this
|
other rights. Unless applicable law gives you more rights despite this
|
||||||
limitation, you will not (and have no right to):
|
limitation, you will not (and have no right to):
|
||||||
|
|
||||||
remove, minimize, block, or modify any notices of Microsoft or its suppliers in
|
a) remove, minimize, block, or modify any notices of Microsoft or its suppliers in
|
||||||
the software;
|
the software;
|
||||||
|
|
||||||
use the software in any way that is against the law or to create or propagate
|
b) use the software in any way that is against the law or to create or propagate
|
||||||
malware; or
|
malware; or
|
||||||
|
|
||||||
share, publish, distribute, or lease the software (except as permitted in
|
c) share, publish, distribute, or lease the software (except as permitted in
|
||||||
Section 2 above), or provide the software as a stand-alone offering for others
|
Section 2 above), or provide the software as a stand-alone offering for others
|
||||||
to use.
|
to use.
|
||||||
|
|
||||||
DATA. This software may interact with other Microsoft products that collect data
|
4. DATA. This software may interact with other Microsoft products that collect data
|
||||||
that is transmitted to Microsoft. To learn more about how Microsoft processes
|
that is transmitted to Microsoft. To learn more about how Microsoft processes
|
||||||
personal data we collect, please see the Microsoft Privacy Statement at
|
personal data we collect, please see the Microsoft Privacy Statement at
|
||||||
https://go.microsoft.com/fwlink/?LinkId=248681.
|
https://go.microsoft.com/fwlink/?LinkId=248681.
|
||||||
|
|
||||||
EXPORT RESTRICTIONS. You must comply with all domestic and international export
|
5. EXPORT RESTRICTIONS. You must comply with all domestic and international export
|
||||||
laws and regulations that apply to the software, which include restrictions on
|
laws and regulations that apply to the software, which include restrictions on
|
||||||
destinations, end users, and end use. For further information on export
|
destinations, end users, and end use. For further information on export
|
||||||
restrictions, visit https://aka.ms/exporting.
|
restrictions, visit https://aka.ms/exporting.
|
||||||
|
|
||||||
SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any
|
6. SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any
|
||||||
support services for the software. Any support provided is “as is”, “with all
|
support services for the software. Any support provided is “as is”, “with all
|
||||||
faults”, and without warranty of any kind.
|
faults”, and without warranty of any kind.
|
||||||
|
|
||||||
UPDATES. Microsoft may periodically update the software. You may obtain updates
|
7. UPDATES. Microsoft may periodically update the software. You may obtain updates
|
||||||
only from Microsoft or Microsoft-authorized sources. Updates may not include or
|
only from Microsoft or Microsoft-authorized sources. Updates may not include or
|
||||||
support all existing software features, services, or peripheral devices.
|
support all existing software features, services, or peripheral devices.
|
||||||
|
|
||||||
TERMINATION. Without prejudice to any other rights, Microsoft may terminate this
|
8. TERMINATION. Without prejudice to any other rights, Microsoft may terminate this
|
||||||
agreement if you fail to comply with any of its terms or conditions. In such
|
agreement if you fail to comply with any of its terms or conditions. In such
|
||||||
event, you must destroy all copies of the software and all of its component
|
event, you must destroy all copies of the software and all of its component
|
||||||
parts.
|
parts.
|
||||||
|
|
||||||
ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for
|
9. ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for
|
||||||
supplements, updates, or third-party applications, is the entire agreement for
|
supplements, updates, or third-party applications, is the entire agreement for
|
||||||
the software. To the extent you have entered into a separate agreement with
|
the software. To the extent you have entered into a separate agreement with
|
||||||
Microsoft relating specifically to the software, the terms in such agreement
|
Microsoft relating specifically to the software, the terms in such agreement
|
||||||
shall control.
|
shall control.
|
||||||
|
|
||||||
APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in
|
10. APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the software in
|
||||||
the United States or Canada, the laws of the state or province where you live
|
the United States or Canada, the laws of the state or province where you live
|
||||||
(or, if a business, where your principal place of business is located) govern
|
(or, if a business, where your principal place of business is located) govern
|
||||||
the interpretation of this agreement, claims for its breach, and all other
|
the interpretation of this agreement, claims for its breach, and all other
|
||||||
@@ -149,7 +149,7 @@ King County, Washington for all disputes heard in court. If not, you and
|
|||||||
Microsoft consent to exclusive jurisdiction and venue in the Superior Court of
|
Microsoft consent to exclusive jurisdiction and venue in the Superior Court of
|
||||||
King County, Washington for all disputes heard in court.
|
King County, Washington for all disputes heard in court.
|
||||||
|
|
||||||
CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal
|
11. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal
|
||||||
rights. You may have other rights, including consumer rights, under the laws of
|
rights. You may have other rights, including consumer rights, under the laws of
|
||||||
your state or country. Separate and apart from your relationship with Microsoft,
|
your state or country. Separate and apart from your relationship with Microsoft,
|
||||||
you may also have rights with respect to the party from which you acquired the
|
you may also have rights with respect to the party from which you acquired the
|
||||||
@@ -158,16 +158,16 @@ state or country do not permit it to do so. For example, if you acquired the
|
|||||||
software in one of the below regions, or mandatory country law applies, then the
|
software in one of the below regions, or mandatory country law applies, then the
|
||||||
following provisions apply to you:
|
following provisions apply to you:
|
||||||
|
|
||||||
Australia. You have statutory guarantees under the Australian Consumer Law and
|
a) Australia. You have statutory guarantees under the Australian Consumer Law and
|
||||||
nothing in this agreement is intended to affect those rights.
|
nothing in this agreement is intended to affect those rights.
|
||||||
|
|
||||||
Germany and Austria.
|
b) Germany and Austria.
|
||||||
|
|
||||||
i.Warranty. The properly licensed software will perform substantially as
|
i. Warranty. The properly licensed software will perform substantially as
|
||||||
described in any Microsoft materials that accompany the software. However,
|
described in any Microsoft materials that accompany the software. However,
|
||||||
Microsoft gives no contractual guarantee in relation to the licensed software.
|
Microsoft gives no contractual guarantee in relation to the licensed software.
|
||||||
|
|
||||||
ii.Limitation of Liability. In case of intentional conduct, gross negligence,
|
ii. Limitation of Liability. In case of intentional conduct, gross negligence,
|
||||||
claims based on the Product Liability Act, as well as, in case of death or
|
claims based on the Product Liability Act, as well as, in case of death or
|
||||||
personal or physical injury, Microsoft is liable according to the statutory law.
|
personal or physical injury, Microsoft is liable according to the statutory law.
|
||||||
|
|
||||||
@@ -180,13 +180,13 @@ with which a party may constantly trust in (so-called "cardinal obligations").
|
|||||||
In other cases of slight negligence, Microsoft will not be liable for slight
|
In other cases of slight negligence, Microsoft will not be liable for slight
|
||||||
negligence.
|
negligence.
|
||||||
|
|
||||||
DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF
|
12. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS IS.” YOU BEAR THE RISK OF
|
||||||
USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO
|
USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO
|
||||||
THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED
|
THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED
|
||||||
WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
|
WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
|
||||||
NON-INFRINGEMENT.
|
NON-INFRINGEMENT.
|
||||||
|
|
||||||
LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING
|
13. LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING
|
||||||
DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM
|
DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM
|
||||||
MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT
|
MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT
|
||||||
RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL,
|
RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL,
|
||||||
|
|||||||
+30
-1
@@ -1,6 +1,6 @@
|
|||||||
LICENSED HARDWARE LIST
|
LICENSED HARDWARE LIST
|
||||||
|
|
||||||
Last Updated: 2020-05-08
|
Last Updated: 2021-04-01
|
||||||
|
|
||||||
Microsoft has entered into OEM Agreements with manufacturers of the following
|
Microsoft has entered into OEM Agreements with manufacturers of the following
|
||||||
microprocessors and microcontrollers (the “hardware”) to enable those
|
microprocessors and microcontrollers (the “hardware”) to enable those
|
||||||
@@ -11,6 +11,35 @@ Production Use” rights in Section 2 of the Microsoft Software License Terms fo
|
|||||||
Microsoft Azure RTOS. If hardware is not listed below, you do not have those
|
Microsoft Azure RTOS. If hardware is not listed below, you do not have those
|
||||||
rights.
|
rights.
|
||||||
|
|
||||||
|
|
||||||
|
STMicroelectronics:
|
||||||
|
|
||||||
|
STM32 MCUs
|
||||||
|
STM32 MPUs
|
||||||
|
|
||||||
|
MediaTek:
|
||||||
|
|
||||||
|
MT3620 MCU (Azure Sphere)
|
||||||
|
|
||||||
|
Microchip:
|
||||||
|
|
||||||
|
PIC 32-bit MCUs
|
||||||
|
SAM 32-bit MCUs
|
||||||
|
SAM 32-bit MPUs
|
||||||
|
|
||||||
|
NXP:
|
||||||
|
|
||||||
|
i.MX RT10xx and RT116x/7x series crossover MCUs
|
||||||
|
LPC5500 series
|
||||||
|
|
||||||
|
|
||||||
|
Renesas:
|
||||||
|
|
||||||
|
Synergy Platform
|
||||||
|
RX Family of MCUs
|
||||||
|
RA Family of MCUs
|
||||||
|
RZ Family of MPUs
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
More coming soon. Please check back frequently for updates.
|
More coming soon. Please check back frequently for updates.
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
# Azure RTOS NetX
|
# Azure RTOS LevelX
|
||||||
|
|
||||||
LevelX provides NAND and NOR flash wear leveling facilities to embedded applications. Since both NAND and NOR flash memory can only be erased a finite number of times, it’s critical to distribute the flash memory use evenly. This is typically called “wear leveling” and is the purpose behind LevelX. LevelX presents to the user an array of logical sectors that are mapped to physical flash memory inside of LevelX. Applications may use LevelX in conjunction with FileX or may read/write logical sectors directly. LevelX is designed for fault tolerance. Flash updates are performed in a multiple-step process that can be interrupted in each step. LevelX automatically recovers to the optimal state during the next operation.
|
LevelX provides NAND and NOR flash wear leveling facilities to embedded applications. Since both NAND and NOR flash memory can only be erased a finite number of times, it’s critical to distribute the flash memory use evenly. This is typically called “wear leveling” and is the purpose behind LevelX. LevelX presents to the user an array of logical sectors that are mapped to physical flash memory inside of LevelX. Applications may use LevelX in conjunction with FileX or may read/write logical sectors directly. LevelX is designed for fault tolerance. Flash updates are performed in a multiple-step process that can be interrupted in each step. LevelX automatically recovers to the optimal state during the next operation.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Documentation for this library can be found here: http://docs.microsoft.com/azure/rtos/levelx
|
Documentation for this library can be found here: https://github.com/azure-rtos/levelx/releases/download/v6.0_rel/Azure_RTOS_LevelX_User_Guide.pdf
|
||||||
|
|
||||||
# Understanding inter-component dependencies
|
# Understanding inter-component dependencies
|
||||||
|
|
||||||
@@ -66,8 +66,26 @@ Each official release (preview or GA) will be tagged to mark the commit and push
|
|||||||
|
|
||||||
Azure RTOS provides OEMs with components to secure communication and to create code and data isolation using underlying MCU/MPU hardware protection mechanisms. It is ultimately the responsibility of the device builder to ensure the device fully meets the evolving security requirements associated with its specific use case.
|
Azure RTOS provides OEMs with components to secure communication and to create code and data isolation using underlying MCU/MPU hardware protection mechanisms. It is ultimately the responsibility of the device builder to ensure the device fully meets the evolving security requirements associated with its specific use case.
|
||||||
|
|
||||||
# Contribution, feedback and issues
|
# Licensing
|
||||||
|
|
||||||
If you encounter any bugs, have suggestions for new features or if you would like to become an active contributor to this project please follow the instructions provided in the contribution guideline for the corresponding repo.
|
License terms for using Azure RTOS are defined in the LICENSE.txt file of this repo. Please refer to this file for all definitive licensing information. No additional license fees are required for deploying Azure RTOS on hardware defined in the LICENSED-HARDWARE.txt file. If you are using hardware not defined in the LICENSED-HARDWARE.txt file or have licensing questions in general, please contact Microsoft directly at https://azure-rtos.ms-iot-contact.com/
|
||||||
|
|
||||||
For general support, please post a question to [Stack Overflow](http://stackoverflow.com/questions/tagged/azure-rtos+threadx) using the `threadx` and `azure-rtos` tags.
|
# Contribution, feedback, issues, and professional support
|
||||||
|
|
||||||
|
If you encounter any bugs, have suggestions for new features, or if you would like to become an active contributor to this project, please follow the instructions provided in the contribution guideline for the corresponding repo.
|
||||||
|
|
||||||
|
For basic support, click Issues in the command bar or post a question to [Stack Overflow](http://stackoverflow.com/questions/tagged/azure-rtos+threadx) using the `threadx` and `azure-rtos` tags.
|
||||||
|
|
||||||
|
Professional support plans (https://azure.microsoft.com/en-us/support/options/) are available from Microsoft.
|
||||||
|
|
||||||
|
# Additional Resources
|
||||||
|
|
||||||
|
The following are references to additional Azure RTOS and Azure IoT in general:
|
||||||
|
| | |
|
||||||
|
|---|---|
|
||||||
|
| Azure RTOS Documenation and Guides: | https://docs.microsoft.com/azure/rtos |
|
||||||
|
| Azure RTOS Website: | https://azure.microsoft.com/services/rtos/ |
|
||||||
|
| Azure RTOS Sales Questions: | https://azure-rtos.ms-iot-contact.com/ |
|
||||||
|
| For technical questions check out Microsoft Q/A for Azure IoT: | https://aka.ms/QnA/azure-rtos |
|
||||||
|
| Internet of Things Show for latest announcements and online training: | https://aka.ms/iotshow |
|
||||||
|
| IoT Tech Community: | https://aka.ms/community/azure-rtos |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Name of the target
|
# Name of the target
|
||||||
set(CMAKE_SYSTEM_NAME Generic)
|
set(CMAKE_SYSTEM_NAME Generic)
|
||||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m4)
|
set(CMAKE_SYSTEM_PROCESSOR cortex-m0)
|
||||||
|
|
||||||
set(THREADX_ARCH "cortex_m0")
|
set(THREADX_ARCH "cortex_m0")
|
||||||
set(THREADX_TOOLCHAIN "gnu")
|
set(THREADX_TOOLCHAIN "gnu")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Name of the target
|
# Name of the target
|
||||||
set(CMAKE_SYSTEM_NAME Generic)
|
set(CMAKE_SYSTEM_NAME Generic)
|
||||||
set(CMAKE_SYSTEM_PROCESSOR cortex-m4)
|
set(CMAKE_SYSTEM_PROCESSOR cortex-m0)
|
||||||
|
|
||||||
set(THREADX_ARCH "cortex_m3")
|
set(THREADX_ARCH "cortex_m3")
|
||||||
set(THREADX_TOOLCHAIN "gnu")
|
set(THREADX_TOOLCHAIN "gnu")
|
||||||
|
|||||||
+109
-1
@@ -26,7 +26,7 @@
|
|||||||
/* APPLICATION INTERFACE DEFINITION RELEASE */
|
/* APPLICATION INTERFACE DEFINITION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* lx_api.h PORTABLE C */
|
/* lx_api.h PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -42,6 +42,19 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||||
|
/* 09-30-2020 William E. Lamie Modified comment(s), and */
|
||||||
|
/* updated product constants, */
|
||||||
|
/* resulting in version 6.1 */
|
||||||
|
/* 11-09-2020 William E. Lamie Modified comment(s), and */
|
||||||
|
/* added support for lx_user.h */
|
||||||
|
/* so user can specify values, */
|
||||||
|
/* resulting in version 6.1.2 */
|
||||||
|
/* 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 */
|
||||||
/* */
|
/* */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
@@ -49,9 +62,92 @@
|
|||||||
#define LX_API_H
|
#define LX_API_H
|
||||||
|
|
||||||
|
|
||||||
|
/* Determine if a C++ compiler is being used. If so, ensure that standard
|
||||||
|
C is used to process the API information. */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
/* Yes, C++ compiler is present. Use standard C. */
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Include necessary system files. */
|
/* Include necessary system files. */
|
||||||
|
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
#include "tx_api.h"
|
#include "tx_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Determine if the optional LevelX user define file should be used. */
|
||||||
|
|
||||||
|
#ifdef LX_INCLUDE_USER_DEFINE_FILE
|
||||||
|
|
||||||
|
|
||||||
|
/* Yes, include the user defines in lx_user.h. The defines in this file may
|
||||||
|
alternately be defined on the command line. */
|
||||||
|
|
||||||
|
#include "lx_user.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LX_STANDALONE_ENABLE
|
||||||
|
|
||||||
|
/* Define compiler library include files. */
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#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. */
|
/* Disable warning of parameter not used. */
|
||||||
#ifndef LX_PARAMETER_NOT_USED
|
#ifndef LX_PARAMETER_NOT_USED
|
||||||
@@ -59,6 +155,13 @@
|
|||||||
#endif /* LX_PARAMETER_NOT_USED */
|
#endif /* LX_PARAMETER_NOT_USED */
|
||||||
|
|
||||||
|
|
||||||
|
/* Define basic constants for the LevelX Stack. */
|
||||||
|
#define AZURE_RTOS_LEVELX
|
||||||
|
#define LEVELX_MAJOR_VERSION 6
|
||||||
|
#define LEVELX_MINOR_VERSION 1
|
||||||
|
#define LEVELX_PATCH_VERSION 7
|
||||||
|
|
||||||
|
|
||||||
/* Define general LevelX Constants. */
|
/* Define general LevelX Constants. */
|
||||||
|
|
||||||
#define LX_FALSE 0
|
#define LX_FALSE 0
|
||||||
@@ -526,5 +629,10 @@ UINT _lx_nor_flash_physical_sector_allocate(LX_NOR_FLASH *nor_flash, ULONG lo
|
|||||||
VOID _lx_nor_flash_sector_mapping_cache_invalidate(LX_NOR_FLASH *nor_flash, ULONG logical_sector);
|
VOID _lx_nor_flash_sector_mapping_cache_invalidate(LX_NOR_FLASH *nor_flash, ULONG logical_sector);
|
||||||
VOID _lx_nor_flash_system_error(LX_NOR_FLASH *nor_flash, UINT error_code);
|
VOID _lx_nor_flash_system_error(LX_NOR_FLASH *nor_flash, UINT error_code);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,126 @@
|
|||||||
|
/**************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) Microsoft Corporation. All rights reserved. */
|
||||||
|
/* */
|
||||||
|
/* This software is licensed under the Microsoft Software License */
|
||||||
|
/* Terms for Microsoft Azure RTOS. Full text of the license can be */
|
||||||
|
/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
|
||||||
|
/* and in the root directory of this software. */
|
||||||
|
/* */
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
/**************************************************************************/
|
||||||
|
/** */
|
||||||
|
/** LevelX Component */
|
||||||
|
/** */
|
||||||
|
/** User Specific */
|
||||||
|
/** */
|
||||||
|
/**************************************************************************/
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||||
|
/* */
|
||||||
|
/* lx_user.h PORTABLE C */
|
||||||
|
/* 6.1.7 */
|
||||||
|
/* */
|
||||||
|
/* AUTHOR */
|
||||||
|
/* */
|
||||||
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
|
/* */
|
||||||
|
/* DESCRIPTION */
|
||||||
|
/* */
|
||||||
|
/* This file contains user defines for configuring LevelX in specific */
|
||||||
|
/* ways. This file will have an effect only if the application and */
|
||||||
|
/* LevelX library are built with LX_INCLUDE_USER_DEFINE_FILE defined. */
|
||||||
|
/* Note that all the defines in this file may also be made on the */
|
||||||
|
/* command line when building LevelX library and application objects. */
|
||||||
|
/* */
|
||||||
|
/* RELEASE HISTORY */
|
||||||
|
/* */
|
||||||
|
/* 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 */
|
||||||
|
/* */
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
#ifndef LX_USER_H
|
||||||
|
#define LX_USER_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this option bypasses the NOR flash driver read routine in favor or reading
|
||||||
|
the NOR memory directly, resulting in a significant performance increase.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_DIRECT_READ
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this causes the LevelX NOR instance open logic to verify free NOR
|
||||||
|
sectors are all ones.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_FREE_SECTOR_DATA_VERIFY
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* By default this value is 128 and defines the logical sector mapping cache size.
|
||||||
|
Large values improve performance, but cost memory. The minimum size is 8 and
|
||||||
|
all values must be a power of 2.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_NAND_SECTOR_MAPPING_CACHE_SIZE 128
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Defined, this creates a direct mapping cache, such that there are no cache misses.
|
||||||
|
It also requires that LX_NAND_SECTOR_MAPPING_CACHE_SIZE represents the exact number
|
||||||
|
of total pages in your flash device.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_NAND_FLASH_DIRECT_MAPPING_CACHE
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Defined, this disabled the extended NOR cache. */
|
||||||
|
/*
|
||||||
|
#define LX_NOR_DISABLE_EXTENDED_CACHE
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* By default this value is 8, which represents a maximum of 8 sectors that
|
||||||
|
can be cached in a NOR instance.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_NOR_EXTENDED_CACHE_SIZE 8
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* By default this value is 16 and defines the logical sector mapping cache size.
|
||||||
|
Large values improve performance, but cost memory. The minimum size is 8 and all
|
||||||
|
values must be a power of 2.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_NOR_SECTOR_MAPPING_CACHE_SIZE 16
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Defined, this makes LevelX thread-safe by using a ThreadX mutex object
|
||||||
|
throughout the API.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LX_THREAD_SAFE_ENABLE
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Defined, LevelX will be used in standalone mode (without Azure RTOS ThreadX) */
|
||||||
|
|
||||||
|
/* #define LX_STANDALONE_ENABLE */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
/* Include necessary system files. */
|
/* Include necessary system files. */
|
||||||
|
|
||||||
#include "tx_api.h"
|
|
||||||
#include "fx_api.h"
|
#include "fx_api.h"
|
||||||
#include "lx_api.h"
|
#include "lx_api.h"
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr);
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _fx_nand_simulator_driver PORTABLE C */
|
/* _fx_nand_simulator_driver PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -120,6 +119,10 @@ VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr);
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _fx_nand_flash_simulator_driver(FX_MEDIA *media_ptr)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
/* Include necessary system files. */
|
/* Include necessary system files. */
|
||||||
|
|
||||||
#include "tx_api.h"
|
|
||||||
#include "fx_api.h"
|
#include "fx_api.h"
|
||||||
#include "lx_api.h"
|
#include "lx_api.h"
|
||||||
|
|
||||||
@@ -65,7 +64,7 @@ VOID _fx_nor_flash_simulator_driver(FX_MEDIA *media_ptr);
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _fx_nor_flash_simulator_driver PORTABLE C */
|
/* _fx_nor_flash_simulator_driver PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -116,6 +115,10 @@ VOID _fx_nor_flash_simulator_driver(FX_MEDIA *media_ptr);
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _fx_nor_flash_simulator_driver(FX_MEDIA *media_ptr)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_256byte_ecc_check PORTABLE C */
|
/* _lx_nand_flash_256byte_ecc_check PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_256byte_ecc_check(UCHAR *page_buffer, UCHAR *ecc_buffer)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_256byte_ecc_compute PORTABLE C */
|
/* _lx_nand_flash_256byte_ecc_compute PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_256byte_ecc_compute(UCHAR *page_buffer, UCHAR *ecc_buffer)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_block_full_update PORTABLE C */
|
/* _lx_nand_flash_block_full_update PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -76,6 +76,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_block_full_update(LX_NAND_FLASH *nand_flash, ULONG block, ULONG erase_count)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_block_obsoleted_check PORTABLE C */
|
/* _lx_nand_flash_block_obsoleted_check PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -82,6 +82,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _lx_nand_flash_block_obsoleted_check(LX_NAND_FLASH *nand_flash, ULONG block)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_block_reclaim PORTABLE C */
|
/* _lx_nand_flash_block_reclaim PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -84,6 +84,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_block_reclaim(LX_NAND_FLASH *nand_flash)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_close PORTABLE C */
|
/* _lx_nand_flash_close PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -70,16 +70,20 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_close(LX_NAND_FLASH *nand_flash)
|
||||||
{
|
{
|
||||||
|
|
||||||
TX_INTERRUPT_SAVE_AREA
|
LX_INTERRUPT_SAVE_AREA
|
||||||
|
|
||||||
|
|
||||||
/* Lockout interrupts for NAND flash close. */
|
/* Lockout interrupts for NAND flash close. */
|
||||||
TX_DISABLE
|
LX_DISABLE
|
||||||
|
|
||||||
/* See if the media is the only one on the media opened list. */
|
/* See if the media is the only one on the media opened list. */
|
||||||
if ((_lx_nand_flash_opened_ptr == nand_flash) &&
|
if ((_lx_nand_flash_opened_ptr == nand_flash) &&
|
||||||
@@ -115,7 +119,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
nand_flash -> lx_nand_flash_state = LX_NAND_FLASH_CLOSED;
|
nand_flash -> lx_nand_flash_state = LX_NAND_FLASH_CLOSED;
|
||||||
|
|
||||||
/* Restore interrupt posture. */
|
/* Restore interrupt posture. */
|
||||||
TX_RESTORE
|
LX_RESTORE
|
||||||
|
|
||||||
#ifdef LX_THREAD_SAFE_ENABLE
|
#ifdef LX_THREAD_SAFE_ENABLE
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_defragment PORTABLE C */
|
/* _lx_nand_flash_defragment PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_defragment(LX_NAND_FLASH *nand_flash)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_block_erase PORTABLE C */
|
/* _lx_nand_flash_driver_block_erase PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_block_erase(LX_NAND_FLASH *nand_flash, ULONG block, ULONG erase_count)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_block_erased_verify PORTABLE C */
|
/* _lx_nand_flash_driver_block_erased_verify PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_block_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_block_status_get PORTABLE C */
|
/* _lx_nand_flash_driver_block_status_get PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -74,6 +74,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_block_status_get(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR *bad_block_flag)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_block_status_set PORTABLE C */
|
/* _lx_nand_flash_driver_block_status_set PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -74,6 +74,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_block_status_set(LX_NAND_FLASH *nand_flash, ULONG block, UCHAR bad_block_flag)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_extra_bytes_get PORTABLE C */
|
/* _lx_nand_flash_driver_extra_bytes_get PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -75,6 +75,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_extra_bytes_get(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, UCHAR *destination, UINT size)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_extra_bytes_set PORTABLE C */
|
/* _lx_nand_flash_driver_extra_bytes_set PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -76,6 +76,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_extra_bytes_set(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, UCHAR *source, UINT size)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_page_erased_verify PORTABLE C */
|
/* _lx_nand_flash_driver_page_erased_verify PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_page_erased_verify(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_read PORTABLE C */
|
/* _lx_nand_flash_driver_read PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -74,6 +74,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_read(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, ULONG *destination, ULONG words)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_driver_write PORTABLE C */
|
/* _lx_nand_flash_driver_write PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -74,6 +74,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_driver_write(LX_NAND_FLASH *nand_flash, ULONG block, ULONG page, ULONG *source, ULONG words)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_extended_cache_enable PORTABLE C */
|
/* _lx_nand_flash_extended_cache_enable PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -75,6 +75,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_extended_cache_enable(LX_NAND_FLASH *nand_flash, VOID *memory, ULONG size)
|
||||||
@@ -89,13 +93,13 @@ ULONG i;
|
|||||||
working_ptr = (UCHAR *) memory;
|
working_ptr = (UCHAR *) memory;
|
||||||
|
|
||||||
/* Check for a NULL pointer. If NULL, disable all the caches. */
|
/* 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. */
|
/* Disable all extended caches. */
|
||||||
nand_flash -> lx_nand_flash_block_status_cache = TX_NULL;
|
nand_flash -> lx_nand_flash_block_status_cache = LX_NULL;
|
||||||
nand_flash -> lx_nand_flash_page_extra_bytes_cache = TX_NULL;
|
nand_flash -> lx_nand_flash_page_extra_bytes_cache = LX_NULL;
|
||||||
nand_flash -> lx_nand_flash_page_0_cache = TX_NULL;
|
nand_flash -> lx_nand_flash_page_0_cache = LX_NULL;
|
||||||
|
|
||||||
/* Return success! */
|
/* Return success! */
|
||||||
return(LX_SUCCESS);
|
return(LX_SUCCESS);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ ULONG _lx_nand_flash_opened_count;
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_initialize PORTABLE C */
|
/* _lx_nand_flash_initialize PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -69,6 +69,8 @@ ULONG _lx_nand_flash_opened_count;
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||||
|
/* 09-30-2020 William E. Lamie Modified comment(s), */
|
||||||
|
/* resulting in version 6.1 */
|
||||||
/* */
|
/* */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
UINT _lx_nand_flash_initialize(void)
|
UINT _lx_nand_flash_initialize(void)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_logical_sector_find PORTABLE C */
|
/* _lx_nand_flash_logical_sector_find PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -83,6 +83,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_logical_sector_find(LX_NAND_FLASH *nand_flash, ULONG logical_sector, ULONG superceded_check, ULONG *block, ULONG *page)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_next_block_to_erase_find PORTABLE C */
|
/* _lx_nand_flash_next_block_to_erase_find PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -80,6 +80,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
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)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_open PORTABLE C */
|
/* _lx_nand_flash_open PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -90,6 +90,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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 *))
|
UINT _lx_nand_flash_open(LX_NAND_FLASH *nand_flash, CHAR *name, UINT (*nand_driver_initialize)(LX_NAND_FLASH *))
|
||||||
@@ -113,12 +117,12 @@ LX_NAND_FLASH *tail_ptr;
|
|||||||
ULONG logical_sector;
|
ULONG logical_sector;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TX_INTERRUPT_SAVE_AREA
|
LX_INTERRUPT_SAVE_AREA
|
||||||
|
|
||||||
LX_PARAMETER_NOT_USED(name);
|
LX_PARAMETER_NOT_USED(name);
|
||||||
|
|
||||||
/* Clear the NAND flash control block. */
|
/* 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. */
|
/* Call the flash driver's initialization function. */
|
||||||
(nand_driver_initialize)(nand_flash);
|
(nand_driver_initialize)(nand_flash);
|
||||||
@@ -903,7 +907,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
status = tx_mutex_create(&nand_flash -> lx_nand_flash_mutex, "NAND Flash Mutex", TX_NO_INHERIT);
|
status = tx_mutex_create(&nand_flash -> lx_nand_flash_mutex, "NAND Flash Mutex", TX_NO_INHERIT);
|
||||||
|
|
||||||
/* Determine if the mutex creation encountered an error. */
|
/* 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. */
|
/* Call system error handler, since this should not happen. */
|
||||||
@@ -925,7 +929,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
nand_flash -> lx_nand_flash_max_mapped_sector = max_mapped_sector;
|
nand_flash -> lx_nand_flash_max_mapped_sector = max_mapped_sector;
|
||||||
|
|
||||||
/* Lockout interrupts. */
|
/* Lockout interrupts. */
|
||||||
TX_DISABLE
|
LX_DISABLE
|
||||||
|
|
||||||
/* At this point, the NAND flash has been opened successfully. Place the
|
/* 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. */
|
NAND flash control block on the linked list of currently opened NAND flashes. */
|
||||||
@@ -964,7 +968,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
_lx_nand_flash_opened_count++;
|
_lx_nand_flash_opened_count++;
|
||||||
|
|
||||||
/* Restore interrupts. */
|
/* Restore interrupts. */
|
||||||
TX_RESTORE
|
LX_RESTORE
|
||||||
|
|
||||||
/* Return a successful completion. */
|
/* Return a successful completion. */
|
||||||
return(LX_SUCCESS);
|
return(LX_SUCCESS);
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_page_ecc_check PORTABLE C */
|
/* _lx_nand_flash_page_ecc_check PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_page_ecc_check(LX_NAND_FLASH *nand_flash, UCHAR *page_buffer, UCHAR *ecc_buffer)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_page_ecc_compute PORTABLE C */
|
/* _lx_nand_flash_page_ecc_compute PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_page_ecc_compute(LX_NAND_FLASH *nand_flash, UCHAR *page_buffer, UCHAR *ecc_buffer)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_partial_defragment PORTABLE C */
|
/* _lx_nand_flash_partial_defragment PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -76,6 +76,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_partial_defragment(LX_NAND_FLASH *nand_flash, UINT max_blocks)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_physical_page_allocate PORTABLE C */
|
/* _lx_nand_flash_physical_page_allocate PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -83,6 +83,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_physical_page_allocate(LX_NAND_FLASH *nand_flash, ULONG *block, ULONG *page, ULONG *erase_count)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_sector_mapping_cache_invalidate PORTABLE C */
|
/* _lx_nand_flash_sector_mapping_cache_invalidate PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _lx_nand_flash_sector_mapping_cache_invalidate(LX_NAND_FLASH *nand_flash, ULONG logical_sector)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_sector_read PORTABLE C */
|
/* _lx_nand_flash_sector_read PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -78,6 +78,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_sector_read(LX_NAND_FLASH *nand_flash, ULONG logical_sector, VOID *buffer)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_sector_release PORTABLE C */
|
/* _lx_nand_flash_sector_release PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -83,6 +83,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_sector_release(LX_NAND_FLASH *nand_flash, ULONG logical_sector)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_sector_write PORTABLE C */
|
/* _lx_nand_flash_sector_write PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -88,6 +88,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nand_flash_sector_write(LX_NAND_FLASH *nand_flash, ULONG logical_sector, VOID *buffer)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
/* Include necessary files. */
|
/* Include necessary files. */
|
||||||
|
|
||||||
#include "tx_api.h"
|
|
||||||
#include "lx_api.h"
|
#include "lx_api.h"
|
||||||
|
|
||||||
/* Define constants for the NAND flash simulation. */
|
/* Define constants for the NAND flash simulation. */
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nand_flash_system_error PORTABLE C */
|
/* _lx_nand_flash_system_error PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _lx_nand_flash_system_error(LX_NAND_FLASH *nand_flash, UINT error_code, ULONG block, ULONG page)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_block_reclaim PORTABLE C */
|
/* _lx_nor_flash_block_reclaim PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -79,6 +79,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_block_reclaim(LX_NOR_FLASH *nor_flash)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_close PORTABLE C */
|
/* _lx_nor_flash_close PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -70,16 +70,20 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_close(LX_NOR_FLASH *nor_flash)
|
||||||
{
|
{
|
||||||
|
|
||||||
TX_INTERRUPT_SAVE_AREA
|
LX_INTERRUPT_SAVE_AREA
|
||||||
|
|
||||||
|
|
||||||
/* Lockout interrupts for NOR flash close. */
|
/* Lockout interrupts for NOR flash close. */
|
||||||
TX_DISABLE
|
LX_DISABLE
|
||||||
|
|
||||||
/* See if the media is the only one on the media opened list. */
|
/* See if the media is the only one on the media opened list. */
|
||||||
if ((_lx_nor_flash_opened_ptr == nor_flash) &&
|
if ((_lx_nor_flash_opened_ptr == nor_flash) &&
|
||||||
@@ -115,7 +119,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
nor_flash -> lx_nor_flash_state = LX_NOR_FLASH_CLOSED;
|
nor_flash -> lx_nor_flash_state = LX_NOR_FLASH_CLOSED;
|
||||||
|
|
||||||
/* Restore interrupt posture. */
|
/* Restore interrupt posture. */
|
||||||
TX_RESTORE
|
LX_RESTORE
|
||||||
|
|
||||||
#ifdef LX_THREAD_SAFE_ENABLE
|
#ifdef LX_THREAD_SAFE_ENABLE
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_defragment PORTABLE C */
|
/* _lx_nor_flash_defragment PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_defragment(LX_NOR_FLASH *nor_flash)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_driver_block_erase PORTABLE C */
|
/* _lx_nor_flash_driver_block_erase PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_driver_block_erase(LX_NOR_FLASH *nor_flash, ULONG block, ULONG erase_count)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_extended_cache_read PORTABLE C */
|
/* _lx_nor_flash_extended_cache_read PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_driver_read(LX_NOR_FLASH *nor_flash, ULONG *flash_address, ULONG *destination, ULONG words)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_driver_write PORTABLE C */
|
/* _lx_nor_flash_driver_write PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -73,6 +73,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_driver_write(LX_NOR_FLASH *nor_flash, ULONG *flash_address, ULONG *source, ULONG words)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_extended_cache_enable PORTABLE C */
|
/* _lx_nor_flash_extended_cache_enable PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,14 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||||
|
/* 09-30-2020 William E. Lamie Modified comment(s), */
|
||||||
|
/* resulting in version 6.1 */
|
||||||
|
/* 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)
|
UINT _lx_nor_flash_extended_cache_enable(LX_NOR_FLASH *nor_flash, VOID *memory, ULONG size)
|
||||||
@@ -139,6 +147,10 @@ ULONG *cache_memory;
|
|||||||
return(LX_SUCCESS);
|
return(LX_SUCCESS);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
LX_PARAMETER_NOT_USED(nor_flash);
|
||||||
|
LX_PARAMETER_NOT_USED(memory);
|
||||||
|
LX_PARAMETER_NOT_USED(size);
|
||||||
|
|
||||||
/* Return disabled error message. */
|
/* Return disabled error message. */
|
||||||
return(LX_DISABLED);
|
return(LX_DISABLED);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ ULONG _lx_nor_flash_opened_count;
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_initialize PORTABLE C */
|
/* _lx_nor_flash_initialize PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -69,6 +69,10 @@ ULONG _lx_nor_flash_opened_count;
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_initialize(void)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_logical_sector_find PORTABLE C */
|
/* _lx_nor_flash_logical_sector_find PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -81,6 +81,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
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)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_next_block_to_erase_find PORTABLE C */
|
/* _lx_nor_flash_next_block_to_erase_find PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -77,6 +77,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
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)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_open PORTABLE C */
|
/* _lx_nor_flash_open PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -81,6 +81,17 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
||||||
|
/* 09-30-2020 William E. Lamie Modified comment(s), */
|
||||||
|
/* resulting in version 6.1 */
|
||||||
|
/* 11-09-2020 William E. Lamie Modified comment(s), */
|
||||||
|
/* fixed compiler warnings, */
|
||||||
|
/* resulting in version 6.1.2 */
|
||||||
|
/* 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 *))
|
UINT _lx_nor_flash_open(LX_NOR_FLASH *nor_flash, CHAR *name, UINT (*nor_driver_initialize)(LX_NOR_FLASH *))
|
||||||
@@ -99,19 +110,19 @@ ULONG used_sectors;
|
|||||||
ULONG *new_map_entry;
|
ULONG *new_map_entry;
|
||||||
ULONG *new_sector_address;
|
ULONG *new_sector_address;
|
||||||
ULONG erased_count, min_erased_count, max_erased_count, temp_erased_count;
|
ULONG erased_count, min_erased_count, max_erased_count, temp_erased_count;
|
||||||
ULONG i, j, k;
|
ULONG j, k, l;
|
||||||
UINT status;
|
UINT status;
|
||||||
#ifdef LX_FREE_SECTOR_DATA_VERIFY
|
#ifdef LX_FREE_SECTOR_DATA_VERIFY
|
||||||
ULONG *sector_word_ptr;
|
ULONG *sector_word_ptr;
|
||||||
ULONG sector_word;
|
ULONG sector_word;
|
||||||
#endif
|
#endif
|
||||||
LX_NOR_FLASH *tail_ptr;
|
LX_NOR_FLASH *tail_ptr;
|
||||||
TX_INTERRUPT_SAVE_AREA
|
LX_INTERRUPT_SAVE_AREA
|
||||||
|
|
||||||
LX_PARAMETER_NOT_USED(name);
|
LX_PARAMETER_NOT_USED(name);
|
||||||
|
|
||||||
/* Clear the NOR flash control block. */
|
/* 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. */
|
/* Call the flash driver's initialization function. */
|
||||||
(nor_driver_initialize)(nor_flash);
|
(nor_driver_initialize)(nor_flash);
|
||||||
@@ -206,7 +217,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
||||||
|
|
||||||
/* Loop through the blocks to determine the minimum and maximum erase count. */
|
/* Loop through the blocks to determine the minimum and maximum erase count. */
|
||||||
for (i = 0; i < nor_flash -> lx_nor_flash_total_blocks; i++)
|
for (l = 0; l < nor_flash -> lx_nor_flash_total_blocks; l++)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Pickup the first word of the block. If the flash manager has executed before, this word contains the
|
/* Pickup the first word of the block. If the flash manager has executed before, this word contains the
|
||||||
@@ -275,7 +286,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
||||||
|
|
||||||
/* Loop through the blocks to setup the flash the fist time. */
|
/* Loop through the blocks to setup the flash the fist time. */
|
||||||
for (i = 0; i < nor_flash -> lx_nor_flash_total_blocks; i++)
|
for (l = 0; l < nor_flash -> lx_nor_flash_total_blocks; l++)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Setup the free bit map that corresponds to the free physical sectors in this
|
/* Setup the free bit map that corresponds to the free physical sectors in this
|
||||||
@@ -336,7 +347,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
block_word_ptr = nor_flash -> lx_nor_flash_base_address;
|
||||||
|
|
||||||
/* Loop through the blocks. */
|
/* Loop through the blocks. */
|
||||||
for (i = 0; i < nor_flash -> lx_nor_flash_total_blocks; i++)
|
for (l = 0; l < nor_flash -> lx_nor_flash_total_blocks; l++)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* First, determine if this block has a valid erase count. */
|
/* First, determine if this block has a valid erase count. */
|
||||||
@@ -382,7 +393,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
nor_flash -> lx_nor_flash_diagnostic_erased_block++;
|
nor_flash -> lx_nor_flash_diagnostic_erased_block++;
|
||||||
|
|
||||||
/* Check to see if the block is erased. */
|
/* Check to see if the block is erased. */
|
||||||
status = (nor_flash -> lx_nor_flash_driver_block_erased_verify)(i);
|
status = (nor_flash -> lx_nor_flash_driver_block_erased_verify)(l);
|
||||||
|
|
||||||
/* Is the block completely erased? */
|
/* Is the block completely erased? */
|
||||||
if (status != LX_SUCCESS)
|
if (status != LX_SUCCESS)
|
||||||
@@ -404,7 +415,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
nor_flash -> lx_nor_flash_diagnostic_re_erase_block++;
|
nor_flash -> lx_nor_flash_diagnostic_re_erase_block++;
|
||||||
|
|
||||||
/* No, the block is not fully erased, erase it again. */
|
/* No, the block is not fully erased, erase it again. */
|
||||||
status = _lx_nor_flash_driver_block_erase(nor_flash, i, max_erased_count);
|
status = _lx_nor_flash_driver_block_erase(nor_flash, l, max_erased_count);
|
||||||
|
|
||||||
/* Check for an error from flash driver. Drivers should never return an error.. */
|
/* Check for an error from flash driver. Drivers should never return an error.. */
|
||||||
if (status)
|
if (status)
|
||||||
@@ -509,7 +520,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
{
|
{
|
||||||
|
|
||||||
/* Remember the block with free sectors. */
|
/* Remember the block with free sectors. */
|
||||||
nor_flash -> lx_nor_flash_free_block_search = i;
|
nor_flash -> lx_nor_flash_free_block_search = l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -746,7 +757,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
/* Read the word directly. */
|
/* Read the word directly. */
|
||||||
sector_word = *(sector_word_ptr);
|
sector_word = *(sector_word_ptr);
|
||||||
#else
|
#else
|
||||||
status = _lx_nor_flash_driver_read((sector_word_ptr), §or_word, 1);
|
status = _lx_nor_flash_driver_read(nor_flash, (sector_word_ptr), §or_word, 1);
|
||||||
|
|
||||||
/* Check for an error from flash driver. Drivers should never return an error.. */
|
/* Check for an error from flash driver. Drivers should never return an error.. */
|
||||||
if (status)
|
if (status)
|
||||||
@@ -806,7 +817,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
status = tx_mutex_create(&nor_flash -> lx_nor_flash_mutex, "NOR Flash Mutex", TX_NO_INHERIT);
|
status = tx_mutex_create(&nor_flash -> lx_nor_flash_mutex, "NOR Flash Mutex", TX_NO_INHERIT);
|
||||||
|
|
||||||
/* Determine if the mutex creation encountered an error. */
|
/* 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. */
|
/* Call system error handler, since this should not happen. */
|
||||||
@@ -825,7 +836,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
nor_flash -> lx_nor_flash_found_sector_search = 0;
|
nor_flash -> lx_nor_flash_found_sector_search = 0;
|
||||||
|
|
||||||
/* Lockout interrupts. */
|
/* Lockout interrupts. */
|
||||||
TX_DISABLE
|
LX_DISABLE
|
||||||
|
|
||||||
/* At this point, the NOR flash has been opened successfully. Place the
|
/* 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. */
|
NOR flash control block on the linked list of currently opened NOR flashes. */
|
||||||
@@ -864,7 +875,7 @@ TX_INTERRUPT_SAVE_AREA
|
|||||||
_lx_nor_flash_opened_count++;
|
_lx_nor_flash_opened_count++;
|
||||||
|
|
||||||
/* Restore interrupts. */
|
/* Restore interrupts. */
|
||||||
TX_RESTORE
|
LX_RESTORE
|
||||||
|
|
||||||
/* Return a successful completion. */
|
/* Return a successful completion. */
|
||||||
return(LX_SUCCESS);
|
return(LX_SUCCESS);
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_partial_defragment PORTABLE C */
|
/* _lx_nor_flash_partial_defragment PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -76,6 +76,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_partial_defragment(LX_NOR_FLASH *nor_flash, UINT max_blocks)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_physical_sector_allocate PORTABLE C */
|
/* _lx_nor_flash_physical_sector_allocate PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -76,6 +76,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_physical_sector_allocate(LX_NOR_FLASH *nor_flash, ULONG logical_sector, ULONG **physical_sector_map_entry, ULONG **physical_sector_address)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_sector_mapping_cache_invalidate PORTABLE C */
|
/* _lx_nor_flash_sector_mapping_cache_invalidate PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -72,6 +72,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _lx_nor_flash_sector_mapping_cache_invalidate(LX_NOR_FLASH *nor_flash, ULONG logical_sector)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_sector_read PORTABLE C */
|
/* _lx_nor_flash_sector_read PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -80,6 +80,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_sector_read(LX_NOR_FLASH *nor_flash, ULONG logical_sector, VOID *buffer)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_sector_release PORTABLE C */
|
/* _lx_nor_flash_sector_release PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -80,6 +80,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_sector_release(LX_NOR_FLASH *nor_flash, ULONG logical_sector)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_sector_write PORTABLE C */
|
/* _lx_nor_flash_sector_write PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -83,6 +83,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
UINT _lx_nor_flash_sector_write(LX_NOR_FLASH *nor_flash, ULONG logical_sector, VOID *buffer)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
/* Include necessary files. */
|
/* Include necessary files. */
|
||||||
|
|
||||||
#include "tx_api.h"
|
|
||||||
#include "lx_api.h"
|
#include "lx_api.h"
|
||||||
|
|
||||||
/* Define constants for the NOR flash simulation. */
|
/* Define constants for the NOR flash simulation. */
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
/* Disable ThreadX error checking. */
|
/* Disable ThreadX error checking. */
|
||||||
|
|
||||||
#ifndef TX_DISABLE_ERROR_CHECKING
|
#ifndef LX_DISABLE_ERROR_CHECKING
|
||||||
#define TX_DISABLE_ERROR_CHECKING
|
#define LX_DISABLE_ERROR_CHECKING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
/* FUNCTION RELEASE */
|
/* FUNCTION RELEASE */
|
||||||
/* */
|
/* */
|
||||||
/* _lx_nor_flash_system_error PORTABLE C */
|
/* _lx_nor_flash_system_error PORTABLE C */
|
||||||
/* 6.0 */
|
/* 6.1.7 */
|
||||||
/* AUTHOR */
|
/* AUTHOR */
|
||||||
/* */
|
/* */
|
||||||
/* William E. Lamie, Microsoft Corporation */
|
/* William E. Lamie, Microsoft Corporation */
|
||||||
@@ -71,6 +71,10 @@
|
|||||||
/* DATE NAME DESCRIPTION */
|
/* DATE NAME DESCRIPTION */
|
||||||
/* */
|
/* */
|
||||||
/* 05-19-2020 William E. Lamie Initial Version 6.0 */
|
/* 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)
|
VOID _lx_nor_flash_system_error(LX_NOR_FLASH *nor_flash, UINT error_code)
|
||||||
|
|||||||
@@ -40,20 +40,34 @@ FX_FILE my_file1;
|
|||||||
|
|
||||||
/* Define ThreadX global data structures. */
|
/* Define ThreadX global data structures. */
|
||||||
|
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
TX_THREAD thread_0;
|
TX_THREAD thread_0;
|
||||||
|
#endif
|
||||||
ULONG thread_0_counter;
|
ULONG thread_0_counter;
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Enter the ThreadX kernel. */
|
/* Enter the ThreadX kernel. */
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
tx_kernel_enter();
|
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. */
|
/* Define what the initial system looks like. */
|
||||||
|
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
void tx_application_define(void *first_unused_memory)
|
void tx_application_define(void *first_unused_memory)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -72,7 +86,7 @@ void tx_application_define(void *first_unused_memory)
|
|||||||
/* Initialize FileX. */
|
/* Initialize FileX. */
|
||||||
fx_system_initialize();
|
fx_system_initialize();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void thread_0_entry(ULONG thread_input)
|
void thread_0_entry(ULONG thread_input)
|
||||||
|
|||||||
@@ -39,20 +39,34 @@ FX_FILE my_file;
|
|||||||
|
|
||||||
/* Define ThreadX global data structures. */
|
/* Define ThreadX global data structures. */
|
||||||
|
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
TX_THREAD thread_0;
|
TX_THREAD thread_0;
|
||||||
|
#endif
|
||||||
ULONG thread_0_counter;
|
ULONG thread_0_counter;
|
||||||
|
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Enter the ThreadX kernel. */
|
/* Enter the ThreadX kernel. */
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
tx_kernel_enter();
|
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. */
|
/* Define what the initial system looks like. */
|
||||||
|
|
||||||
|
#ifndef LX_STANDALONE_ENABLE
|
||||||
void tx_application_define(void *first_unused_memory)
|
void tx_application_define(void *first_unused_memory)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -70,6 +84,7 @@ void tx_application_define(void *first_unused_memory)
|
|||||||
/* Initialize FileX. */
|
/* Initialize FileX. */
|
||||||
fx_system_initialize();
|
fx_system_initialize();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user