Compare commits

..

4 commits

Author SHA1 Message Date
Angus Gratton
1cbb46fbc7 exception_vectors: Use call0 not jup for sdk__xt_int_exit, allows literal load 2015-10-04 19:11:56 +11:00
Angus Gratton
5d434525ea binary_sdk: 4-byte align all functions 2015-10-04 19:11:33 +11:00
Angus Gratton
a9e3928c8d Disassembled binary SDK output, direct from xtobjdis with a couple of tweaks
Tweaks to xtobjdis are hg-git sha 6da80c11f

Everything works except for wpa_auth.o & phy_chip_v6_ana.o disassemble
with some functions not correctly detected.
2015-10-03 13:04:35 +10:00
Angus Gratton
419f252d80 Tools to disassemble and reassemble binary SDK in-place 2015-10-02 09:51:21 +10:00
1029 changed files with 169297 additions and 271896 deletions

1
.gitignore vendored
View file

@ -10,4 +10,3 @@ firmware
local.mk local.mk
local.h local.h
screenlog.* screenlog.*
*.swp

44
.gitmodules vendored
View file

@ -1,48 +1,6 @@
[submodule "lwip/lwip"] [submodule "lwip/lwip"]
path = lwip/lwip path = lwip/lwip
url = https://github.com/ourairquality/lwip.git url = https://github.com/SuperHouse/esp-lwip.git
[submodule "extras/mbedtls/mbedtls"] [submodule "extras/mbedtls/mbedtls"]
path = extras/mbedtls/mbedtls path = extras/mbedtls/mbedtls
url = https://github.com/ARMmbed/mbedtls.git url = https://github.com/ARMmbed/mbedtls.git
[submodule "extras/jsmn/jsmn"]
path = extras/jsmn/jsmn
url = https://github.com/zserge/jsmn.git
[submodule "bootloader/rboot"]
path = bootloader/rboot
url = https://github.com/raburton/rboot.git
[submodule "extras/spiffs/spiffs"]
path = extras/spiffs/spiffs
url = https://github.com/pellepl/spiffs.git
[submodule "tests/unity"]
path = tests/unity
url = https://github.com/ThrowTheSwitch/Unity.git
[submodule "tests/fs-test"]
path = tests/fs-test
url = https://github.com/sheinz/fs-test
[submodule "extras/bearssl/BearSSL"]
path = extras/bearssl/BearSSL
url = https://www.bearssl.org/git/BearSSL
[submodule "extras/http-parser/http-parser"]
path = extras/http-parser/http-parser
url = https://github.com/nodejs/http-parser
[submodule "extras/crc_generic/crc_lib"]
path = extras/crc_generic/crc_lib
url = https://github.com/Zaltora/crc_generic_lib.git
[submodule "extras/libesphttpd/libesphttpd"]
path = extras/libesphttpd/libesphttpd
url = https://github.com/nochkin/libesphttpd
[submodule "extras/libesphttpd/libesphttpd/lib/heatshrink"]
path = extras/libesphttpd/libesphttpd/lib/heatshrink
url = https://github.com/atomicobject/heatshrink
[submodule "extras/multipwm"]
path = extras/multipwm
url = https://github.com/nochkin/multipwm
[submodule "lvgl/lvgl"]
path = lvgl/lvgl
url = https://github.com/littlevgl/lvgl.git
[submodule "lvgl/lv_drivers"]
path = lvgl/lv_drivers
url = https://github.com/littlevgl/lv_drivers.git
[submodule "lvgl/lv_examples"]
path = lvgl/lv_examples
url = https://github.com/littlevgl/lv_examples.git

View file

@ -2,15 +2,17 @@ language: c
sudo: false sudo: false
env: env:
# Target commit for https://github.com/pfalcon/esp-open-sdk/ # Target commit for https://github.com/pfalcon/esp-open-sdk/
OPENSDK_COMMIT=b069537 OPENSDK_COMMIT=b44afa47
CROSS_ROOT="${HOME}/toolchain-${OPENSDK_COMMIT}" CROSS_ROOT="${HOME}/toolchain-${OPENSDK_COMMIT}"
CROSS_BINDIR="${CROSS_ROOT}/bin" CROSS_BINDIR="${CROSS_ROOT}/bin"
CROSS="ccache xtensa-lx106-elf-" ESPTOOL2_COMMIT=92530bb8
MAKE_CMD="make WARNINGS_AS_ERRORS=1 -C examples/ build-examples" ESPTOOL2_BINDIR="${HOME}/esptool2-${ESPTOOL2_COMMIT}"
PATH=${PATH}:${CROSS_BINDIR} PATH=${PATH}:${CROSS_BINDIR}:${ESPTOOL2_BINDIR}
cache: cache:
directories: directories:
- ${CROSS_ROOT} - ${CROSS_ROOT}
- ${HOME}/.ccache
- ${ESPTOOL2_BINDIR}
addons: addons:
apt: apt:
packages: packages:
@ -29,22 +31,32 @@ addons:
- libncurses5-dev - libncurses5-dev
- libexpat1-dev - libexpat1-dev
- python - python
- python-pip - python-serial
- sed - sed
- git - git
- help2man
- vim-common
- zlib1g-dev
before_install: before_install:
- pip install --user pyserial # Install a toolchain using esp-open-sdk (parts we need for this are the GNU toolchain and libhal)
- travis_wait 30 utils/travis_build/install_toolchain.sh #
# Adds hack of "{$HAS_TC} || -Buildstep-" to avoid rebuilding toolchain if it's already
# installed from the cache. If this gets any more complex it should be spun out to a standalone shell script.
- export HAS_TC="test -d ${CROSS_BINDIR}"
- unset CC # Travis sets this due to "language: c", but it confuses autotools configure when cross-building
- ${HAS_TC} || git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
- ${HAS_TC} || cd esp-open-sdk
- ${HAS_TC} || git reset --hard ${OPENSDK_COMMIT}
- ${HAS_TC} || git submodule update
- ${HAS_TC} || sed -i "s/2.69/2.68/" lx106-hal/configure.ac # this is a nasty hack as Ubuntu Precise only has autoconf 2.68 not 2.69...
- ${HAS_TC} || sed -r -i 's%TOOLCHAIN ?=.*%TOOLCHAIN=${CROSS_ROOT}%' Makefile
- ${HAS_TC} || make STANDALONE=n
- export HAS_ET2="test -f ${ESPTOOL2_BINDIR}/esptool2"
- ${HAS_ET2} || git clone https://github.com/raburton/esp8266 ${HOME}/raburton
- ${HAS_ET2} || make -C ${HOME}/raburton/esptool2
- ${HAS_ET2} || mkdir -p ${ESPTOOL2_BINDIR}
- ${HAS_ET2} || cp -a ${HOME}/raburton/esptool2/esptool2 ${ESPTOOL2_BINDIR}/
script: script:
- cd ${TRAVIS_BUILD_DIR} - cd ${TRAVIS_BUILD_DIR}
# Remove ssid_config requirement for examples # Remove ssid_config requirement for examples
- echo -e '#define WIFI_SSID "mywifissid"\n#define WIFI_PASS "my secret password"\n' > include/private_ssid_config.h - sed -i "s%#warning%//#warning%" include/ssid_config.h
# Don't verbose-build all examples (too much output), only verbose-build errors - make -C examples/ build-examples CROSS="ccache xtensa-lx106-elf-"
- ( ${MAKE_CMD} ) || ( ${MAKE_CMD} V=1 )
# build bootloader
- make -C bootloader/

View file

@ -1,37 +1,440 @@
The FreeRTOS kernel is released under the MIT open source license, the text of The FreeRTOS.org source code is licensed by the *modified* GNU General Public
which is provided below. License (GPL), text provided below. A special exception to the GPL is
included to allow you to distribute a combined work that includes FreeRTOS
without being obliged to provide the source code for any proprietary
components. See the licensing section of http://www.FreeRTOS.org for full
details. The exception text is also included at the bottom of this file.
This license covers the FreeRTOS kernel source files, which are located in the The FreeRTOS download also includes demo application source code, some of
/FreeRTOS/Source directory of the official FreeRTOS kernel download. It also which is provided by third parties AND IS LICENSED SEPARATELY FROM FREERTOS.
covers most of the source files in the demo application projects, which are
located in the /FreeRTOS/Demo directory of the official FreeRTOS download. The For the avoidance of any doubt refer to the comment included at the top
demo projects may also include third party software that is not part of FreeRTOS of each source and header file for license and copyright information.
and is licensed separately to FreeRTOS. Examples of third party software
includes header files provided by chip or tools vendors, linker scripts, This is a list of files for which Real Time Engineers Ltd are not the
peripheral drivers, etc. All the software in subdirectories of the /FreeRTOS copyright owner and are NOT COVERED BY THE GPL.
directory is either open source or distributed with permission, and is free for
use. For the avoidance of doubt, refer to the comments at the top of each
source file.
License text: 1) Various header files provided by silicon manufacturers and tool vendors
------------- that define processor specific memory addresses and utility macros.
Permission has been granted by the various copyright holders for these
files to be included in the FreeRTOS download. Users must ensure license
conditions are adhered to for any use other than compilation of the
FreeRTOS demo applications.
Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2) The uIP TCP/IP stack the copyright of which is held by Adam Dunkels.
Permission is hereby granted, free of charge, to any person obtaining a copy of Users must ensure the open source license conditions stated at the top
this software and associated documentation files (the "Software"), to deal in of each uIP source file is understood and adhered to.
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all 3) The lwIP TCP/IP stack the copyright of which is held by the Swedish
copies or substantial portions of the Software. Institute of Computer Science. Users must ensure the open source license
conditions stated at the top of each lwIP source file is understood and
adhered to.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 4) Various peripheral driver source files and binaries provided by silicon
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS manufacturers and tool vendors. Permission has been granted by the
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR various copyright holders for these files to be included in the FreeRTOS
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER download. Users must ensure license conditions are adhered to for any
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN use other than compilation of the FreeRTOS demo applications.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5) The files contained within FreeRTOS\Demo\WizNET_DEMO_TERN_186\tern_code,
which are slightly modified versions of code provided by and copyright to
Tern Inc.
Errors and omissions should be reported to Richard Barry, contact details for
whom can be obtained from http://www.FreeRTOS.org.
The GPL license text follows.
A special exception to the GPL is included to allow you to distribute a
combined work that includes FreeRTOS without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details. The exception text is also
included at the bottom of this file.
--------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License** as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
----------------------------------------------------------------------------
The FreeRTOS GPL Exception Text:
Any FreeRTOS source code, whether modified or in it's original release form,
or whether in whole or in part, can only be distributed by you under the terms
of the GNU General Public License plus this exception. An independent module is
a module which is not derived from or based on FreeRTOS.
Clause 1:
Linking FreeRTOS statically or dynamically with other modules is making a
combined work based on FreeRTOS. Thus, the terms and conditions of the GNU
General Public License cover the whole combination.
As a special exception, the copyright holder of FreeRTOS gives you permission
to link FreeRTOS with independent modules that communicate with FreeRTOS
solely through the FreeRTOS API interface, regardless of the license terms of
these independent modules, and to copy and distribute the resulting combined
work under terms of your choice, provided that
+ Every copy of the combined work is accompanied by a written statement that
details to the recipient the version of FreeRTOS used and an offer by yourself
to provide the FreeRTOS source code (including any modifications you may have
made) should the recipient request it.
+ The combined work is not itself an RTOS, scheduler, kernel or related product.
+ The independent modules add significant and primary functionality to FreeRTOS
and do not merely extend the existing functionality already present in FreeRTOS.
Clause 2:
FreeRTOS may not be used for any competitive or comparative purpose, including the
publication of any form of run time or compile time metric, without the express
permission of Real Time Engineers Ltd. (this is the norm within the industry and
is intended to ensure information accuracy).

View file

@ -1,37 +1,71 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "task.h" #include "task.h"
#include "croutine.h" #include "croutine.h"
/* Remove the whole file is co-routines are not being used. */
#if( configUSE_CO_ROUTINES != 0 )
/* /*
* Some kernel aware debuggers require data to be viewed to be global, rather * Some kernel aware debuggers require data to be viewed to be global, rather
* than file scope. * than file scope.
@ -42,17 +76,17 @@
/* Lists for ready and blocked co-routines. --------------------*/ /* Lists for ready and blocked co-routines. --------------------*/
static List_t pxReadyCoRoutineLists[ configMAX_CO_ROUTINE_PRIORITIES ]; /*< Prioritised ready co-routines. */ static xList pxReadyCoRoutineLists[ configMAX_CO_ROUTINE_PRIORITIES ]; /*< Prioritised ready co-routines. */
static List_t xDelayedCoRoutineList1; /*< Delayed co-routines. */ static xList xDelayedCoRoutineList1; /*< Delayed co-routines. */
static List_t xDelayedCoRoutineList2; /*< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */ static xList xDelayedCoRoutineList2; /*< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */
static List_t * pxDelayedCoRoutineList; /*< Points to the delayed co-routine list currently being used. */ static xList * pxDelayedCoRoutineList; /*< Points to the delayed co-routine list currently being used. */
static List_t * pxOverflowDelayedCoRoutineList; /*< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */ static xList * pxOverflowDelayedCoRoutineList; /*< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */
static List_t xPendingReadyCoRoutineList; /*< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */ static xList xPendingReadyCoRoutineList; /*< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */
/* Other file private variables. --------------------------------*/ /* Other file private variables. --------------------------------*/
CRCB_t * pxCurrentCoRoutine = NULL; corCRCB * pxCurrentCoRoutine = NULL;
static UBaseType_t uxTopCoRoutineReadyPriority = 0; static unsigned portBASE_TYPE uxTopCoRoutineReadyPriority = 0;
static TickType_t xCoRoutineTickCount = 0, xLastTickCount = 0, xPassedTicks = 0; static portTickType xCoRoutineTickCount = 0, xLastTickCount = 0, xPassedTicks = 0;
/* The initial state of the co-routine when it is created. */ /* The initial state of the co-routine when it is created. */
#define corINITIAL_STATE ( 0 ) #define corINITIAL_STATE ( 0 )
@ -70,7 +104,7 @@ static TickType_t xCoRoutineTickCount = 0, xLastTickCount = 0, xPassedTicks = 0;
{ \ { \
uxTopCoRoutineReadyPriority = pxCRCB->uxPriority; \ uxTopCoRoutineReadyPriority = pxCRCB->uxPriority; \
} \ } \
vListInsertEnd( ( List_t * ) &( pxReadyCoRoutineLists[ pxCRCB->uxPriority ] ), &( pxCRCB->xGenericListItem ) ); \ vListInsertEnd( ( xList * ) &( pxReadyCoRoutineLists[ pxCRCB->uxPriority ] ), &( pxCRCB->xGenericListItem ) ); \
} }
/* /*
@ -99,13 +133,13 @@ static void prvCheckDelayedList( void );
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
BaseType_t xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex ) signed portBASE_TYPE xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex )
{ {
BaseType_t xReturn; signed portBASE_TYPE xReturn;
CRCB_t *pxCoRoutine; corCRCB *pxCoRoutine;
/* Allocate the memory that will store the co-routine control block. */ /* Allocate the memory that will store the co-routine control block. */
pxCoRoutine = ( CRCB_t * ) pvPortMalloc( sizeof( CRCB_t ) ); pxCoRoutine = ( corCRCB * ) pvPortMalloc( sizeof( corCRCB ) );
if( pxCoRoutine ) if( pxCoRoutine )
{ {
/* If pxCurrentCoRoutine is NULL then this is the first co-routine to /* If pxCurrentCoRoutine is NULL then this is the first co-routine to
@ -132,14 +166,14 @@ CRCB_t *pxCoRoutine;
vListInitialiseItem( &( pxCoRoutine->xGenericListItem ) ); vListInitialiseItem( &( pxCoRoutine->xGenericListItem ) );
vListInitialiseItem( &( pxCoRoutine->xEventListItem ) ); vListInitialiseItem( &( pxCoRoutine->xEventListItem ) );
/* Set the co-routine control block as a link back from the ListItem_t. /* Set the co-routine control block as a link back from the xListItem.
This is so we can get back to the containing CRCB from a generic item This is so we can get back to the containing CRCB from a generic item
in a list. */ in a list. */
listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xGenericListItem ), pxCoRoutine ); listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xGenericListItem ), pxCoRoutine );
listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xEventListItem ), pxCoRoutine ); listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xEventListItem ), pxCoRoutine );
/* Event lists are always in priority order. */ /* Event lists are always in priority order. */
listSET_LIST_ITEM_VALUE( &( pxCoRoutine->xEventListItem ), ( ( TickType_t ) configMAX_CO_ROUTINE_PRIORITIES - ( TickType_t ) uxPriority ) ); listSET_LIST_ITEM_VALUE( &( pxCoRoutine->xEventListItem ), configMAX_PRIORITIES - ( portTickType ) uxPriority );
/* Now the co-routine has been initialised it can be added to the ready /* Now the co-routine has been initialised it can be added to the ready
list at the correct priority. */ list at the correct priority. */
@ -156,9 +190,9 @@ CRCB_t *pxCoRoutine;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay, List_t *pxEventList ) void vCoRoutineAddToDelayedList( portTickType xTicksToDelay, xList *pxEventList )
{ {
TickType_t xTimeToWake; portTickType xTimeToWake;
/* Calculate the time to wake - this may overflow but this is /* Calculate the time to wake - this may overflow but this is
not a problem. */ not a problem. */
@ -167,7 +201,7 @@ TickType_t xTimeToWake;
/* We must remove ourselves from the ready list before adding /* We must remove ourselves from the ready list before adding
ourselves to the blocked list as the same list item is used for ourselves to the blocked list as the same list item is used for
both lists. */ both lists. */
( void ) uxListRemove( ( ListItem_t * ) &( pxCurrentCoRoutine->xGenericListItem ) ); ( void ) uxListRemove( ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );
/* The list item will be inserted in wake time order. */ /* The list item will be inserted in wake time order. */
listSET_LIST_ITEM_VALUE( &( pxCurrentCoRoutine->xGenericListItem ), xTimeToWake ); listSET_LIST_ITEM_VALUE( &( pxCurrentCoRoutine->xGenericListItem ), xTimeToWake );
@ -176,13 +210,13 @@ TickType_t xTimeToWake;
{ {
/* Wake time has overflowed. Place this item in the /* Wake time has overflowed. Place this item in the
overflow list. */ overflow list. */
vListInsert( ( List_t * ) pxOverflowDelayedCoRoutineList, ( ListItem_t * ) &( pxCurrentCoRoutine->xGenericListItem ) ); vListInsert( ( xList * ) pxOverflowDelayedCoRoutineList, ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );
} }
else else
{ {
/* The wake time has not overflowed, so we can use the /* The wake time has not overflowed, so we can use the
current block list. */ current block list. */
vListInsert( ( List_t * ) pxDelayedCoRoutineList, ( ListItem_t * ) &( pxCurrentCoRoutine->xGenericListItem ) ); vListInsert( ( xList * ) pxDelayedCoRoutineList, ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );
} }
if( pxEventList ) if( pxEventList )
@ -201,12 +235,12 @@ static void prvCheckPendingReadyList( void )
the ready lists itself. */ the ready lists itself. */
while( listLIST_IS_EMPTY( &xPendingReadyCoRoutineList ) == pdFALSE ) while( listLIST_IS_EMPTY( &xPendingReadyCoRoutineList ) == pdFALSE )
{ {
CRCB_t *pxUnblockedCRCB; corCRCB *pxUnblockedCRCB;
/* The pending ready list can be accessed by an ISR. */ /* The pending ready list can be accessed by an ISR. */
portDISABLE_INTERRUPTS(); portDISABLE_INTERRUPTS();
{ {
pxUnblockedCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( (&xPendingReadyCoRoutineList) ); pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( (&xPendingReadyCoRoutineList) );
( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) ); ( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) );
} }
portENABLE_INTERRUPTS(); portENABLE_INTERRUPTS();
@ -219,7 +253,7 @@ static void prvCheckPendingReadyList( void )
static void prvCheckDelayedList( void ) static void prvCheckDelayedList( void )
{ {
CRCB_t *pxCRCB; corCRCB *pxCRCB;
xPassedTicks = xTaskGetTickCount() - xLastTickCount; xPassedTicks = xTaskGetTickCount() - xLastTickCount;
while( xPassedTicks ) while( xPassedTicks )
@ -230,7 +264,7 @@ CRCB_t *pxCRCB;
/* If the tick count has overflowed we need to swap the ready lists. */ /* If the tick count has overflowed we need to swap the ready lists. */
if( xCoRoutineTickCount == 0 ) if( xCoRoutineTickCount == 0 )
{ {
List_t * pxTemp; xList * pxTemp;
/* Tick count has overflowed so we need to swap the delay lists. If there are /* Tick count has overflowed so we need to swap the delay lists. If there are
any items in pxDelayedCoRoutineList here then there is an error! */ any items in pxDelayedCoRoutineList here then there is an error! */
@ -242,7 +276,7 @@ CRCB_t *pxCRCB;
/* See if this tick has made a timeout expire. */ /* See if this tick has made a timeout expire. */
while( listLIST_IS_EMPTY( pxDelayedCoRoutineList ) == pdFALSE ) while( listLIST_IS_EMPTY( pxDelayedCoRoutineList ) == pdFALSE )
{ {
pxCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList ); pxCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList );
if( xCoRoutineTickCount < listGET_LIST_ITEM_VALUE( &( pxCRCB->xGenericListItem ) ) ) if( xCoRoutineTickCount < listGET_LIST_ITEM_VALUE( &( pxCRCB->xGenericListItem ) ) )
{ {
@ -257,10 +291,10 @@ CRCB_t *pxCRCB;
have been moved to the pending ready list and the following have been moved to the pending ready list and the following
line is still valid. Also the pvContainer parameter will have line is still valid. Also the pvContainer parameter will have
been set to NULL so the following lines are also valid. */ been set to NULL so the following lines are also valid. */
( void ) uxListRemove( &( pxCRCB->xGenericListItem ) ); uxListRemove( &( pxCRCB->xGenericListItem ) );
/* Is the co-routine waiting on an event also? */ /* Is the co-routine waiting on an event also? */
if( pxCRCB->xEventListItem.pxContainer ) if( pxCRCB->xEventListItem.pvContainer )
{ {
( void ) uxListRemove( &( pxCRCB->xEventListItem ) ); ( void ) uxListRemove( &( pxCRCB->xEventListItem ) );
} }
@ -307,16 +341,16 @@ void vCoRoutineSchedule( void )
static void prvInitialiseCoRoutineLists( void ) static void prvInitialiseCoRoutineLists( void )
{ {
UBaseType_t uxPriority; unsigned portBASE_TYPE uxPriority;
for( uxPriority = 0; uxPriority < configMAX_CO_ROUTINE_PRIORITIES; uxPriority++ ) for( uxPriority = 0; uxPriority < configMAX_CO_ROUTINE_PRIORITIES; uxPriority++ )
{ {
vListInitialise( ( List_t * ) &( pxReadyCoRoutineLists[ uxPriority ] ) ); vListInitialise( ( xList * ) &( pxReadyCoRoutineLists[ uxPriority ] ) );
} }
vListInitialise( ( List_t * ) &xDelayedCoRoutineList1 ); vListInitialise( ( xList * ) &xDelayedCoRoutineList1 );
vListInitialise( ( List_t * ) &xDelayedCoRoutineList2 ); vListInitialise( ( xList * ) &xDelayedCoRoutineList2 );
vListInitialise( ( List_t * ) &xPendingReadyCoRoutineList ); vListInitialise( ( xList * ) &xPendingReadyCoRoutineList );
/* Start with pxDelayedCoRoutineList using list1 and the /* Start with pxDelayedCoRoutineList using list1 and the
pxOverflowDelayedCoRoutineList using list2. */ pxOverflowDelayedCoRoutineList using list2. */
@ -325,17 +359,17 @@ UBaseType_t uxPriority;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
BaseType_t xCoRoutineRemoveFromEventList( const List_t *pxEventList ) signed portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList )
{ {
CRCB_t *pxUnblockedCRCB; corCRCB *pxUnblockedCRCB;
BaseType_t xReturn; signed portBASE_TYPE xReturn;
/* This function is called from within an interrupt. It can only access /* This function is called from within an interrupt. It can only access
event lists and the pending ready list. This function assumes that a event lists and the pending ready list. This function assumes that a
check has already been made to ensure pxEventList is not empty. */ check has already been made to ensure pxEventList is not empty. */
pxUnblockedCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList );
( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) ); ( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) );
vListInsertEnd( ( List_t * ) &( xPendingReadyCoRoutineList ), &( pxUnblockedCRCB->xEventListItem ) ); vListInsertEnd( ( xList * ) &( xPendingReadyCoRoutineList ), &( pxUnblockedCRCB->xEventListItem ) );
if( pxUnblockedCRCB->uxPriority >= pxCurrentCoRoutine->uxPriority ) if( pxUnblockedCRCB->uxPriority >= pxCurrentCoRoutine->uxPriority )
{ {
@ -349,5 +383,3 @@ BaseType_t xReturn;
return xReturn; return xReturn;
} }
#endif /* configUSE_CO_ROUTINES == 0 */

View file

@ -1,753 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
/* Standard includes. */
#include <stdlib.h>
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
all the API functions to use the MPU wrappers. That should only be done when
task.h is included from an application file. */
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "event_groups.h"
/* Lint e961, e750 and e9021 are suppressed as a MISRA exception justified
because the MPU ports require MPU_WRAPPERS_INCLUDED_FROM_API_FILE to be defined
for the header files above, but not in this file, in order to generate the
correct privileged Vs unprivileged linkage and placement. */
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE /*lint !e961 !e750 !e9021 See comment above. */
/* The following bit fields convey control information in a task's event list
item value. It is important they don't clash with the
taskEVENT_LIST_ITEM_VALUE_IN_USE definition. */
#if configUSE_16_BIT_TICKS == 1
#define eventCLEAR_EVENTS_ON_EXIT_BIT 0x0100U
#define eventUNBLOCKED_DUE_TO_BIT_SET 0x0200U
#define eventWAIT_FOR_ALL_BITS 0x0400U
#define eventEVENT_BITS_CONTROL_BYTES 0xff00U
#else
#define eventCLEAR_EVENTS_ON_EXIT_BIT 0x01000000UL
#define eventUNBLOCKED_DUE_TO_BIT_SET 0x02000000UL
#define eventWAIT_FOR_ALL_BITS 0x04000000UL
#define eventEVENT_BITS_CONTROL_BYTES 0xff000000UL
#endif
typedef struct EventGroupDef_t
{
EventBits_t uxEventBits;
List_t xTasksWaitingForBits; /*< List of tasks waiting for a bit to be set. */
#if( configUSE_TRACE_FACILITY == 1 )
UBaseType_t uxEventGroupNumber;
#endif
#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
#endif
} EventGroup_t;
/*-----------------------------------------------------------*/
/*
* Test the bits set in uxCurrentEventBits to see if the wait condition is met.
* The wait condition is defined by xWaitForAllBits. If xWaitForAllBits is
* pdTRUE then the wait condition is met if all the bits set in uxBitsToWaitFor
* are also set in uxCurrentEventBits. If xWaitForAllBits is pdFALSE then the
* wait condition is met if any of the bits set in uxBitsToWait for are also set
* in uxCurrentEventBits.
*/
static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits, const EventBits_t uxBitsToWaitFor, const BaseType_t xWaitForAllBits ) PRIVILEGED_FUNCTION;
/*-----------------------------------------------------------*/
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
EventGroupHandle_t xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer )
{
EventGroup_t *pxEventBits;
/* A StaticEventGroup_t object must be provided. */
configASSERT( pxEventGroupBuffer );
#if( configASSERT_DEFINED == 1 )
{
/* Sanity check that the size of the structure used to declare a
variable of type StaticEventGroup_t equals the size of the real
event group structure. */
volatile size_t xSize = sizeof( StaticEventGroup_t );
configASSERT( xSize == sizeof( EventGroup_t ) );
} /*lint !e529 xSize is referenced if configASSERT() is defined. */
#endif /* configASSERT_DEFINED */
/* The user has provided a statically allocated event group - use it. */
pxEventBits = ( EventGroup_t * ) pxEventGroupBuffer; /*lint !e740 !e9087 EventGroup_t and StaticEventGroup_t are deliberately aliased for data hiding purposes and guaranteed to have the same size and alignment requirement - checked by configASSERT(). */
if( pxEventBits != NULL )
{
pxEventBits->uxEventBits = 0;
vListInitialise( &( pxEventBits->xTasksWaitingForBits ) );
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
{
/* Both static and dynamic allocation can be used, so note that
this event group was created statically in case the event group
is later deleted. */
pxEventBits->ucStaticallyAllocated = pdTRUE;
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
traceEVENT_GROUP_CREATE( pxEventBits );
}
else
{
/* xEventGroupCreateStatic should only ever be called with
pxEventGroupBuffer pointing to a pre-allocated (compile time
allocated) StaticEventGroup_t variable. */
traceEVENT_GROUP_CREATE_FAILED();
}
return pxEventBits;
}
#endif /* configSUPPORT_STATIC_ALLOCATION */
/*-----------------------------------------------------------*/
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
EventGroupHandle_t xEventGroupCreate( void )
{
EventGroup_t *pxEventBits;
/* Allocate the event group. Justification for MISRA deviation as
follows: pvPortMalloc() always ensures returned memory blocks are
aligned per the requirements of the MCU stack. In this case
pvPortMalloc() must return a pointer that is guaranteed to meet the
alignment requirements of the EventGroup_t structure - which (if you
follow it through) is the alignment requirements of the TickType_t type
(EventBits_t being of TickType_t itself). Therefore, whenever the
stack alignment requirements are greater than or equal to the
TickType_t alignment requirements the cast is safe. In other cases,
where the natural word size of the architecture is less than
sizeof( TickType_t ), the TickType_t variables will be accessed in two
or more reads operations, and the alignment requirements is only that
of each individual read. */
pxEventBits = ( EventGroup_t * ) pvPortMalloc( sizeof( EventGroup_t ) ); /*lint !e9087 !e9079 see comment above. */
if( pxEventBits != NULL )
{
pxEventBits->uxEventBits = 0;
vListInitialise( &( pxEventBits->xTasksWaitingForBits ) );
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
{
/* Both static and dynamic allocation can be used, so note this
event group was allocated statically in case the event group is
later deleted. */
pxEventBits->ucStaticallyAllocated = pdFALSE;
}
#endif /* configSUPPORT_STATIC_ALLOCATION */
traceEVENT_GROUP_CREATE( pxEventBits );
}
else
{
traceEVENT_GROUP_CREATE_FAILED(); /*lint !e9063 Else branch only exists to allow tracing and does not generate code if trace macros are not defined. */
}
return pxEventBits;
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
/*-----------------------------------------------------------*/
EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait )
{
EventBits_t uxOriginalBitValue, uxReturn;
EventGroup_t *pxEventBits = xEventGroup;
BaseType_t xAlreadyYielded;
BaseType_t xTimeoutOccurred = pdFALSE;
configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
configASSERT( uxBitsToWaitFor != 0 );
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
}
#endif
vTaskSuspendAll();
{
uxOriginalBitValue = pxEventBits->uxEventBits;
( void ) xEventGroupSetBits( xEventGroup, uxBitsToSet );
if( ( ( uxOriginalBitValue | uxBitsToSet ) & uxBitsToWaitFor ) == uxBitsToWaitFor )
{
/* All the rendezvous bits are now set - no need to block. */
uxReturn = ( uxOriginalBitValue | uxBitsToSet );
/* Rendezvous always clear the bits. They will have been cleared
already unless this is the only task in the rendezvous. */
pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
xTicksToWait = 0;
}
else
{
if( xTicksToWait != ( TickType_t ) 0 )
{
traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor );
/* Store the bits that the calling task is waiting for in the
task's event list item so the kernel knows when a match is
found. Then enter the blocked state. */
vTaskPlaceOnUnorderedEventList( &( pxEventBits->xTasksWaitingForBits ), ( uxBitsToWaitFor | eventCLEAR_EVENTS_ON_EXIT_BIT | eventWAIT_FOR_ALL_BITS ), xTicksToWait );
/* This assignment is obsolete as uxReturn will get set after
the task unblocks, but some compilers mistakenly generate a
warning about uxReturn being returned without being set if the
assignment is omitted. */
uxReturn = 0;
}
else
{
/* The rendezvous bits were not set, but no block time was
specified - just return the current event bit value. */
uxReturn = pxEventBits->uxEventBits;
xTimeoutOccurred = pdTRUE;
}
}
}
xAlreadyYielded = xTaskResumeAll();
if( xTicksToWait != ( TickType_t ) 0 )
{
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
/* The task blocked to wait for its required bits to be set - at this
point either the required bits were set or the block time expired. If
the required bits were set they will have been stored in the task's
event list item, and they should now be retrieved then cleared. */
uxReturn = uxTaskResetEventItemValue();
if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
{
/* The task timed out, just return the current event bit value. */
taskENTER_CRITICAL();
{
uxReturn = pxEventBits->uxEventBits;
/* Although the task got here because it timed out before the
bits it was waiting for were set, it is possible that since it
unblocked another task has set the bits. If this is the case
then it needs to clear the bits before exiting. */
if( ( uxReturn & uxBitsToWaitFor ) == uxBitsToWaitFor )
{
pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
taskEXIT_CRITICAL();
xTimeoutOccurred = pdTRUE;
}
else
{
/* The task unblocked because the bits were set. */
}
/* Control bits might be set as the task had blocked should not be
returned. */
uxReturn &= ~eventEVENT_BITS_CONTROL_BYTES;
}
traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred );
/* Prevent compiler warnings when trace macros are not used. */
( void ) xTimeoutOccurred;
return uxReturn;
}
/*-----------------------------------------------------------*/
EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait )
{
EventGroup_t *pxEventBits = xEventGroup;
EventBits_t uxReturn, uxControlBits = 0;
BaseType_t xWaitConditionMet, xAlreadyYielded;
BaseType_t xTimeoutOccurred = pdFALSE;
/* Check the user is not attempting to wait on the bits used by the kernel
itself, and that at least one bit is being requested. */
configASSERT( xEventGroup );
configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
configASSERT( uxBitsToWaitFor != 0 );
#if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
{
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
}
#endif
vTaskSuspendAll();
{
const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
/* Check to see if the wait condition is already met or not. */
xWaitConditionMet = prvTestWaitCondition( uxCurrentEventBits, uxBitsToWaitFor, xWaitForAllBits );
if( xWaitConditionMet != pdFALSE )
{
/* The wait condition has already been met so there is no need to
block. */
uxReturn = uxCurrentEventBits;
xTicksToWait = ( TickType_t ) 0;
/* Clear the wait bits if requested to do so. */
if( xClearOnExit != pdFALSE )
{
pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else if( xTicksToWait == ( TickType_t ) 0 )
{
/* The wait condition has not been met, but no block time was
specified, so just return the current value. */
uxReturn = uxCurrentEventBits;
xTimeoutOccurred = pdTRUE;
}
else
{
/* The task is going to block to wait for its required bits to be
set. uxControlBits are used to remember the specified behaviour of
this call to xEventGroupWaitBits() - for use when the event bits
unblock the task. */
if( xClearOnExit != pdFALSE )
{
uxControlBits |= eventCLEAR_EVENTS_ON_EXIT_BIT;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
if( xWaitForAllBits != pdFALSE )
{
uxControlBits |= eventWAIT_FOR_ALL_BITS;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
/* Store the bits that the calling task is waiting for in the
task's event list item so the kernel knows when a match is
found. Then enter the blocked state. */
vTaskPlaceOnUnorderedEventList( &( pxEventBits->xTasksWaitingForBits ), ( uxBitsToWaitFor | uxControlBits ), xTicksToWait );
/* This is obsolete as it will get set after the task unblocks, but
some compilers mistakenly generate a warning about the variable
being returned without being set if it is not done. */
uxReturn = 0;
traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor );
}
}
xAlreadyYielded = xTaskResumeAll();
if( xTicksToWait != ( TickType_t ) 0 )
{
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
/* The task blocked to wait for its required bits to be set - at this
point either the required bits were set or the block time expired. If
the required bits were set they will have been stored in the task's
event list item, and they should now be retrieved then cleared. */
uxReturn = uxTaskResetEventItemValue();
if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
{
taskENTER_CRITICAL();
{
/* The task timed out, just return the current event bit value. */
uxReturn = pxEventBits->uxEventBits;
/* It is possible that the event bits were updated between this
task leaving the Blocked state and running again. */
if( prvTestWaitCondition( uxReturn, uxBitsToWaitFor, xWaitForAllBits ) != pdFALSE )
{
if( xClearOnExit != pdFALSE )
{
pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else
{
mtCOVERAGE_TEST_MARKER();
}
xTimeoutOccurred = pdTRUE;
}
taskEXIT_CRITICAL();
}
else
{
/* The task unblocked because the bits were set. */
}
/* The task blocked so control bits may have been set. */
uxReturn &= ~eventEVENT_BITS_CONTROL_BYTES;
}
traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred );
/* Prevent compiler warnings when trace macros are not used. */
( void ) xTimeoutOccurred;
return uxReturn;
}
/*-----------------------------------------------------------*/
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )
{
EventGroup_t *pxEventBits = xEventGroup;
EventBits_t uxReturn;
/* Check the user is not attempting to clear the bits used by the kernel
itself. */
configASSERT( xEventGroup );
configASSERT( ( uxBitsToClear & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
taskENTER_CRITICAL();
{
traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear );
/* The value returned is the event group value prior to the bits being
cleared. */
uxReturn = pxEventBits->uxEventBits;
/* Clear the bits. */
pxEventBits->uxEventBits &= ~uxBitsToClear;
}
taskEXIT_CRITICAL();
return uxReturn;
}
/*-----------------------------------------------------------*/
#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )
{
BaseType_t xReturn;
traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear );
xReturn = xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL ); /*lint !e9087 Can't avoid cast to void* as a generic callback function not specific to this use case. Callback casts back to original type so safe. */
return xReturn;
}
#endif
/*-----------------------------------------------------------*/
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
{
UBaseType_t uxSavedInterruptStatus;
EventGroup_t const * const pxEventBits = xEventGroup;
EventBits_t uxReturn;
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
{
uxReturn = pxEventBits->uxEventBits;
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
return uxReturn;
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
/*-----------------------------------------------------------*/
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet )
{
ListItem_t *pxListItem, *pxNext;
ListItem_t const *pxListEnd;
List_t const * pxList;
EventBits_t uxBitsToClear = 0, uxBitsWaitedFor, uxControlBits;
EventGroup_t *pxEventBits = xEventGroup;
BaseType_t xMatchFound = pdFALSE;
/* Check the user is not attempting to set the bits used by the kernel
itself. */
configASSERT( xEventGroup );
configASSERT( ( uxBitsToSet & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
pxList = &( pxEventBits->xTasksWaitingForBits );
pxListEnd = listGET_END_MARKER( pxList ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */
vTaskSuspendAll();
{
traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );
pxListItem = listGET_HEAD_ENTRY( pxList );
/* Set the bits. */
pxEventBits->uxEventBits |= uxBitsToSet;
/* See if the new bit value should unblock any tasks. */
while( pxListItem != pxListEnd )
{
pxNext = listGET_NEXT( pxListItem );
uxBitsWaitedFor = listGET_LIST_ITEM_VALUE( pxListItem );
xMatchFound = pdFALSE;
/* Split the bits waited for from the control bits. */
uxControlBits = uxBitsWaitedFor & eventEVENT_BITS_CONTROL_BYTES;
uxBitsWaitedFor &= ~eventEVENT_BITS_CONTROL_BYTES;
if( ( uxControlBits & eventWAIT_FOR_ALL_BITS ) == ( EventBits_t ) 0 )
{
/* Just looking for single bit being set. */
if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) != ( EventBits_t ) 0 )
{
xMatchFound = pdTRUE;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) == uxBitsWaitedFor )
{
/* All bits are set. */
xMatchFound = pdTRUE;
}
else
{
/* Need all bits to be set, but not all the bits were set. */
}
if( xMatchFound != pdFALSE )
{
/* The bits match. Should the bits be cleared on exit? */
if( ( uxControlBits & eventCLEAR_EVENTS_ON_EXIT_BIT ) != ( EventBits_t ) 0 )
{
uxBitsToClear |= uxBitsWaitedFor;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
/* Store the actual event flag value in the task's event list
item before removing the task from the event list. The
eventUNBLOCKED_DUE_TO_BIT_SET bit is set so the task knows
that is was unblocked due to its required bits matching, rather
than because it timed out. */
vTaskRemoveFromUnorderedEventList( pxListItem, pxEventBits->uxEventBits | eventUNBLOCKED_DUE_TO_BIT_SET );
}
/* Move onto the next list item. Note pxListItem->pxNext is not
used here as the list item may have been removed from the event list
and inserted into the ready/pending reading list. */
pxListItem = pxNext;
}
/* Clear any bits that matched when the eventCLEAR_EVENTS_ON_EXIT_BIT
bit was set in the control word. */
pxEventBits->uxEventBits &= ~uxBitsToClear;
}
( void ) xTaskResumeAll();
return pxEventBits->uxEventBits;
}
/*-----------------------------------------------------------*/
void vEventGroupDelete( EventGroupHandle_t xEventGroup )
{
EventGroup_t *pxEventBits = xEventGroup;
const List_t *pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
vTaskSuspendAll();
{
traceEVENT_GROUP_DELETE( xEventGroup );
while( listCURRENT_LIST_LENGTH( pxTasksWaitingForBits ) > ( UBaseType_t ) 0 )
{
/* Unblock the task, returning 0 as the event list is being deleted
and cannot therefore have any bits set. */
configASSERT( pxTasksWaitingForBits->xListEnd.pxNext != ( const ListItem_t * ) &( pxTasksWaitingForBits->xListEnd ) );
vTaskRemoveFromUnorderedEventList( pxTasksWaitingForBits->xListEnd.pxNext, eventUNBLOCKED_DUE_TO_BIT_SET );
}
#if( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
{
/* The event group can only have been allocated dynamically - free
it again. */
vPortFree( pxEventBits );
}
#elif( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
{
/* The event group could have been allocated statically or
dynamically, so check before attempting to free the memory. */
if( pxEventBits->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
{
vPortFree( pxEventBits );
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
}
( void ) xTaskResumeAll();
}
/*-----------------------------------------------------------*/
/* For internal use only - execute a 'set bits' command that was pended from
an interrupt. */
void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet )
{
( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
}
/*-----------------------------------------------------------*/
/* For internal use only - execute a 'clear bits' command that was pended from
an interrupt. */
void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear )
{
( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear ); /*lint !e9079 Can't avoid cast to void* as a generic timer callback prototype. Callback casts back to original type so safe. */
}
/*-----------------------------------------------------------*/
static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits, const EventBits_t uxBitsToWaitFor, const BaseType_t xWaitForAllBits )
{
BaseType_t xWaitConditionMet = pdFALSE;
if( xWaitForAllBits == pdFALSE )
{
/* Task only has to wait for one bit within uxBitsToWaitFor to be
set. Is one already set? */
if( ( uxCurrentEventBits & uxBitsToWaitFor ) != ( EventBits_t ) 0 )
{
xWaitConditionMet = pdTRUE;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
else
{
/* Task has to wait for all the bits in uxBitsToWaitFor to be set.
Are they set already? */
if( ( uxCurrentEventBits & uxBitsToWaitFor ) == uxBitsToWaitFor )
{
xWaitConditionMet = pdTRUE;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
return xWaitConditionMet;
}
/*-----------------------------------------------------------*/
#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken )
{
BaseType_t xReturn;
traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet );
xReturn = xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken ); /*lint !e9087 Can't avoid cast to void* as a generic callback function not specific to this use case. Callback casts back to original type so safe. */
return xReturn;
}
#endif
/*-----------------------------------------------------------*/
#if (configUSE_TRACE_FACILITY == 1)
UBaseType_t uxEventGroupGetNumber( void* xEventGroup )
{
UBaseType_t xReturn;
EventGroup_t const *pxEventBits = ( EventGroup_t * ) xEventGroup; /*lint !e9087 !e9079 EventGroupHandle_t is a pointer to an EventGroup_t, but EventGroupHandle_t is kept opaque outside of this file for data hiding purposes. */
if( xEventGroup == NULL )
{
xReturn = 0;
}
else
{
xReturn = pxEventBits->uxEventGroupNumber;
}
return xReturn;
}
#endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/
#if ( configUSE_TRACE_FACILITY == 1 )
void vEventGroupSetNumber( void * xEventGroup, UBaseType_t uxEventGroupNumber )
{
( ( EventGroup_t * ) xEventGroup )->uxEventGroupNumber = uxEventGroupNumber; /*lint !e9087 !e9079 EventGroupHandle_t is a pointer to an EventGroup_t, but EventGroupHandle_t is kept opaque outside of this file for data hiding purposes. */
}
#endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/

File diff suppressed because it is too large Load diff

View file

@ -1,31 +1,15 @@
/* /* Default esp-open-sdk FreeRTOSConfig file.
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software. If you wish to use our Amazon
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
You can override settings in here by creating your own
FreeRTOSConfig.h file in your program directory.
You could just copy this file there and edit it, but it's
recommended you instead define whatever you want to override and
then use #include_next<FreeRTOSConfig.h> to pick up these defaults.
The "blink" example in "examples/blink" provides an example of how
to do this.
*/
#ifndef __DEFAULT_FREERTOS_CONFIG_H #ifndef __DEFAULT_FREERTOS_CONFIG_H
#define __DEFAULT_FREERTOS_CONFIG_H #define __DEFAULT_FREERTOS_CONFIG_H
@ -50,20 +34,13 @@
#define configUSE_TICK_HOOK 0 #define configUSE_TICK_HOOK 0
#endif #endif
#ifndef configCPU_CLOCK_HZ #ifndef configCPU_CLOCK_HZ
/* This is the _default_ clock speed for the CPU. Can be either 80MHz
* or 160MHz, and the system will set the clock speed to match at startup.
*
* Note that it's possible to change the clock speed at runtime, so you
* can/should use sdk_system_get_cpu_frequency() in order to determine the
* current CPU frequency, in preference to this macro.
*/
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 ) #define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )
#endif #endif
#ifndef configTICK_RATE_HZ #ifndef configTICK_RATE_HZ
#define configTICK_RATE_HZ ( ( TickType_t ) 100 ) #define configTICK_RATE_HZ ( ( portTickType ) 100 )
#endif #endif
#ifndef configMAX_PRIORITIES #ifndef configMAX_PRIORITIES
#define configMAX_PRIORITIES ( 15 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 15 )
#endif #endif
#ifndef configMINIMAL_STACK_SIZE #ifndef configMINIMAL_STACK_SIZE
#define configMINIMAL_STACK_SIZE ( ( unsigned short )256 ) #define configMINIMAL_STACK_SIZE ( ( unsigned short )256 )
@ -97,9 +74,6 @@
#ifndef configCHECK_FOR_STACK_OVERFLOW #ifndef configCHECK_FOR_STACK_OVERFLOW
#define configCHECK_FOR_STACK_OVERFLOW 2 #define configCHECK_FOR_STACK_OVERFLOW 2
#endif #endif
#ifndef configUSE_RECURSIVE_MUTEXES
#define configUSE_RECURSIVE_MUTEXES 1
#endif
#ifndef configUSE_MUTEXES #ifndef configUSE_MUTEXES
#define configUSE_MUTEXES 1 #define configUSE_MUTEXES 1
#endif #endif
@ -107,6 +81,7 @@
#define configUSE_TIMERS 1 #define configUSE_TIMERS 1
#endif #endif
#if configUSE_TIMERS #if configUSE_TIMERS
#ifndef configTIMER_TASK_PRIORITY #ifndef configTIMER_TASK_PRIORITY
#define configTIMER_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) #define configTIMER_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
@ -127,10 +102,6 @@
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
#endif #endif
#ifndef configUSE_NEWLIB_REENTRANT
#define configUSE_NEWLIB_REENTRANT 1
#endif
/* Set the following definitions to 1 to include the API function, or zero /* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */ to exclude the API function. */
#ifndef INCLUDE_vTaskPrioritySet #ifndef INCLUDE_vTaskPrioritySet
@ -163,14 +134,5 @@ to exclude the API function. */
#define INCLUDE_uxTaskGetStackHighWaterMark 1 #define INCLUDE_uxTaskGetStackHighWaterMark 1
#endif #endif
#ifndef configENABLE_BACKWARD_COMPATIBILITY
#define configENABLE_BACKWARD_COMPATIBILITY 0
#endif
/* Normal assert() semantics without relying on the provision of an assert.h
header file. */
void vAssertCalled(const char * pcFile, unsigned long ulLine);
#define configASSERT(x) if((x) == 0) vAssertCalled(__FILE__, __LINE__);
#endif /* __DEFAULT_FREERTOS_CONFIG_H */ #endif /* __DEFAULT_FREERTOS_CONFIG_H */

View file

@ -0,0 +1,179 @@
/*
FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
***************************************************************************
* *
* FreeRTOS provides completely free yet professionally developed, *
* robust, strictly quality controlled, supported, and cross *
* platform software that has become a de facto standard. *
* *
* Help yourself get started quickly and support the FreeRTOS *
* project by purchasing a FreeRTOS tutorial book, reference *
* manual, or both from: http://www.FreeRTOS.org/Documentation *
* *
* Thank you! *
* *
***************************************************************************
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
>>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#ifndef STACK_MACROS_H
#define STACK_MACROS_H
/*
* Call the stack overflow hook function if the stack of the task being swapped
* out is currently overflowed, or looks like it might have overflowed in the
* past.
*
* Setting configCHECK_FOR_STACK_OVERFLOW to 1 will cause the macro to check
* the current stack state only - comparing the current top of stack value to
* the stack limit. Setting configCHECK_FOR_STACK_OVERFLOW to greater than 1
* will also cause the last few stack bytes to be checked to ensure the value
* to which the bytes were set when the task was created have not been
* overwritten. Note this second test does not guarantee that an overflowed
* stack will always be recognised.
*/
/*-----------------------------------------------------------*/
#if( configCHECK_FOR_STACK_OVERFLOW == 0 )
/* FreeRTOSConfig.h is not set to check for stack overflows. */
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW()
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()
#endif /* configCHECK_FOR_STACK_OVERFLOW == 0 */
/*-----------------------------------------------------------*/
#if( configCHECK_FOR_STACK_OVERFLOW == 1 )
/* FreeRTOSConfig.h is only set to use the first method of
overflow checking. */
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW()
#endif
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH < 0 ) )
/* Only the current stack state is to be checked. */
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
{ \
/* Is the currently saved stack pointer within the stack limit? */ \
if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \
{ \
vApplicationStackOverflowHook( ( xTaskHandle ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* configCHECK_FOR_STACK_OVERFLOW > 0 */
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH > 0 ) )
/* Only the current stack state is to be checked. */
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
{ \
\
/* Is the currently saved stack pointer within the stack limit? */ \
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \
{ \
vApplicationStackOverflowHook( ( xTaskHandle ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
{ \
static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
\
\
/* Has the extremity of the task stack ever been written over? */ \
if( memcmp( ( void * ) pxCurrentTCB->pxStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
{ \
vApplicationStackOverflowHook( ( xTaskHandle ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
{ \
char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \
static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
\
\
pcEndOfStack -= sizeof( ucExpectedStackBytes ); \
\
/* Has the extremity of the task stack ever been written over? */ \
if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
{ \
vApplicationStackOverflowHook( ( xTaskHandle ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
/*-----------------------------------------------------------*/
#endif /* STACK_MACROS_H */

View file

@ -1,29 +1,66 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#ifndef CO_ROUTINE_H #ifndef CO_ROUTINE_H
#define CO_ROUTINE_H #define CO_ROUTINE_H
@ -41,28 +78,28 @@ extern "C" {
/* Used to hide the implementation of the co-routine control block. The /* Used to hide the implementation of the co-routine control block. The
control block structure however has to be included in the header due to control block structure however has to be included in the header due to
the macro implementation of the co-routine functionality. */ the macro implementation of the co-routine functionality. */
typedef void * CoRoutineHandle_t; typedef void * xCoRoutineHandle;
/* Defines the prototype to which co-routine functions must conform. */ /* Defines the prototype to which co-routine functions must conform. */
typedef void (*crCOROUTINE_CODE)( CoRoutineHandle_t, UBaseType_t ); typedef void (*crCOROUTINE_CODE)( xCoRoutineHandle, unsigned portBASE_TYPE );
typedef struct corCoRoutineControlBlock typedef struct corCoRoutineControlBlock
{ {
crCOROUTINE_CODE pxCoRoutineFunction; crCOROUTINE_CODE pxCoRoutineFunction;
ListItem_t xGenericListItem; /*< List item used to place the CRCB in ready and blocked queues. */ xListItem xGenericListItem; /*< List item used to place the CRCB in ready and blocked queues. */
ListItem_t xEventListItem; /*< List item used to place the CRCB in event lists. */ xListItem xEventListItem; /*< List item used to place the CRCB in event lists. */
UBaseType_t uxPriority; /*< The priority of the co-routine in relation to other co-routines. */ unsigned portBASE_TYPE uxPriority; /*< The priority of the co-routine in relation to other co-routines. */
UBaseType_t uxIndex; /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */ unsigned portBASE_TYPE uxIndex; /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */
uint16_t uxState; /*< Used internally by the co-routine implementation. */ unsigned short uxState; /*< Used internally by the co-routine implementation. */
} CRCB_t; /* Co-routine control block. Note must be identical in size down to uxPriority with TCB_t. */ } corCRCB; /* Co-routine control block. Note must be identical in size down to uxPriority with tskTCB. */
/** /**
* croutine. h * croutine. h
*<pre> *<pre>
BaseType_t xCoRoutineCreate( portBASE_TYPE xCoRoutineCreate(
crCOROUTINE_CODE pxCoRoutineCode, crCOROUTINE_CODE pxCoRoutineCode,
UBaseType_t uxPriority, unsigned portBASE_TYPE uxPriority,
UBaseType_t uxIndex unsigned portBASE_TYPE uxIndex
);</pre> );</pre>
* *
* Create a new co-routine and add it to the list of co-routines that are * Create a new co-routine and add it to the list of co-routines that are
@ -85,12 +122,12 @@ typedef struct corCoRoutineControlBlock
* Example usage: * Example usage:
<pre> <pre>
// Co-routine to be created. // Co-routine to be created.
void vFlashCoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) void vFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// Variables in co-routines must be declared static if they must maintain value across a blocking call. // Variables in co-routines must be declared static if they must maintain value across a blocking call.
// This may not be necessary for const variables. // This may not be necessary for const variables.
static const char cLedToFlash[ 2 ] = { 5, 6 }; static const char cLedToFlash[ 2 ] = { 5, 6 };
static const TickType_t uxFlashRates[ 2 ] = { 200, 400 }; static const portTickType uxFlashRates[ 2 ] = { 200, 400 };
// Must start every co-routine with a call to crSTART(); // Must start every co-routine with a call to crSTART();
crSTART( xHandle ); crSTART( xHandle );
@ -100,7 +137,7 @@ typedef struct corCoRoutineControlBlock
// This co-routine just delays for a fixed period, then toggles // This co-routine just delays for a fixed period, then toggles
// an LED. Two co-routines are created using this function, so // an LED. Two co-routines are created using this function, so
// the uxIndex parameter is used to tell the co-routine which // the uxIndex parameter is used to tell the co-routine which
// LED to flash and how int32_t to delay. This assumes xQueue has // LED to flash and how long to delay. This assumes xQueue has
// already been created. // already been created.
vParTestToggleLED( cLedToFlash[ uxIndex ] ); vParTestToggleLED( cLedToFlash[ uxIndex ] );
crDELAY( xHandle, uxFlashRates[ uxIndex ] ); crDELAY( xHandle, uxFlashRates[ uxIndex ] );
@ -113,8 +150,8 @@ typedef struct corCoRoutineControlBlock
// Function that creates two co-routines. // Function that creates two co-routines.
void vOtherFunction( void ) void vOtherFunction( void )
{ {
uint8_t ucParameterToPass; unsigned char ucParameterToPass;
TaskHandle_t xHandle; xTaskHandle xHandle;
// Create two co-routines at priority 0. The first is given index 0 // Create two co-routines at priority 0. The first is given index 0
// so (from the code above) toggles LED 5 every 200 ticks. The second // so (from the code above) toggles LED 5 every 200 ticks. The second
@ -128,7 +165,7 @@ typedef struct corCoRoutineControlBlock
* \defgroup xCoRoutineCreate xCoRoutineCreate * \defgroup xCoRoutineCreate xCoRoutineCreate
* \ingroup Tasks * \ingroup Tasks
*/ */
BaseType_t xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex ); signed portBASE_TYPE xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, unsigned portBASE_TYPE uxPriority, unsigned portBASE_TYPE uxIndex );
/** /**
@ -175,17 +212,17 @@ void vCoRoutineSchedule( void );
/** /**
* croutine. h * croutine. h
* <pre> * <pre>
crSTART( CoRoutineHandle_t xHandle );</pre> crSTART( xCoRoutineHandle xHandle );</pre>
* *
* This macro MUST always be called at the start of a co-routine function. * This macro MUST always be called at the start of a co-routine function.
* *
* Example usage: * Example usage:
<pre> <pre>
// Co-routine to be created. // Co-routine to be created.
void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// Variables in co-routines must be declared static if they must maintain value across a blocking call. // Variables in co-routines must be declared static if they must maintain value across a blocking call.
static int32_t ulAVariable; static long ulAVariable;
// Must start every co-routine with a call to crSTART(); // Must start every co-routine with a call to crSTART();
crSTART( xHandle ); crSTART( xHandle );
@ -201,7 +238,7 @@ void vCoRoutineSchedule( void );
* \defgroup crSTART crSTART * \defgroup crSTART crSTART
* \ingroup Tasks * \ingroup Tasks
*/ */
#define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0: #define crSTART( pxCRCB ) switch( ( ( corCRCB * )( pxCRCB ) )->uxState ) { case 0:
/** /**
* croutine. h * croutine. h
@ -213,10 +250,10 @@ void vCoRoutineSchedule( void );
* Example usage: * Example usage:
<pre> <pre>
// Co-routine to be created. // Co-routine to be created.
void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// Variables in co-routines must be declared static if they must maintain value across a blocking call. // Variables in co-routines must be declared static if they must maintain value across a blocking call.
static int32_t ulAVariable; static long ulAVariable;
// Must start every co-routine with a call to crSTART(); // Must start every co-routine with a call to crSTART();
crSTART( xHandle ); crSTART( xHandle );
@ -238,13 +275,13 @@ void vCoRoutineSchedule( void );
* These macros are intended for internal use by the co-routine implementation * These macros are intended for internal use by the co-routine implementation
* only. The macros should not be used directly by application writers. * only. The macros should not be used directly by application writers.
*/ */
#define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2): #define crSET_STATE0( xHandle ) ( ( corCRCB * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):
#define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1): #define crSET_STATE1( xHandle ) ( ( corCRCB * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):
/** /**
* croutine. h * croutine. h
*<pre> *<pre>
crDELAY( CoRoutineHandle_t xHandle, TickType_t xTicksToDelay );</pre> crDELAY( xCoRoutineHandle xHandle, portTickType xTicksToDelay );</pre>
* *
* Delay a co-routine for a fixed period of time. * Delay a co-routine for a fixed period of time.
* *
@ -257,18 +294,18 @@ void vCoRoutineSchedule( void );
* *
* @param xTickToDelay The number of ticks that the co-routine should delay * @param xTickToDelay The number of ticks that the co-routine should delay
* for. The actual amount of time this equates to is defined by * for. The actual amount of time this equates to is defined by
* configTICK_RATE_HZ (set in FreeRTOSConfig.h). The constant portTICK_PERIOD_MS * configTICK_RATE_HZ (set in FreeRTOSConfig.h). The constant portTICK_RATE_MS
* can be used to convert ticks to milliseconds. * can be used to convert ticks to milliseconds.
* *
* Example usage: * Example usage:
<pre> <pre>
// Co-routine to be created. // Co-routine to be created.
void vACoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// Variables in co-routines must be declared static if they must maintain value across a blocking call. // Variables in co-routines must be declared static if they must maintain value across a blocking call.
// This may not be necessary for const variables. // This may not be necessary for const variables.
// We are to delay for 200ms. // We are to delay for 200ms.
static const xTickType xDelayTime = 200 / portTICK_PERIOD_MS; static const xTickType xDelayTime = 200 / portTICK_RATE_MS;
// Must start every co-routine with a call to crSTART(); // Must start every co-routine with a call to crSTART();
crSTART( xHandle ); crSTART( xHandle );
@ -297,11 +334,11 @@ void vCoRoutineSchedule( void );
/** /**
* <pre> * <pre>
crQUEUE_SEND( crQUEUE_SEND(
CoRoutineHandle_t xHandle, xCoRoutineHandle xHandle,
QueueHandle_t pxQueue, xQueueHandle pxQueue,
void *pvItemToQueue, void *pvItemToQueue,
TickType_t xTicksToWait, portTickType xTicksToWait,
BaseType_t *pxResult portBASE_TYPE *pxResult
)</pre> )</pre>
* *
* The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine * The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine
@ -334,7 +371,7 @@ void vCoRoutineSchedule( void );
* to wait for space to become available on the queue, should space not be * to wait for space to become available on the queue, should space not be
* available immediately. The actual amount of time this equates to is defined * available immediately. The actual amount of time this equates to is defined
* by configTICK_RATE_HZ (set in FreeRTOSConfig.h). The constant * by configTICK_RATE_HZ (set in FreeRTOSConfig.h). The constant
* portTICK_PERIOD_MS can be used to convert ticks to milliseconds (see example * portTICK_RATE_MS can be used to convert ticks to milliseconds (see example
* below). * below).
* *
* @param pxResult The variable pointed to by pxResult will be set to pdPASS if * @param pxResult The variable pointed to by pxResult will be set to pdPASS if
@ -345,11 +382,11 @@ void vCoRoutineSchedule( void );
<pre> <pre>
// Co-routine function that blocks for a fixed period then posts a number onto // Co-routine function that blocks for a fixed period then posts a number onto
// a queue. // a queue.
static void prvCoRoutineFlashTask( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) static void prvCoRoutineFlashTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// Variables in co-routines must be declared static if they must maintain value across a blocking call. // Variables in co-routines must be declared static if they must maintain value across a blocking call.
static BaseType_t xNumberToPost = 0; static portBASE_TYPE xNumberToPost = 0;
static BaseType_t xResult; static portBASE_TYPE xResult;
// Co-routines must begin with a call to crSTART(). // Co-routines must begin with a call to crSTART().
crSTART( xHandle ); crSTART( xHandle );
@ -396,11 +433,11 @@ void vCoRoutineSchedule( void );
* croutine. h * croutine. h
* <pre> * <pre>
crQUEUE_RECEIVE( crQUEUE_RECEIVE(
CoRoutineHandle_t xHandle, xCoRoutineHandle xHandle,
QueueHandle_t pxQueue, xQueueHandle pxQueue,
void *pvBuffer, void *pvBuffer,
TickType_t xTicksToWait, portTickType xTicksToWait,
BaseType_t *pxResult portBASE_TYPE *pxResult
)</pre> )</pre>
* *
* The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine * The macro's crQUEUE_SEND() and crQUEUE_RECEIVE() are the co-routine
@ -432,7 +469,7 @@ void vCoRoutineSchedule( void );
* to wait for data to become available from the queue, should data not be * to wait for data to become available from the queue, should data not be
* available immediately. The actual amount of time this equates to is defined * available immediately. The actual amount of time this equates to is defined
* by configTICK_RATE_HZ (set in FreeRTOSConfig.h). The constant * by configTICK_RATE_HZ (set in FreeRTOSConfig.h). The constant
* portTICK_PERIOD_MS can be used to convert ticks to milliseconds (see the * portTICK_RATE_MS can be used to convert ticks to milliseconds (see the
* crQUEUE_SEND example). * crQUEUE_SEND example).
* *
* @param pxResult The variable pointed to by pxResult will be set to pdPASS if * @param pxResult The variable pointed to by pxResult will be set to pdPASS if
@ -443,11 +480,11 @@ void vCoRoutineSchedule( void );
<pre> <pre>
// A co-routine receives the number of an LED to flash from a queue. It // A co-routine receives the number of an LED to flash from a queue. It
// blocks on the queue until the number is received. // blocks on the queue until the number is received.
static void prvCoRoutineFlashWorkTask( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) static void prvCoRoutineFlashWorkTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// Variables in co-routines must be declared static if they must maintain value across a blocking call. // Variables in co-routines must be declared static if they must maintain value across a blocking call.
static BaseType_t xResult; static portBASE_TYPE xResult;
static UBaseType_t uxLEDToFlash; static unsigned portBASE_TYPE uxLEDToFlash;
// All co-routines must start with a call to crSTART(). // All co-routines must start with a call to crSTART().
crSTART( xHandle ); crSTART( xHandle );
@ -488,9 +525,9 @@ void vCoRoutineSchedule( void );
* croutine. h * croutine. h
* <pre> * <pre>
crQUEUE_SEND_FROM_ISR( crQUEUE_SEND_FROM_ISR(
QueueHandle_t pxQueue, xQueueHandle pxQueue,
void *pvItemToQueue, void *pvItemToQueue,
BaseType_t xCoRoutinePreviouslyWoken portBASE_TYPE xCoRoutinePreviouslyWoken
)</pre> )</pre>
* *
* The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the * The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the
@ -528,10 +565,10 @@ void vCoRoutineSchedule( void );
* Example usage: * Example usage:
<pre> <pre>
// A co-routine that blocks on a queue waiting for characters to be received. // A co-routine that blocks on a queue waiting for characters to be received.
static void vReceivingCoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) static void vReceivingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
char cRxedChar; char cRxedChar;
BaseType_t xResult; portBASE_TYPE xResult;
// All co-routines must start with a call to crSTART(). // All co-routines must start with a call to crSTART().
crSTART( xHandle ); crSTART( xHandle );
@ -558,7 +595,7 @@ void vCoRoutineSchedule( void );
void vUART_ISR( void ) void vUART_ISR( void )
{ {
char cRxedChar; char cRxedChar;
BaseType_t xCRWokenByPost = pdFALSE; portBASE_TYPE xCRWokenByPost = pdFALSE;
// We loop around reading characters until there are none left in the UART. // We loop around reading characters until there are none left in the UART.
while( UART_RX_REG_NOT_EMPTY() ) while( UART_RX_REG_NOT_EMPTY() )
@ -585,9 +622,9 @@ void vCoRoutineSchedule( void );
* croutine. h * croutine. h
* <pre> * <pre>
crQUEUE_SEND_FROM_ISR( crQUEUE_SEND_FROM_ISR(
QueueHandle_t pxQueue, xQueueHandle pxQueue,
void *pvBuffer, void *pvBuffer,
BaseType_t * pxCoRoutineWoken portBASE_TYPE * pxCoRoutineWoken
)</pre> )</pre>
* *
* The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the * The macro's crQUEUE_SEND_FROM_ISR() and crQUEUE_RECEIVE_FROM_ISR() are the
@ -626,12 +663,12 @@ void vCoRoutineSchedule( void );
<pre> <pre>
// A co-routine that posts a character to a queue then blocks for a fixed // A co-routine that posts a character to a queue then blocks for a fixed
// period. The character is incremented each time. // period. The character is incremented each time.
static void vSendingCoRoutine( CoRoutineHandle_t xHandle, UBaseType_t uxIndex ) static void vSendingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
{ {
// cChar holds its value while this co-routine is blocked and must therefore // cChar holds its value while this co-routine is blocked and must therefore
// be declared static. // be declared static.
static char cCharToTx = 'a'; static char cCharToTx = 'a';
BaseType_t xResult; portBASE_TYPE xResult;
// All co-routines must start with a call to crSTART(). // All co-routines must start with a call to crSTART().
crSTART( xHandle ); crSTART( xHandle );
@ -674,7 +711,7 @@ void vCoRoutineSchedule( void );
void vUART_ISR( void ) void vUART_ISR( void )
{ {
char cCharToTx; char cCharToTx;
BaseType_t xCRWokenByPost = pdFALSE; portBASE_TYPE xCRWokenByPost = pdFALSE;
while( UART_TX_REG_EMPTY() ) while( UART_TX_REG_EMPTY() )
{ {
@ -702,7 +739,7 @@ void vCoRoutineSchedule( void );
* Removes the current co-routine from its ready list and places it in the * Removes the current co-routine from its ready list and places it in the
* appropriate delayed list. * appropriate delayed list.
*/ */
void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay, List_t *pxEventList ); void vCoRoutineAddToDelayedList( portTickType xTicksToDelay, xList *pxEventList );
/* /*
* This function is intended for internal use by the queue implementation only. * This function is intended for internal use by the queue implementation only.
@ -711,7 +748,7 @@ void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay, List_t *pxEventList )
* Removes the highest priority co-routine from the event list and places it in * Removes the highest priority co-routine from the event list and places it in
* the pending ready list. * the pending ready list.
*/ */
BaseType_t xCoRoutineRemoveFromEventList( const List_t *pxEventList ); signed portBASE_TYPE xCoRoutineRemoveFromEventList( const xList *pxEventList );
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,279 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
#ifndef DEPRECATED_DEFINITIONS_H
#define DEPRECATED_DEFINITIONS_H
/* Each FreeRTOS port has a unique portmacro.h header file. Originally a
pre-processor definition was used to ensure the pre-processor found the correct
portmacro.h file for the port being used. That scheme was deprecated in favour
of setting the compiler's include path such that it found the correct
portmacro.h file - removing the need for the constant and allowing the
portmacro.h file to be located anywhere in relation to the port being used. The
definitions below remain in the code for backward compatibility only. New
projects should not use them. */
#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
#include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
#include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef GCC_MEGA_AVR
#include "../portable/GCC/ATMega323/portmacro.h"
#endif
#ifdef IAR_MEGA_AVR
#include "../portable/IAR/ATMega323/portmacro.h"
#endif
#ifdef MPLAB_PIC24_PORT
#include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"
#endif
#ifdef MPLAB_DSPIC_PORT
#include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"
#endif
#ifdef MPLAB_PIC18F_PORT
#include "../../Source/portable/MPLAB/PIC18F/portmacro.h"
#endif
#ifdef MPLAB_PIC32MX_PORT
#include "../../Source/portable/MPLAB/PIC32MX/portmacro.h"
#endif
#ifdef _FEDPICC
#include "libFreeRTOS/Include/portmacro.h"
#endif
#ifdef SDCC_CYGNAL
#include "../../Source/portable/SDCC/Cygnal/portmacro.h"
#endif
#ifdef GCC_ARM7
#include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
#endif
#ifdef GCC_ARM7_ECLIPSE
#include "portmacro.h"
#endif
#ifdef ROWLEY_LPC23xx
#include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
#endif
#ifdef IAR_MSP430
#include "..\..\Source\portable\IAR\MSP430\portmacro.h"
#endif
#ifdef GCC_MSP430
#include "../../Source/portable/GCC/MSP430F449/portmacro.h"
#endif
#ifdef ROWLEY_MSP430
#include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
#endif
#ifdef ARM7_LPC21xx_KEIL_RVDS
#include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
#endif
#ifdef SAM7_GCC
#include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
#endif
#ifdef SAM7_IAR
#include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
#endif
#ifdef SAM9XE_IAR
#include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
#endif
#ifdef LPC2000_IAR
#include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
#endif
#ifdef STR71X_IAR
#include "..\..\Source\portable\IAR\STR71x\portmacro.h"
#endif
#ifdef STR75X_IAR
#include "..\..\Source\portable\IAR\STR75x\portmacro.h"
#endif
#ifdef STR75X_GCC
#include "..\..\Source\portable\GCC\STR75x\portmacro.h"
#endif
#ifdef STR91X_IAR
#include "..\..\Source\portable\IAR\STR91x\portmacro.h"
#endif
#ifdef GCC_H8S
#include "../../Source/portable/GCC/H8S2329/portmacro.h"
#endif
#ifdef GCC_AT91FR40008
#include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
#endif
#ifdef RVDS_ARMCM3_LM3S102
#include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
#endif
#ifdef GCC_ARMCM3_LM3S102
#include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
#endif
#ifdef GCC_ARMCM3
#include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
#endif
#ifdef IAR_ARM_CM3
#include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
#endif
#ifdef IAR_ARMCM3_LM
#include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
#endif
#ifdef HCS12_CODE_WARRIOR
#include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
#endif
#ifdef MICROBLAZE_GCC
#include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
#endif
#ifdef TERN_EE
#include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
#endif
#ifdef GCC_HCS12
#include "../../Source/portable/GCC/HCS12/portmacro.h"
#endif
#ifdef GCC_MCF5235
#include "../../Source/portable/GCC/MCF5235/portmacro.h"
#endif
#ifdef COLDFIRE_V2_GCC
#include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
#endif
#ifdef COLDFIRE_V2_CODEWARRIOR
#include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
#endif
#ifdef GCC_PPC405
#include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
#endif
#ifdef GCC_PPC440
#include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
#endif
#ifdef _16FX_SOFTUNE
#include "..\..\Source\portable\Softune\MB96340\portmacro.h"
#endif
#ifdef BCC_INDUSTRIAL_PC_PORT
/* A short file name has to be used in place of the normal
FreeRTOSConfig.h when using the Borland compiler. */
#include "frconfig.h"
#include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef BCC_FLASH_LITE_186_PORT
/* A short file name has to be used in place of the normal
FreeRTOSConfig.h when using the Borland compiler. */
#include "frconfig.h"
#include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef __GNUC__
#ifdef __AVR32_AVR32A__
#include "portmacro.h"
#endif
#endif
#ifdef __ICCAVR32__
#ifdef __CORE__
#if __CORE__ == __AVR32A__
#include "portmacro.h"
#endif
#endif
#endif
#ifdef __91467D
#include "portmacro.h"
#endif
#ifdef __96340
#include "portmacro.h"
#endif
#ifdef __IAR_V850ES_Fx3__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Jx3__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Jx3_L__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Jx2__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Hx2__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_78K0R_Kx3__
#include "../../Source/portable/IAR/78K0R/portmacro.h"
#endif
#ifdef __IAR_78K0R_Kx3L__
#include "../../Source/portable/IAR/78K0R/portmacro.h"
#endif
#endif /* DEPRECATED_DEFINITIONS_H */

View file

@ -1,757 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
#ifndef EVENT_GROUPS_H
#define EVENT_GROUPS_H
#ifndef INC_FREERTOS_H
#error "include FreeRTOS.h" must appear in source files before "include event_groups.h"
#endif
/* FreeRTOS includes. */
#include "timers.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* An event group is a collection of bits to which an application can assign a
* meaning. For example, an application may create an event group to convey
* the status of various CAN bus related events in which bit 0 might mean "A CAN
* message has been received and is ready for processing", bit 1 might mean "The
* application has queued a message that is ready for sending onto the CAN
* network", and bit 2 might mean "It is time to send a SYNC message onto the
* CAN network" etc. A task can then test the bit values to see which events
* are active, and optionally enter the Blocked state to wait for a specified
* bit or a group of specified bits to be active. To continue the CAN bus
* example, a CAN controlling task can enter the Blocked state (and therefore
* not consume any processing time) until either bit 0, bit 1 or bit 2 are
* active, at which time the bit that was actually active would inform the task
* which action it had to take (process a received message, send a message, or
* send a SYNC).
*
* The event groups implementation contains intelligence to avoid race
* conditions that would otherwise occur were an application to use a simple
* variable for the same purpose. This is particularly important with respect
* to when a bit within an event group is to be cleared, and when bits have to
* be set and then tested atomically - as is the case where event groups are
* used to create a synchronisation point between multiple tasks (a
* 'rendezvous').
*
* \defgroup EventGroup
*/
/**
* event_groups.h
*
* Type by which event groups are referenced. For example, a call to
* xEventGroupCreate() returns an EventGroupHandle_t variable that can then
* be used as a parameter to other event group functions.
*
* \defgroup EventGroupHandle_t EventGroupHandle_t
* \ingroup EventGroup
*/
struct EventGroupDef_t;
typedef struct EventGroupDef_t * EventGroupHandle_t;
/*
* The type that holds event bits always matches TickType_t - therefore the
* number of bits it holds is set by configUSE_16_BIT_TICKS (16 bits if set to 1,
* 32 bits if set to 0.
*
* \defgroup EventBits_t EventBits_t
* \ingroup EventGroup
*/
typedef TickType_t EventBits_t;
/**
* event_groups.h
*<pre>
EventGroupHandle_t xEventGroupCreate( void );
</pre>
*
* Create a new event group.
*
* Internally, within the FreeRTOS implementation, event groups use a [small]
* block of memory, in which the event group's structure is stored. If an event
* groups is created using xEventGropuCreate() then the required memory is
* automatically dynamically allocated inside the xEventGroupCreate() function.
* (see http://www.freertos.org/a00111.html). If an event group is created
* using xEventGropuCreateStatic() then the application writer must instead
* provide the memory that will get used by the event group.
* xEventGroupCreateStatic() therefore allows an event group to be created
* without using any dynamic memory allocation.
*
* Although event groups are not related to ticks, for internal implementation
* reasons the number of bits available for use in an event group is dependent
* on the configUSE_16_BIT_TICKS setting in FreeRTOSConfig.h. If
* configUSE_16_BIT_TICKS is 1 then each event group contains 8 usable bits (bit
* 0 to bit 7). If configUSE_16_BIT_TICKS is set to 0 then each event group has
* 24 usable bits (bit 0 to bit 23). The EventBits_t type is used to store
* event bits within an event group.
*
* @return If the event group was created then a handle to the event group is
* returned. If there was insufficient FreeRTOS heap available to create the
* event group then NULL is returned. See http://www.freertos.org/a00111.html
*
* Example usage:
<pre>
// Declare a variable to hold the created event group.
EventGroupHandle_t xCreatedEventGroup;
// Attempt to create the event group.
xCreatedEventGroup = xEventGroupCreate();
// Was the event group created successfully?
if( xCreatedEventGroup == NULL )
{
// The event group was not created because there was insufficient
// FreeRTOS heap available.
}
else
{
// The event group was created.
}
</pre>
* \defgroup xEventGroupCreate xEventGroupCreate
* \ingroup EventGroup
*/
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
EventGroupHandle_t xEventGroupCreate( void ) PRIVILEGED_FUNCTION;
#endif
/**
* event_groups.h
*<pre>
EventGroupHandle_t xEventGroupCreateStatic( EventGroupHandle_t * pxEventGroupBuffer );
</pre>
*
* Create a new event group.
*
* Internally, within the FreeRTOS implementation, event groups use a [small]
* block of memory, in which the event group's structure is stored. If an event
* groups is created using xEventGropuCreate() then the required memory is
* automatically dynamically allocated inside the xEventGroupCreate() function.
* (see http://www.freertos.org/a00111.html). If an event group is created
* using xEventGropuCreateStatic() then the application writer must instead
* provide the memory that will get used by the event group.
* xEventGroupCreateStatic() therefore allows an event group to be created
* without using any dynamic memory allocation.
*
* Although event groups are not related to ticks, for internal implementation
* reasons the number of bits available for use in an event group is dependent
* on the configUSE_16_BIT_TICKS setting in FreeRTOSConfig.h. If
* configUSE_16_BIT_TICKS is 1 then each event group contains 8 usable bits (bit
* 0 to bit 7). If configUSE_16_BIT_TICKS is set to 0 then each event group has
* 24 usable bits (bit 0 to bit 23). The EventBits_t type is used to store
* event bits within an event group.
*
* @param pxEventGroupBuffer pxEventGroupBuffer must point to a variable of type
* StaticEventGroup_t, which will be then be used to hold the event group's data
* structures, removing the need for the memory to be allocated dynamically.
*
* @return If the event group was created then a handle to the event group is
* returned. If pxEventGroupBuffer was NULL then NULL is returned.
*
* Example usage:
<pre>
// StaticEventGroup_t is a publicly accessible structure that has the same
// size and alignment requirements as the real event group structure. It is
// provided as a mechanism for applications to know the size of the event
// group (which is dependent on the architecture and configuration file
// settings) without breaking the strict data hiding policy by exposing the
// real event group internals. This StaticEventGroup_t variable is passed
// into the xSemaphoreCreateEventGroupStatic() function and is used to store
// the event group's data structures
StaticEventGroup_t xEventGroupBuffer;
// Create the event group without dynamically allocating any memory.
xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer );
</pre>
*/
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
EventGroupHandle_t xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer ) PRIVILEGED_FUNCTION;
#endif
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToWaitFor,
const BaseType_t xClearOnExit,
const BaseType_t xWaitForAllBits,
const TickType_t xTicksToWait );
</pre>
*
* [Potentially] block to wait for one or more bits to be set within a
* previously created event group.
*
* This function cannot be called from an interrupt.
*
* @param xEventGroup The event group in which the bits are being tested. The
* event group must have previously been created using a call to
* xEventGroupCreate().
*
* @param uxBitsToWaitFor A bitwise value that indicates the bit or bits to test
* inside the event group. For example, to wait for bit 0 and/or bit 2 set
* uxBitsToWaitFor to 0x05. To wait for bits 0 and/or bit 1 and/or bit 2 set
* uxBitsToWaitFor to 0x07. Etc.
*
* @param xClearOnExit If xClearOnExit is set to pdTRUE then any bits within
* uxBitsToWaitFor that are set within the event group will be cleared before
* xEventGroupWaitBits() returns if the wait condition was met (if the function
* returns for a reason other than a timeout). If xClearOnExit is set to
* pdFALSE then the bits set in the event group are not altered when the call to
* xEventGroupWaitBits() returns.
*
* @param xWaitForAllBits If xWaitForAllBits is set to pdTRUE then
* xEventGroupWaitBits() will return when either all the bits in uxBitsToWaitFor
* are set or the specified block time expires. If xWaitForAllBits is set to
* pdFALSE then xEventGroupWaitBits() will return when any one of the bits set
* in uxBitsToWaitFor is set or the specified block time expires. The block
* time is specified by the xTicksToWait parameter.
*
* @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait
* for one/all (depending on the xWaitForAllBits value) of the bits specified by
* uxBitsToWaitFor to become set.
*
* @return The value of the event group at the time either the bits being waited
* for became set, or the block time expired. Test the return value to know
* which bits were set. If xEventGroupWaitBits() returned because its timeout
* expired then not all the bits being waited for will be set. If
* xEventGroupWaitBits() returned because the bits it was waiting for were set
* then the returned value is the event group value before any bits were
* automatically cleared in the case that xClearOnExit parameter was set to
* pdTRUE.
*
* Example usage:
<pre>
#define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 )
void aFunction( EventGroupHandle_t xEventGroup )
{
EventBits_t uxBits;
const TickType_t xTicksToWait = 100 / portTICK_PERIOD_MS;
// Wait a maximum of 100ms for either bit 0 or bit 4 to be set within
// the event group. Clear the bits before exiting.
uxBits = xEventGroupWaitBits(
xEventGroup, // The event group being tested.
BIT_0 | BIT_4, // The bits within the event group to wait for.
pdTRUE, // BIT_0 and BIT_4 should be cleared before returning.
pdFALSE, // Don't wait for both bits, either bit will do.
xTicksToWait ); // Wait a maximum of 100ms for either bit to be set.
if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )
{
// xEventGroupWaitBits() returned because both bits were set.
}
else if( ( uxBits & BIT_0 ) != 0 )
{
// xEventGroupWaitBits() returned because just BIT_0 was set.
}
else if( ( uxBits & BIT_4 ) != 0 )
{
// xEventGroupWaitBits() returned because just BIT_4 was set.
}
else
{
// xEventGroupWaitBits() returned because xTicksToWait ticks passed
// without either BIT_0 or BIT_4 becoming set.
}
}
</pre>
* \defgroup xEventGroupWaitBits xEventGroupWaitBits
* \ingroup EventGroup
*/
EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear );
</pre>
*
* Clear bits within an event group. This function cannot be called from an
* interrupt.
*
* @param xEventGroup The event group in which the bits are to be cleared.
*
* @param uxBitsToClear A bitwise value that indicates the bit or bits to clear
* in the event group. For example, to clear bit 3 only, set uxBitsToClear to
* 0x08. To clear bit 3 and bit 0 set uxBitsToClear to 0x09.
*
* @return The value of the event group before the specified bits were cleared.
*
* Example usage:
<pre>
#define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 )
void aFunction( EventGroupHandle_t xEventGroup )
{
EventBits_t uxBits;
// Clear bit 0 and bit 4 in xEventGroup.
uxBits = xEventGroupClearBits(
xEventGroup, // The event group being updated.
BIT_0 | BIT_4 );// The bits being cleared.
if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )
{
// Both bit 0 and bit 4 were set before xEventGroupClearBits() was
// called. Both will now be clear (not set).
}
else if( ( uxBits & BIT_0 ) != 0 )
{
// Bit 0 was set before xEventGroupClearBits() was called. It will
// now be clear.
}
else if( ( uxBits & BIT_4 ) != 0 )
{
// Bit 4 was set before xEventGroupClearBits() was called. It will
// now be clear.
}
else
{
// Neither bit 0 nor bit 4 were set in the first place.
}
}
</pre>
* \defgroup xEventGroupClearBits xEventGroupClearBits
* \ingroup EventGroup
*/
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
/**
* event_groups.h
*<pre>
BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );
</pre>
*
* A version of xEventGroupClearBits() that can be called from an interrupt.
*
* Setting bits in an event group is not a deterministic operation because there
* are an unknown number of tasks that may be waiting for the bit or bits being
* set. FreeRTOS does not allow nondeterministic operations to be performed
* while interrupts are disabled, so protects event groups that are accessed
* from tasks by suspending the scheduler rather than disabling interrupts. As
* a result event groups cannot be accessed directly from an interrupt service
* routine. Therefore xEventGroupClearBitsFromISR() sends a message to the
* timer task to have the clear operation performed in the context of the timer
* task.
*
* @param xEventGroup The event group in which the bits are to be cleared.
*
* @param uxBitsToClear A bitwise value that indicates the bit or bits to clear.
* For example, to clear bit 3 only, set uxBitsToClear to 0x08. To clear bit 3
* and bit 0 set uxBitsToClear to 0x09.
*
* @return If the request to execute the function was posted successfully then
* pdPASS is returned, otherwise pdFALSE is returned. pdFALSE will be returned
* if the timer service queue was full.
*
* Example usage:
<pre>
#define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 )
// An event group which it is assumed has already been created by a call to
// xEventGroupCreate().
EventGroupHandle_t xEventGroup;
void anInterruptHandler( void )
{
// Clear bit 0 and bit 4 in xEventGroup.
xResult = xEventGroupClearBitsFromISR(
xEventGroup, // The event group being updated.
BIT_0 | BIT_4 ); // The bits being set.
if( xResult == pdPASS )
{
// The message was posted successfully.
}
}
</pre>
* \defgroup xEventGroupClearBitsFromISR xEventGroupClearBitsFromISR
* \ingroup EventGroup
*/
#if( configUSE_TRACE_FACILITY == 1 )
BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
#else
#define xEventGroupClearBitsFromISR( xEventGroup, uxBitsToClear ) xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL )
#endif
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet );
</pre>
*
* Set bits within an event group.
* This function cannot be called from an interrupt. xEventGroupSetBitsFromISR()
* is a version that can be called from an interrupt.
*
* Setting bits in an event group will automatically unblock tasks that are
* blocked waiting for the bits.
*
* @param xEventGroup The event group in which the bits are to be set.
*
* @param uxBitsToSet A bitwise value that indicates the bit or bits to set.
* For example, to set bit 3 only, set uxBitsToSet to 0x08. To set bit 3
* and bit 0 set uxBitsToSet to 0x09.
*
* @return The value of the event group at the time the call to
* xEventGroupSetBits() returns. There are two reasons why the returned value
* might have the bits specified by the uxBitsToSet parameter cleared. First,
* if setting a bit results in a task that was waiting for the bit leaving the
* blocked state then it is possible the bit will be cleared automatically
* (see the xClearBitOnExit parameter of xEventGroupWaitBits()). Second, any
* unblocked (or otherwise Ready state) task that has a priority above that of
* the task that called xEventGroupSetBits() will execute and may change the
* event group value before the call to xEventGroupSetBits() returns.
*
* Example usage:
<pre>
#define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 )
void aFunction( EventGroupHandle_t xEventGroup )
{
EventBits_t uxBits;
// Set bit 0 and bit 4 in xEventGroup.
uxBits = xEventGroupSetBits(
xEventGroup, // The event group being updated.
BIT_0 | BIT_4 );// The bits being set.
if( ( uxBits & ( BIT_0 | BIT_4 ) ) == ( BIT_0 | BIT_4 ) )
{
// Both bit 0 and bit 4 remained set when the function returned.
}
else if( ( uxBits & BIT_0 ) != 0 )
{
// Bit 0 remained set when the function returned, but bit 4 was
// cleared. It might be that bit 4 was cleared automatically as a
// task that was waiting for bit 4 was removed from the Blocked
// state.
}
else if( ( uxBits & BIT_4 ) != 0 )
{
// Bit 4 remained set when the function returned, but bit 0 was
// cleared. It might be that bit 0 was cleared automatically as a
// task that was waiting for bit 0 was removed from the Blocked
// state.
}
else
{
// Neither bit 0 nor bit 4 remained set. It might be that a task
// was waiting for both of the bits to be set, and the bits were
// cleared as the task left the Blocked state.
}
}
</pre>
* \defgroup xEventGroupSetBits xEventGroupSetBits
* \ingroup EventGroup
*/
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ) PRIVILEGED_FUNCTION;
/**
* event_groups.h
*<pre>
BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* A version of xEventGroupSetBits() that can be called from an interrupt.
*
* Setting bits in an event group is not a deterministic operation because there
* are an unknown number of tasks that may be waiting for the bit or bits being
* set. FreeRTOS does not allow nondeterministic operations to be performed in
* interrupts or from critical sections. Therefore xEventGroupSetBitsFromISR()
* sends a message to the timer task to have the set operation performed in the
* context of the timer task - where a scheduler lock is used in place of a
* critical section.
*
* @param xEventGroup The event group in which the bits are to be set.
*
* @param uxBitsToSet A bitwise value that indicates the bit or bits to set.
* For example, to set bit 3 only, set uxBitsToSet to 0x08. To set bit 3
* and bit 0 set uxBitsToSet to 0x09.
*
* @param pxHigherPriorityTaskWoken As mentioned above, calling this function
* will result in a message being sent to the timer daemon task. If the
* priority of the timer daemon task is higher than the priority of the
* currently running task (the task the interrupt interrupted) then
* *pxHigherPriorityTaskWoken will be set to pdTRUE by
* xEventGroupSetBitsFromISR(), indicating that a context switch should be
* requested before the interrupt exits. For that reason
* *pxHigherPriorityTaskWoken must be initialised to pdFALSE. See the
* example code below.
*
* @return If the request to execute the function was posted successfully then
* pdPASS is returned, otherwise pdFALSE is returned. pdFALSE will be returned
* if the timer service queue was full.
*
* Example usage:
<pre>
#define BIT_0 ( 1 << 0 )
#define BIT_4 ( 1 << 4 )
// An event group which it is assumed has already been created by a call to
// xEventGroupCreate().
EventGroupHandle_t xEventGroup;
void anInterruptHandler( void )
{
BaseType_t xHigherPriorityTaskWoken, xResult;
// xHigherPriorityTaskWoken must be initialised to pdFALSE.
xHigherPriorityTaskWoken = pdFALSE;
// Set bit 0 and bit 4 in xEventGroup.
xResult = xEventGroupSetBitsFromISR(
xEventGroup, // The event group being updated.
BIT_0 | BIT_4 // The bits being set.
&xHigherPriorityTaskWoken );
// Was the message posted successfully?
if( xResult == pdPASS )
{
// If xHigherPriorityTaskWoken is now set to pdTRUE then a context
// switch should be requested. The macro used is port specific and
// will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR() -
// refer to the documentation page for the port being used.
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
}
</pre>
* \defgroup xEventGroupSetBitsFromISR xEventGroupSetBitsFromISR
* \ingroup EventGroup
*/
#if( configUSE_TRACE_FACILITY == 1 )
BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
#else
#define xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken ) xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken )
#endif
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet,
const EventBits_t uxBitsToWaitFor,
TickType_t xTicksToWait );
</pre>
*
* Atomically set bits within an event group, then wait for a combination of
* bits to be set within the same event group. This functionality is typically
* used to synchronise multiple tasks, where each task has to wait for the other
* tasks to reach a synchronisation point before proceeding.
*
* This function cannot be used from an interrupt.
*
* The function will return before its block time expires if the bits specified
* by the uxBitsToWait parameter are set, or become set within that time. In
* this case all the bits specified by uxBitsToWait will be automatically
* cleared before the function returns.
*
* @param xEventGroup The event group in which the bits are being tested. The
* event group must have previously been created using a call to
* xEventGroupCreate().
*
* @param uxBitsToSet The bits to set in the event group before determining
* if, and possibly waiting for, all the bits specified by the uxBitsToWait
* parameter are set.
*
* @param uxBitsToWaitFor A bitwise value that indicates the bit or bits to test
* inside the event group. For example, to wait for bit 0 and bit 2 set
* uxBitsToWaitFor to 0x05. To wait for bits 0 and bit 1 and bit 2 set
* uxBitsToWaitFor to 0x07. Etc.
*
* @param xTicksToWait The maximum amount of time (specified in 'ticks') to wait
* for all of the bits specified by uxBitsToWaitFor to become set.
*
* @return The value of the event group at the time either the bits being waited
* for became set, or the block time expired. Test the return value to know
* which bits were set. If xEventGroupSync() returned because its timeout
* expired then not all the bits being waited for will be set. If
* xEventGroupSync() returned because all the bits it was waiting for were
* set then the returned value is the event group value before any bits were
* automatically cleared.
*
* Example usage:
<pre>
// Bits used by the three tasks.
#define TASK_0_BIT ( 1 << 0 )
#define TASK_1_BIT ( 1 << 1 )
#define TASK_2_BIT ( 1 << 2 )
#define ALL_SYNC_BITS ( TASK_0_BIT | TASK_1_BIT | TASK_2_BIT )
// Use an event group to synchronise three tasks. It is assumed this event
// group has already been created elsewhere.
EventGroupHandle_t xEventBits;
void vTask0( void *pvParameters )
{
EventBits_t uxReturn;
TickType_t xTicksToWait = 100 / portTICK_PERIOD_MS;
for( ;; )
{
// Perform task functionality here.
// Set bit 0 in the event flag to note this task has reached the
// sync point. The other two tasks will set the other two bits defined
// by ALL_SYNC_BITS. All three tasks have reached the synchronisation
// point when all the ALL_SYNC_BITS are set. Wait a maximum of 100ms
// for this to happen.
uxReturn = xEventGroupSync( xEventBits, TASK_0_BIT, ALL_SYNC_BITS, xTicksToWait );
if( ( uxReturn & ALL_SYNC_BITS ) == ALL_SYNC_BITS )
{
// All three tasks reached the synchronisation point before the call
// to xEventGroupSync() timed out.
}
}
}
void vTask1( void *pvParameters )
{
for( ;; )
{
// Perform task functionality here.
// Set bit 1 in the event flag to note this task has reached the
// synchronisation point. The other two tasks will set the other two
// bits defined by ALL_SYNC_BITS. All three tasks have reached the
// synchronisation point when all the ALL_SYNC_BITS are set. Wait
// indefinitely for this to happen.
xEventGroupSync( xEventBits, TASK_1_BIT, ALL_SYNC_BITS, portMAX_DELAY );
// xEventGroupSync() was called with an indefinite block time, so
// this task will only reach here if the syncrhonisation was made by all
// three tasks, so there is no need to test the return value.
}
}
void vTask2( void *pvParameters )
{
for( ;; )
{
// Perform task functionality here.
// Set bit 2 in the event flag to note this task has reached the
// synchronisation point. The other two tasks will set the other two
// bits defined by ALL_SYNC_BITS. All three tasks have reached the
// synchronisation point when all the ALL_SYNC_BITS are set. Wait
// indefinitely for this to happen.
xEventGroupSync( xEventBits, TASK_2_BIT, ALL_SYNC_BITS, portMAX_DELAY );
// xEventGroupSync() was called with an indefinite block time, so
// this task will only reach here if the syncrhonisation was made by all
// three tasks, so there is no need to test the return value.
}
}
</pre>
* \defgroup xEventGroupSync xEventGroupSync
* \ingroup EventGroup
*/
EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupGetBits( EventGroupHandle_t xEventGroup );
</pre>
*
* Returns the current value of the bits in an event group. This function
* cannot be used from an interrupt.
*
* @param xEventGroup The event group being queried.
*
* @return The event group bits at the time xEventGroupGetBits() was called.
*
* \defgroup xEventGroupGetBits xEventGroupGetBits
* \ingroup EventGroup
*/
#define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 )
/**
* event_groups.h
*<pre>
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup );
</pre>
*
* A version of xEventGroupGetBits() that can be called from an ISR.
*
* @param xEventGroup The event group being queried.
*
* @return The event group bits at the time xEventGroupGetBitsFromISR() was called.
*
* \defgroup xEventGroupGetBitsFromISR xEventGroupGetBitsFromISR
* \ingroup EventGroup
*/
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION;
/**
* event_groups.h
*<pre>
void xEventGroupDelete( EventGroupHandle_t xEventGroup );
</pre>
*
* Delete an event group that was previously created by a call to
* xEventGroupCreate(). Tasks that are blocked on the event group will be
* unblocked and obtain 0 as the event group's value.
*
* @param xEventGroup The event group being deleted.
*/
void vEventGroupDelete( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION;
/* For internal use only. */
void vEventGroupSetBitsCallback( void *pvEventGroup, const uint32_t ulBitsToSet ) PRIVILEGED_FUNCTION;
void vEventGroupClearBitsCallback( void *pvEventGroup, const uint32_t ulBitsToClear ) PRIVILEGED_FUNCTION;
#if (configUSE_TRACE_FACILITY == 1)
UBaseType_t uxEventGroupGetNumber( void* xEventGroup ) PRIVILEGED_FUNCTION;
void vEventGroupSetNumber( void* xEventGroup, UBaseType_t uxEventGroupNumber ) PRIVILEGED_FUNCTION;
#endif
#ifdef __cplusplus
}
#endif
#endif /* EVENT_GROUPS_H */

View file

@ -1,36 +1,73 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
/* /*
* This is the list implementation used by the scheduler. While it is tailored * This is the list implementation used by the scheduler. While it is tailored
* heavily for the schedulers needs, it is also available for use by * heavily for the schedulers needs, it is also available for use by
* application code. * application code.
* *
* list_ts can only store pointers to list_item_ts. Each ListItem_t contains a * xLists can only store pointers to xListItems. Each xListItem contains a
* numeric value (xItemValue). Most of the time the lists are sorted in * numeric value (xItemValue). Most of the time the lists are sorted in
* descending item value order. * descending item value order.
* *
@ -53,9 +90,6 @@
* \ingroup FreeRTOSIntro * \ingroup FreeRTOSIntro
*/ */
#ifndef INC_FREERTOS_H
#error FreeRTOS.h must be included before list.h
#endif
#ifndef LIST_H #ifndef LIST_H
#define LIST_H #define LIST_H
@ -95,80 +129,36 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Macros that can be used to place known values within the list structures,
then check that the known values do not get corrupted during the execution of
the application. These may catch the list data structures being overwritten in
memory. They will not catch data errors caused by incorrect configuration or
use of FreeRTOS.*/
#if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 0 )
/* Define the macros to do nothing. */
#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listFIRST_LIST_INTEGRITY_CHECK_VALUE
#define listSECOND_LIST_INTEGRITY_CHECK_VALUE
#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )
#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )
#define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList )
#define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList )
#define listTEST_LIST_ITEM_INTEGRITY( pxItem )
#define listTEST_LIST_INTEGRITY( pxList )
#else
/* Define macros that add new members into the list structures. */
#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue1;
#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue2;
#define listFIRST_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue1;
#define listSECOND_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue2;
/* Define macros that set the new structure members to known values. */
#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue1 = pdINTEGRITY_CHECK_VALUE
#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue2 = pdINTEGRITY_CHECK_VALUE
#define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ) ( pxList )->xListIntegrityValue1 = pdINTEGRITY_CHECK_VALUE
#define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ) ( pxList )->xListIntegrityValue2 = pdINTEGRITY_CHECK_VALUE
/* Define macros that will assert if one of the structure members does not
contain its expected value. */
#define listTEST_LIST_ITEM_INTEGRITY( pxItem ) configASSERT( ( ( pxItem )->xListItemIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxItem )->xListItemIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )
#define listTEST_LIST_INTEGRITY( pxList ) configASSERT( ( ( pxList )->xListIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxList )->xListIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )
#endif /* configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES */
/* /*
* Definition of the only type of object that a list can contain. * Definition of the only type of object that a list can contain.
*/ */
struct xLIST;
struct xLIST_ITEM struct xLIST_ITEM
{ {
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ configLIST_VOLATILE portTickType xItemValue; /*< The value being listed. In most cases this is used to sort the list in descending order. */
configLIST_VOLATILE TickType_t xItemValue; /*< The value being listed. In most cases this is used to sort the list in descending order. */ struct xLIST_ITEM * configLIST_VOLATILE pxNext; /*< Pointer to the next xListItem in the list. */
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /*< Pointer to the next ListItem_t in the list. */ struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;/*< Pointer to the previous xListItem in the list. */
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /*< Pointer to the previous ListItem_t in the list. */ void * pvOwner; /*< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */
void * pvOwner; /*< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */ void * configLIST_VOLATILE pvContainer; /*< Pointer to the list in which this list item is placed (if any). */
struct xLIST * configLIST_VOLATILE pxContainer; /*< Pointer to the list in which this list item is placed (if any). */
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
}; };
typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */ typedef struct xLIST_ITEM xListItem; /* For some reason lint wants this as two separate definitions. */
struct xMINI_LIST_ITEM struct xMINI_LIST_ITEM
{ {
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ configLIST_VOLATILE portTickType xItemValue;
configLIST_VOLATILE TickType_t xItemValue;
struct xLIST_ITEM * configLIST_VOLATILE pxNext; struct xLIST_ITEM * configLIST_VOLATILE pxNext;
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
}; };
typedef struct xMINI_LIST_ITEM MiniListItem_t; typedef struct xMINI_LIST_ITEM xMiniListItem;
/* /*
* Definition of the type of queue used by the scheduler. * Definition of the type of queue used by the scheduler.
*/ */
typedef struct xLIST typedef struct xLIST
{ {
listFIRST_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ configLIST_VOLATILE unsigned portBASE_TYPE uxNumberOfItems;
volatile UBaseType_t uxNumberOfItems; xListItem * configLIST_VOLATILE pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to pvListGetOwnerOfNextEntry (). */
ListItem_t * configLIST_VOLATILE pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */ xMiniListItem xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
MiniListItem_t xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */ } xList;
listSECOND_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
} List_t;
/* /*
* Access macro to set the owner of a list item. The owner of a list item * Access macro to set the owner of a list item. The owner of a list item
@ -186,7 +176,7 @@ typedef struct xLIST
* \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER * \page listSET_LIST_ITEM_OWNER listSET_LIST_ITEM_OWNER
* \ingroup LinkedList * \ingroup LinkedList
*/ */
#define listGET_LIST_ITEM_OWNER( pxListItem ) ( ( pxListItem )->pvOwner ) #define listGET_LIST_ITEM_OWNER( pxListItem ) ( pxListItem )->pvOwner
/* /*
* Access macro to set the value of the list item. In most cases the value is * Access macro to set the value of the list item. In most cases the value is
@ -195,50 +185,26 @@ typedef struct xLIST
* \page listSET_LIST_ITEM_VALUE listSET_LIST_ITEM_VALUE * \page listSET_LIST_ITEM_VALUE listSET_LIST_ITEM_VALUE
* \ingroup LinkedList * \ingroup LinkedList
*/ */
#define listSET_LIST_ITEM_VALUE( pxListItem, xValue ) ( ( pxListItem )->xItemValue = ( xValue ) ) #define listSET_LIST_ITEM_VALUE( pxListItem, xValue ) ( ( pxListItem )->xItemValue = ( xValue ) )
/* /*
* Access macro to retrieve the value of the list item. The value can * Access macro to retrieve the value of the list item. The value can
* represent anything - for example the priority of a task, or the time at * represent anything - for example a the priority of a task, or the time at
* which a task should be unblocked. * which a task should be unblocked.
* *
* \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
* \ingroup LinkedList * \ingroup LinkedList
*/ */
#define listGET_LIST_ITEM_VALUE( pxListItem ) ( ( pxListItem )->xItemValue ) #define listGET_LIST_ITEM_VALUE( pxListItem ) ( ( pxListItem )->xItemValue )
/* /*
* Access macro to retrieve the value of the list item at the head of a given * Access macro the retrieve the value of the list item at the head of a given
* list. * list.
* *
* \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE * \page listGET_LIST_ITEM_VALUE listGET_LIST_ITEM_VALUE
* \ingroup LinkedList * \ingroup LinkedList
*/ */
#define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue ) #define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( (&( ( pxList )->xListEnd ))->pxNext->xItemValue )
/*
* Return the list item at the head of the list.
*
* \page listGET_HEAD_ENTRY listGET_HEAD_ENTRY
* \ingroup LinkedList
*/
#define listGET_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext )
/*
* Return the list item at the head of the list.
*
* \page listGET_NEXT listGET_NEXT
* \ingroup LinkedList
*/
#define listGET_NEXT( pxListItem ) ( ( pxListItem )->pxNext )
/*
* Return the list item that marks the end of the list
*
* \page listGET_END_MARKER listGET_END_MARKER
* \ingroup LinkedList
*/
#define listGET_END_MARKER( pxList ) ( ( ListItem_t const * ) ( &( ( pxList )->xListEnd ) ) )
/* /*
* Access macro to determine if a list contains any items. The macro will * Access macro to determine if a list contains any items. The macro will
@ -247,19 +213,19 @@ typedef struct xLIST
* \page listLIST_IS_EMPTY listLIST_IS_EMPTY * \page listLIST_IS_EMPTY listLIST_IS_EMPTY
* \ingroup LinkedList * \ingroup LinkedList
*/ */
#define listLIST_IS_EMPTY( pxList ) ( ( ( pxList )->uxNumberOfItems == ( UBaseType_t ) 0 ) ? pdTRUE : pdFALSE ) #define listLIST_IS_EMPTY( pxList ) ( ( portBASE_TYPE ) ( ( pxList )->uxNumberOfItems == ( unsigned portBASE_TYPE ) 0 ) )
/* /*
* Access macro to return the number of items in the list. * Access macro to return the number of items in the list.
*/ */
#define listCURRENT_LIST_LENGTH( pxList ) ( ( pxList )->uxNumberOfItems ) #define listCURRENT_LIST_LENGTH( pxList ) ( ( pxList )->uxNumberOfItems )
/* /*
* Access function to obtain the owner of the next entry in a list. * Access function to obtain the owner of the next entry in a list.
* *
* The list member pxIndex is used to walk through a list. Calling * The list member pxIndex is used to walk through a list. Calling
* listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list * listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list
* and returns that entry's pxOwner parameter. Using multiple calls to this * and returns that entries pxOwner parameter. Using multiple calls to this
* function it is therefore possible to move through every item contained in * function it is therefore possible to move through every item contained in
* a list. * a list.
* *
@ -268,7 +234,6 @@ typedef struct xLIST
* The pxOwner parameter effectively creates a two way link between the list * The pxOwner parameter effectively creates a two way link between the list
* item and its owner. * item and its owner.
* *
* @param pxTCB pxTCB is set to the address of the owner of the next list item.
* @param pxList The list from which the next item owner is to be returned. * @param pxList The list from which the next item owner is to be returned.
* *
* \page listGET_OWNER_OF_NEXT_ENTRY listGET_OWNER_OF_NEXT_ENTRY * \page listGET_OWNER_OF_NEXT_ENTRY listGET_OWNER_OF_NEXT_ENTRY
@ -276,7 +241,7 @@ typedef struct xLIST
*/ */
#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \ #define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
{ \ { \
List_t * const pxConstList = ( pxList ); \ xList * const pxConstList = ( pxList ); \
/* Increment the index to the next item and return the item, ensuring */ \ /* Increment the index to the next item and return the item, ensuring */ \
/* we don't return the marker used at the end of the list. */ \ /* we don't return the marker used at the end of the list. */ \
( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \ ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \
@ -313,17 +278,18 @@ List_t * const pxConstList = ( pxList ); \
* *
* @param pxList The list we want to know if the list item is within. * @param pxList The list we want to know if the list item is within.
* @param pxListItem The list item we want to know if is in the list. * @param pxListItem The list item we want to know if is in the list.
* @return pdTRUE if the list item is in the list, otherwise pdFALSE. * @return pdTRUE is the list item is in the list, otherwise pdFALSE.
* pointer against
*/ */
#define listIS_CONTAINED_WITHIN( pxList, pxListItem ) ( ( ( pxListItem )->pxContainer == ( pxList ) ) ? ( pdTRUE ) : ( pdFALSE ) ) #define listIS_CONTAINED_WITHIN( pxList, pxListItem ) ( ( portBASE_TYPE ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) )
/* /*
* Return the list a list item is contained within (referenced from). * Return the list a list item is contained within (referenced from).
* *
* @param pxListItem The list item being queried. * @param pxListItem The list item being queried.
* @return A pointer to the List_t object that references the pxListItem * @return A pointer to the xList object that references the pxListItem
*/ */
#define listLIST_ITEM_CONTAINER( pxListItem ) ( ( pxListItem )->pxContainer ) #define listLIST_ITEM_CONTAINER( pxListItem ) ( ( pxListItem )->pvContainer )
/* /*
* This provides a crude means of knowing if a list has been initialised, as * This provides a crude means of knowing if a list has been initialised, as
@ -342,7 +308,7 @@ List_t * const pxConstList = ( pxList ); \
* \page vListInitialise vListInitialise * \page vListInitialise vListInitialise
* \ingroup LinkedList * \ingroup LinkedList
*/ */
void vListInitialise( List_t * const pxList ) PRIVILEGED_FUNCTION; void vListInitialise( xList * const pxList );
/* /*
* Must be called before a list item is used. This sets the list container to * Must be called before a list item is used. This sets the list container to
@ -353,7 +319,7 @@ void vListInitialise( List_t * const pxList ) PRIVILEGED_FUNCTION;
* \page vListInitialiseItem vListInitialiseItem * \page vListInitialiseItem vListInitialiseItem
* \ingroup LinkedList * \ingroup LinkedList
*/ */
void vListInitialiseItem( ListItem_t * const pxItem ) PRIVILEGED_FUNCTION; void vListInitialiseItem( xListItem * const pxItem );
/* /*
* Insert a list item into a list. The item will be inserted into the list in * Insert a list item into a list. The item will be inserted into the list in
@ -361,24 +327,24 @@ void vListInitialiseItem( ListItem_t * const pxItem ) PRIVILEGED_FUNCTION;
* *
* @param pxList The list into which the item is to be inserted. * @param pxList The list into which the item is to be inserted.
* *
* @param pxNewListItem The item that is to be placed in the list. * @param pxNewListItem The item to that is to be placed in the list.
* *
* \page vListInsert vListInsert * \page vListInsert vListInsert
* \ingroup LinkedList * \ingroup LinkedList
*/ */
void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIVILEGED_FUNCTION; void vListInsert( xList * const pxList, xListItem * const pxNewListItem );
/* /*
* Insert a list item into a list. The item will be inserted in a position * Insert a list item into a list. The item will be inserted in a position
* such that it will be the last item within the list returned by multiple * such that it will be the last item within the list returned by multiple
* calls to listGET_OWNER_OF_NEXT_ENTRY. * calls to listGET_OWNER_OF_NEXT_ENTRY.
* *
* The list member pxIndex is used to walk through a list. Calling * The list member pvIndex is used to walk through a list. Calling
* listGET_OWNER_OF_NEXT_ENTRY increments pxIndex to the next item in the list. * listGET_OWNER_OF_NEXT_ENTRY increments pvIndex to the next item in the list.
* Placing an item in a list using vListInsertEnd effectively places the item * Placing an item in a list using vListInsertEnd effectively places the item
* in the list position pointed to by pxIndex. This means that every other * in the list position pointed to by pvIndex. This means that every other
* item within the list will be returned by listGET_OWNER_OF_NEXT_ENTRY before * item within the list will be returned by listGET_OWNER_OF_NEXT_ENTRY before
* the pxIndex parameter again points to the item being inserted. * the pvIndex parameter again points to the item being inserted.
* *
* @param pxList The list into which the item is to be inserted. * @param pxList The list into which the item is to be inserted.
* *
@ -387,7 +353,7 @@ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIV
* \page vListInsertEnd vListInsertEnd * \page vListInsertEnd vListInsertEnd
* \ingroup LinkedList * \ingroup LinkedList
*/ */
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) PRIVILEGED_FUNCTION; void vListInsertEnd( xList * const pxList, xListItem * const pxNewListItem );
/* /*
* Remove an item from a list. The list item has a pointer to the list that * Remove an item from a list. The list item has a pointer to the list that
@ -402,7 +368,7 @@ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) P
* \page uxListRemove uxListRemove * \page uxListRemove uxListRemove
* \ingroup LinkedList * \ingroup LinkedList
*/ */
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) PRIVILEGED_FUNCTION; unsigned portBASE_TYPE uxListRemove( xListItem * const pxItemToRemove );
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -1,798 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
/*
* Message buffers build functionality on top of FreeRTOS stream buffers.
* Whereas stream buffers are used to send a continuous stream of data from one
* task or interrupt to another, message buffers are used to send variable
* length discrete messages from one task or interrupt to another. Their
* implementation is light weight, making them particularly suited for interrupt
* to task and core to core communication scenarios.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xMessageBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xMessageBufferRead()) inside a critical section and set the receive
* timeout to 0.
*
* Message buffers hold variable length messages. To enable that, when a
* message is written to the message buffer an additional sizeof( size_t ) bytes
* are also written to store the message's length (that happens internally, with
* the API function). sizeof( size_t ) is typically 4 bytes on a 32-bit
* architecture, so writing a 10 byte message to a message buffer on a 32-bit
* architecture will actually reduce the available space in the message buffer
* by 14 bytes (10 byte are used by the message, and 4 bytes to hold the length
* of the message).
*/
#ifndef FREERTOS_MESSAGE_BUFFER_H
#define FREERTOS_MESSAGE_BUFFER_H
/* Message buffers are built onto of stream buffers. */
#include "stream_buffer.h"
#if defined( __cplusplus )
extern "C" {
#endif
/**
* Type by which message buffers are referenced. For example, a call to
* xMessageBufferCreate() returns an MessageBufferHandle_t variable that can
* then be used as a parameter to xMessageBufferSend(), xMessageBufferReceive(),
* etc.
*/
typedef void * MessageBufferHandle_t;
/*-----------------------------------------------------------*/
/**
* message_buffer.h
*
<pre>
MessageBufferHandle_t xMessageBufferCreate( size_t xBufferSizeBytes );
</pre>
*
* Creates a new message buffer using dynamically allocated memory. See
* xMessageBufferCreateStatic() for a version that uses statically allocated
* memory (memory that is allocated at compile time).
*
* configSUPPORT_DYNAMIC_ALLOCATION must be set to 1 or left undefined in
* FreeRTOSConfig.h for xMessageBufferCreate() to be available.
*
* @param xBufferSizeBytes The total number of bytes (not messages) the message
* buffer will be able to hold at any one time. When a message is written to
* the message buffer an additional sizeof( size_t ) bytes are also written to
* store the message's length. sizeof( size_t ) is typically 4 bytes on a
* 32-bit architecture, so on most 32-bit architectures a 10 byte message will
* take up 14 bytes of message buffer space.
*
* @return If NULL is returned, then the message buffer cannot be created
* because there is insufficient heap memory available for FreeRTOS to allocate
* the message buffer data structures and storage area. A non-NULL value being
* returned indicates that the message buffer has been created successfully -
* the returned value should be stored as the handle to the created message
* buffer.
*
* Example use:
<pre>
void vAFunction( void )
{
MessageBufferHandle_t xMessageBuffer;
const size_t xMessageBufferSizeBytes = 100;
// Create a message buffer that can hold 100 bytes. The memory used to hold
// both the message buffer structure and the messages themselves is allocated
// dynamically. Each message added to the buffer consumes an additional 4
// bytes which are used to hold the lengh of the message.
xMessageBuffer = xMessageBufferCreate( xMessageBufferSizeBytes );
if( xMessageBuffer == NULL )
{
// There was not enough heap memory space available to create the
// message buffer.
}
else
{
// The message buffer was created successfully and can now be used.
}
</pre>
* \defgroup xMessageBufferCreate xMessageBufferCreate
* \ingroup MessageBufferManagement
*/
#define xMessageBufferCreate( xBufferSizeBytes ) ( MessageBufferHandle_t ) xStreamBufferGenericCreate( xBufferSizeBytes, ( size_t ) 0, pdTRUE )
/**
* message_buffer.h
*
<pre>
MessageBufferHandle_t xMessageBufferCreateStatic( size_t xBufferSizeBytes,
uint8_t *pucMessageBufferStorageArea,
StaticMessageBuffer_t *pxStaticMessageBuffer );
</pre>
* Creates a new message buffer using statically allocated memory. See
* xMessageBufferCreate() for a version that uses dynamically allocated memory.
*
* @param xBufferSizeBytes The size, in bytes, of the buffer pointed to by the
* pucMessageBufferStorageArea parameter. When a message is written to the
* message buffer an additional sizeof( size_t ) bytes are also written to store
* the message's length. sizeof( size_t ) is typically 4 bytes on a 32-bit
* architecture, so on most 32-bit architecture a 10 byte message will take up
* 14 bytes of message buffer space. The maximum number of bytes that can be
* stored in the message buffer is actually (xBufferSizeBytes - 1).
*
* @param pucMessageBufferStorageArea Must point to a uint8_t array that is at
* least xBufferSizeBytes + 1 big. This is the array to which messages are
* copied when they are written to the message buffer.
*
* @param pxStaticMessageBuffer Must point to a variable of type
* StaticMessageBuffer_t, which will be used to hold the message buffer's data
* structure.
*
* @return If the message buffer is created successfully then a handle to the
* created message buffer is returned. If either pucMessageBufferStorageArea or
* pxStaticmessageBuffer are NULL then NULL is returned.
*
* Example use:
<pre>
// Used to dimension the array used to hold the messages. The available space
// will actually be one less than this, so 999.
#define STORAGE_SIZE_BYTES 1000
// Defines the memory that will actually hold the messages within the message
// buffer.
static uint8_t ucStorageBuffer[ STORAGE_SIZE_BYTES ];
// The variable used to hold the message buffer structure.
StaticMessageBuffer_t xMessageBufferStruct;
void MyFunction( void )
{
MessageBufferHandle_t xMessageBuffer;
xMessageBuffer = xMessageBufferCreateStatic( sizeof( ucBufferStorage ),
ucBufferStorage,
&xMessageBufferStruct );
// As neither the pucMessageBufferStorageArea or pxStaticMessageBuffer
// parameters were NULL, xMessageBuffer will not be NULL, and can be used to
// reference the created message buffer in other message buffer API calls.
// Other code that uses the message buffer can go here.
}
</pre>
* \defgroup xMessageBufferCreateStatic xMessageBufferCreateStatic
* \ingroup MessageBufferManagement
*/
#define xMessageBufferCreateStatic( xBufferSizeBytes, pucMessageBufferStorageArea, pxStaticMessageBuffer ) ( MessageBufferHandle_t ) xStreamBufferGenericCreateStatic( xBufferSizeBytes, 0, pdTRUE, pucMessageBufferStorageArea, pxStaticMessageBuffer )
/**
* message_buffer.h
*
<pre>
size_t xMessageBufferSend( MessageBufferHandle_t xMessageBuffer,
const void *pvTxData,
size_t xDataLengthBytes,
TickType_t xTicksToWait );
<pre>
*
* Sends a discrete message to the message buffer. The message can be any
* length that fits within the buffer's free space, and is copied into the
* buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xMessageBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xMessageBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xMessageBufferSend() to write to a message buffer from a task. Use
* xMessageBufferSendFromISR() to write to a message buffer from an interrupt
* service routine (ISR).
*
* @param xMessageBuffer The handle of the message buffer to which a message is
* being sent.
*
* @param pvTxData A pointer to the message that is to be copied into the
* message buffer.
*
* @param xDataLengthBytes The length of the message. That is, the number of
* bytes to copy from pvTxData into the message buffer. When a message is
* written to the message buffer an additional sizeof( size_t ) bytes are also
* written to store the message's length. sizeof( size_t ) is typically 4 bytes
* on a 32-bit architecture, so on most 32-bit architecture setting
* xDataLengthBytes to 20 will reduce the free space in the message buffer by 24
* bytes (20 bytes of message data and 4 bytes to hold the message length).
*
* @param xTicksToWait The maximum amount of time the calling task should remain
* in the Blocked state to wait for enough space to become available in the
* message buffer, should the message buffer have insufficient space when
* xMessageBufferSend() is called. The calling task will never block if
* xTicksToWait is zero. The block time is specified in tick periods, so the
* absolute time it represents is dependent on the tick frequency. The macro
* pdMS_TO_TICKS() can be used to convert a time specified in milliseconds into
* a time specified in ticks. Setting xTicksToWait to portMAX_DELAY will cause
* the task to wait indefinitely (without timing out), provided
* INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h. Tasks do not use any
* CPU time when they are in the Blocked state.
*
* @return The number of bytes written to the message buffer. If the call to
* xMessageBufferSend() times out before there was enough space to write the
* message into the message buffer then zero is returned. If the call did not
* time out then xDataLengthBytes is returned.
*
* Example use:
<pre>
void vAFunction( MessageBufferHandle_t xMessageBuffer )
{
size_t xBytesSent;
uint8_t ucArrayToSend[] = { 0, 1, 2, 3 };
char *pcStringToSend = "String to send";
const TickType_t x100ms = pdMS_TO_TICKS( 100 );
// Send an array to the message buffer, blocking for a maximum of 100ms to
// wait for enough space to be available in the message buffer.
xBytesSent = xMessageBufferSend( xMessageBuffer, ( void * ) ucArrayToSend, sizeof( ucArrayToSend ), x100ms );
if( xBytesSent != sizeof( ucArrayToSend ) )
{
// The call to xMessageBufferSend() times out before there was enough
// space in the buffer for the data to be written.
}
// Send the string to the message buffer. Return immediately if there is
// not enough space in the buffer.
xBytesSent = xMessageBufferSend( xMessageBuffer, ( void * ) pcStringToSend, strlen( pcStringToSend ), 0 );
if( xBytesSent != strlen( pcStringToSend ) )
{
// The string could not be added to the message buffer because there was
// not enough free space in the buffer.
}
}
</pre>
* \defgroup xMessageBufferSend xMessageBufferSend
* \ingroup MessageBufferManagement
*/
#define xMessageBufferSend( xMessageBuffer, pvTxData, xDataLengthBytes, xTicksToWait ) xStreamBufferSend( ( StreamBufferHandle_t ) xMessageBuffer, pvTxData, xDataLengthBytes, xTicksToWait )
/**
* message_buffer.h
*
<pre>
size_t xMessageBufferSendFromISR( MessageBufferHandle_t xMessageBuffer,
const void *pvTxData,
size_t xDataLengthBytes,
BaseType_t *pxHigherPriorityTaskWoken );
<pre>
*
* Interrupt safe version of the API function that sends a discrete message to
* the message buffer. The message can be any length that fits within the
* buffer's free space, and is copied into the buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xMessageBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xMessageBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xMessageBufferSend() to write to a message buffer from a task. Use
* xMessageBufferSendFromISR() to write to a message buffer from an interrupt
* service routine (ISR).
*
* @param xMessageBuffer The handle of the message buffer to which a message is
* being sent.
*
* @param pvTxData A pointer to the message that is to be copied into the
* message buffer.
*
* @param xDataLengthBytes The length of the message. That is, the number of
* bytes to copy from pvTxData into the message buffer. When a message is
* written to the message buffer an additional sizeof( size_t ) bytes are also
* written to store the message's length. sizeof( size_t ) is typically 4 bytes
* on a 32-bit architecture, so on most 32-bit architecture setting
* xDataLengthBytes to 20 will reduce the free space in the message buffer by 24
* bytes (20 bytes of message data and 4 bytes to hold the message length).
*
* @param pxHigherPriorityTaskWoken It is possible that a message buffer will
* have a task blocked on it waiting for data. Calling
* xMessageBufferSendFromISR() can make data available, and so cause a task that
* was waiting for data to leave the Blocked state. If calling
* xMessageBufferSendFromISR() causes a task to leave the Blocked state, and the
* unblocked task has a priority higher than the currently executing task (the
* task that was interrupted), then, internally, xMessageBufferSendFromISR()
* will set *pxHigherPriorityTaskWoken to pdTRUE. If
* xMessageBufferSendFromISR() sets this value to pdTRUE, then normally a
* context switch should be performed before the interrupt is exited. This will
* ensure that the interrupt returns directly to the highest priority Ready
* state task. *pxHigherPriorityTaskWoken should be set to pdFALSE before it
* is passed into the function. See the code example below for an example.
*
* @return The number of bytes actually written to the message buffer. If the
* message buffer didn't have enough free space for the message to be stored
* then 0 is returned, otherwise xDataLengthBytes is returned.
*
* Example use:
<pre>
// A message buffer that has already been created.
MessageBufferHandle_t xMessageBuffer;
void vAnInterruptServiceRoutine( void )
{
size_t xBytesSent;
char *pcStringToSend = "String to send";
BaseType_t xHigherPriorityTaskWoken = pdFALSE; // Initialised to pdFALSE.
// Attempt to send the string to the message buffer.
xBytesSent = xMessageBufferSendFromISR( xMessageBuffer,
( void * ) pcStringToSend,
strlen( pcStringToSend ),
&xHigherPriorityTaskWoken );
if( xBytesSent != strlen( pcStringToSend ) )
{
// The string could not be added to the message buffer because there was
// not enough free space in the buffer.
}
// If xHigherPriorityTaskWoken was set to pdTRUE inside
// xMessageBufferSendFromISR() then a task that has a priority above the
// priority of the currently executing task was unblocked and a context
// switch should be performed to ensure the ISR returns to the unblocked
// task. In most FreeRTOS ports this is done by simply passing
// xHigherPriorityTaskWoken into taskYIELD_FROM_ISR(), which will test the
// variables value, and perform the context switch if necessary. Check the
// documentation for the port in use for port specific instructions.
taskYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
</pre>
* \defgroup xMessageBufferSendFromISR xMessageBufferSendFromISR
* \ingroup MessageBufferManagement
*/
#define xMessageBufferSendFromISR( xMessageBuffer, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken ) xStreamBufferSendFromISR( ( StreamBufferHandle_t ) xMessageBuffer, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken )
/**
* message_buffer.h
*
<pre>
size_t xMessageBufferReceive( MessageBufferHandle_t xMessageBuffer,
void *pvRxData,
size_t xBufferLengthBytes,
TickType_t xTicksToWait );
</pre>
*
* Receives a discrete message from a message buffer. Messages can be of
* variable length and are copied out of the buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xMessageBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xMessageBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xMessageBufferReceive() to read from a message buffer from a task. Use
* xMessageBufferReceiveFromISR() to read from a message buffer from an
* interrupt service routine (ISR).
*
* @param xMessageBuffer The handle of the message buffer from which a message
* is being received.
*
* @param pvRxData A pointer to the buffer into which the received message is
* to be copied.
*
* @param xBufferLengthBytes The length of the buffer pointed to by the pvRxData
* parameter. This sets the maximum length of the message that can be received.
* If xBufferLengthBytes is too small to hold the next message then the message
* will be left in the message buffer and 0 will be returned.
*
* @param xTicksToWait The maximum amount of time the task should remain in the
* Blocked state to wait for a message, should the message buffer be empty.
* xMessageBufferReceive() will return immediately if xTicksToWait is zero and
* the message buffer is empty. The block time is specified in tick periods, so
* the absolute time it represents is dependent on the tick frequency. The
* macro pdMS_TO_TICKS() can be used to convert a time specified in milliseconds
* into a time specified in ticks. Setting xTicksToWait to portMAX_DELAY will
* cause the task to wait indefinitely (without timing out), provided
* INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h. Tasks do not use any
* CPU time when they are in the Blocked state.
*
* @return The length, in bytes, of the message read from the message buffer, if
* any. If xMessageBufferReceive() times out before a message became available
* then zero is returned. If the length of the message is greater than
* xBufferLengthBytes then the message will be left in the message buffer and
* zero is returned.
*
* Example use:
<pre>
void vAFunction( MessageBuffer_t xMessageBuffer )
{
uint8_t ucRxData[ 20 ];
size_t xReceivedBytes;
const TickType_t xBlockTime = pdMS_TO_TICKS( 20 );
// Receive the next message from the message buffer. Wait in the Blocked
// state (so not using any CPU processing time) for a maximum of 100ms for
// a message to become available.
xReceivedBytes = xMessageBufferReceive( xMessageBuffer,
( void * ) ucRxData,
sizeof( ucRxData ),
xBlockTime );
if( xReceivedBytes > 0 )
{
// A ucRxData contains a message that is xReceivedBytes long. Process
// the message here....
}
}
</pre>
* \defgroup xMessageBufferReceive xMessageBufferReceive
* \ingroup MessageBufferManagement
*/
#define xMessageBufferReceive( xMessageBuffer, pvRxData, xBufferLengthBytes, xTicksToWait ) xStreamBufferReceive( ( StreamBufferHandle_t ) xMessageBuffer, pvRxData, xBufferLengthBytes, xTicksToWait )
/**
* message_buffer.h
*
<pre>
size_t xMessageBufferReceiveFromISR( MessageBufferHandle_t xMessageBuffer,
void *pvRxData,
size_t xBufferLengthBytes,
BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* An interrupt safe version of the API function that receives a discrete
* message from a message buffer. Messages can be of variable length and are
* copied out of the buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xMessageBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xMessageBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xMessageBufferReceive() to read from a message buffer from a task. Use
* xMessageBufferReceiveFromISR() to read from a message buffer from an
* interrupt service routine (ISR).
*
* @param xMessageBuffer The handle of the message buffer from which a message
* is being received.
*
* @param pvRxData A pointer to the buffer into which the received message is
* to be copied.
*
* @param xBufferLengthBytes The length of the buffer pointed to by the pvRxData
* parameter. This sets the maximum length of the message that can be received.
* If xBufferLengthBytes is too small to hold the next message then the message
* will be left in the message buffer and 0 will be returned.
*
* @param pxHigherPriorityTaskWoken It is possible that a message buffer will
* have a task blocked on it waiting for space to become available. Calling
* xMessageBufferReceiveFromISR() can make space available, and so cause a task
* that is waiting for space to leave the Blocked state. If calling
* xMessageBufferReceiveFromISR() causes a task to leave the Blocked state, and
* the unblocked task has a priority higher than the currently executing task
* (the task that was interrupted), then, internally,
* xMessageBufferReceiveFromISR() will set *pxHigherPriorityTaskWoken to pdTRUE.
* If xMessageBufferReceiveFromISR() sets this value to pdTRUE, then normally a
* context switch should be performed before the interrupt is exited. That will
* ensure the interrupt returns directly to the highest priority Ready state
* task. *pxHigherPriorityTaskWoken should be set to pdFALSE before it is
* passed into the function. See the code example below for an example.
*
* @return The length, in bytes, of the message read from the message buffer, if
* any.
*
* Example use:
<pre>
// A message buffer that has already been created.
MessageBuffer_t xMessageBuffer;
void vAnInterruptServiceRoutine( void )
{
uint8_t ucRxData[ 20 ];
size_t xReceivedBytes;
BaseType_t xHigherPriorityTaskWoken = pdFALSE; // Initialised to pdFALSE.
// Receive the next message from the message buffer.
xReceivedBytes = xMessageBufferReceiveFromISR( xMessageBuffer,
( void * ) ucRxData,
sizeof( ucRxData ),
&xHigherPriorityTaskWoken );
if( xReceivedBytes > 0 )
{
// A ucRxData contains a message that is xReceivedBytes long. Process
// the message here....
}
// If xHigherPriorityTaskWoken was set to pdTRUE inside
// xMessageBufferReceiveFromISR() then a task that has a priority above the
// priority of the currently executing task was unblocked and a context
// switch should be performed to ensure the ISR returns to the unblocked
// task. In most FreeRTOS ports this is done by simply passing
// xHigherPriorityTaskWoken into taskYIELD_FROM_ISR(), which will test the
// variables value, and perform the context switch if necessary. Check the
// documentation for the port in use for port specific instructions.
taskYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
</pre>
* \defgroup xMessageBufferReceiveFromISR xMessageBufferReceiveFromISR
* \ingroup MessageBufferManagement
*/
#define xMessageBufferReceiveFromISR( xMessageBuffer, pvRxData, xBufferLengthBytes, pxHigherPriorityTaskWoken ) xStreamBufferReceiveFromISR( ( StreamBufferHandle_t ) xMessageBuffer, pvRxData, xBufferLengthBytes, pxHigherPriorityTaskWoken )
/**
* message_buffer.h
*
<pre>
void vMessageBufferDelete( MessageBufferHandle_t xMessageBuffer );
</pre>
*
* Deletes a message buffer that was previously created using a call to
* xMessageBufferCreate() or xMessageBufferCreateStatic(). If the message
* buffer was created using dynamic memory (that is, by xMessageBufferCreate()),
* then the allocated memory is freed.
*
* A message buffer handle must not be used after the message buffer has been
* deleted.
*
* @param xMessageBuffer The handle of the message buffer to be deleted.
*
*/
#define vMessageBufferDelete( xMessageBuffer ) vStreamBufferDelete( ( StreamBufferHandle_t ) xMessageBuffer )
/**
* message_buffer.h
<pre>
BaseType_t xMessageBufferIsFull( MessageBufferHandle_t xMessageBuffer ) );
</pre>
*
* Tests to see if a message buffer is full. A message buffer is full if it
* cannot accept any more messages, of any size, until space is made available
* by a message being removed from the message buffer.
*
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return If the message buffer referenced by xMessageBuffer is full then
* pdTRUE is returned. Otherwise pdFALSE is returned.
*/
#define xMessageBufferIsFull( xMessageBuffer ) xStreamBufferIsFull( ( StreamBufferHandle_t ) xMessageBuffer )
/**
* message_buffer.h
<pre>
BaseType_t xMessageBufferIsEmpty( MessageBufferHandle_t xMessageBuffer ) );
</pre>
*
* Tests to see if a message buffer is empty (does not contain any messages).
*
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return If the message buffer referenced by xMessageBuffer is empty then
* pdTRUE is returned. Otherwise pdFALSE is returned.
*
*/
#define xMessageBufferIsEmpty( xMessageBuffer ) xStreamBufferIsEmpty( ( StreamBufferHandle_t ) xMessageBuffer )
/**
* message_buffer.h
<pre>
BaseType_t xMessageBufferReset( MessageBufferHandle_t xMessageBuffer );
</pre>
*
* Resets a message buffer to its initial empty state, discarding any message it
* contained.
*
* A message buffer can only be reset if there are no tasks blocked on it.
*
* @param xMessageBuffer The handle of the message buffer being reset.
*
* @return If the message buffer was reset then pdPASS is returned. If the
* message buffer could not be reset because either there was a task blocked on
* the message queue to wait for space to become available, or to wait for a
* a message to be available, then pdFAIL is returned.
*
* \defgroup xMessageBufferReset xMessageBufferReset
* \ingroup MessageBufferManagement
*/
#define xMessageBufferReset( xMessageBuffer ) xStreamBufferReset( ( StreamBufferHandle_t ) xMessageBuffer )
/**
* message_buffer.h
<pre>
size_t xMessageBufferSpaceAvailable( MessageBufferHandle_t xMessageBuffer ) );
</pre>
* Returns the number of bytes of free space in the message buffer.
*
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return The number of bytes that can be written to the message buffer before
* the message buffer would be full. When a message is written to the message
* buffer an additional sizeof( size_t ) bytes are also written to store the
* message's length. sizeof( size_t ) is typically 4 bytes on a 32-bit
* architecture, so if xMessageBufferSpacesAvailable() returns 10, then the size
* of the largest message that can be written to the message buffer is 6 bytes.
*
* \defgroup xMessageBufferSpaceAvailable xMessageBufferSpaceAvailable
* \ingroup MessageBufferManagement
*/
#define xMessageBufferSpaceAvailable( xMessageBuffer ) xStreamBufferSpacesAvailable( ( StreamBufferHandle_t ) xMessageBuffer )
/**
* message_buffer.h
<pre>
size_t xMessageBufferNextLengthBytes( MessageBufferHandle_t xMessageBuffer ) );
</pre>
* Returns the length (in bytes) of the next message in a message buffer.
* Useful if xMessageBufferReceive() returned 0 because the size of the buffer
* passed into xMessageBufferReceive() was too small to hold the next message.
*
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return The length (in bytes) of the next message in the message buffer, or 0
* if the message buffer is empty.
*
* \defgroup xMessageBufferNextLengthBytes xMessageBufferNextLengthBytes
* \ingroup MessageBufferManagement
*/
#define xMessageBufferNextLengthBytes( xMessageBuffer ) xStreamBufferNextMessageLengthBytes( ( StreamBufferHandle_t ) xMessageBuffer ) PRIVILEGED_FUNCTION;
/**
* message_buffer.h
*
<pre>
BaseType_t xMessageBufferSendCompletedFromISR( MessageBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* For advanced users only.
*
* The sbSEND_COMPLETED() macro is called from within the FreeRTOS APIs when
* data is sent to a message buffer or stream buffer. If there was a task that
* was blocked on the message or stream buffer waiting for data to arrive then
* the sbSEND_COMPLETED() macro sends a notification to the task to remove it
* from the Blocked state. xMessageBufferSendCompletedFromISR() does the same
* thing. It is provided to enable application writers to implement their own
* version of sbSEND_COMPLETED(), and MUST NOT BE USED AT ANY OTHER TIME.
*
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
* @param xStreamBuffer The handle of the stream buffer to which data was
* written.
*
* @param pxHigherPriorityTaskWoken *pxHigherPriorityTaskWoken should be
* initialised to pdFALSE before it is passed into
* xMessageBufferSendCompletedFromISR(). If calling
* xMessageBufferSendCompletedFromISR() removes a task from the Blocked state,
* and the task has a priority above the priority of the currently running task,
* then *pxHigherPriorityTaskWoken will get set to pdTRUE indicating that a
* context switch should be performed before exiting the ISR.
*
* @return If a task was removed from the Blocked state then pdTRUE is returned.
* Otherwise pdFALSE is returned.
*
* \defgroup xMessageBufferSendCompletedFromISR xMessageBufferSendCompletedFromISR
* \ingroup StreamBufferManagement
*/
#define xMessageBufferSendCompletedFromISR( xMessageBuffer, pxHigherPriorityTaskWoken ) xStreamBufferSendCompletedFromISR( ( StreamBufferHandle_t ) xMessageBuffer, pxHigherPriorityTaskWoken )
/**
* message_buffer.h
*
<pre>
BaseType_t xMessageBufferReceiveCompletedFromISR( MessageBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* For advanced users only.
*
* The sbRECEIVE_COMPLETED() macro is called from within the FreeRTOS APIs when
* data is read out of a message buffer or stream buffer. If there was a task
* that was blocked on the message or stream buffer waiting for data to arrive
* then the sbRECEIVE_COMPLETED() macro sends a notification to the task to
* remove it from the Blocked state. xMessageBufferReceiveCompletedFromISR()
* does the same thing. It is provided to enable application writers to
* implement their own version of sbRECEIVE_COMPLETED(), and MUST NOT BE USED AT
* ANY OTHER TIME.
*
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
* @param xStreamBuffer The handle of the stream buffer from which data was
* read.
*
* @param pxHigherPriorityTaskWoken *pxHigherPriorityTaskWoken should be
* initialised to pdFALSE before it is passed into
* xMessageBufferReceiveCompletedFromISR(). If calling
* xMessageBufferReceiveCompletedFromISR() removes a task from the Blocked state,
* and the task has a priority above the priority of the currently running task,
* then *pxHigherPriorityTaskWoken will get set to pdTRUE indicating that a
* context switch should be performed before exiting the ISR.
*
* @return If a task was removed from the Blocked state then pdTRUE is returned.
* Otherwise pdFALSE is returned.
*
* \defgroup xMessageBufferReceiveCompletedFromISR xMessageBufferReceiveCompletedFromISR
* \ingroup StreamBufferManagement
*/
#define xMessageBufferReceiveCompletedFromISR( xMessageBuffer, pxHigherPriorityTaskWoken ) xStreamBufferReceiveCompletedFromISR( ( StreamBufferHandle_t ) xMessageBuffer, pxHigherPriorityTaskWoken )
#if defined( __cplusplus )
} /* extern "C" */
#endif
#endif /* !defined( FREERTOS_MESSAGE_BUFFER_H ) */

View file

@ -1,157 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
/*
* When the MPU is used the standard (non MPU) API functions are mapped to
* equivalents that start "MPU_", the prototypes for which are defined in this
* header files. This will cause the application code to call the MPU_ version
* which wraps the non-MPU version with privilege promoting then demoting code,
* so the kernel code always runs will full privileges.
*/
#ifndef MPU_PROTOTYPES_H
#define MPU_PROTOTYPES_H
/* MPU versions of tasks.h API functions. */
BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode, const char * const pcName, const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskCreateRestricted( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskCreateRestrictedStatic( const TaskParameters_t * const pxTaskDefinition, TaskHandle_t *pxCreatedTask ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskAllocateMPURegions( TaskHandle_t xTask, const MemoryRegion_t * const pxRegions ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskDelete( TaskHandle_t xTaskToDelete ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskDelay( const TickType_t xTicksToDelay ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskAbortDelay( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxTaskPriorityGet( const TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
eTaskState MPU_eTaskGetState( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskSuspend( TaskHandle_t xTaskToSuspend ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskResume( TaskHandle_t xTaskToResume ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskStartScheduler( void ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskSuspendAll( void ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskResumeAll( void ) FREERTOS_SYSTEM_CALL;
TickType_t MPU_xTaskGetTickCount( void ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxTaskGetNumberOfTasks( void ) FREERTOS_SYSTEM_CALL;
char * MPU_pcTaskGetName( TaskHandle_t xTaskToQuery ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xTaskGetHandle( const char *pcNameToQuery ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
configSTACK_DEPTH_TYPE MPU_uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction ) FREERTOS_SYSTEM_CALL;
TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue ) FREERTOS_SYSTEM_CALL;
void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xTaskGetIdleTaskHandle( void ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray, const UBaseType_t uxArraySize, uint32_t * const pulTotalRunTime ) FREERTOS_SYSTEM_CALL;
TickType_t MPU_xTaskGetIdleRunTimeCounter( void ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskList( char * pcWriteBuffer ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskGetRunTimeStats( char *pcWriteBuffer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskNotifyStateClear( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskIncrementTick( void ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) FREERTOS_SYSTEM_CALL;
void MPU_vTaskMissedYield( void ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTaskGetSchedulerState( void ) FREERTOS_SYSTEM_CALL;
/* MPU versions of queue.h API functions. */
BaseType_t MPU_xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueuePeek( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxQueueMessagesWaiting( const QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxQueueSpacesAvailable( const QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
void MPU_vQueueDelete( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
QueueHandle_t MPU_xQueueCreateMutex( const uint8_t ucQueueType ) FREERTOS_SYSTEM_CALL;
QueueHandle_t MPU_xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) FREERTOS_SYSTEM_CALL;
QueueHandle_t MPU_xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) FREERTOS_SYSTEM_CALL;
QueueHandle_t MPU_xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) FREERTOS_SYSTEM_CALL;
void MPU_vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName ) FREERTOS_SYSTEM_CALL;
void MPU_vQueueUnregisterQueue( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
const char * MPU_pcQueueGetName( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
QueueHandle_t MPU_xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) FREERTOS_SYSTEM_CALL;
QueueHandle_t MPU_xQueueGenericCreateStatic( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t *pucQueueStorage, StaticQueue_t *pxStaticQueue, const uint8_t ucQueueType ) FREERTOS_SYSTEM_CALL;
QueueSetHandle_t MPU_xQueueCreateSet( const UBaseType_t uxEventQueueLength ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueAddToSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueRemoveFromSet( QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet ) FREERTOS_SYSTEM_CALL;
QueueSetMemberHandle_t MPU_xQueueSelectFromSet( QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) FREERTOS_SYSTEM_CALL;
void MPU_vQueueSetQueueNumber( QueueHandle_t xQueue, UBaseType_t uxQueueNumber ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxQueueGetQueueNumber( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
uint8_t MPU_ucQueueGetQueueType( QueueHandle_t xQueue ) FREERTOS_SYSTEM_CALL;
/* MPU versions of timers.h API functions. */
TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) FREERTOS_SYSTEM_CALL;
TimerHandle_t MPU_xTimerCreateStatic( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer ) FREERTOS_SYSTEM_CALL;
void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
void MPU_vTimerSetTimerID( TimerHandle_t xTimer, void *pvNewID ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTimerIsTimerActive( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload ) FREERTOS_SYSTEM_CALL;
TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTimerCreateTimerTask( void ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
/* MPU versions of event_group.h API functions. */
EventGroupHandle_t MPU_xEventGroupCreate( void ) FREERTOS_SYSTEM_CALL;
EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t *pxEventGroupBuffer ) FREERTOS_SYSTEM_CALL;
EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear ) FREERTOS_SYSTEM_CALL;
EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet ) FREERTOS_SYSTEM_CALL;
EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet, const EventBits_t uxBitsToWaitFor, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup ) FREERTOS_SYSTEM_CALL;
UBaseType_t MPU_uxEventGroupGetNumber( void* xEventGroup ) FREERTOS_SYSTEM_CALL;
/* MPU versions of message/stream_buffer.h API functions. */
size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;
size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, size_t xTriggerLevel ) FREERTOS_SYSTEM_CALL;
StreamBufferHandle_t MPU_xStreamBufferGenericCreate( size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer ) FREERTOS_SYSTEM_CALL;
StreamBufferHandle_t MPU_xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer, uint8_t * const pucStreamBufferStorageArea, StaticStreamBuffer_t * const pxStaticStreamBuffer ) FREERTOS_SYSTEM_CALL;
#endif /* MPU_PROTOTYPES_H */

View file

@ -1,29 +1,66 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#ifndef MPU_WRAPPERS_H #ifndef MPU_WRAPPERS_H
#define MPU_WRAPPERS_H #define MPU_WRAPPERS_H
@ -37,138 +74,68 @@ only for ports that are using the MPU. */
those files. */ those files. */
#ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE #ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
/* #define xTaskGenericCreate MPU_xTaskGenericCreate
* Map standard (non MPU) API functions to equivalents that start #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions
* "MPU_". This will cause the application code to call the MPU_ #define vTaskDelete MPU_vTaskDelete
* version, which wraps the non-MPU version with privilege promoting #define vTaskDelayUntil MPU_vTaskDelayUntil
* then demoting code, so the kernel code always runs will full #define vTaskDelay MPU_vTaskDelay
* privileges. #define uxTaskPriorityGet MPU_uxTaskPriorityGet
*/ #define vTaskPrioritySet MPU_vTaskPrioritySet
#define eTaskGetState MPU_eTaskGetState
#define vTaskSuspend MPU_vTaskSuspend
#define xTaskIsTaskSuspended MPU_xTaskIsTaskSuspended
#define vTaskResume MPU_vTaskResume
#define vTaskSuspendAll MPU_vTaskSuspendAll
#define xTaskResumeAll MPU_xTaskResumeAll
#define xTaskGetTickCount MPU_xTaskGetTickCount
#define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks
#define vTaskList MPU_vTaskList
#define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats
#define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
#define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
#define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
#define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark
#define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle
#define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
#define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
#define uxTaskGetSystemState MPU_uxTaskGetSystemState
/* Map standard tasks.h API functions to the MPU equivalents. */ #define xQueueGenericCreate MPU_xQueueGenericCreate
#define xTaskCreate MPU_xTaskCreate #define xQueueCreateMutex MPU_xQueueCreateMutex
#define xTaskCreateStatic MPU_xTaskCreateStatic #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive
#define xTaskCreateRestricted MPU_xTaskCreateRestricted #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive
#define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore
#define vTaskDelete MPU_vTaskDelete #define xQueueGenericSend MPU_xQueueGenericSend
#define vTaskDelay MPU_vTaskDelay #define xQueueAltGenericSend MPU_xQueueAltGenericSend
#define vTaskDelayUntil MPU_vTaskDelayUntil #define xQueueAltGenericReceive MPU_xQueueAltGenericReceive
#define xTaskAbortDelay MPU_xTaskAbortDelay #define xQueueGenericReceive MPU_xQueueGenericReceive
#define uxTaskPriorityGet MPU_uxTaskPriorityGet #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting
#define eTaskGetState MPU_eTaskGetState #define vQueueDelete MPU_vQueueDelete
#define vTaskGetInfo MPU_vTaskGetInfo #define xQueueGenericReset MPU_xQueueGenericReset
#define vTaskPrioritySet MPU_vTaskPrioritySet #define xQueueCreateSet MPU_xQueueCreateSet
#define vTaskSuspend MPU_vTaskSuspend #define xQueueSelectFromSet MPU_xQueueSelectFromSet
#define vTaskResume MPU_vTaskResume #define xQueueAddToSet MPU_xQueueAddToSet
#define vTaskSuspendAll MPU_vTaskSuspendAll #define xQueueRemoveFromSet MPU_xQueueRemoveFromSet
#define xTaskResumeAll MPU_xTaskResumeAll #define xQueuePeekFromISR MPU_xQueuePeekFromISR
#define xTaskGetTickCount MPU_xTaskGetTickCount
#define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks
#define pcTaskGetName MPU_pcTaskGetName
#define xTaskGetHandle MPU_xTaskGetHandle
#define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark
#define uxTaskGetStackHighWaterMark2 MPU_uxTaskGetStackHighWaterMark2
#define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
#define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
#define vTaskSetThreadLocalStoragePointer MPU_vTaskSetThreadLocalStoragePointer
#define pvTaskGetThreadLocalStoragePointer MPU_pvTaskGetThreadLocalStoragePointer
#define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
#define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
#define uxTaskGetSystemState MPU_uxTaskGetSystemState
#define vTaskList MPU_vTaskList
#define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats
#define xTaskGetIdleRunTimeCounter MPU_xTaskGetIdleRunTimeCounter
#define xTaskGenericNotify MPU_xTaskGenericNotify
#define xTaskNotifyWait MPU_xTaskNotifyWait
#define ulTaskNotifyTake MPU_ulTaskNotifyTake
#define xTaskNotifyStateClear MPU_xTaskNotifyStateClear
#define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle #define pvPortMalloc MPU_pvPortMalloc
#define vTaskSetTimeOutState MPU_vTaskSetTimeOutState #define vPortFree MPU_vPortFree
#define xTaskCheckForTimeOut MPU_xTaskCheckForTimeOut #define xPortGetFreeHeapSize MPU_xPortGetFreeHeapSize
#define xTaskGetSchedulerState MPU_xTaskGetSchedulerState #define vPortInitialiseBlocks MPU_vPortInitialiseBlocks
/* Map standard queue.h API functions to the MPU equivalents. */ #if configQUEUE_REGISTRY_SIZE > 0
#define xQueueGenericSend MPU_xQueueGenericSend #define vQueueAddToRegistry MPU_vQueueAddToRegistry
#define xQueueReceive MPU_xQueueReceive #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue
#define xQueuePeek MPU_xQueuePeek
#define xQueueSemaphoreTake MPU_xQueueSemaphoreTake
#define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting
#define uxQueueSpacesAvailable MPU_uxQueueSpacesAvailable
#define vQueueDelete MPU_vQueueDelete
#define xQueueCreateMutex MPU_xQueueCreateMutex
#define xQueueCreateMutexStatic MPU_xQueueCreateMutexStatic
#define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore
#define xQueueCreateCountingSemaphoreStatic MPU_xQueueCreateCountingSemaphoreStatic
#define xQueueGetMutexHolder MPU_xQueueGetMutexHolder
#define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive
#define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive
#define xQueueGenericCreate MPU_xQueueGenericCreate
#define xQueueGenericCreateStatic MPU_xQueueGenericCreateStatic
#define xQueueCreateSet MPU_xQueueCreateSet
#define xQueueAddToSet MPU_xQueueAddToSet
#define xQueueRemoveFromSet MPU_xQueueRemoveFromSet
#define xQueueSelectFromSet MPU_xQueueSelectFromSet
#define xQueueGenericReset MPU_xQueueGenericReset
#if( configQUEUE_REGISTRY_SIZE > 0 )
#define vQueueAddToRegistry MPU_vQueueAddToRegistry
#define vQueueUnregisterQueue MPU_vQueueUnregisterQueue
#define pcQueueGetName MPU_pcQueueGetName
#endif #endif
/* Map standard timer.h API functions to the MPU equivalents. */ /* Remove the privileged function macro. */
#define xTimerCreate MPU_xTimerCreate
#define xTimerCreateStatic MPU_xTimerCreateStatic
#define pvTimerGetTimerID MPU_pvTimerGetTimerID
#define vTimerSetTimerID MPU_vTimerSetTimerID
#define xTimerIsTimerActive MPU_xTimerIsTimerActive
#define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle
#define xTimerPendFunctionCall MPU_xTimerPendFunctionCall
#define pcTimerGetName MPU_pcTimerGetName
#define vTimerSetReloadMode MPU_vTimerSetReloadMode
#define xTimerGetPeriod MPU_xTimerGetPeriod
#define xTimerGetExpiryTime MPU_xTimerGetExpiryTime
#define xTimerGenericCommand MPU_xTimerGenericCommand
/* Map standard event_group.h API functions to the MPU equivalents. */
#define xEventGroupCreate MPU_xEventGroupCreate
#define xEventGroupCreateStatic MPU_xEventGroupCreateStatic
#define xEventGroupWaitBits MPU_xEventGroupWaitBits
#define xEventGroupClearBits MPU_xEventGroupClearBits
#define xEventGroupSetBits MPU_xEventGroupSetBits
#define xEventGroupSync MPU_xEventGroupSync
#define vEventGroupDelete MPU_vEventGroupDelete
/* Map standard message/stream_buffer.h API functions to the MPU
equivalents. */
#define xStreamBufferSend MPU_xStreamBufferSend
#define xStreamBufferReceive MPU_xStreamBufferReceive
#define xStreamBufferNextMessageLengthBytes MPU_xStreamBufferNextMessageLengthBytes
#define vStreamBufferDelete MPU_vStreamBufferDelete
#define xStreamBufferIsFull MPU_xStreamBufferIsFull
#define xStreamBufferIsEmpty MPU_xStreamBufferIsEmpty
#define xStreamBufferReset MPU_xStreamBufferReset
#define xStreamBufferSpacesAvailable MPU_xStreamBufferSpacesAvailable
#define xStreamBufferBytesAvailable MPU_xStreamBufferBytesAvailable
#define xStreamBufferSetTriggerLevel MPU_xStreamBufferSetTriggerLevel
#define xStreamBufferGenericCreate MPU_xStreamBufferGenericCreate
#define xStreamBufferGenericCreateStatic MPU_xStreamBufferGenericCreateStatic
/* Remove the privileged function macro, but keep the PRIVILEGED_DATA
macro so applications can place data in privileged access sections
(useful when using statically allocated objects). */
#define PRIVILEGED_FUNCTION #define PRIVILEGED_FUNCTION
#define PRIVILEGED_DATA __attribute__((section("privileged_data")))
#define FREERTOS_SYSTEM_CALL
#else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */ #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
/* Ensure API functions go in the privileged execution section. */ /* Ensure API functions go in the privileged execution section. */
#define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions"))) #define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions")))
#define PRIVILEGED_DATA __attribute__((section("privileged_data"))) #define PRIVILEGED_DATA __attribute__((section("privileged_data")))
#define FREERTOS_SYSTEM_CALL __attribute__((section( "freertos_system_calls")))
#endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */ #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
@ -176,7 +143,6 @@ only for ports that are using the MPU. */
#define PRIVILEGED_FUNCTION #define PRIVILEGED_FUNCTION
#define PRIVILEGED_DATA #define PRIVILEGED_DATA
#define FREERTOS_SYSTEM_CALL
#define portUSING_MPU_WRAPPERS 0 #define portUSING_MPU_WRAPPERS 0
#endif /* portUSING_MPU_WRAPPERS */ #endif /* portUSING_MPU_WRAPPERS */

View file

@ -1,29 +1,66 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
/*----------------------------------------------------------- /*-----------------------------------------------------------
* Portable layer API. Each function must be defined for each port. * Portable layer API. Each function must be defined for each port.
@ -32,32 +69,253 @@
#ifndef PORTABLE_H #ifndef PORTABLE_H
#define PORTABLE_H #define PORTABLE_H
/* Each FreeRTOS port has a unique portmacro.h header file. Originally a /* Include the macro file relevant to the port being used. */
pre-processor definition was used to ensure the pre-processor found the correct
portmacro.h file for the port being used. That scheme was deprecated in favour
of setting the compiler's include path such that it found the correct
portmacro.h file - removing the need for the constant and allowing the
portmacro.h file to be located anywhere in relation to the port being used.
Purely for reasons of backward compatibility the old method is still valid, but
to make it clear that new projects should not use it, support for the port
specific constants has been moved into the deprecated_definitions.h header
file. */
#include "deprecated_definitions.h"
/* If portENTER_CRITICAL is not defined then including deprecated_definitions.h #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
did not result in a portmacro.h header file being included - and it should be #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
included here. In this case the path to the correct portmacro.h header file typedef void ( __interrupt __far *pxISR )();
must be set in the compiler's include path. */ #endif
#ifndef portENTER_CRITICAL
#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
#include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef GCC_MEGA_AVR
#include "../portable/GCC/ATMega323/portmacro.h"
#endif
#ifdef IAR_MEGA_AVR
#include "../portable/IAR/ATMega323/portmacro.h"
#endif
#ifdef MPLAB_PIC24_PORT
#include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
#endif
#ifdef MPLAB_DSPIC_PORT
#include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
#endif
#ifdef MPLAB_PIC18F_PORT
#include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"
#endif
#ifdef MPLAB_PIC32MX_PORT
#include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"
#endif
#ifdef _FEDPICC
#include "libFreeRTOS/Include/portmacro.h"
#endif
#ifdef SDCC_CYGNAL
#include "../../Source/portable/SDCC/Cygnal/portmacro.h"
#endif
#ifdef GCC_ARM7
#include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
#endif
#ifdef GCC_ARM7_ECLIPSE
#include "portmacro.h" #include "portmacro.h"
#endif #endif
#if portBYTE_ALIGNMENT == 32 #ifdef ROWLEY_LPC23xx
#define portBYTE_ALIGNMENT_MASK ( 0x001f ) #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
#endif #endif
#if portBYTE_ALIGNMENT == 16 #ifdef IAR_MSP430
#define portBYTE_ALIGNMENT_MASK ( 0x000f ) #include "..\..\Source\portable\IAR\MSP430\portmacro.h"
#endif
#ifdef GCC_MSP430
#include "../../Source/portable/GCC/MSP430F449/portmacro.h"
#endif
#ifdef ROWLEY_MSP430
#include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
#endif
#ifdef ARM7_LPC21xx_KEIL_RVDS
#include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
#endif
#ifdef SAM7_GCC
#include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
#endif
#ifdef SAM7_IAR
#include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
#endif
#ifdef SAM9XE_IAR
#include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
#endif
#ifdef LPC2000_IAR
#include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
#endif
#ifdef STR71X_IAR
#include "..\..\Source\portable\IAR\STR71x\portmacro.h"
#endif
#ifdef STR75X_IAR
#include "..\..\Source\portable\IAR\STR75x\portmacro.h"
#endif
#ifdef STR75X_GCC
#include "..\..\Source\portable\GCC\STR75x\portmacro.h"
#endif
#ifdef STR91X_IAR
#include "..\..\Source\portable\IAR\STR91x\portmacro.h"
#endif
#ifdef GCC_H8S
#include "../../Source/portable/GCC/H8S2329/portmacro.h"
#endif
#ifdef GCC_AT91FR40008
#include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
#endif
#ifdef RVDS_ARMCM3_LM3S102
#include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
#endif
#ifdef GCC_ARMCM3_LM3S102
#include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
#endif
#ifdef GCC_ARMCM3
#include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
#endif
#ifdef IAR_ARM_CM3
#include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
#endif
#ifdef IAR_ARMCM3_LM
#include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
#endif
#ifdef HCS12_CODE_WARRIOR
#include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
#endif
#ifdef MICROBLAZE_GCC
#include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
#endif
#ifdef TERN_EE
#include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
#endif
#ifdef GCC_HCS12
#include "../../Source/portable/GCC/HCS12/portmacro.h"
#endif
#ifdef GCC_MCF5235
#include "../../Source/portable/GCC/MCF5235/portmacro.h"
#endif
#ifdef COLDFIRE_V2_GCC
#include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
#endif
#ifdef COLDFIRE_V2_CODEWARRIOR
#include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
#endif
#ifdef GCC_PPC405
#include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
#endif
#ifdef GCC_PPC440
#include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
#endif
#ifdef _16FX_SOFTUNE
#include "..\..\Source\portable\Softune\MB96340\portmacro.h"
#endif
#ifdef BCC_INDUSTRIAL_PC_PORT
/* A short file name has to be used in place of the normal
FreeRTOSConfig.h when using the Borland compiler. */
#include "frconfig.h"
#include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef BCC_FLASH_LITE_186_PORT
/* A short file name has to be used in place of the normal
FreeRTOSConfig.h when using the Borland compiler. */
#include "frconfig.h"
#include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
typedef void ( __interrupt __far *pxISR )();
#endif
#ifdef __GNUC__
#ifdef __AVR32_AVR32A__
#include "portmacro.h"
#endif
#endif
#ifdef __ICCAVR32__
#ifdef __CORE__
#if __CORE__ == __AVR32A__
#include "portmacro.h"
#endif
#endif
#endif
#ifdef __91467D
#include "portmacro.h"
#endif
#ifdef __96340
#include "portmacro.h"
#endif
#ifdef __IAR_V850ES_Fx3__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Jx3__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Jx3_L__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Jx2__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_V850ES_Hx2__
#include "../../Source/portable/IAR/V850ES/portmacro.h"
#endif
#ifdef __IAR_78K0R_Kx3__
#include "../../Source/portable/IAR/78K0R/portmacro.h"
#endif
#ifdef __IAR_78K0R_Kx3L__
#include "../../Source/portable/IAR/78K0R/portmacro.h"
#endif
/* Catch all to ensure portmacro.h is included in the build. Newer demos
have the path as part of the project options, rather than as relative from
the project location. If portENTER_CRITICAL() has not been defined then
portmacro.h has not yet been included - as every portmacro.h provides a
portENTER_CRITICAL() definition. Check the demo application for your demo
to find the path to the correct portmacro.h file. */
#ifndef portENTER_CRITICAL
#include "portmacro.h"
#endif #endif
#if portBYTE_ALIGNMENT == 8 #if portBYTE_ALIGNMENT == 8
@ -84,14 +342,6 @@ must be set in the compiler's include path. */
#define portNUM_CONFIGURABLE_REGIONS 1 #define portNUM_CONFIGURABLE_REGIONS 1
#endif #endif
#ifndef portHAS_STACK_OVERFLOW_CHECKING
#define portHAS_STACK_OVERFLOW_CHECKING 0
#endif
#ifndef portARCH_NAME
#define portARCH_NAME NULL
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -105,40 +355,11 @@ extern "C" {
* *
*/ */
#if( portUSING_MPU_WRAPPERS == 1 ) #if( portUSING_MPU_WRAPPERS == 1 )
#if( portHAS_STACK_OVERFLOW_CHECKING == 1 ) portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, StackType_t *pxEndOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;
#else
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;
#endif
#else #else
#if( portHAS_STACK_OVERFLOW_CHECKING == 1 ) portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, StackType_t *pxEndOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;
#else
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;
#endif
#endif #endif
/* Used by heap_5.c. */
typedef struct HeapRegion
{
uint8_t *pucStartAddress;
size_t xSizeInBytes;
} HeapRegion_t;
/*
* Used to define multiple heap regions for use by heap_5.c. This function
* must be called before any calls to pvPortMalloc() - not creating a task,
* queue, semaphore, mutex, software timer, event group, etc. will result in
* pvPortMalloc being called.
*
* pxHeapRegions passes in an array of HeapRegion_t structures - each of which
* defines a region of memory that can be used as the heap. The array is
* terminated by a HeapRegions_t structure that has a size of 0. The region
* with the lowest start address must appear first in the array.
*/
void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;
/* /*
* Map to the memory management routines required for the port. * Map to the memory management routines required for the port.
*/ */
@ -146,13 +367,12 @@ void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
void vPortFree( void *pv ) PRIVILEGED_FUNCTION; void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION; void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION; size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
/* /*
* Setup the hardware ready for the scheduler to take control. This generally * Setup the hardware ready for the scheduler to take control. This generally
* sets up a tick interrupt and sets timers for the correct tick frequency. * sets up a tick interrupt and sets timers for the correct tick frequency.
*/ */
BaseType_t xPortStartScheduler( void ) PRIVILEGED_FUNCTION; portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;
/* /*
* Undo any hardware/ISR setup that was performed by xPortStartScheduler() so * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
@ -170,7 +390,7 @@ void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
*/ */
#if( portUSING_MPU_WRAPPERS == 1 ) #if( portUSING_MPU_WRAPPERS == 1 )
struct xMEMORY_REGION; struct xMEMORY_REGION;
void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint32_t ulStackDepth ) PRIVILEGED_FUNCTION; void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1,123 +1,87 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#ifndef PROJDEFS_H #ifndef PROJDEFS_H
#define PROJDEFS_H #define PROJDEFS_H
/* /* Defines the prototype to which task functions must conform. */
* Defines the prototype to which task functions must conform. Defined in this typedef void (*pdTASK_CODE)( void * );
* file to ensure the type is known before portable.h is included.
*/
typedef void (*TaskFunction_t)( void * );
/* Converts a time in milliseconds to a time in ticks. This macro can be #define pdFALSE ( ( portBASE_TYPE ) 0 )
overridden by a macro of the same name defined in FreeRTOSConfig.h in case the #define pdTRUE ( ( portBASE_TYPE ) 1 )
definition here is not suitable for your application. */
#ifndef pdMS_TO_TICKS
#define pdMS_TO_TICKS( xTimeInMs ) ( ( TickType_t ) ( ( ( TickType_t ) ( xTimeInMs ) * ( TickType_t ) configTICK_RATE_HZ ) / ( TickType_t ) 1000 ) )
#endif
#define pdFALSE ( ( BaseType_t ) 0 ) #define pdPASS ( pdTRUE )
#define pdTRUE ( ( BaseType_t ) 1 ) #define pdFAIL ( pdFALSE )
#define errQUEUE_EMPTY ( ( portBASE_TYPE ) 0 )
#define errQUEUE_FULL ( ( portBASE_TYPE ) 0 )
#define pdPASS ( pdTRUE ) /* Error definitions. */
#define pdFAIL ( pdFALSE )
#define errQUEUE_EMPTY ( ( BaseType_t ) 0 )
#define errQUEUE_FULL ( ( BaseType_t ) 0 )
/* FreeRTOS error definitions. */
#define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ( -1 ) #define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ( -1 )
#define errNO_TASK_TO_RUN ( -2 )
#define errQUEUE_BLOCKED ( -4 ) #define errQUEUE_BLOCKED ( -4 )
#define errQUEUE_YIELD ( -5 ) #define errQUEUE_YIELD ( -5 )
/* Macros used for basic data corruption checks. */
#ifndef configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
#define configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES 0
#endif
#if( configUSE_16_BIT_TICKS == 1 )
#define pdINTEGRITY_CHECK_VALUE 0x5a5a
#else
#define pdINTEGRITY_CHECK_VALUE 0x5a5a5a5aUL
#endif
/* The following errno values are used by FreeRTOS+ components, not FreeRTOS
itself. */
#define pdFREERTOS_ERRNO_NONE 0 /* No errors */
#define pdFREERTOS_ERRNO_ENOENT 2 /* No such file or directory */
#define pdFREERTOS_ERRNO_EINTR 4 /* Interrupted system call */
#define pdFREERTOS_ERRNO_EIO 5 /* I/O error */
#define pdFREERTOS_ERRNO_ENXIO 6 /* No such device or address */
#define pdFREERTOS_ERRNO_EBADF 9 /* Bad file number */
#define pdFREERTOS_ERRNO_EAGAIN 11 /* No more processes */
#define pdFREERTOS_ERRNO_EWOULDBLOCK 11 /* Operation would block */
#define pdFREERTOS_ERRNO_ENOMEM 12 /* Not enough memory */
#define pdFREERTOS_ERRNO_EACCES 13 /* Permission denied */
#define pdFREERTOS_ERRNO_EFAULT 14 /* Bad address */
#define pdFREERTOS_ERRNO_EBUSY 16 /* Mount device busy */
#define pdFREERTOS_ERRNO_EEXIST 17 /* File exists */
#define pdFREERTOS_ERRNO_EXDEV 18 /* Cross-device link */
#define pdFREERTOS_ERRNO_ENODEV 19 /* No such device */
#define pdFREERTOS_ERRNO_ENOTDIR 20 /* Not a directory */
#define pdFREERTOS_ERRNO_EISDIR 21 /* Is a directory */
#define pdFREERTOS_ERRNO_EINVAL 22 /* Invalid argument */
#define pdFREERTOS_ERRNO_ENOSPC 28 /* No space left on device */
#define pdFREERTOS_ERRNO_ESPIPE 29 /* Illegal seek */
#define pdFREERTOS_ERRNO_EROFS 30 /* Read only file system */
#define pdFREERTOS_ERRNO_EUNATCH 42 /* Protocol driver not attached */
#define pdFREERTOS_ERRNO_EBADE 50 /* Invalid exchange */
#define pdFREERTOS_ERRNO_EFTYPE 79 /* Inappropriate file type or format */
#define pdFREERTOS_ERRNO_ENMFILE 89 /* No more files */
#define pdFREERTOS_ERRNO_ENOTEMPTY 90 /* Directory not empty */
#define pdFREERTOS_ERRNO_ENAMETOOLONG 91 /* File or path name too long */
#define pdFREERTOS_ERRNO_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
#define pdFREERTOS_ERRNO_ENOBUFS 105 /* No buffer space available */
#define pdFREERTOS_ERRNO_ENOPROTOOPT 109 /* Protocol not available */
#define pdFREERTOS_ERRNO_EADDRINUSE 112 /* Address already in use */
#define pdFREERTOS_ERRNO_ETIMEDOUT 116 /* Connection timed out */
#define pdFREERTOS_ERRNO_EINPROGRESS 119 /* Connection already in progress */
#define pdFREERTOS_ERRNO_EALREADY 120 /* Socket already connected */
#define pdFREERTOS_ERRNO_EADDRNOTAVAIL 125 /* Address not available */
#define pdFREERTOS_ERRNO_EISCONN 127 /* Socket is already connected */
#define pdFREERTOS_ERRNO_ENOTCONN 128 /* Socket is not connected */
#define pdFREERTOS_ERRNO_ENOMEDIUM 135 /* No medium inserted */
#define pdFREERTOS_ERRNO_EILSEQ 138 /* An invalid UTF-16 sequence was encountered. */
#define pdFREERTOS_ERRNO_ECANCELED 140 /* Operation canceled. */
/* The following endian values are used by FreeRTOS+ components, not FreeRTOS
itself. */
#define pdFREERTOS_LITTLE_ENDIAN 0
#define pdFREERTOS_BIG_ENDIAN 1
/* Re-defining endian values for generic naming. */
#define pdLITTLE_ENDIAN pdFREERTOS_LITTLE_ENDIAN
#define pdBIG_ENDIAN pdFREERTOS_BIG_ENDIAN
#endif /* PROJDEFS_H */ #endif /* PROJDEFS_H */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,129 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
#ifndef STACK_MACROS_H
#define STACK_MACROS_H
/*
* Call the stack overflow hook function if the stack of the task being swapped
* out is currently overflowed, or looks like it might have overflowed in the
* past.
*
* Setting configCHECK_FOR_STACK_OVERFLOW to 1 will cause the macro to check
* the current stack state only - comparing the current top of stack value to
* the stack limit. Setting configCHECK_FOR_STACK_OVERFLOW to greater than 1
* will also cause the last few stack bytes to be checked to ensure the value
* to which the bytes were set when the task was created have not been
* overwritten. Note this second test does not guarantee that an overflowed
* stack will always be recognised.
*/
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW == 1 ) && ( portSTACK_GROWTH < 0 ) )
/* Only the current stack state is to be checked. */
#define taskCHECK_FOR_STACK_OVERFLOW() \
{ \
/* Is the currently saved stack pointer within the stack limit? */ \
if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \
{ \
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW == 1 ) && ( portSTACK_GROWTH > 0 ) )
/* Only the current stack state is to be checked. */
#define taskCHECK_FOR_STACK_OVERFLOW() \
{ \
\
/* Is the currently saved stack pointer within the stack limit? */ \
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \
{ \
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
#define taskCHECK_FOR_STACK_OVERFLOW() \
{ \
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
\
if( ( pulStack[ 0 ] != ulCheckValue ) || \
( pulStack[ 1 ] != ulCheckValue ) || \
( pulStack[ 2 ] != ulCheckValue ) || \
( pulStack[ 3 ] != ulCheckValue ) ) \
{ \
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
/*-----------------------------------------------------------*/
#if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) )
#define taskCHECK_FOR_STACK_OVERFLOW() \
{ \
int8_t *pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack; \
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \
\
\
pcEndOfStack -= sizeof( ucExpectedStackBytes ); \
\
/* Has the extremity of the task stack ever been written over? */ \
if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \
{ \
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
/*-----------------------------------------------------------*/
/* Remove stack overflow macro if not being used. */
#ifndef taskCHECK_FOR_STACK_OVERFLOW
#define taskCHECK_FOR_STACK_OVERFLOW()
#endif
#endif /* STACK_MACROS_H */

View file

@ -1,855 +0,0 @@
/*
* FreeRTOS Kernel V10.2.0
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
/*
* Stream buffers are used to send a continuous stream of data from one task or
* interrupt to another. Their implementation is light weight, making them
* particularly suited for interrupt to task and core to core communication
* scenarios.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xStreamBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xStreamBufferRead()) inside a critical section section and set the
* receive block time to 0.
*
*/
#ifndef STREAM_BUFFER_H
#define STREAM_BUFFER_H
#if defined( __cplusplus )
extern "C" {
#endif
/**
* Type by which stream buffers are referenced. For example, a call to
* xStreamBufferCreate() returns an StreamBufferHandle_t variable that can
* then be used as a parameter to xStreamBufferSend(), xStreamBufferReceive(),
* etc.
*/
struct StreamBufferDef_t;
typedef struct StreamBufferDef_t * StreamBufferHandle_t;
/**
* message_buffer.h
*
<pre>
StreamBufferHandle_t xStreamBufferCreate( size_t xBufferSizeBytes, size_t xTriggerLevelBytes );
</pre>
*
* Creates a new stream buffer using dynamically allocated memory. See
* xStreamBufferCreateStatic() for a version that uses statically allocated
* memory (memory that is allocated at compile time).
*
* configSUPPORT_DYNAMIC_ALLOCATION must be set to 1 or left undefined in
* FreeRTOSConfig.h for xStreamBufferCreate() to be available.
*
* @param xBufferSizeBytes The total number of bytes the stream buffer will be
* able to hold at any one time.
*
* @param xTriggerLevelBytes The number of bytes that must be in the stream
* buffer before a task that is blocked on the stream buffer to wait for data is
* moved out of the blocked state. For example, if a task is blocked on a read
* of an empty stream buffer that has a trigger level of 1 then the task will be
* unblocked when a single byte is written to the buffer or the task's block
* time expires. As another example, if a task is blocked on a read of an empty
* stream buffer that has a trigger level of 10 then the task will not be
* unblocked until the stream buffer contains at least 10 bytes or the task's
* block time expires. If a reading task's block time expires before the
* trigger level is reached then the task will still receive however many bytes
* are actually available. Setting a trigger level of 0 will result in a
* trigger level of 1 being used. It is not valid to specify a trigger level
* that is greater than the buffer size.
*
* @return If NULL is returned, then the stream buffer cannot be created
* because there is insufficient heap memory available for FreeRTOS to allocate
* the stream buffer data structures and storage area. A non-NULL value being
* returned indicates that the stream buffer has been created successfully -
* the returned value should be stored as the handle to the created stream
* buffer.
*
* Example use:
<pre>
void vAFunction( void )
{
StreamBufferHandle_t xStreamBuffer;
const size_t xStreamBufferSizeBytes = 100, xTriggerLevel = 10;
// Create a stream buffer that can hold 100 bytes. The memory used to hold
// both the stream buffer structure and the data in the stream buffer is
// allocated dynamically.
xStreamBuffer = xStreamBufferCreate( xStreamBufferSizeBytes, xTriggerLevel );
if( xStreamBuffer == NULL )
{
// There was not enough heap memory space available to create the
// stream buffer.
}
else
{
// The stream buffer was created successfully and can now be used.
}
}
</pre>
* \defgroup xStreamBufferCreate xStreamBufferCreate
* \ingroup StreamBufferManagement
*/
#define xStreamBufferCreate( xBufferSizeBytes, xTriggerLevelBytes ) xStreamBufferGenericCreate( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE )
/**
* stream_buffer.h
*
<pre>
StreamBufferHandle_t xStreamBufferCreateStatic( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
uint8_t *pucStreamBufferStorageArea,
StaticStreamBuffer_t *pxStaticStreamBuffer );
</pre>
* Creates a new stream buffer using statically allocated memory. See
* xStreamBufferCreate() for a version that uses dynamically allocated memory.
*
* configSUPPORT_STATIC_ALLOCATION must be set to 1 in FreeRTOSConfig.h for
* xStreamBufferCreateStatic() to be available.
*
* @param xBufferSizeBytes The size, in bytes, of the buffer pointed to by the
* pucStreamBufferStorageArea parameter.
*
* @param xTriggerLevelBytes The number of bytes that must be in the stream
* buffer before a task that is blocked on the stream buffer to wait for data is
* moved out of the blocked state. For example, if a task is blocked on a read
* of an empty stream buffer that has a trigger level of 1 then the task will be
* unblocked when a single byte is written to the buffer or the task's block
* time expires. As another example, if a task is blocked on a read of an empty
* stream buffer that has a trigger level of 10 then the task will not be
* unblocked until the stream buffer contains at least 10 bytes or the task's
* block time expires. If a reading task's block time expires before the
* trigger level is reached then the task will still receive however many bytes
* are actually available. Setting a trigger level of 0 will result in a
* trigger level of 1 being used. It is not valid to specify a trigger level
* that is greater than the buffer size.
*
* @param pucStreamBufferStorageArea Must point to a uint8_t array that is at
* least xBufferSizeBytes + 1 big. This is the array to which streams are
* copied when they are written to the stream buffer.
*
* @param pxStaticStreamBuffer Must point to a variable of type
* StaticStreamBuffer_t, which will be used to hold the stream buffer's data
* structure.
*
* @return If the stream buffer is created successfully then a handle to the
* created stream buffer is returned. If either pucStreamBufferStorageArea or
* pxStaticstreamBuffer are NULL then NULL is returned.
*
* Example use:
<pre>
// Used to dimension the array used to hold the streams. The available space
// will actually be one less than this, so 999.
#define STORAGE_SIZE_BYTES 1000
// Defines the memory that will actually hold the streams within the stream
// buffer.
static uint8_t ucStorageBuffer[ STORAGE_SIZE_BYTES ];
// The variable used to hold the stream buffer structure.
StaticStreamBuffer_t xStreamBufferStruct;
void MyFunction( void )
{
StreamBufferHandle_t xStreamBuffer;
const size_t xTriggerLevel = 1;
xStreamBuffer = xStreamBufferCreateStatic( sizeof( ucBufferStorage ),
xTriggerLevel,
ucBufferStorage,
&xStreamBufferStruct );
// As neither the pucStreamBufferStorageArea or pxStaticStreamBuffer
// parameters were NULL, xStreamBuffer will not be NULL, and can be used to
// reference the created stream buffer in other stream buffer API calls.
// Other code that uses the stream buffer can go here.
}
</pre>
* \defgroup xStreamBufferCreateStatic xStreamBufferCreateStatic
* \ingroup StreamBufferManagement
*/
#define xStreamBufferCreateStatic( xBufferSizeBytes, xTriggerLevelBytes, pucStreamBufferStorageArea, pxStaticStreamBuffer ) xStreamBufferGenericCreateStatic( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE, pucStreamBufferStorageArea, pxStaticStreamBuffer )
/**
* stream_buffer.h
*
<pre>
size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
const void *pvTxData,
size_t xDataLengthBytes,
TickType_t xTicksToWait );
</pre>
*
* Sends bytes to a stream buffer. The bytes are copied into the stream buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xStreamBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xStreamBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xStreamBufferSend() to write to a stream buffer from a task. Use
* xStreamBufferSendFromISR() to write to a stream buffer from an interrupt
* service routine (ISR).
*
* @param xStreamBuffer The handle of the stream buffer to which a stream is
* being sent.
*
* @param pvTxData A pointer to the buffer that holds the bytes to be copied
* into the stream buffer.
*
* @param xDataLengthBytes The maximum number of bytes to copy from pvTxData
* into the stream buffer.
*
* @param xTicksToWait The maximum amount of time the task should remain in the
* Blocked state to wait for enough space to become available in the stream
* buffer, should the stream buffer contain too little space to hold the
* another xDataLengthBytes bytes. The block time is specified in tick periods,
* so the absolute time it represents is dependent on the tick frequency. The
* macro pdMS_TO_TICKS() can be used to convert a time specified in milliseconds
* into a time specified in ticks. Setting xTicksToWait to portMAX_DELAY will
* cause the task to wait indefinitely (without timing out), provided
* INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h. If a task times out
* before it can write all xDataLengthBytes into the buffer it will still write
* as many bytes as possible. A task does not use any CPU time when it is in
* the blocked state.
*
* @return The number of bytes written to the stream buffer. If a task times
* out before it can write all xDataLengthBytes into the buffer it will still
* write as many bytes as possible.
*
* Example use:
<pre>
void vAFunction( StreamBufferHandle_t xStreamBuffer )
{
size_t xBytesSent;
uint8_t ucArrayToSend[] = { 0, 1, 2, 3 };
char *pcStringToSend = "String to send";
const TickType_t x100ms = pdMS_TO_TICKS( 100 );
// Send an array to the stream buffer, blocking for a maximum of 100ms to
// wait for enough space to be available in the stream buffer.
xBytesSent = xStreamBufferSend( xStreamBuffer, ( void * ) ucArrayToSend, sizeof( ucArrayToSend ), x100ms );
if( xBytesSent != sizeof( ucArrayToSend ) )
{
// The call to xStreamBufferSend() times out before there was enough
// space in the buffer for the data to be written, but it did
// successfully write xBytesSent bytes.
}
// Send the string to the stream buffer. Return immediately if there is not
// enough space in the buffer.
xBytesSent = xStreamBufferSend( xStreamBuffer, ( void * ) pcStringToSend, strlen( pcStringToSend ), 0 );
if( xBytesSent != strlen( pcStringToSend ) )
{
// The entire string could not be added to the stream buffer because
// there was not enough free space in the buffer, but xBytesSent bytes
// were sent. Could try again to send the remaining bytes.
}
}
</pre>
* \defgroup xStreamBufferSend xStreamBufferSend
* \ingroup StreamBufferManagement
*/
size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
const void *pvTxData,
size_t xDataLengthBytes,
TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
const void *pvTxData,
size_t xDataLengthBytes,
BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* Interrupt safe version of the API function that sends a stream of bytes to
* the stream buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xStreamBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xStreamBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xStreamBufferSend() to write to a stream buffer from a task. Use
* xStreamBufferSendFromISR() to write to a stream buffer from an interrupt
* service routine (ISR).
*
* @param xStreamBuffer The handle of the stream buffer to which a stream is
* being sent.
*
* @param pvTxData A pointer to the data that is to be copied into the stream
* buffer.
*
* @param xDataLengthBytes The maximum number of bytes to copy from pvTxData
* into the stream buffer.
*
* @param pxHigherPriorityTaskWoken It is possible that a stream buffer will
* have a task blocked on it waiting for data. Calling
* xStreamBufferSendFromISR() can make data available, and so cause a task that
* was waiting for data to leave the Blocked state. If calling
* xStreamBufferSendFromISR() causes a task to leave the Blocked state, and the
* unblocked task has a priority higher than the currently executing task (the
* task that was interrupted), then, internally, xStreamBufferSendFromISR()
* will set *pxHigherPriorityTaskWoken to pdTRUE. If
* xStreamBufferSendFromISR() sets this value to pdTRUE, then normally a
* context switch should be performed before the interrupt is exited. This will
* ensure that the interrupt returns directly to the highest priority Ready
* state task. *pxHigherPriorityTaskWoken should be set to pdFALSE before it
* is passed into the function. See the example code below for an example.
*
* @return The number of bytes actually written to the stream buffer, which will
* be less than xDataLengthBytes if the stream buffer didn't have enough free
* space for all the bytes to be written.
*
* Example use:
<pre>
// A stream buffer that has already been created.
StreamBufferHandle_t xStreamBuffer;
void vAnInterruptServiceRoutine( void )
{
size_t xBytesSent;
char *pcStringToSend = "String to send";
BaseType_t xHigherPriorityTaskWoken = pdFALSE; // Initialised to pdFALSE.
// Attempt to send the string to the stream buffer.
xBytesSent = xStreamBufferSendFromISR( xStreamBuffer,
( void * ) pcStringToSend,
strlen( pcStringToSend ),
&xHigherPriorityTaskWoken );
if( xBytesSent != strlen( pcStringToSend ) )
{
// There was not enough free space in the stream buffer for the entire
// string to be written, ut xBytesSent bytes were written.
}
// If xHigherPriorityTaskWoken was set to pdTRUE inside
// xStreamBufferSendFromISR() then a task that has a priority above the
// priority of the currently executing task was unblocked and a context
// switch should be performed to ensure the ISR returns to the unblocked
// task. In most FreeRTOS ports this is done by simply passing
// xHigherPriorityTaskWoken into taskYIELD_FROM_ISR(), which will test the
// variables value, and perform the context switch if necessary. Check the
// documentation for the port in use for port specific instructions.
taskYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
</pre>
* \defgroup xStreamBufferSendFromISR xStreamBufferSendFromISR
* \ingroup StreamBufferManagement
*/
size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
const void *pvTxData,
size_t xDataLengthBytes,
BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
void *pvRxData,
size_t xBufferLengthBytes,
TickType_t xTicksToWait );
</pre>
*
* Receives bytes from a stream buffer.
*
* ***NOTE***: Uniquely among FreeRTOS objects, the stream buffer
* implementation (so also the message buffer implementation, as message buffers
* are built on top of stream buffers) assumes there is only one task or
* interrupt that will write to the buffer (the writer), and only one task or
* interrupt that will read from the buffer (the reader). It is safe for the
* writer and reader to be different tasks or interrupts, but, unlike other
* FreeRTOS objects, it is not safe to have multiple different writers or
* multiple different readers. If there are to be multiple different writers
* then the application writer must place each call to a writing API function
* (such as xStreamBufferSend()) inside a critical section and set the send
* block time to 0. Likewise, if there are to be multiple different readers
* then the application writer must place each call to a reading API function
* (such as xStreamBufferRead()) inside a critical section and set the receive
* block time to 0.
*
* Use xStreamBufferReceive() to read from a stream buffer from a task. Use
* xStreamBufferReceiveFromISR() to read from a stream buffer from an
* interrupt service routine (ISR).
*
* @param xStreamBuffer The handle of the stream buffer from which bytes are to
* be received.
*
* @param pvRxData A pointer to the buffer into which the received bytes will be
* copied.
*
* @param xBufferLengthBytes The length of the buffer pointed to by the
* pvRxData parameter. This sets the maximum number of bytes to receive in one
* call. xStreamBufferReceive will return as many bytes as possible up to a
* maximum set by xBufferLengthBytes.
*
* @param xTicksToWait The maximum amount of time the task should remain in the
* Blocked state to wait for data to become available if the stream buffer is
* empty. xStreamBufferReceive() will return immediately if xTicksToWait is
* zero. The block time is specified in tick periods, so the absolute time it
* represents is dependent on the tick frequency. The macro pdMS_TO_TICKS() can
* be used to convert a time specified in milliseconds into a time specified in
* ticks. Setting xTicksToWait to portMAX_DELAY will cause the task to wait
* indefinitely (without timing out), provided INCLUDE_vTaskSuspend is set to 1
* in FreeRTOSConfig.h. A task does not use any CPU time when it is in the
* Blocked state.
*
* @return The number of bytes actually read from the stream buffer, which will
* be less than xBufferLengthBytes if the call to xStreamBufferReceive() timed
* out before xBufferLengthBytes were available.
*
* Example use:
<pre>
void vAFunction( StreamBuffer_t xStreamBuffer )
{
uint8_t ucRxData[ 20 ];
size_t xReceivedBytes;
const TickType_t xBlockTime = pdMS_TO_TICKS( 20 );
// Receive up to another sizeof( ucRxData ) bytes from the stream buffer.
// Wait in the Blocked state (so not using any CPU processing time) for a
// maximum of 100ms for the full sizeof( ucRxData ) number of bytes to be
// available.
xReceivedBytes = xStreamBufferReceive( xStreamBuffer,
( void * ) ucRxData,
sizeof( ucRxData ),
xBlockTime );
if( xReceivedBytes > 0 )
{
// A ucRxData contains another xRecievedBytes bytes of data, which can
// be processed here....
}
}
</pre>
* \defgroup xStreamBufferReceive xStreamBufferReceive
* \ingroup StreamBufferManagement
*/
size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
void *pvRxData,
size_t xBufferLengthBytes,
TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
size_t xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer,
void *pvRxData,
size_t xBufferLengthBytes,
BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* An interrupt safe version of the API function that receives bytes from a
* stream buffer.
*
* Use xStreamBufferReceive() to read bytes from a stream buffer from a task.
* Use xStreamBufferReceiveFromISR() to read bytes from a stream buffer from an
* interrupt service routine (ISR).
*
* @param xStreamBuffer The handle of the stream buffer from which a stream
* is being received.
*
* @param pvRxData A pointer to the buffer into which the received bytes are
* copied.
*
* @param xBufferLengthBytes The length of the buffer pointed to by the
* pvRxData parameter. This sets the maximum number of bytes to receive in one
* call. xStreamBufferReceive will return as many bytes as possible up to a
* maximum set by xBufferLengthBytes.
*
* @param pxHigherPriorityTaskWoken It is possible that a stream buffer will
* have a task blocked on it waiting for space to become available. Calling
* xStreamBufferReceiveFromISR() can make space available, and so cause a task
* that is waiting for space to leave the Blocked state. If calling
* xStreamBufferReceiveFromISR() causes a task to leave the Blocked state, and
* the unblocked task has a priority higher than the currently executing task
* (the task that was interrupted), then, internally,
* xStreamBufferReceiveFromISR() will set *pxHigherPriorityTaskWoken to pdTRUE.
* If xStreamBufferReceiveFromISR() sets this value to pdTRUE, then normally a
* context switch should be performed before the interrupt is exited. That will
* ensure the interrupt returns directly to the highest priority Ready state
* task. *pxHigherPriorityTaskWoken should be set to pdFALSE before it is
* passed into the function. See the code example below for an example.
*
* @return The number of bytes read from the stream buffer, if any.
*
* Example use:
<pre>
// A stream buffer that has already been created.
StreamBuffer_t xStreamBuffer;
void vAnInterruptServiceRoutine( void )
{
uint8_t ucRxData[ 20 ];
size_t xReceivedBytes;
BaseType_t xHigherPriorityTaskWoken = pdFALSE; // Initialised to pdFALSE.
// Receive the next stream from the stream buffer.
xReceivedBytes = xStreamBufferReceiveFromISR( xStreamBuffer,
( void * ) ucRxData,
sizeof( ucRxData ),
&xHigherPriorityTaskWoken );
if( xReceivedBytes > 0 )
{
// ucRxData contains xReceivedBytes read from the stream buffer.
// Process the stream here....
}
// If xHigherPriorityTaskWoken was set to pdTRUE inside
// xStreamBufferReceiveFromISR() then a task that has a priority above the
// priority of the currently executing task was unblocked and a context
// switch should be performed to ensure the ISR returns to the unblocked
// task. In most FreeRTOS ports this is done by simply passing
// xHigherPriorityTaskWoken into taskYIELD_FROM_ISR(), which will test the
// variables value, and perform the context switch if necessary. Check the
// documentation for the port in use for port specific instructions.
taskYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
</pre>
* \defgroup xStreamBufferReceiveFromISR xStreamBufferReceiveFromISR
* \ingroup StreamBufferManagement
*/
size_t xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer,
void *pvRxData,
size_t xBufferLengthBytes,
BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
void vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer );
</pre>
*
* Deletes a stream buffer that was previously created using a call to
* xStreamBufferCreate() or xStreamBufferCreateStatic(). If the stream
* buffer was created using dynamic memory (that is, by xStreamBufferCreate()),
* then the allocated memory is freed.
*
* A stream buffer handle must not be used after the stream buffer has been
* deleted.
*
* @param xStreamBuffer The handle of the stream buffer to be deleted.
*
* \defgroup vStreamBufferDelete vStreamBufferDelete
* \ingroup StreamBufferManagement
*/
void vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
BaseType_t xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer );
</pre>
*
* Queries a stream buffer to see if it is full. A stream buffer is full if it
* does not have any free space, and therefore cannot accept any more data.
*
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return If the stream buffer is full then pdTRUE is returned. Otherwise
* pdFALSE is returned.
*
* \defgroup xStreamBufferIsFull xStreamBufferIsFull
* \ingroup StreamBufferManagement
*/
BaseType_t xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
BaseType_t xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer );
</pre>
*
* Queries a stream buffer to see if it is empty. A stream buffer is empty if
* it does not contain any data.
*
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return If the stream buffer is empty then pdTRUE is returned. Otherwise
* pdFALSE is returned.
*
* \defgroup xStreamBufferIsEmpty xStreamBufferIsEmpty
* \ingroup StreamBufferManagement
*/
BaseType_t xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
BaseType_t xStreamBufferReset( StreamBufferHandle_t xStreamBuffer );
</pre>
*
* Resets a stream buffer to its initial, empty, state. Any data that was in
* the stream buffer is discarded. A stream buffer can only be reset if there
* are no tasks blocked waiting to either send to or receive from the stream
* buffer.
*
* @param xStreamBuffer The handle of the stream buffer being reset.
*
* @return If the stream buffer is reset then pdPASS is returned. If there was
* a task blocked waiting to send to or read from the stream buffer then the
* stream buffer is not reset and pdFAIL is returned.
*
* \defgroup xStreamBufferReset xStreamBufferReset
* \ingroup StreamBufferManagement
*/
BaseType_t xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer );
</pre>
*
* Queries a stream buffer to see how much free space it contains, which is
* equal to the amount of data that can be sent to the stream buffer before it
* is full.
*
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return The number of bytes that can be written to the stream buffer before
* the stream buffer would be full.
*
* \defgroup xStreamBufferSpacesAvailable xStreamBufferSpacesAvailable
* \ingroup StreamBufferManagement
*/
size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
size_t xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer );
</pre>
*
* Queries a stream buffer to see how much data it contains, which is equal to
* the number of bytes that can be read from the stream buffer before the stream
* buffer would be empty.
*
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return The number of bytes that can be read from the stream buffer before
* the stream buffer would be empty.
*
* \defgroup xStreamBufferBytesAvailable xStreamBufferBytesAvailable
* \ingroup StreamBufferManagement
*/
size_t xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, size_t xTriggerLevel );
</pre>
*
* A stream buffer's trigger level is the number of bytes that must be in the
* stream buffer before a task that is blocked on the stream buffer to
* wait for data is moved out of the blocked state. For example, if a task is
* blocked on a read of an empty stream buffer that has a trigger level of 1
* then the task will be unblocked when a single byte is written to the buffer
* or the task's block time expires. As another example, if a task is blocked
* on a read of an empty stream buffer that has a trigger level of 10 then the
* task will not be unblocked until the stream buffer contains at least 10 bytes
* or the task's block time expires. If a reading task's block time expires
* before the trigger level is reached then the task will still receive however
* many bytes are actually available. Setting a trigger level of 0 will result
* in a trigger level of 1 being used. It is not valid to specify a trigger
* level that is greater than the buffer size.
*
* A trigger level is set when the stream buffer is created, and can be modified
* using xStreamBufferSetTriggerLevel().
*
* @param xStreamBuffer The handle of the stream buffer being updated.
*
* @param xTriggerLevel The new trigger level for the stream buffer.
*
* @return If xTriggerLevel was less than or equal to the stream buffer's length
* then the trigger level will be updated and pdTRUE is returned. Otherwise
* pdFALSE is returned.
*
* \defgroup xStreamBufferSetTriggerLevel xStreamBufferSetTriggerLevel
* \ingroup StreamBufferManagement
*/
BaseType_t xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer, size_t xTriggerLevel ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* For advanced users only.
*
* The sbSEND_COMPLETED() macro is called from within the FreeRTOS APIs when
* data is sent to a message buffer or stream buffer. If there was a task that
* was blocked on the message or stream buffer waiting for data to arrive then
* the sbSEND_COMPLETED() macro sends a notification to the task to remove it
* from the Blocked state. xStreamBufferSendCompletedFromISR() does the same
* thing. It is provided to enable application writers to implement their own
* version of sbSEND_COMPLETED(), and MUST NOT BE USED AT ANY OTHER TIME.
*
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
* @param xStreamBuffer The handle of the stream buffer to which data was
* written.
*
* @param pxHigherPriorityTaskWoken *pxHigherPriorityTaskWoken should be
* initialised to pdFALSE before it is passed into
* xStreamBufferSendCompletedFromISR(). If calling
* xStreamBufferSendCompletedFromISR() removes a task from the Blocked state,
* and the task has a priority above the priority of the currently running task,
* then *pxHigherPriorityTaskWoken will get set to pdTRUE indicating that a
* context switch should be performed before exiting the ISR.
*
* @return If a task was removed from the Blocked state then pdTRUE is returned.
* Otherwise pdFALSE is returned.
*
* \defgroup xStreamBufferSendCompletedFromISR xStreamBufferSendCompletedFromISR
* \ingroup StreamBufferManagement
*/
BaseType_t xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
/**
* stream_buffer.h
*
<pre>
BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken );
</pre>
*
* For advanced users only.
*
* The sbRECEIVE_COMPLETED() macro is called from within the FreeRTOS APIs when
* data is read out of a message buffer or stream buffer. If there was a task
* that was blocked on the message or stream buffer waiting for data to arrive
* then the sbRECEIVE_COMPLETED() macro sends a notification to the task to
* remove it from the Blocked state. xStreamBufferReceiveCompletedFromISR()
* does the same thing. It is provided to enable application writers to
* implement their own version of sbRECEIVE_COMPLETED(), and MUST NOT BE USED AT
* ANY OTHER TIME.
*
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
* @param xStreamBuffer The handle of the stream buffer from which data was
* read.
*
* @param pxHigherPriorityTaskWoken *pxHigherPriorityTaskWoken should be
* initialised to pdFALSE before it is passed into
* xStreamBufferReceiveCompletedFromISR(). If calling
* xStreamBufferReceiveCompletedFromISR() removes a task from the Blocked state,
* and the task has a priority above the priority of the currently running task,
* then *pxHigherPriorityTaskWoken will get set to pdTRUE indicating that a
* context switch should be performed before exiting the ISR.
*
* @return If a task was removed from the Blocked state then pdTRUE is returned.
* Otherwise pdFALSE is returned.
*
* \defgroup xStreamBufferReceiveCompletedFromISR xStreamBufferReceiveCompletedFromISR
* \ingroup StreamBufferManagement
*/
BaseType_t xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;
/* Functions below here are not part of the public API. */
StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
BaseType_t xIsMessageBuffer ) PRIVILEGED_FUNCTION;
StreamBufferHandle_t xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
BaseType_t xIsMessageBuffer,
uint8_t * const pucStreamBufferStorageArea,
StaticStreamBuffer_t * const pxStaticStreamBuffer ) PRIVILEGED_FUNCTION;
size_t xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
#if( configUSE_TRACE_FACILITY == 1 )
void vStreamBufferSetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer, UBaseType_t uxStreamBufferNumber ) PRIVILEGED_FUNCTION;
UBaseType_t uxStreamBufferGetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
uint8_t ucStreamBufferGetStreamBufferType( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
#endif
#if defined( __cplusplus )
}
#endif
#endif /* !defined( STREAM_BUFFER_H ) */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,29 +1,66 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. * project by purchasing a FreeRTOS tutorial book, reference *
* * manual, or both from: http://www.FreeRTOS.org/Documentation *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * Thank you! *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * *
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ***************************************************************************
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. This file is part of the FreeRTOS distribution.
*
* http://www.FreeRTOS.org FreeRTOS is free software; you can redistribute it and/or modify it under
* http://aws.amazon.com/freertos the terms of the GNU General Public License (version 2) as published by the
* Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
* 1 tab == 4 spaces!
*/ >>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#include <stdlib.h> #include <stdlib.h>
@ -34,12 +71,12 @@
* PUBLIC LIST API documented in list.h * PUBLIC LIST API documented in list.h
*----------------------------------------------------------*/ *----------------------------------------------------------*/
void vListInitialise( List_t * const pxList ) void vListInitialise( xList * const pxList )
{ {
/* The list structure contains a list item which is used to mark the /* The list structure contains a list item which is used to mark the
end of the list. To initialise the list the list end is inserted end of the list. To initialise the list the list end is inserted
as the only list entry. */ as the only list entry. */
pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->pxIndex = ( xListItem * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */
/* The list end value is the highest possible value in the list to /* The list end value is the highest possible value in the list to
ensure it remains at the end of the list. */ ensure it remains at the end of the list. */
@ -47,78 +84,56 @@ void vListInitialise( List_t * const pxList )
/* The list end next and previous pointers point to itself so we know /* The list end next and previous pointers point to itself so we know
when the list is empty. */ when the list is empty. */
pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->xListEnd.pxNext = ( xListItem * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */
pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->xListEnd.pxPrevious = ( xListItem * ) &( pxList->xListEnd );/*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */
pxList->uxNumberOfItems = ( UBaseType_t ) 0U; pxList->uxNumberOfItems = ( unsigned portBASE_TYPE ) 0U;
/* Write known values into the list if
configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList );
listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vListInitialiseItem( ListItem_t * const pxItem ) void vListInitialiseItem( xListItem * const pxItem )
{ {
/* Make sure the list item is not recorded as being on a list. */ /* Make sure the list item is not recorded as being on a list. */
pxItem->pxContainer = NULL; pxItem->pvContainer = NULL;
/* Write known values into the list item if
configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem );
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) void IRAM vListInsertEnd( xList * const pxList, xListItem * const pxNewListItem )
{ {
ListItem_t * const pxIndex = pxList->pxIndex; xListItem * pxIndex;
/* Only effective when configASSERT() is also defined, these tests may catch
the list data structures being overwritten in memory. They will not catch
data errors caused by incorrect configuration or use of FreeRTOS. */
listTEST_LIST_INTEGRITY( pxList );
listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );
/* Insert a new list item into pxList, but rather than sort the list, /* Insert a new list item into pxList, but rather than sort the list,
makes the new list item the last item to be removed by a call to makes the new list item the last item to be removed by a call to
listGET_OWNER_OF_NEXT_ENTRY(). */ pvListGetOwnerOfNextEntry. */
pxIndex = pxList->pxIndex;
pxNewListItem->pxNext = pxIndex; pxNewListItem->pxNext = pxIndex;
pxNewListItem->pxPrevious = pxIndex->pxPrevious; pxNewListItem->pxPrevious = pxIndex->pxPrevious;
/* Only used during decision coverage testing. */
mtCOVERAGE_TEST_DELAY();
pxIndex->pxPrevious->pxNext = pxNewListItem; pxIndex->pxPrevious->pxNext = pxNewListItem;
pxIndex->pxPrevious = pxNewListItem; pxIndex->pxPrevious = pxNewListItem;
/* Remember which list the item is in. */ /* Remember which list the item is in. */
pxNewListItem->pxContainer = pxList; pxNewListItem->pvContainer = ( void * ) pxList;
( pxList->uxNumberOfItems )++; ( pxList->uxNumberOfItems )++;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) void IRAM vListInsert( xList * const pxList, xListItem * const pxNewListItem )
{ {
ListItem_t *pxIterator; xListItem *pxIterator;
const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; portTickType xValueOfInsertion;
/* Only effective when configASSERT() is also defined, these tests may catch /* Insert the new list item into the list, sorted in ulListItem order. */
the list data structures being overwritten in memory. They will not catch xValueOfInsertion = pxNewListItem->xItemValue;
data errors caused by incorrect configuration or use of FreeRTOS. */
listTEST_LIST_INTEGRITY( pxList );
listTEST_LIST_ITEM_INTEGRITY( pxNewListItem );
/* Insert the new list item into the list, sorted in xItemValue order. /* If the list already contains a list item with the same item value then
the new list item should be placed after it. This ensures that TCB's which
If the list already contains a list item with the same item value then the are stored in ready lists (all of which have the same ulListItem value)
new list item should be placed after it. This ensures that TCBs which are get an equal share of the CPU. However, if the xItemValue is the same as
stored in ready lists (all of which have the same xItemValue value) get a the back marker the iteration loop below will not end. This means we need
share of the CPU. However, if the xItemValue is the same as the back marker to guard against this by checking the value first and modifying the
the iteration loop below will not end. Therefore the value is checked algorithm slightly if necessary. */
first, and the algorithm slightly modified if necessary. */
if( xValueOfInsertion == portMAX_DELAY ) if( xValueOfInsertion == portMAX_DELAY )
{ {
pxIterator = pxList->xListEnd.pxPrevious; pxIterator = pxList->xListEnd.pxPrevious;
@ -126,31 +141,26 @@ const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
else else
{ {
/* *** NOTE *********************************************************** /* *** NOTE ***********************************************************
If you find your application is crashing here then likely causes are If you find your application is crashing here then likely causes are:
listed below. In addition see https://www.freertos.org/FAQHelp.html for
more tips, and ensure configASSERT() is defined!
https://www.freertos.org/a00110.html#configASSERT
1) Stack overflow - 1) Stack overflow -
see https://www.freertos.org/Stacks-and-stack-overflow-checking.html see http://www.freertos.org/Stacks-and-stack-overflow-checking.html
2) Incorrect interrupt priority assignment, especially on Cortex-M 2) Incorrect interrupt priority assignment, especially on Cortex-M3
parts where numerically high priority values denote low actual parts where numerically high priority values denote low actual
interrupt priorities, which can seem counter intuitive. See interrupt priories, which can seem counter intuitive. See
https://www.freertos.org/RTOS-Cortex-M3-M4.html and the definition configMAX_SYSCALL_INTERRUPT_PRIORITY on http://www.freertos.org/a00110.html
of configMAX_SYSCALL_INTERRUPT_PRIORITY on
https://www.freertos.org/a00110.html
3) Calling an API function from within a critical section or when 3) Calling an API function from within a critical section or when
the scheduler is suspended, or calling an API function that does the scheduler is suspended, or calling an API function that does
not end in "FromISR" from an interrupt. not end in "FromISR" from an interrupt.
4) Using a queue or semaphore before it has been initialised or 4) Using a queue or semaphore before it has been initialised or
before the scheduler has been started (are interrupts firing before the scheduler has been started (are interrupts firing
before vTaskStartScheduler() has been called?). before vTaskStartScheduler() has been called?).
See http://www.freertos.org/FAQHelp.html for more tips.
**********************************************************************/ **********************************************************************/
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */ for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */
{ {
/* There is nothing to do here, just iterating to the wanted /* There is nothing to do here, we are just iterating to the
insertion position. */ wanted insertion position. */
} }
} }
@ -161,35 +171,30 @@ const TickType_t xValueOfInsertion = pxNewListItem->xItemValue;
/* Remember which list the item is in. This allows fast removal of the /* Remember which list the item is in. This allows fast removal of the
item later. */ item later. */
pxNewListItem->pxContainer = pxList; pxNewListItem->pvContainer = ( void * ) pxList;
( pxList->uxNumberOfItems )++; ( pxList->uxNumberOfItems )++;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) unsigned portBASE_TYPE IRAM uxListRemove( xListItem * const pxItemToRemove )
{ {
/* The list item knows which list it is in. Obtain the list from the list xList * pxList;
item. */
List_t * const pxList = pxItemToRemove->pxContainer;
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
/* Only used during decision coverage testing. */ /* The list item knows which list it is in. Obtain the list from the list
mtCOVERAGE_TEST_DELAY(); item. */
pxList = ( xList * ) pxItemToRemove->pvContainer;
/* Make sure the index is left pointing to a valid item. */ /* Make sure the index is left pointing to a valid item. */
if( pxList->pxIndex == pxItemToRemove ) if( pxList->pxIndex == pxItemToRemove )
{ {
pxList->pxIndex = pxItemToRemove->pxPrevious; pxList->pxIndex = pxItemToRemove->pxPrevious;
} }
else
{
mtCOVERAGE_TEST_MARKER();
}
pxItemToRemove->pxContainer = NULL; pxItemToRemove->pvContainer = NULL;
( pxList->uxNumberOfItems )--; ( pxList->uxNumberOfItems )--;
return pxList->uxNumberOfItems; return pxList->uxNumberOfItems;

View file

@ -1,30 +1,66 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. If you wish to use our Amazon * project by purchasing a FreeRTOS tutorial book, reference *
* FreeRTOS name, please do so in a fair use way that does not cause confusion. * manual, or both from: http://www.FreeRTOS.org/Documentation *
* * *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * Thank you! *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR ***************************************************************************
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN This file is part of the FreeRTOS distribution.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* FreeRTOS is free software; you can redistribute it and/or modify it under
* http://www.FreeRTOS.org the terms of the GNU General Public License (version 2) as published by the
* http://aws.amazon.com/freertos Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
*
* 1 tab == 4 spaces! >>! NOTE: The modification to the GPL is included to allow you to distribute
*/ >>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
/*----------------------------------------------------------- /*-----------------------------------------------------------
* Implementation of functions defined in portable.h for ESP8266 * Implementation of functions defined in portable.h for ESP8266
@ -37,43 +73,32 @@
#include <malloc.h> #include <malloc.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <xtensa_ops.h>
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "task.h" #include "task.h"
#include "queue.h"
#include "xtensa_rtos.h" #include "xtensa_rtos.h"
unsigned cpu_sr; unsigned cpu_sr;
char level1_int_disabled; char level1_int_disabled;
/* Supervisor stack pointer entry. This is the "high water mark" of /* Supervisor stack pointer entry. This is the "high water mark" of how far the
how far the supervisor stack grew down before task started. Is zero supervisor stack grew down before task started.
before the scheduler starts.
After the scheduler starts, task stacks are all allocated from the After tasks start, task stacks are all allocated from the heap and
heap and FreeRTOS checks for stack overflow. FreeRTOS checks for stack overflow.
*/ */
void *xPortSupervisorStackPointer; static uint32_t xPortSupervisorStackPointer;
void vAssertCalled(const char * pcFile, unsigned long ulLine)
{
printf("rtos assert %s %lu\n", pcFile, ulLine);
abort();
//for (;;);
}
/* /*
* Stack initialization * Stack initialization
*/ */
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
{ {
#define SET_STKREG(r,v) sp[(r) >> 2] = (portSTACK_TYPE)(v) #define SET_STKREG(r,v) sp[(r) >> 2] = (portSTACK_TYPE)(v)
portSTACK_TYPE *sp, *tp; portSTACK_TYPE *sp, *tp;
/* Create interrupt stack frame aligned to 16 byte boundary */ /* Create interrupt stack frame aligned to 16 byte boundary */
sp = (portSTACK_TYPE*) (((uint32_t)(pxTopOfStack + 1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf); sp = (portSTACK_TYPE*) (((uint32_t)(pxTopOfStack+1) - XT_CP_SIZE - XT_STK_FRMSZ) & ~0xf);
/* Clear the entire frame (do not use memset() because we don't depend on C library) */ /* Clear the entire frame (do not use memset() because we don't depend on C library) */
for (tp = sp; tp <= pxTopOfStack; ++tp) for (tp = sp; tp <= pxTopOfStack; ++tp)
@ -94,29 +119,30 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, TaskFunctio
static int pending_soft_sv; static int pending_soft_sv;
static int pending_maclayer_sv; static int pending_maclayer_sv;
/* /* PendSV is called in place of vPortYield() to request a supervisor
* The portYIELD macro calls PendSV with SVC_Software to set a pending interrupt call.
* service callback that allows a task switch, and this occur when interrupts
* are enabled which might be after exiting the critical region below. The portYIELD macro calls pendSV if it's a software request.
*
* The wdev NMI calls this function from pp_post() with SVC_MACLayer to set a The libpp and libudhcp libraries also call this function, assuming
* pending interrupt service callback which flushs the queue of messages that always with arg==2 (but maybe sometimes with arg==1?)
* the NMI stashes away. This interrupt will be triggered after the return from
* the NMI and when interrupts are enabled. The NMI can not touch the FreeRTOS In the original esp_iot_rtos_sdk implementation, arg was a char. Using an
* queues itself. The NMI must not touch the interrupt masks so that path must enum is ABI-compatible, though.
* not call vPortEnterCritical and vPortExitCritical. */
*/
void IRAM PendSV(enum SVC_ReqType req) void IRAM PendSV(enum SVC_ReqType req)
{ {
if (req == SVC_Software) { vPortEnterCritical();
vPortEnterCritical();
pending_soft_sv = 1; if(req == SVC_Software)
WSR(BIT(INUM_SOFT), interrupt); {
vPortExitCritical(); pending_soft_sv = 1;
} else if (req == SVC_MACLayer) { }
pending_maclayer_sv= 1; else if(req == SVC_MACLayer)
WSR(BIT(INUM_SOFT), interrupt); pending_maclayer_sv= 1;
}
xthal_set_intset(BIT(INUM_SOFT));
vPortExitCritical();
} }
/* This MAC layer ISR handler is defined in libpp.a, and is called /* This MAC layer ISR handler is defined in libpp.a, and is called
@ -125,36 +151,54 @@ void IRAM PendSV(enum SVC_ReqType req)
*/ */
extern portBASE_TYPE sdk_MacIsrSigPostDefHdl(void); extern portBASE_TYPE sdk_MacIsrSigPostDefHdl(void);
void IRAM SV_ISR(void *arg) void IRAM SV_ISR(void)
{ {
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE ; portBASE_TYPE xHigherPriorityTaskWoken=pdFALSE ;
if (pending_maclayer_sv) { if(pending_maclayer_sv)
xHigherPriorityTaskWoken = sdk_MacIsrSigPostDefHdl(); {
pending_maclayer_sv = 0; xHigherPriorityTaskWoken = sdk_MacIsrSigPostDefHdl();
} pending_maclayer_sv = 0;
if (xHigherPriorityTaskWoken || pending_soft_sv) { }
sdk__xt_timer_int1(); if( xHigherPriorityTaskWoken || pending_soft_sv)
pending_soft_sv = 0; {
} sdk__xt_timer_int1();
pending_soft_sv = 0;
}
} }
void xPortSysTickHandle (void) void xPortSysTickHandle (void)
{ {
if (xTaskIncrementTick() != pdFALSE) { //CloseNMI();
vTaskSwitchContext(); {
} if(xTaskIncrementTick() !=pdFALSE )
{
vTaskSwitchContext();
}
}
//OpenNMI();
} }
static bool sdk_compat_initialised;
void sdk_compat_initialise(void);
/* /*
* See header file for description. * See header file for description.
*/ */
portBASE_TYPE xPortStartScheduler( void ) portBASE_TYPE xPortStartScheduler( void )
{ {
_xt_isr_attach(INUM_SOFT, SV_ISR, NULL); _xt_isr_attach(INUM_SOFT, SV_ISR);
_xt_isr_unmask(BIT(INUM_SOFT)); _xt_isr_unmask(BIT(INUM_SOFT));
/* ENORMOUS HACK: Call the sdk_compat_initialise() function.
This can be removed happily once we have open source startup code.
*/
if(!sdk_compat_initialised) {
sdk_compat_initialised = true;
sdk_compat_initialise();
}
/* Initialize system tick timer interrupt and schedule the first tick. */ /* Initialize system tick timer interrupt and schedule the first tick. */
_xt_isr_attach(INUM_TICK, sdk__xt_timer_int, NULL); _xt_isr_attach(INUM_TICK, sdk__xt_timer_int);
_xt_isr_unmask(BIT(INUM_TICK)); _xt_isr_unmask(BIT(INUM_TICK));
sdk__xt_tick_timer_init(); sdk__xt_tick_timer_init();
@ -185,11 +229,9 @@ size_t xPortGetFreeHeapSize( void )
struct mallinfo mi = mallinfo(); struct mallinfo mi = mallinfo();
uint32_t brk_val = (uint32_t) sbrk(0); uint32_t brk_val = (uint32_t) sbrk(0);
intptr_t sp = (intptr_t)xPortSupervisorStackPointer; uint32_t sp = xPortSupervisorStackPointer;
if (sp == 0) { if(sp == 0) /* scheduler not started */
/* scheduler not started */ __asm__ __volatile__ ("mov %0, a1\n" : "=a"(sp));
SP(sp);
}
return sp - brk_val + mi.fordblks; return sp - brk_val + mi.fordblks;
} }
@ -200,6 +242,8 @@ void vPortEndScheduler( void )
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* Each task maintains its own interrupt status in the critical nesting
variable. */
static unsigned portBASE_TYPE uxCriticalNesting = 0; static unsigned portBASE_TYPE uxCriticalNesting = 0;
/* These nested vPortEnter/ExitCritical macros are called by SDK /* These nested vPortEnter/ExitCritical macros are called by SDK
@ -208,42 +252,18 @@ static unsigned portBASE_TYPE uxCriticalNesting = 0;
* It may be possible to replace the global nesting count variable * It may be possible to replace the global nesting count variable
* with a save/restore of interrupt level, although it's difficult as * with a save/restore of interrupt level, although it's difficult as
* the functions have no return value. * the functions have no return value.
*
* These should not be called from the NMI in regular operation and
* the NMI must not touch the interrupt mask, but that might occur in
* exceptional paths such as aborts and debug code.
*/ */
void IRAM vPortEnterCritical(void) { void IRAM vPortEnterCritical( void )
{
portDISABLE_INTERRUPTS(); portDISABLE_INTERRUPTS();
uxCriticalNesting++; uxCriticalNesting++;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void IRAM vPortExitCritical(void) { void IRAM vPortExitCritical( void )
{
uxCriticalNesting--; uxCriticalNesting--;
if (uxCriticalNesting == 0) if( uxCriticalNesting == 0 )
portENABLE_INTERRUPTS(); portENABLE_INTERRUPTS();
} }
/* Backward compatibility, for the sdk library. */
signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode,
const signed char * const pcName,
unsigned short usStackDepth,
void *pvParameters,
unsigned portBASE_TYPE uxPriority,
TaskHandle_t *pxCreatedTask,
portSTACK_TYPE *puxStackBuffer,
const MemoryRegion_t * const xRegions) {
(void)puxStackBuffer;
(void)xRegions;
return xTaskCreate(pxTaskCode, (const char * const)pcName, usStackDepth,
pvParameters, uxPriority, pxCreatedTask);
}
BaseType_t xQueueGenericReceive(QueueHandle_t xQueue, void * const pvBuffer,
TickType_t xTicksToWait, const BaseType_t xJustPeeking) {
configASSERT(xJustPeeking == 0);
return xQueueReceive(xQueue, pvBuffer, xTicksToWait);
}

View file

@ -1,30 +1,67 @@
/* /*
* FreeRTOS Kernel V10.2.0 FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in ***************************************************************************
* the Software without restriction, including without limitation the rights to * *
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * FreeRTOS provides completely free yet professionally developed, *
* the Software, and to permit persons to whom the Software is furnished to do so, * robust, strictly quality controlled, supported, and cross *
* subject to the following conditions: * platform software that has become a de facto standard. *
* * *
* The above copyright notice and this permission notice shall be included in all * Help yourself get started quickly and support the FreeRTOS *
* copies or substantial portions of the Software. If you wish to use our Amazon * project by purchasing a FreeRTOS tutorial book, reference *
* FreeRTOS name, please do so in a fair use way that does not cause confusion. * manual, or both from: http://www.FreeRTOS.org/Documentation *
* * *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * Thank you! *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * *
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR ***************************************************************************
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN This file is part of the FreeRTOS distribution.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* FreeRTOS is free software; you can redistribute it and/or modify it under
* http://www.FreeRTOS.org the terms of the GNU General Public License (version 2) as published by the
* http://aws.amazon.com/freertos Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
*
* 1 tab == 4 spaces! >>! NOTE: The modification to the GPL is included to allow you to distribute
*/ >>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#ifndef PORTMACRO_H #ifndef PORTMACRO_H
#define PORTMACRO_H #define PORTMACRO_H
@ -55,20 +92,15 @@ extern "C" {
#define portDOUBLE double #define portDOUBLE double
#define portLONG long #define portLONG long
#define portSHORT short #define portSHORT short
#define portSTACK_TYPE uint32_t #define portSTACK_TYPE unsigned portLONG
#define portBASE_TYPE long #define portBASE_TYPE long
typedef portSTACK_TYPE StackType_t; typedef uint32_t portTickType;
typedef portBASE_TYPE BaseType_t; #define portMAX_DELAY ( portTickType ) 0xffffffff
typedef unsigned portBASE_TYPE UBaseType_t;
typedef uint32_t TickType_t;
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
/* Architecture specifics. */ /* Architecture specifics. */
#define portARCH_NAME "ESP8266"
#define portSTACK_GROWTH ( -1 ) #define portSTACK_GROWTH ( -1 )
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8 #define portBYTE_ALIGNMENT 8
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -107,7 +139,7 @@ void PendSV(enum SVC_ReqType);
ESPTODO: It may be possible to just read the 'ps' register instead ESPTODO: It may be possible to just read the 'ps' register instead
of accessing thisvariable. of accessing thisvariable.
*/ */
extern uint8_t sdk_NMIIrqIsOn; extern char sdk_NMIIrqIsOn;
extern char level1_int_disabled; extern char level1_int_disabled;
extern unsigned cpu_sr; extern unsigned cpu_sr;
@ -119,9 +151,6 @@ extern unsigned cpu_sr;
prefer to _xt_disable_interrupts & _xt_enable_interrupts and store prefer to _xt_disable_interrupts & _xt_enable_interrupts and store
the ps value in a local variable - that approach is recursive-safe the ps value in a local variable - that approach is recursive-safe
and generally better. and generally better.
The NMI must not touch the interrupt mask and it should not in
regular operation, but there is a guard here just in case.
*/ */
inline static __attribute__((always_inline)) void portDISABLE_INTERRUPTS(void) inline static __attribute__((always_inline)) void portDISABLE_INTERRUPTS(void)
{ {
@ -151,10 +180,6 @@ not necessary for to use this port. They are defined so the common demo files
(which build with all the ports) will build. */ (which build with all the ports) will build. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
/* FreeRTOS API functions should not be called from the NMI handler. */
#define portASSERT_IF_INTERRUPT_PRIORITY_INVALID() configASSERT(sdk_NMIIrqIsOn == 0)
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -1,20 +0,0 @@
Each real time kernel port consists of three files that contain the core kernel
components and are common to every port, and one or more files that are
specific to a particular microcontroller and/or compiler.
+ The FreeRTOS/Source/Portable/MemMang directory contains the five sample
memory allocators as described on the http://www.FreeRTOS.org WEB site.
+ The other directories each contain files specific to a particular
microcontroller or compiler, where the directory name denotes the compiler
specific files the directory contains.
For example, if you are interested in the [compiler] port for the [architecture]
microcontroller, then the port specific files are contained in
FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the
only port you are interested in then all the other directories can be
ignored.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

21
FreeRTOS/readme.txt Normal file
View file

@ -0,0 +1,21 @@
Directories:
+ The FreeRTOS/Source directory contains the FreeRTOS source code, and contains
its own readme file.
+ The FreeRTOS/Demo directory contains a demo application for every official
FreeRTOS port, and contains its own readme file.
+ See http://www.freertos.org/a00017.html for full details of the directory
structure and information on locating the files you require.
The easiest way to use FreeRTOS is to start with one of the pre-configured demo
application projects (found in the FreeRTOS/Demo directory). That way you will
have the correct FreeRTOS source files included, and the correct include paths
configured. Once a demo application is building and executing you can remove
the demo application file, and start to add in your own application source
files.
See also -
http://www.freertos.org/FreeRTOS-quick-start-guide.html
http://www.freertos.org/FAQHelp.html

View file

@ -2,7 +2,7 @@
A community developed open source [FreeRTOS](http://www.freertos.org/)-based framework for ESP8266 WiFi-enabled microcontrollers. Intended for use in both commercial and open source projects. A community developed open source [FreeRTOS](http://www.freertos.org/)-based framework for ESP8266 WiFi-enabled microcontrollers. Intended for use in both commercial and open source projects.
Originally based on, but substantially different from, the [Espressif IOT RTOS SDK](https://github.com/espressif/ESP8266_RTOS_SDK). Originally based on, but substantially different from, the [Espressif IOT RTOS SDK](https://github.com/espressif/esp_iot_rtos_sdk).
## Resources ## Resources
@ -12,13 +12,13 @@ Email discussion list: https://groups.google.com/d/forum/esp-open-rtos
IRC channel: #esp-open-rtos on Freenode ([Web Chat Link](http://webchat.freenode.net/?channels=%23esp-open-rtos&uio=d4)). IRC channel: #esp-open-rtos on Freenode ([Web Chat Link](http://webchat.freenode.net/?channels=%23esp-open-rtos&uio=d4)).
Github issues list/bugtracker: https://github.com/superhouse/esp-open-rtos/issues Github issues list/bugtracker: http://github.com/superhouse/esp-open-rtos/issues
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/SuperHouse/esp-open-rtos/blob/master/code_of_conduct.md). By participating in this project you agree to abide by its terms. Please note that this project is released with a [Contributor Code of Conduct](https://github.com/SuperHouse/esp-open-rtos/blob/master/code_of_conduct.md). By participating in this project you agree to abide by its terms.
## Quick Start ## Quick Start
* Install [esp-open-sdk](https://github.com/pfalcon/esp-open-sdk/), build it with `make toolchain esptool libhal STANDALONE=n`, then edit your PATH and add the generated toolchain `bin` directory. The path will be something like `/path/to/esp-open-sdk/xtensa-lx106-elf/bin`. (Despite the similar name esp-open-sdk has different maintainers - but we think it's fantastic!) * Install [esp-open-sdk](https://github.com/pfalcon/esp-open-sdk/), build it with `make STANDALONE=n`, then edit your PATH and add the generated toolchain `bin` directory. (Despite the similar name esp-open-sdk has different maintainers - but we think it's fantastic!)
(Other toolchains may also work, as long as a gcc cross-compiler is available on the PATH and libhal (and libhal headers) are compiled and available to gcc. The proprietary Tensilica "xcc" compiler will probably not work.) (Other toolchains may also work, as long as a gcc cross-compiler is available on the PATH and libhal (and libhal headers) are compiled and available to gcc. The proprietary Tensilica "xcc" compiler will probably not work.)
@ -33,13 +33,15 @@ git clone --recursive https://github.com/Superhouse/esp-open-rtos.git
cd esp-open-rtos cd esp-open-rtos
``` ```
* To build any examples that use WiFi, create `include/private_ssid_config.h` defining the two macro defines: * To build any examples that use WiFi, edit `include/ssid_config.h` and change the two macro defines:
```c ```c
#define WIFI_SSID "mywifissid" #define WIFI_SSID "mywifissid"
#define WIFI_PASS "my secret password" #define WIFI_PASS "my secret password"
``` ```
Remove the `#warning` line and follow the git ignore instructions written in the header file to keep your credentials from being pushed to Github.
* Build an example project (found in the 'examples' directory) and flash it to a serial port: * Build an example project (found in the 'examples' directory) and flash it to a serial port:
``` ```
@ -77,9 +79,9 @@ Current status is alpha quality, actively developed. AP STATION mode (ie wifi cl
## Open Source Components ## Open Source Components
* [FreeRTOS](http://www.freertos.org/) V10.2.0 * [FreeRTOS](http://freertos.org) V7.5.2
* [lwIP](http://lwip.wikia.com/wiki/LwIP_Wiki) v2.0.3, with [some modifications](https://github.com/ourairquality/lwip/). * [lwIP](http://lwip.wikia.com/wiki/LwIP_Wiki) v1.4.1, modified via the [esp-lwip project](https://github.com/kadamski/esp-lwip) by @kadamski.
* [newlib](https://github.com/ourairquality/newlib) v3.0.0, with patches for xtensa support and locking stubs for thread-safe operation on FreeRTOS. * [newlib](https://github.com/projectgus/newlib-xtensa) v2.2.0, with patches for xtensa support and locking stubs for thread-safe operation on FreeRTOS.
For details of how third party libraries are integrated, [see the wiki page](https://github.com/SuperHouse/esp-open-rtos/wiki/Third-Party-Libraries). For details of how third party libraries are integrated, [see the wiki page](https://github.com/SuperHouse/esp-open-rtos/wiki/Third-Party-Libraries).
@ -100,7 +102,7 @@ Some binary libraries appear to contain unattributed open source code:
* BSD license (as described in LICENSE) applies to original source files, [lwIP](http://lwip.wikia.com/wiki/LwIP_Wiki). lwIP is Copyright (C) Swedish Institute of Computer Science. * BSD license (as described in LICENSE) applies to original source files, [lwIP](http://lwip.wikia.com/wiki/LwIP_Wiki). lwIP is Copyright (C) Swedish Institute of Computer Science.
* FreeRTOS (since v10) is provided under the MIT license. License details in files under FreeRTOS dir. FreeRTOS is Copyright (C) Amazon. * FreeRTOS is provided under the GPL with the FreeRTOS linking exception, allowing non-GPL firmwares to be produced using FreeRTOS as the RTOS core. License details in files under FreeRTOS dir. FreeRTOS is Copyright (C) Real Time Engineers Ltd.
* Source & binary components from the [Espressif IOT RTOS SDK](https://github.com/espressif/esp_iot_rtos_sdk) were released under the MIT license. Source code components are relicensed here under the BSD license. The original parts are Copyright (C) Espressif Systems. * Source & binary components from the [Espressif IOT RTOS SDK](https://github.com/espressif/esp_iot_rtos_sdk) were released under the MIT license. Source code components are relicensed here under the BSD license. The original parts are Copyright (C) Espressif Systems.
@ -124,7 +126,7 @@ If you are contributing code, *please ensure that it can be licensed under the B
* Code from Espressif IoT SDK cannot be merged, as it is provided under either the "Espressif General Public License" or the "Espressif MIT License", which are not compatible with the BSD license. * Code from Espressif IoT SDK cannot be merged, as it is provided under either the "Espressif General Public License" or the "Espressif MIT License", which are not compatible with the BSD license.
* Recent releases of the Espressif IoT RTOS SDK cannot be merged, as they changed from MIT License to the "Espressif MIT License" which is not BSD compatible. The Espressif binaries used in esp-open-rtos were taken from [revision ec75c85, as this was the last MIT Licensed revision](https://github.com/espressif/ESP8266_RTOS_SDK/commit/43585fa74550054076bdf4bfe185e808ad0da83e). * Recent releases of the Espressif IoT RTOS SDK cannot be merged, as they changed from MIT License to the "Espressif MIT License" which is not BSD compatible. The Espressif binaries used in esp-open-rtos were taken from [revision ec75c85, as this was the last MIT Licensed revision](https://github.com/espressif/esp_iot_rtos_sdk/commit/43585fa74550054076bdf4bfe185e808ad0da83e).
For code submissions based on reverse engineered binary functionality, please either reverse engineer functionality from MIT Licensed Espressif releases or make sure that the reverse engineered code does not directly copy the code structure of the binaries - it cannot be a "derivative work" of an incompatible binary. For code submissions based on reverse engineered binary functionality, please either reverse engineer functionality from MIT Licensed Espressif releases or make sure that the reverse engineered code does not directly copy the code structure of the binaries - it cannot be a "derivative work" of an incompatible binary.

5
binary_sdk/component.mk Normal file
View file

@ -0,0 +1,5 @@
# Component makefile for binary SDK components
binary_sdk_SRC_DIR = $(binary_sdk_ROOT)libmain $(binary_sdk_ROOT)libnet80211 $(binary_sdk_ROOT)libphy $(binary_sdk_ROOT)libpp $(binary_sdk_ROOT)libwpa
$(eval $(call component_compile_rules,binary_sdk))

32
binary_sdk/dump_libraries.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
#
# Simple bash script to regenerate a set of binary SDK subdirectories
# containing assembler code disassembled using xtobjdis.
#
#
INDIR=$1
OUTDIR=$2
if [ -z ${OUTDIR} ] || [ -z ${INDIR}; then
echo "Usage: $0 [Input library dir] [Output binary_sdk dir]"
exit 1
fi
INDIR=$(realpath ${INDIR})
OUTDIR=$(realpath ${OUTDIR})
set -e -x
for LIB in ${INDIR}/*.a; do
LIB=$(basename ${LIB%.a})
echo $LIB
mkdir -p ${OUTDIR}/${LIB}
cd ${OUTDIR}/$LIB
ar x ${INDIR}/${LIB}.a
for O in *.o; do
O=${O%.o}
xtobjdis --rewrite-as-source ${O}.o > ${O}.S
rm ${O}.o
done
done

View file

@ -0,0 +1,602 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .text+0x4
.balign 4
.Lfunc001: movi a5, .Ldata001 # 4: 51ffff
l8ui a2, a5, 0 /* [.Ldata001] */ # 7: 220500
addi a3, a5, 32 /* .bss+0x20 */ # a: 32c520
addi a2, a2, 1 /* [.Ldata001]+0x1 */ # d: 1b22
extui a2, a2, 0, 8 # f: 202074
bltui a2, 5, .Lbr001 # 12: b65208
addi a3, a2, -1 # 15: 0b32
s8i a3, a5, 0 /* a3 -> [.Ldata001] */ # 17: 324500
movi a2, 0 /* 0x00000000 */ # 1a: 0c02
ret /* 0x00000000 */ # 1c: 0df0
.Lbr001: s8i a2, a5, 0 /* a2 -> [.Ldata001] */ # 1e: 224500
l8ui a2, a5, 1 /* [.Ldata002] */ # 21: 220501
addi a4, a2, 1 /* [.Ldata002]+0x1 */ # 24: 1b42
addx8 a2, a2, a3 # 26: 3022b0
extui a4, a4, 0, 8 # 29: 404074
bltui a4, 4, .Lbr002 # 2c: b64401
movi a4, 0 /* 0x00000000 */ # 2f: 0c04
.Lbr002: s8i a4, a5, 1 /* a4 -> [.Ldata002] */ # 31: 424501
ret # 34: 0df0
.literal_position # 38: 24000000
# 3c: 00000000
# 40: 30000000
# 44: 00000000
# 48: 00000000
# 4c: 00000000
# 50: 00000000
# Function @ .text+0x54
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.Lfunc002: addi sp, sp, -16 /* (local0) */ # 54: 12c1f0
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 57: 0921
call0 .Lfunc001 # 59: 85faff
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 5c: 2901
bnez a2, .Lbr003 # 5e: cca2
movi a2, .Lstr004 # 60: 21f6ff
call0 printf # 63: 01f8ffc0
# 67: 0000
j .Lbr005 # 69: 060b00
.Lbr003: mov a3, sp /* (local0) */ # 6c: 3d01
addi a4, sp, 4 /* (local1) */ # 6e: 4b41
movi a5, 0 /* 0x00000000 */ # 70: 0c05
s32i a5, a2, 0 # 72: 5902
movi a2, .Ldata001 # 74: 21f2ff
s32i a5, sp, 4 /* 0x00000000 -> [(local1)] */ # 77: 5911
l32i a2, a2, 16 /* [.Ldata004] */ # 79: 2842
call0 xQueueGenericSendFromISR # 7b: 01f3ffc0
# 7f: 0000
mov a3, a2 # 81: 3d02
beqi a2, 1, .Lbr004 # 83: 261208
movi a2, .Lstr005 # 86: 21eeff
call0 printf # 89: 01f0ffc0
# 8d: 0000
.Lbr004: l32i a3, sp, 4 /* [(local1)] */ # 8f: 3811
beqz a3, .Lbr005 # 91: 8c43
call0 vTaskSwitchContext # 93: 01efffc0
# 97: 0000
.Lbr005: l32i a0, sp, 8 /* [(local2)] */ # 99: 0821
addi sp, sp, 16 /* (top of frame) */ # 9b: 12c110
ret # 9e: 0df0
.section .bss, "aw", @nobits
.Ldata001: .byte 0x00
.Ldata002: .byte 0x00
.byte 0x00, 0x00
.Ldata003: .word 0x00000000 # 4: 00000000
.global sdk_debug_timer
.type sdk_debug_timer, @object
sdk_debug_timer:
.word 0x00000000 # 8: 00000000
.global sdk_debug_timerfn
.type sdk_debug_timerfn, @object
sdk_debug_timerfn:
.word 0x00000000 # c: 00000000
.Ldata004: .word 0x00000000 # 10: 00000000
.space 44
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# Function @ .irom0.text+0xc
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc003: addi sp, sp, -16 /* (local0) */ # c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # f: 0901
call0 vPortEnterCritical # 11: 01fcffc0
# 15: 0000
movi a2, .Ldata001 # 17: 21faff
l8ui a0, a2, 0 /* [.Ldata001] */ # 1a: 020200
addi a0, a0, -1 /* [.Ldata001]-0x1 */ # 1d: 0b00
s8i a0, a2, 0 /* [.Ldata001]-0x1 -> [.Ldata001] */ # 1f: 024200
call0 vPortExitCritical # 22: 01f9ffc0
# 26: 0000
l32i a0, sp, 0 /* [(local0)] */ # 28: 0801
addi sp, sp, 16 /* (top of frame) */ # 2a: 12c110
ret # 2d: 0df0
.literal_position # 30: 00060060
# Function @ .irom0.text+0x34
.balign 4
.Lfunc004: movi a3, 0x60000600 # 34: 31ffff
memw # 37: c02000
s32i a2, a3, 48 /* arg0 -> [0x60000630] */ # 3a: 29c3
ret /* arg0 */ # 3c: 0df0
.literal_position # 40: 00060060
# Function @ .irom0.text+0x44
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc005: addi sp, sp, -16 /* (local0) */ # 44: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 47: 0901
movi a4, 0x60000600 # 49: 41fdff
memw # 4c: c02000
l32i a4, a4, 36 /* [0x60000624] */ # 4f: 4894
sub a0, a2, a4 # 51: 4002c0
addi a3, a0, -40 # 54: 32c0d8
bgei a3, 1, .Lbr007 # 57: e61314
bgei a0, 1, .Lbr006 # 5a: e61008
addi a2, a4, 40 /* [0x60000624]+0x28 */ # 5d: 22c428
call0 .Lfunc004 # 60: 05fdff
j .Lbr008 # 63: c60200
.Lbr006: addi a2, a2, 44 /* arg0+0x2c */ # 66: 22c22c
call0 .Lfunc004 # 69: 85fcff
j .Lbr008 # 6c: 860000
.Lbr007: call0 .Lfunc004 # 6f: 45fcff
.Lbr008: l32i a0, sp, 0 /* [(local0)] */ # 72: 0801
addi sp, sp, 16 /* (top of frame) */ # 74: 12c110
ret # 77: 0df0
.balign 4
# Function @ .irom0.text+0x7c
.balign 4
.global sdk_ets_timer_setfn
.type sdk_ets_timer_setfn, @function
sdk_ets_timer_setfn:
s32i a3, a2, 16 /* arg1 -> [arg0+0x10] */ # 7c: 3942
s32i a4, a2, 24 /* arg2 -> [arg0+0x18] */ # 7e: 4962
movi a5, -1 /* 0xffffffff */ # 80: 7cf5
movi a6, 0 /* 0x00000000 */ # 82: 0c06
s32i a6, a2, 8 /* 0x00000000 -> [arg0+0x8] */ # 84: 6922
s32i a6, a2, 12 /* 0x00000000 -> [arg0+0xc] */ # 86: 6932
s32i a5, a2, 0 /* 0xffffffff -> [arg0] */ # 88: 5902
ret /* arg0 */ # 8a: 0df0
.literal_position # 8c: 00000000
# 90: 00000000
# 94: 08000000
# 98: 00000000
# Function @ .irom0.text+0x9c
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.Lfunc006: addi sp, sp, -16 /* (local0) */ # 9c: 12c1f0
movi a6, .Ldata001 # 9f: 61fbff
s32i a0, sp, 4 /* a0 -> [(local1)] */ # a2: 0911
l32i a0, a6, 4 /* [.Ldata003] */ # a4: 0816
movi a5, 0 /* 0x00000000 */ # a6: 0c05
beqz a0, .Lbr010 # a8: 9c00
.Lbr009: l32i a4, a0, 8 # aa: 4820
sub a4, a2, a4 # ac: 4042c0
blti a4, 1, .Lbr011 # af: a6140b
mov a5, a0 # b2: 5d00
l32i a0, a0, 0 # b4: 0800
bnez a0, .Lbr009 # b6: 5600ff
j .Lbr011 # b9: 460000
.Lbr010: movi a5, 0 /* 0x00000000 */ # bc: 0c05
.Lbr011: s32i a3, sp, 0 /* arg1 -> [(local0)] */ # be: 3901
s32i a0, a3, 0 /* a0 -> [arg1] */ # c0: 0903
s32i a2, a3, 8 /* arg0 -> [arg1+0x8] */ # c2: 2923
beqz a5, .Lbr012 # c4: 8c35
s32i a3, a5, 0 # c6: 3905
j .Lbr013 # c8: 060200
.Lbr012: l32i a5, sp, 0 /* [(local0)] */ # cb: 5801
s32i a5, a6, 4 /* [(local0)] -> [.Ldata003] */ # cd: 5916
call0 .Lfunc005 # cf: 45f7ff
l32i a3, sp, 0 /* [(local0)] */ # d2: 3801
.Lbr013: l32i a6, a3, 0 # d4: 6803
l32i a0, sp, 4 /* [(local1)] */ # d6: 0811
bne a6, a3, .Lbr015 # d8: 379611
movi a2, .Lstr001 # db: 21edff
movi a3, .Lstr002 # de: 31edff
movi a4, 209 /* 0x000000d1 */ # e1: 42a0d1
call0 ets_printf # e4: 01edffc0
# e8: 0000
.Lbr014: j .Lbr014 /* (halt) */ # ea: 06ffff
.Lbr015: addi sp, sp, 16 /* (top of frame) */ # ed: 12c110
ret # f0: 0df0
.literal_position # f4: 14000000
# f8: 404b4c00
# fc: 40420f00
# 100: 00060060
# 104: 00000000
# 108: 00000000
# 10c: 00000000
# 110: 00000000
# Function @ .irom0.text+0x114
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global sdk_ets_timer_arm_ms_us
.type sdk_ets_timer_arm_ms_us, @function
sdk_ets_timer_arm_ms_us:
addi sp, sp, -16 /* (local0) */ # 114: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 117: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 119: d921
mov a12, a2 /* arg0 */ # 11b: cd02
mov a2, a3 /* arg1 */ # 11d: 2d03
mov a3, a4 /* arg2 */ # 11f: 3d04
l32i a4, a12, 0 /* [arg0] */ # 121: 480c
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 123: 0901
beqi a4, -1, .Lbr017 # 125: 26040d
movi a2, .Lstr003 # 128: 21f3ff
mov a3, a12 /* arg0 */ # 12b: 3d0c
call0 printf # 12d: 01f5ffc0
# 131: 0000
.Lbr016: j .Lbr016 /* (halt) */ # 133: 06ffff
.Lbr017: bnei a5, 1, .Lbr018 # 136: 661505
movi a0, 1000 /* 0x000003e8 */ # 139: 02a3e8
mull a2, a2, a0 # 13c: 002282
.Lbr018: beqz a2, .Lbr020 # 13f: ace2
s32i a3, sp, 12 /* arg2 -> [(local3)] */ # 141: 3931
movi a4, 858 /* 0x0000035a */ # 143: 42a35a
bgeu a4, a2, .Lbr019 # 146: 27b411
srli a13, a2, 2 # 149: 20d241
extui a0, a2, 0, 2 # 14c: 200014
addx4 a0, a0, a0 # 14f: 0000a0
addx4 a13, a13, a13 # 152: d0dda0
addx4 a13, a13, a0 # 155: 00dda0
j .Lbr021 # 158: c60500
.Lbr019: movi a4, 0x004c4b40 # 15b: 41e7ff
movi a3, 0x000f4240 # 15e: 31e7ff
mull a2, a2, a4 # 161: 402282
call0 __udivsi3 # 164: 01e9ffc0
# 168: 0000
mov a13, a2 # 16a: dd02
l32i a3, sp, 12 /* [(local3)] */ # 16c: 3831
j .Lbr021 # 16e: 460000
.Lbr020: movi a13, 0 /* 0x00000000 */ # 171: 0c0d
.Lbr021: beqz a3, .Lbr022 # 173: 8c03
s32i a13, a12, 12 /* a13 -> [arg0+0xc] */ # 175: d93c
.Lbr022: call0 vPortEnterCritical # 177: 01e5ffc0
# 17b: 0000
mov a3, a12 /* arg0 */ # 17d: 3d0c
movi a2, 0x60000600 # 17f: 21e0ff
memw # 182: c02000
l32i a2, a2, 36 /* [0x60000624] */ # 185: 2892
add a2, a13, a2 # 187: 2a2d
call0 .Lfunc006 # 189: 05f1ff
call0 vPortExitCritical # 18c: 01e1ffc0
# 190: 0000
l32i a12, sp, 4 /* [(local1)] */ # 192: c811
l32i a13, sp, 8 /* [(local2)] */ # 194: d821
l32i a0, sp, 0 /* [(local0)] */ # 196: 0801
addi sp, sp, 16 /* (top of frame) */ # 198: 12c110
ret # 19b: 0df0
.balign 4
# Function @ .irom0.text+0x1a0
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ets_timer_arm_us
.type sdk_ets_timer_arm_us, @function
sdk_ets_timer_arm_us:
movi a5, 0 /* 0x00000000 */ # 1a0: 0c05
addi sp, sp, -16 /* (local0) */ # 1a2: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1a5: 0901
call0 sdk_ets_timer_arm_ms_us # 1a7: 050000
l32i a0, sp, 0 /* [(local0)] */ # 1aa: 0801
addi sp, sp, 16 /* (top of frame) */ # 1ac: 12c110
ret # 1af: 0df0
.balign 4
# Function @ .irom0.text+0x1b4
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ets_timer_arm
.type sdk_ets_timer_arm, @function
sdk_ets_timer_arm:
movi a5, 1 /* 0x00000001 */ # 1b4: 0c15
addi sp, sp, -16 /* (local0) */ # 1b6: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1b9: 0901
call0 sdk_ets_timer_arm_ms_us # 1bb: 050000
l32i a0, sp, 0 /* [(local0)] */ # 1be: 0801
addi sp, sp, 16 /* (top of frame) */ # 1c0: 12c110
ret # 1c3: 0df0
.literal_position # 1c8: 00000000
# 1cc: 00000000
# 1d0: 00000000
# Function @ .irom0.text+0x1d4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ets_timer_disarm
.type sdk_ets_timer_disarm, @function
sdk_ets_timer_disarm:
addi sp, sp, -16 /* (local0) */ # 1d4: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1d7: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1d9: 0901
mov a12, a2 /* arg0 */ # 1db: cd02
call0 vPortEnterCritical # 1dd: 01fbffc0
# 1e1: 0000
movi a5, .Ldata001 # 1e3: 51f9ff
l32i a0, a5, 4 /* [.Ldata003] */ # 1e6: 0815
movi a2, 0 /* 0x00000000 */ # 1e8: 0c02
beqz a0, .Lbr024 # 1ea: 8cb0
.Lbr023: beq a12, a0, .Lbr025 # 1ec: 071c0b
mov a2, a0 # 1ef: 2d00
l32i a0, a0, 0 # 1f1: 0800
bnez a0, .Lbr023 # 1f3: 5650ff
j .Lbr027 # 1f6: 860300
.Lbr024: movi a2, 0 /* 0x00000000 */ # 1f9: 0c02
.Lbr025: beqz a0, .Lbr027 # 1fb: 8c90
l32i a0, a0, 0 # 1fd: 0800
bnez a2, .Lbr026 # 1ff: cc32
s32i a0, a5, 4 /* a0 -> [.Ldata003] */ # 201: 0915
j .Lbr027 # 203: 460000
.Lbr026: s32i a0, a2, 0 # 206: 0902
.Lbr027: call0 vPortExitCritical # 208: 01f2ffc0
# 20c: 0000
movi a0, 0 /* 0x00000000 */ # 20e: 0c00
movi a2, -1 /* 0xffffffff */ # 210: 7cf2
s32i a2, a12, 0 /* 0xffffffff -> [arg0] */ # 212: 290c
s32i a0, a12, 12 /* 0x00000000 -> [arg0+0xc] */ # 214: 093c
l32i a12, sp, 4 /* [(local1)] */ # 216: c811
l32i a0, sp, 0 /* [(local0)] */ # 218: 0801
addi sp, sp, 16 /* (top of frame) */ # 21a: 12c110
ret /* 0xffffffff */ # 21d: 0df0
.literal_position # 220: 00000000
# 224: 08000000
# 228: 00000000
# Function @ .irom0.text+0x22c
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ets_timer_done
.type sdk_ets_timer_done, @function
sdk_ets_timer_done:
addi sp, sp, -16 /* (local0) */ # 22c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 22f: 0901
l32i a0, a2, 0 /* [arg0] */ # 231: 0802
beqi a0, -1, .Lbr029 # 233: 260011
movi a2, .Lstr001 # 236: 21faff
movi a3, .Lstr002 # 239: 31faff
movi a4, 288 /* 0x00000120 */ # 23c: 42a120
call0 ets_printf # 23f: 01faffc0
# 243: 0000
.Lbr028: j .Lbr028 /* (halt) */ # 245: 06ffff
.Lbr029: movi a3, 0 /* 0x00000000 */ # 248: 0c03
movi a4, 0 /* 0x00000000 */ # 24a: 0c04
call0 sdk_ets_timer_setfn # 24c: 050000
l32i a0, sp, 0 /* [(local0)] */ # 24f: 0801
addi sp, sp, 16 /* (top of frame) */ # 251: 12c110
ret # 254: 0df0
.literal_position # 258: 00060060
# 25c: 00000000
# 260: 00000000
# 264: 00000000
# 268: 00060060
# 26c: 00000000
# 270: 00000000
# 274: 00000000
# 278: 00000000
# Function @ .irom0.text+0x27c
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ets_timer_handler_isr
.type sdk_ets_timer_handler_isr, @function
sdk_ets_timer_handler_isr:
addi sp, sp, -16 /* (local0) */ # 27c: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 27f: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 281: 0901
call0 vPortEnterCritical # 283: 01faffc0
# 287: 0000
movi a3, 0x60000600 # 289: 31f3ff
memw # 28c: c02000
movi a0, .Ldata001 # 28f: 01f3ff
l32i a5, a3, 36 /* [0x60000624] */ # 292: 5893
.Lbr030: l32i a12, a0, 4 /* [.Ldata003] */ # 294: c810
beqz a12, .Lbr033 # 296: 162c05
l32i a2, a12, 8 /* [[.Ldata003]+0x8] */ # 299: 282c
sub a4, a2, a5 # 29b: 5042c0
bgei a4, 1, .Lbr032 # 29e: e61445
movi a5, -1 /* 0xffffffff */ # 2a1: 7cf5
movi a7, .Ldata001 # 2a3: 71efff
l32i a8, a12, 16 /* [[.Ldata003]+0x10] */ # 2a6: 884c
s32i a8, a7, 12 /* [[.Ldata003]+0x10] -> [sdk_debug_timerfn] */ # 2a8: 8937
s32i a12, a7, 8 /* [.Ldata003] -> [sdk_debug_timer] */ # 2aa: c927
l32i a6, a12, 0 /* [[.Ldata003]] */ # 2ac: 680c
s32i a6, a7, 4 /* [[.Ldata003]] -> [.Ldata003] */ # 2ae: 6917
s32i a5, a12, 0 /* 0xffffffff -> [[.Ldata003]] */ # 2b0: 590c
call0 vPortExitCritical # 2b2: 01efffc0
# 2b6: 0000
l32i a0, a12, 16 /* [[.Ldata003]+0x10] */ # 2b8: 084c
l32i a2, a12, 24 /* [[.Ldata003]+0x18] */ # 2ba: 286c
callx0 a0 /* [[.Ldata003]+0x10] */ # 2bc: c00000
call0 vPortEnterCritical # 2bf: 01edffc0
# 2c3: 0000
l32i a2, a12, 0 /* [[.Ldata003]] */ # 2c5: 280c
l32i a0, a12, 12 /* [[.Ldata003]+0xc] */ # 2c7: 083c
bnei a2, -1, .Lbr031 # 2c9: 66020c
beqz a0, .Lbr031 # 2cc: 8c90
l32i a2, a12, 8 /* [[.Ldata003]+0x8] */ # 2ce: 282c
mov a3, a12 /* [.Ldata003] */ # 2d0: 3d0c
add a2, a2, a0 # 2d2: 0a22
s32i a2, a12, 8 /* a2 -> [[.Ldata003]+0x8] */ # 2d4: 292c
call0 .Lfunc006 # 2d6: 45dcff
.Lbr031: movi a0, .Ldata001 # 2d9: 01e2ff
memw # 2dc: c02000
movi a3, 0x60000600 # 2df: 31e2ff
l32i a5, a3, 36 /* [0x60000624] */ # 2e2: 5893
j .Lbr030 # 2e4: 06ebff
.Lbr032: beqz a12, .Lbr033 # 2e7: 8c1c
call0 .Lfunc005 # 2e9: 85d5ff
.Lbr033: call0 vPortExitCritical # 2ec: 01e3ffc0
# 2f0: 0000
l32i a12, sp, 4 /* [(local1)] */ # 2f2: c811
l32i a0, sp, 0 /* [(local0)] */ # 2f4: 0801
addi sp, sp, 16 /* (top of frame) */ # 2f6: 12c110
ret # 2f9: 0df0
.literal_position # 2fc: 00000000
# 300: 00000000
# Function @ .irom0.text+0x304
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.Lfunc007: addi sp, sp, -16 /* (local0) */ # 304: 12c1f0
s32i a12, sp, 8 /* a12 -> [(local2)] */ # 307: c921
movi a12, .Ldata001 # 309: c1fcff
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 30c: 0911
.Lbr034: l32i a2, a12, 16 /* [.Ldata004] */ # 30e: 284c
mov a3, sp /* (local0) */ # 310: 3d01
movi a4, -1 /* 0xffffffff */ # 312: 7cf4
movi a5, 0 /* 0x00000000 */ # 314: 0c05
call0 xQueueGenericReceive # 316: 01faffc0
# 31a: 0000
bnei a2, 1, .Lbr034 # 31c: 6612ee
l32i a0, sp, 0 /* [(local0)] */ # 31f: 0801
l32i a0, a0, 0 /* [[(local0)]] */ # 321: 0800
bnez a0, .Lbr035 # 323: cc30
movi a2, 0 /* 0x00000000 */ # 325: 0c02
call0 sdk_ets_timer_handler_isr # 327: 050000
.Lbr035: call0 .Lfunc003 # 32a: 05ceff
j .Lbr034 # 32d: 46f7ff
.literal_position # 330: 00000000
# 334: 54000000
# 338: 00000000
# 33c: 40000000
# 340: 04030000
# 344: 50000000
# 348: 00feef3f
# 34c: 00060060
# 350: 00000000
# 354: 00000000
# 358: 00000000
# 35c: 00000000
# 360: 00000000
# Function @ .irom0.text+0x364
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word[3] @ -0x1c
# (local2): word @ -0x10
# (local3): word[3] @ -0xc
.balign 4
.global sdk_ets_timer_init
.type sdk_ets_timer_init, @function
sdk_ets_timer_init:
movi a3, .Lfunc002 # 364: 31f4ff
addi sp, sp, -32 /* (local0) */ # 367: 12c1e0
movi a2, .Ldata001 # 36a: 21f1ff
s32i a0, sp, 20 /* a0 -> [(local3)] */ # 36d: 0951
movi a0, 0 /* 0x00000000 */ # 36f: 0c00
s32i a0, a2, 4 /* 0x00000000 -> [.Ldata003] */ # 371: 0912
movi a2, 10 /* 0x0000000a */ # 373: 0ca2
call0 _xt_isr_attach # 375: 01f6ffc0
# 379: 0000
movi a2, 4 /* 0x00000004 */ # 37b: 0c42
movi a3, 4 /* 0x00000004 */ # 37d: 0c43
movi a4, 0 /* 0x00000000 */ # 37f: 0c04
call0 xQueueGenericCreate # 381: 01f4ffc0
# 385: 0000
movi a5, 0 /* 0x00000000 */ # 387: 0c05
movi a6, 12 /* 0x0000000c */ # 389: 0cc6
addi a7, sp, 16 /* (local2) */ # 38b: 72c110
movi a4, .Ldata001 # 38e: 41eaff
movi a3, 0 /* 0x00000000 */ # 391: 0c03
s32i a2, a4, 16 /* a2 -> [.Ldata004] */ # 393: 2944
movi a4, 200 /* 0x000000c8 */ # 395: 42a0c8
s32i a3, sp, 0 /* 0x00000000 -> [(local0)] */ # 398: 3901
s32i a3, sp, 4 /* 0x00000000 -> [(local1)] */ # 39a: 3911
movi a2, .Lfunc007 # 39c: 21e9ff
movi a3, .Lstr006 # 39f: 31e7ff
call0 xTaskGenericCreate # 3a2: 01edffc0
# 3a6: 0000
movi a2, .Lstr007 # 3a8: 21e7ff
l32i a3, sp, 16 /* [(local2)] */ # 3ab: 3841
movi a4, 12 /* 0x0000000c */ # 3ad: 0cc4
movi a5, 200 /* 0x000000c8 */ # 3af: 52a0c8
call0 printf # 3b2: 01eaffc0
# 3b6: 0000
movi a6, 0x3feffe00 # 3b8: 61e4ff
movi a9, 0x60000600 # 3bb: 91e4ff
memw # 3be: c02000
movi a8, 0 /* 0x00000000 */ # 3c1: 0c08
s32i a8, a9, 48 /* 0x00000000 -> [0x60000630] */ # 3c3: 89c9
movi a10, 132 /* 0x00000084 */ # 3c5: a2a084
memw # 3c8: c02000
s32i a10, a9, 40 /* 0x00000084 -> [0x60000628] */ # 3cb: a9a9
memw # 3cd: c02000
s32i a8, a9, 32 /* 0x00000000 -> [0x60000620] */ # 3d0: 8989
movi a7, 4 /* 0x00000004 */ # 3d2: 0c47
memw # 3d4: c02000
l32i a5, a6, 0x204 /* [0x3ff00004] */ # 3d7: 522681
or a5, a5, a7 # 3da: 705520
memw # 3dd: c02000
s32i a5, a6, 0x204 /* a5 -> [0x3ff00004] */ # 3e0: 526681
movi a2, 1024 /* 0x00000400 */ # 3e3: 22a400
call0 sdk__xt_isr_unmask # 3e6: 01deffc0
# 3ea: 0000
l32i a0, sp, 20 /* [(local3)] */ # 3ec: 0851
addi sp, sp, 32 /* (top of frame) */ # 3ee: 12c120
ret # 3f1: 0df0
.section .rodata.str1.4, "MSa", @progbits, 1
.Lstr001: .asciz "%s %s \n" # 0: 25732025
# 4: 73200a00
.Lstr002: .asciz "ets_timer.c" # 8: 6574735f
# c: 74696d65
# 10: 722e6300
.Lstr003: .asciz "arm new %x %x\n" # 14: 61726d20
# 18: 6e657720
# 1c: 25782025
# 20: 780a00
.balign 4
.Lstr004: .asciz "TIMQ_NUL\n" # 24: 54494d51
# 28: 5f4e554c
# 2c: 0a00
.balign 4
.Lstr005: .asciz "TIMQ_FL:%d!!" # 30: 54494d51
# 34: 5f464c3a
# 38: 25642121
# 3c: 00
.balign 4
.Lstr006: .asciz "rtc_timer_task" # 40: 7274635f
# 44: 74696d65
# 48: 725f7461
# 4c: 736b00
.balign 4
.Lstr007: .asciz "frc2_timer_task_hdl:%x, prio:%d, stack:%d\n" # 50: 66726332
# 54: 5f74696d
# 58: 65725f74
# 5c: 61736b5f
# 60: 68646c3a
# 64: 25782c20
# 68: 7072696f
# 6c: 3a25642c
# 70: 20737461
# 74: 636b3a25
# 78: 640a00

157
binary_sdk/libmain/misc.S Normal file
View file

@ -0,0 +1,157 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .text+0x4
.balign 4
.global sdk_os_get_cpu_frequency
.type sdk_os_get_cpu_frequency, @function
sdk_os_get_cpu_frequency:
movi a2, .Ldata001 # 4: 21ffff
l32i a2, a2, 0 /* [.Ldata001] */ # 7: 2802
ret /* [.Ldata001] */ # 9: 0df0
.section .data, "aw", @progbits
.Ldata001: .word 0x00000050 # 0: 50000000
.section .bss, "aw", @nobits
.global sdk__putc1
.type sdk__putc1, @object
sdk__putc1: .word 0x00000000 # 0: 00000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# Function @ .irom0.text+0xc
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_ets_delay_us
.type sdk_ets_delay_us, @function
sdk_ets_delay_us:
.global sdk_os_delay_us
.type sdk_os_delay_us, @function
sdk_os_delay_us:
addi sp, sp, -16 /* (local0) */ # c: 12c1f0
s32i a13, sp, 8 /* a13 -> [(local2)] */ # f: d921
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 11: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 13: 0901
mov a12, a2 /* arg0 */ # 15: cd02
call0 xthal_get_ccount # 17: 01fbffc0
# 1b: 0000
movi a0, .Ldata001 # 1d: 01f8ff
l32i a0, a0, 0 /* [.Ldata001] */ # 20: 0800
mov a13, a2 # 22: dd02
mull a12, a0, a12 # 24: c0c082
.Lbr001: call0 xthal_get_ccount # 27: 01f8ffc0
# 2b: 0000
sub a3, a2, a13 # 2d: d032c0
bltu a3, a12, .Lbr001 # 30: c733f3
l32i a12, sp, 4 /* [(local1)] */ # 33: c811
l32i a13, sp, 8 /* [(local2)] */ # 35: d821
l32i a0, sp, 0 /* [(local0)] */ # 37: 0801
addi sp, sp, 16 /* (top of frame) */ # 39: 12c110
ret # 3c: 0df0
.literal_position # 40: 00000000
# Function @ .irom0.text+0x44
.balign 4
.global sdk_ets_update_cpu_frequency
.type sdk_ets_update_cpu_frequency, @function
sdk_ets_update_cpu_frequency:
.global sdk_os_update_cpu_frequency
.type sdk_os_update_cpu_frequency, @function
sdk_os_update_cpu_frequency:
movi a3, .Ldata001 # 44: 31ffff
s32i a2, a3, 0 /* arg0 -> [.Ldata001] */ # 47: 2903
ret /* arg0 */ # 49: 0df0
.literal_position # 4c: 00000000
# Function @ .irom0.text+0x50
.balign 4
.global sdk_os_install_putc1
.type sdk_os_install_putc1, @function
sdk_os_install_putc1:
movi a3, sdk__putc1 # 50: 31ffff
s32i a2, a3, 0 /* arg0 -> [sdk__putc1] */ # 53: 2903
ret /* arg0 */ # 55: 0df0
.literal_position # 58: 00000000
# Function @ .irom0.text+0x5c
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_os_putc
.type sdk_os_putc, @function
sdk_os_putc:
addi sp, sp, -16 /* (local0) */ # 5c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 5f: 0901
movi a0, sdk__putc1 # 61: 01fdff
l32i a0, a0, 0 /* [sdk__putc1] */ # 64: 0800
callx0 a0 /* [sdk__putc1] */ # 66: c00000
l32i a0, sp, 0 /* [(local0)] */ # 69: 0801
addi sp, sp, 16 /* (top of frame) */ # 6b: 12c110
ret # 6e: 0df0
.literal_position # 70: 00020060
# Function @ .irom0.text+0x74
.balign 4
.global sdk_gpio_output_set
.type sdk_gpio_output_set, @function
sdk_gpio_output_set:
movi a6, 0x60000200 # 74: 61ffff
memw # 77: c02000
s32i a2, a6, 0x104 /* arg0 -> [0x60000304] */ # 7a: 226641
memw # 7d: c02000
s32i a3, a6, 0x108 /* arg1 -> [0x60000308] */ # 80: 326642
memw # 83: c02000
s32i a4, a6, 0x110 /* arg2 -> [0x60000310] */ # 86: 426644
memw # 89: c02000
s32i a5, a6, 0x114 /* arg3 -> [0x60000314] */ # 8c: 526645
ret /* arg0 */ # 8f: 0df0
.literal_position # 94: 00060060
# 98: ffffdfff
# Function @ .irom0.text+0x9c
.balign 4
.global sdk_rtc_get_reset_reason
.type sdk_rtc_get_reset_reason, @function
sdk_rtc_get_reset_reason:
movi a4, 0x60000600 # 9c: 41feff
memw # 9f: c02000
l32i a2, a4, 0x114 /* [0x60000714] */ # a2: 222445
extui a2, a2, 0, 4 # a5: 202034
bnei a2, 5, .Lbr003 # a8: 665224
memw # ab: c02000
l32i a3, a4, 0x118 /* [0x60000718] */ # ae: 322446
extui a3, a3, 8, 6 # b1: 303854
bnei a3, 1, .Lbr002 # b4: 661304
movi a2, 6 /* 0x00000006 */ # b7: 0c62
j .Lbr003 # b9: c60400
.Lbr002: memw # bc: c02000
l32i a6, a4, 0x118 /* [0x60000718] */ # bf: 622446
movi a5, 0 /* 0x00000000 */ # c2: 0c05
extui a6, a6, 8, 6 # c4: 606854
addi a6, a6, -8 # c7: 62c6f8
movnez a2, a5, a6 # ca: 602593
extui a2, a2, 0, 8 # cd: 202074
.Lbr003: movi a8, 0xffdfffff # d0: 81f2ff
memw # d3: c02000
l32i a7, a4, 0x108 /* [0x60000708] */ # d6: 722442
and a7, a7, a8 # d9: 807710
memw # dc: c02000
s32i a7, a4, 0x108 /* a7 -> [0x60000708] */ # df: 726442
ret # e2: 0df0

View file

@ -0,0 +1,227 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# c: 00000000
# 10: 00000000
# Function @ .text+0x14
# Local variables/stack:
# (local0): word @ -0x50
# (local1): word @ -0x4c
# (local2): word @ -0x48
# (local3): word @ -0x44
# (local4): word[16] @ -0x40
.balign 4
.global vPortYield
.type vPortYield, @function
vPortYield: wsr a0, excsave1 # 14: 00d113
addi sp, sp, -80 /* (local0) */ # 17: 12c1b0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 1a: 0911
addi a0, sp, 80 /* (top of frame) */ # 1c: 02c150
s32i a0, sp, 16 /* (top of frame) -> [(local4)] */ # 1f: 0941
rsr a0, ps # 21: 00e603
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 24: 0921
rsr a0, excsave1 # 26: 00d103
s32i a0, sp, 12 /* a0 -> [(local3)] */ # 29: 0931
movi a0, _xt_user_exit # 2b: 01f5ff
s32i a0, sp, 0 /* _xt_user_exit -> [(local0)] */ # 2e: 0901
call0 sdk__xt_int_enter # 30: 050000
call0 vPortEnterCritical # 33: 01f4ffc0
# 37: 0000
call0 vTaskSwitchContext # 39: 01f3ffc0
# 3d: 0000
call0 vPortExitCritical # 3f: 01f3ffc0
# 43: 0000
call0 sdk__xt_int_exit # 45: 01f2ffc0
# 49: 0000
ret # 4b: 0df0
.literal_position # 50: 00000000
# 54: 00000000
# 58: 00000000
# 5c: 00000000
# 60: 00000000
# 64: 00350c00
# 68: 00000000
# 6c: 00000000
# 70: 00350c00
# Function @ .text+0x74
.balign 4
.global sdk__xt_int_enter
.type sdk__xt_int_enter, @function
sdk__xt_int_enter:
s32i a12, sp, 60 /* a12 -> [(FP)+0x3c] */ # 74: c9f1
s32i a13, sp, 64 /* a13 -> [(FP)+0x40] */ # 76: d26110
mov a12, a0 # 79: cd00
call0 sdk__xt_context_save # 7b: 01f5ffc0
# 7f: 0000
movi a0, pxCurrentTCB # 81: 01f4ff
l32i a0, a0, 0 /* [pxCurrentTCB] */ # 84: 0800
s32i sp, a0, 0 /* (top of frame) -> [[pxCurrentTCB]] */ # 86: 1900
mov a0, a12 # 88: 0d0c
ret # 8a: 0df0
# Function @ .text+0x8c
.balign 4
.global sdk__xt_int_exit
.type sdk__xt_int_exit, @function
sdk__xt_int_exit:
s32i a14, sp, 68 /* a14 -> [(FP)+0x44] */ # 8c: e26111
s32i a15, sp, 72 /* a15 -> [(FP)+0x48] */ # 8f: f26112
movi sp, pxCurrentTCB # 92: 11f1ff
l32i sp, sp, 0 /* [pxCurrentTCB] */ # 95: 1801
l32i sp, sp, 0 /* [[pxCurrentTCB]] */ # 97: 1801
movi a14, pxCurrentTCB # 99: e1f0ff
l32i a14, a14, 0 /* [pxCurrentTCB] */ # 9c: e80e
addi a15, sp, 80 /* [[pxCurrentTCB]]+0x50 */ # 9e: f2c150
s32i a15, a14, 0 /* [[pxCurrentTCB]]+0x50 -> [[pxCurrentTCB]] */ # a1: f90e
call0 sdk__xt_context_restore # a3: 01efffc0
# a7: 0000
l32i a14, sp, 68 /* [[[pxCurrentTCB]]+0x44] */ # a9: e22111
l32i a15, sp, 72 /* [[[pxCurrentTCB]]+0x48] */ # ac: f22112
l32i a0, sp, 0 /* [[[pxCurrentTCB]]] */ # af: 0801
ret # b1: 0df0
.balign 4
# Function @ .text+0xb4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk__xt_timer_int
.type sdk__xt_timer_int, @function
sdk__xt_timer_int:
addi sp, sp, -16 /* (local0) */ # b4: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # b7: 0901
.Lbr001: movi a2, 0x000c3500 # b9: 21eaff
rsr a3, ccompare0 # bc: 30f003
add a4, a3, a2 # bf: 2a43
wsr a4, ccompare0 # c1: 40f013
esync # c4: 202000
s32i a2, sp, 4 /* 0x000c3500 -> [(local1)] */ # c7: 2911
s32i a3, sp, 8 /* a3 -> [(local2)] */ # c9: 3921
call0 xPortSysTickHandle # cb: 01e7ffc0
# cf: 0000
l32i a2, sp, 4 /* [(local1)] */ # d1: 2811
l32i a3, sp, 8 /* [(local2)] */ # d3: 3821
esync # d5: 202000
rsr a4, ccount # d8: 40ea03
sub a4, a4, a3 # db: 3044c0
blt a2, a4, .Lbr001 # de: 4722d7
l32i a0, sp, 0 /* [(local0)] */ # e1: 0801
addi sp, sp, 16 /* (top of frame) */ # e3: 12c110
ret /* [(local1)] */ # e6: 0df0
# Function @ .text+0xe8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk__xt_timer_int1
.type sdk__xt_timer_int1, @function
sdk__xt_timer_int1:
addi sp, sp, -16 /* (local0) */ # e8: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # eb: 0901
s32i a2, sp, 4 /* arg0 -> [(local1)] */ # ed: 2911
s32i a3, sp, 8 /* arg1 -> [(local2)] */ # ef: 3921
call0 vTaskSwitchContext # f1: 01deffc0
# f5: 0000
l32i a2, sp, 4 /* [(local1)] */ # f7: 2811
l32i a3, sp, 8 /* [(local2)] */ # f9: 3821
l32i a0, sp, 0 /* [(local0)] */ # fb: 0801
addi sp, sp, 16 /* (top of frame) */ # fd: 12c110
ret /* [(local1)] */ # 100: 0df0
.balign 4
# Function @ .text+0x104
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk__xt_tick_timer_init
.type sdk__xt_tick_timer_init, @function
sdk__xt_tick_timer_init:
addi sp, sp, -16 /* (local0) */ # 104: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 107: 0901
movi a3, 0x000c3500 # 109: 31d9ff
rsr a2, ccount # 10c: 20ea03
add a2, a2, a3 # 10f: 3a22
wsr a2, ccompare0 # 111: 20f013
movi a2, 0 /* 0x00000000 */ # 114: 0c02
xsr a2, intenable # 116: 20e461
movi a3, 64 /* 0x00000040 */ # 119: 4c03
or a2, a2, a3 # 11b: 302220
wsr a2, intenable # 11e: 20e413
l32i a0, sp, 0 /* [(local0)] */ # 121: 0801
addi sp, sp, 16 /* (top of frame) */ # 123: 12c110
ret # 126: 0df0
# Function @ .text+0x128
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk__xt_isr_unmask
.type sdk__xt_isr_unmask, @function
sdk__xt_isr_unmask:
addi sp, sp, -16 /* (local0) */ # 128: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 12b: 0901
movi a3, 0 /* 0x00000000 */ # 12d: 0c03
xsr a3, intenable # 12f: 30e461
or a3, a2, a3 # 132: 303220
wsr a3, intenable # 135: 30e413
l32i a0, sp, 0 /* [(local0)] */ # 138: 0801
addi sp, sp, 16 /* (top of frame) */ # 13a: 12c110
ret /* arg0 */ # 13d: 0df0
.balign 4
# Function @ .text+0x140
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk__xt_isr_mask
.type sdk__xt_isr_mask, @function
sdk__xt_isr_mask:
addi sp, sp, -16 /* (local0) */ # 140: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 143: 0901
movi a3, 0 /* 0x00000000 */ # 145: 0c03
xsr a3, intenable # 147: 30e461
and a3, a2, a3 # 14a: 303210
wsr a3, intenable # 14d: 30e413
l32i a0, sp, 0 /* [(local0)] */ # 150: 0801
addi sp, sp, 16 /* (top of frame) */ # 152: 12c110
ret /* arg0 */ # 155: 0df0
.balign 4
# Function @ .text+0x158
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk__xt_read_ints
.type sdk__xt_read_ints, @function
sdk__xt_read_ints:
addi sp, sp, -16 /* (local0) */ # 158: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 15b: 0901
rsr a2, interrupt # 15d: 20e203
l32i a0, sp, 0 /* [(local0)] */ # 160: 0801
addi sp, sp, 16 /* (top of frame) */ # 162: 12c110
ret # 165: 0df0
.balign 4
# Function @ .text+0x168
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk__xt_clear_ints
.type sdk__xt_clear_ints, @function
sdk__xt_clear_ints:
addi sp, sp, -16 /* (local0) */ # 168: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 16b: 0901
wsr a2, intclear # 16d: 20e313
l32i a0, sp, 0 /* [(local0)] */ # 170: 0801
addi sp, sp, 16 /* (top of frame) */ # 172: 12c110
ret # 175: 0df0

View file

@ -0,0 +1,548 @@
.section .text, "ax", @progbits
.literal_position # 0: ff9f6ffe
# 4: 00020060
# 8: 00200000
# c: 00000000
# 10: 00020060
# 14: 00200001
# 18: 00201000
# 1c: 00208000
# 20: 00600000
# 24: 00000000
# 28: 00000000
# Function @ .text+0x2c
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_SPIReadModeCnfig
.type sdk_SPIReadModeCnfig, @function
sdk_SPIReadModeCnfig:
addi sp, sp, -16 /* (local0) */ # 2c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 2f: 0901
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 31: c911
movi a4, 0xfe6f9fff # 33: 41f3ff
movi a3, 0x60000200 # 36: 31f3ff
memw # 39: c02000
l32i a0, a3, 8 /* [0x60000208] */ # 3c: 0823
and a0, a0, a4 # 3e: 400010
memw # 41: c02000
s32i a0, a3, 8 /* a0 -> [0x60000208] */ # 44: 0923
movi a0, sdk_flashchip # 46: 01f1ff
beqz a2, .Lbr004 # 49: 166204
beqi a2, 1, .Lbr005 # 4c: 261249
beqi a2, 2, .Lbr006 # 4f: 26224c
beqi a2, 3, .Lbr007 # 52: 26324f
addi a6, a2, -4 /* arg0-0x4 */ # 55: 62c2fc
movi a5, 0x00002000 # 58: 51ecff
movi a12, 0 /* 0x00000000 */ # 5b: 0c0c
moveqz a12, a5, a6 # 5d: 60c583
.Lbr001: beqz a2, .Lbr003 # 60: ac42
beqi a2, 1, .Lbr003 # 62: 261222
mov a2, a0 /* sdk_flashchip */ # 65: 2d00
call0 Disable_QMode # 67: 01efffc0
# 6b: 0000
.Lbr002: memw # 6d: c02000
movi a8, 0x60000200 # 70: 81e8ff
l32i a7, a8, 8 /* [0x60000208] */ # 73: 7828
or a7, a7, a12 # 75: c07720
memw # 78: c02000
s32i a7, a8, 8 /* a7 -> [0x60000208] */ # 7b: 7928
movi a2, 0 /* 0x00000000 */ # 7d: 0c02
l32i a12, sp, 4 /* [(local1)] */ # 7f: c811
l32i a0, sp, 0 /* [(local0)] */ # 81: 0801
addi sp, sp, 16 /* (top of frame) */ # 83: 12c110
ret /* 0x00000000 */ # 86: 0df0
.Lbr003: mov a2, a0 /* sdk_flashchip */ # 88: 2d00
call0 Enable_QMode # 8a: 01e7ffc0
# 8e: 0000
j .Lbr002 # 90: 46f6ff
.Lbr004: movi a12, 0x01002000 # 93: c1e0ff
j .Lbr001 # 96: 86f1ff
.Lbr005: movi a12, 0x00102000 # 99: c1dfff
j .Lbr001 # 9c: 06f0ff
.Lbr006: movi a12, 0x00802000 # 9f: c1dfff
j .Lbr001 # a2: 86eeff
.Lbr007: movi a12, 0x00006000 # a5: c1deff
j .Lbr001 # a8: 06edff
.literal_position # ac: 00000000
# b0: 00000000
# b4: 00000000
# b8: 00000000
# bc: 00000000
# c0: 00000000
# c4: 00000000
# c8: 00000000
# cc: 00000000
# d0: 00000000
# d4: 00000000
# Function @ .text+0xd8
# Local variables/stack:
# (local0): word @ -0x30
# (local1): word @ -0x2c
# (local2): word @ -0x28
# (local3): word @ -0x24
# (local4): word @ -0x20
# (local5): word @ -0x1c
# (local6): word @ -0x18
# (local7): word @ -0x14
# (local8): word @ -0x10
# (local9): word[3] @ -0xc
.balign 4
.global sdk_SPIWrite
.type sdk_SPIWrite, @function
sdk_SPIWrite:
mov a5, a4 /* arg2 */ # d8: 5d04
addi sp, sp, -48 /* (local0) */ # da: 12c1d0
s32i a12, sp, 16 /* a12 -> [(local4)] */ # dd: c941
s32i a14, sp, 24 /* a14 -> [(local6)] */ # df: e961
s32i a3, sp, 36 /* arg1 -> [(local9)] */ # e1: 3991
s32i a0, sp, 12 /* a0 -> [(local3)] */ # e3: 0931
movi a4, sdk_flashchip # e5: 41f1ff
s32i a15, sp, 28 /* a15 -> [(local7)] */ # e8: f971
s32i a13, sp, 20 /* a13 -> [(local5)] */ # ea: d951
mov a15, a3 /* arg1 */ # ec: fd03
mov a13, a2 /* arg0 */ # ee: dd02
l32i a0, a4, 4 /* [.Ldata001] */ # f0: 0814
add a2, a5, a2 # f2: 2a25
bltu a0, a2, .Lbr008 # f4: 273002
j .Lbr014 # f7: 462000
.Lbr008: movi a2, 1 /* 0x00000001 */ # fa: 0c12
j .Lbr013 # fc: 461b00
.Lbr009: movi a2, sdk_flashchip # ff: 21ecff
mov a3, a13 /* arg0 */ # 102: 3d0d
mov a4, a15 /* arg1 */ # 104: 4d0f
mov a5, a12 # 106: 5d0c
call0 SPI_page_program # 108: 01eeffc0
# 10c: 0000
bnez a2, .Lbr008 # 10e: 5682fe
l32i a2, sp, 8 /* [(local2)] */ # 111: 2821
mov a3, a14 /* [.Ldata003] */ # 113: 3d0e
sub a2, a2, a12 # 115: c022c0
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 118: 2901
call0 __udivsi3 # 11a: 01eaffc0
# 11e: 0000
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 120: 2911
beqz a2, .Lbr011 # 122: acf2
movi a3, 0 /* 0x00000000 */ # 124: 0c03
s32i a3, sp, 32 /* 0x00000000 -> [(local8)] */ # 126: 3981
.Lbr010: movi a2, sdk_flashchip # 128: 21e3ff
add a3, a13, a12 # 12b: ca3d
mov a5, a14 /* [.Ldata003] */ # 12d: 5d0e
srli a4, a12, 2 # 12f: c04241
addx4 a4, a4, a15 # 132: f044a0
call0 SPI_page_program # 135: 01e4ffc0
# 139: 0000
bnez a2, .Lbr008 # 13b: 56b2fb
add a12, a14, a12 # 13e: cace
l32i a6, sp, 32 /* [(local8)] */ # 140: 6881
l32i a5, sp, 4 /* [(local1)] */ # 142: 5811
addi a7, a6, 1 /* [(local8)]+0x1 */ # 144: 1b76
extui a6, a7, 0, 8 # 146: 706074
s32i a6, sp, 32 /* a6 -> [(local8)] */ # 149: 6981
bne a5, a6, .Lbr010 # 14b: 6795d9
l32i a8, sp, 8 /* [(local2)] */ # 14e: 8821
sub a8, a8, a12 # 150: c088c0
s32i a8, sp, 0 /* a8 -> [(local0)] */ # 153: 8901
.Lbr011: add a3, a13, a12 # 155: ca3d
movi a2, sdk_flashchip # 157: 21d8ff
l32i a5, sp, 0 /* [(local0)] */ # 15a: 5801
srli a4, a12, 2 # 15c: c04241
addx4 a4, a4, a15 # 15f: f044a0
call0 SPI_page_program # 162: 01daffc0
# 166: 0000
bnez a2, .Lbr008 # 168: 56e2f8
.Lbr012: movi a2, 0 /* 0x00000000 */ # 16b: 0c02
.Lbr013: l32i a12, sp, 16 /* [(local4)] */ # 16d: c841
l32i a13, sp, 20 /* [(local5)] */ # 16f: d851
l32i a14, sp, 24 /* [(local6)] */ # 171: e861
l32i a15, sp, 28 /* [(local7)] */ # 173: f871
l32i a0, sp, 12 /* [(local3)] */ # 175: 0831
addi sp, sp, 48 /* (top of frame) */ # 177: 12c130
ret # 17a: 0df0
.Lbr014: mov a2, a13 /* arg0 */ # 17c: 2d0d
l32i a14, a4, 16 /* [.Ldata003] */ # 17e: e844
s32i a5, sp, 8 /* arg2 -> [(local2)] */ # 180: 5921
mov a3, a14 /* [.Ldata003] */ # 182: 3d0e
call0 __umodsi3 # 184: 01d3ffc0
# 188: 0000
l32i a5, sp, 8 /* [(local2)] */ # 18a: 5821
sub a12, a14, a2 # 18c: 20cec0
bltu a5, a12, .Lbr015 # 18f: c73502
j .Lbr009 # 192: 46daff
.Lbr015: mov a4, a15 /* arg1 */ # 195: 4d0f
mov a3, a13 /* arg0 */ # 197: 3d0d
movi a2, sdk_flashchip # 199: 21c8ff
call0 SPI_page_program # 19c: 01ceffc0
# 1a0: 0000
bnez a2, .Lbr008 # 1a2: 5642f5
j .Lbr012 # 1a5: 86f0ff
.literal_position # 1a8: 00000000
# 1ac: 00000000
# Function @ .text+0x1b0
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_SPIRead
.type sdk_SPIRead, @function
sdk_SPIRead:
mov a5, a4 /* arg2 */ # 1b0: 5d04
mov a7, a3 /* arg1 */ # 1b2: 7d03
addi sp, sp, -16 /* (local0) */ # 1b4: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1b7: 0901
mov a3, a2 /* arg0 */ # 1b9: 3d02
mov a4, a7 /* arg1 */ # 1bb: 4d07
movi a2, sdk_flashchip # 1bd: 21faff
call0 SPI_read_data # 1c0: 01fbffc0
# 1c4: 0000
movi a4, 0 /* 0x00000000 */ # 1c6: 0c04
l32i a3, sp, 0 /* [(local0)] */ # 1c8: 3801
movi a0, 1 /* 0x00000001 */ # 1ca: 0c10
addi sp, sp, 16 /* (top of frame) */ # 1cc: 12c110
moveqz a0, a4, a2 # 1cf: 200483
mov a2, a0 # 1d2: 2d00
mov a0, a3 /* [(local0)] */ # 1d4: 0d03
ret # 1d6: 0df0
.literal_position # 1d8: 00000000
# 1dc: 00000000
# 1e0: 00000000
# 1e4: 00000000
# 1e8: 00000000
# 1ec: 00000000
# Function @ .text+0x1f0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_SPIEraseSector
.type sdk_SPIEraseSector, @function
sdk_SPIEraseSector:
addi sp, sp, -16 /* (local0) */ # 1f0: 12c1f0
movi a3, sdk_flashchip # 1f3: 31f9ff
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1f6: c911
mov a12, a2 /* arg0 */ # 1f8: cd02
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1fa: 0901
l32i a2, a3, 4 /* [.Ldata001] */ # 1fc: 2813
l32i a3, a3, 12 /* [.Ldata002] */ # 1fe: 3833
call0 __udivsi3 # 200: 01f9ffc0
# 204: 0000
bgeu a12, a2, .Lbr016 # 206: 27bc1f
movi a2, sdk_flashchip # 209: 21f4ff
call0 SPI_write_enable # 20c: 01f7ffc0
# 210: 0000
bnez a2, .Lbr016 # 212: dc32
movi a2, sdk_flashchip # 214: 21f3ff
l32i a3, a2, 12 /* [.Ldata002] */ # 217: 3832
mull a3, a3, a12 # 219: c03382
call0 SPI_sector_erase # 21c: 01f4ffc0
# 220: 0000
bnez a2, .Lbr016 # 222: cc32
movi a2, 0 /* 0x00000000 */ # 224: 0c02
j .Lbr017 # 226: 460000
.Lbr016: movi a2, 1 /* 0x00000001 */ # 229: 0c12
.Lbr017: l32i a12, sp, 4 /* [(local1)] */ # 22b: c811
l32i a0, sp, 0 /* [(local0)] */ # 22d: 0801
addi sp, sp, 16 /* (top of frame) */ # 22f: 12c110
ret # 232: 0df0
.literal_position # 234: 00000000
# 238: 00020060
# 23c: 00000010
# 240: ffffff00
# 244: 00000000
# 248: 00000000
# 24c: 00000000
# 250: 00000000
# 254: 00000000
# Function @ .text+0x258
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_spi_flash_get_id
.type sdk_spi_flash_get_id, @function
sdk_spi_flash_get_id:
addi sp, sp, -16 /* (local0) */ # 258: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 25b: 0911
call0 vPortEnterCritical # 25d: 01f9ffc0
# 261: 0000
call0 Cache_Read_Disable # 263: 01f9ffc0
# 267: 0000
movi a2, sdk_flashchip # 269: 21f2ff
call0 Wait_SPI_Idle # 26c: 01f8ffc0
# 270: 0000
movi a4, 0 /* 0x00000000 */ # 272: 0c04
movi a0, 0x60000200 # 274: 01f1ff
memw # 277: c02000
s32i a4, a0, 64 /* 0x00000000 -> [0x60000240] */ # 27a: 426010
movi a3, 0x10000000 # 27d: 31efff
memw # 280: c02000
s32i a3, a0, 0 /* 0x10000000 -> [0x60000200] */ # 283: 3900
memw # 285: c02000
l32i a2, a0, 0 /* [0x60000200] */ # 288: 2800
beqz a2, .Lbr019 # 28a: 8c62
.Lbr018: memw # 28c: c02000
l32i a5, a0, 0 /* [0x60000200] */ # 28f: 5800
bnez a5, .Lbr018 # 291: 5675ff
.Lbr019: movi a7, 0x00ffffff # 294: 71ebff
memw # 297: c02000
movi a2, 0 /* 0x00000000 */ # 29a: 0c02
movi a3, 0 /* 0x00000000 */ # 29c: 0c03
l32i a6, a0, 64 /* [0x60000240] */ # 29e: 622010
movi a4, 1 /* 0x00000001 */ # 2a1: 0c14
and a6, a6, a7 # 2a3: 706610
s32i a6, sp, 0 /* a6 -> [(local0)] */ # 2a6: 6901
call0 Cache_Read_Enable # 2a8: 01eaffc0
# 2ac: 0000
call0 vPortExitCritical # 2ae: 01e9ffc0
# 2b2: 0000
l32i a8, sp, 4 /* [(local1)] */ # 2b4: 8811
l32i a2, sp, 0 /* [(local0)] */ # 2b6: 2801
mov a0, a8 /* [(local1)] */ # 2b8: 0d08
addi sp, sp, 16 /* (top of frame) */ # 2ba: 12c110
ret /* [(local0)] */ # 2bd: 0df0
.literal_position # 2c0: 00000000
# 2c4: 00000000
# 2c8: 00000000
# 2cc: 00000000
# 2d0: 00000000
# 2d4: 00000000
# Function @ .text+0x2d8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_spi_flash_read_status
.type sdk_spi_flash_read_status, @function
sdk_spi_flash_read_status:
addi sp, sp, -16 /* (local0) */ # 2d8: 12c1f0
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 2db: 2901
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 2dd: 0921
call0 vPortEnterCritical # 2df: 01f9ffc0
# 2e3: 0000
call0 Cache_Read_Disable # 2e5: 01f8ffc0
# 2e9: 0000
movi a2, sdk_flashchip # 2eb: 21f5ff
l32i a3, sp, 0 /* [(local0)] */ # 2ee: 3801
call0 SPI_read_status # 2f0: 01f7ffc0
# 2f4: 0000
movi a3, 0 /* 0x00000000 */ # 2f6: 0c03
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 2f8: 2911
movi a4, 1 /* 0x00000001 */ # 2fa: 0c14
movi a2, 0 /* 0x00000000 */ # 2fc: 0c02
call0 Cache_Read_Enable # 2fe: 01f4ffc0
# 302: 0000
call0 vPortExitCritical # 304: 01f4ffc0
# 308: 0000
l32i a3, sp, 8 /* [(local2)] */ # 30a: 3821
l32i a2, sp, 4 /* [(local1)] */ # 30c: 2811
mov a0, a3 /* [(local2)] */ # 30e: 0d03
addi sp, sp, 16 /* (top of frame) */ # 310: 12c110
ret /* [(local1)] */ # 313: 0df0
.literal_position # 318: 00000000
# 31c: 00000000
# 320: 00000000
# 324: 00000000
# 328: 00000000
# 32c: 00000000
# Function @ .text+0x330
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_spi_flash_write_status
.type sdk_spi_flash_write_status, @function
sdk_spi_flash_write_status:
addi sp, sp, -16 /* (local0) */ # 330: 12c1f0
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 333: 2901
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 335: 0921
call0 vPortEnterCritical # 337: 01f9ffc0
# 33b: 0000
call0 Cache_Read_Disable # 33d: 01f8ffc0
# 341: 0000
movi a2, sdk_flashchip # 343: 21f5ff
l32i a3, sp, 0 /* [(local0)] */ # 346: 3801
call0 SPI_write_status # 348: 01f7ffc0
# 34c: 0000
movi a3, 0 /* 0x00000000 */ # 34e: 0c03
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 350: 2911
movi a4, 1 /* 0x00000001 */ # 352: 0c14
movi a2, 0 /* 0x00000000 */ # 354: 0c02
call0 Cache_Read_Enable # 356: 01f4ffc0
# 35a: 0000
call0 vPortExitCritical # 35c: 01f4ffc0
# 360: 0000
l32i a3, sp, 8 /* [(local2)] */ # 362: 3821
l32i a2, sp, 4 /* [(local1)] */ # 364: 2811
mov a0, a3 /* [(local2)] */ # 366: 0d03
addi sp, sp, 16 /* (top of frame) */ # 368: 12c110
ret /* [(local1)] */ # 36b: 0df0
.literal_position # 370: 00000000
# 374: 00000000
# 378: 00000000
# 37c: 00000000
# Function @ .text+0x380
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_spi_flash_erase_sector
.type sdk_spi_flash_erase_sector, @function
sdk_spi_flash_erase_sector:
addi sp, sp, -16 /* (local0) */ # 380: 12c1f0
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 383: 2901
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 385: 0921
call0 vPortEnterCritical # 387: 01faffc0
# 38b: 0000
call0 Cache_Read_Disable # 38d: 01f9ffc0
# 391: 0000
l32i a2, sp, 0 /* [(local0)] */ # 393: 2801
call0 sdk_SPIEraseSector # 395: 050000
movi a3, 0 /* 0x00000000 */ # 398: 0c03
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 39a: 2911
movi a4, 1 /* 0x00000001 */ # 39c: 0c14
movi a2, 0 /* 0x00000000 */ # 39e: 0c02
call0 Cache_Read_Enable # 3a0: 01f6ffc0
# 3a4: 0000
call0 vPortExitCritical # 3a6: 01f5ffc0
# 3aa: 0000
l32i a3, sp, 8 /* [(local2)] */ # 3ac: 3821
l32i a2, sp, 4 /* [(local1)] */ # 3ae: 2811
mov a0, a3 /* [(local2)] */ # 3b0: 0d03
addi sp, sp, 16 /* (top of frame) */ # 3b2: 12c110
ret /* [(local1)] */ # 3b5: 0df0
.literal_position # 3b8: 00000000
# 3bc: 00000000
# 3c0: 00000000
# 3c4: 00000000
# Function @ .text+0x3c8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global sdk_spi_flash_write
.type sdk_spi_flash_write, @function
sdk_spi_flash_write:
addi sp, sp, -16 /* (local0) */ # 3c8: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 3cb: 0911
s32i a13, sp, 12 /* a13 -> [(local3)] */ # 3cd: d931
s32i a12, sp, 8 /* a12 -> [(local2)] */ # 3cf: c921
mov a13, a3 /* arg1 */ # 3d1: dd03
mov a12, a4 /* arg2 */ # 3d3: cd04
bnez a3, .Lbr020 # 3d5: cc33
movi a2, 1 /* 0x00000001 */ # 3d7: 0c12
j .Lbr022 # 3d9: 460e00
.Lbr020: s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 3dc: 2901
movi a0, 3 /* 0x00000003 */ # 3de: 0c30
bnone a0, a4, .Lbr021 # 3e0: 470007
movi a0, 4 /* 0x00000004 */ # 3e3: 0c40
srli a12, a4, 2 # 3e5: 40c241
addx4 a12, a12, a0 # 3e8: 00cca0
.Lbr021: call0 vPortEnterCritical # 3eb: 01f3ffc0
# 3ef: 0000
call0 Cache_Read_Disable # 3f1: 01f2ffc0
# 3f5: 0000
mov a4, a12 # 3f7: 4d0c
mov a3, a13 /* arg1 */ # 3f9: 3d0d
l32i a2, sp, 0 /* [(local0)] */ # 3fb: 2801
call0 sdk_SPIWrite # 3fd: 050000
movi a3, 0 /* 0x00000000 */ # 400: 0c03
mov a12, a2 # 402: cd02
movi a4, 1 /* 0x00000001 */ # 404: 0c14
movi a2, 0 /* 0x00000000 */ # 406: 0c02
call0 Cache_Read_Enable # 408: 01eeffc0
# 40c: 0000
call0 vPortExitCritical # 40e: 01edffc0
# 412: 0000
mov a2, a12 # 414: 2d0c
.Lbr022: l32i a12, sp, 8 /* [(local2)] */ # 416: c821
l32i a13, sp, 12 /* [(local3)] */ # 418: d831
l32i a0, sp, 4 /* [(local1)] */ # 41a: 0811
addi sp, sp, 16 /* (top of frame) */ # 41c: 12c110
ret # 41f: 0df0
.literal_position # 424: 00000000
# 428: 00000000
# 42c: 00000000
# 430: 00000000
# Function @ .text+0x434
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global sdk_spi_flash_read
.type sdk_spi_flash_read, @function
sdk_spi_flash_read:
addi sp, sp, -16 /* (local0) */ # 434: 12c1f0
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 437: 0921
s32i a4, sp, 0 /* arg2 -> [(local0)] */ # 439: 4901
s32i a12, sp, 12 /* a12 -> [(local3)] */ # 43b: c931
s32i a2, sp, 4 /* arg0 -> [(local1)] */ # 43d: 2911
mov a12, a3 /* arg1 */ # 43f: cd03
bnez a3, .Lbr023 # 441: cc33
movi a2, 1 /* 0x00000001 */ # 443: 0c12
j .Lbr024 # 445: 860a00
.Lbr023: call0 vPortEnterCritical # 448: 01f7ffc0
# 44c: 0000
call0 Cache_Read_Disable # 44e: 01f6ffc0
# 452: 0000
mov a3, a12 /* arg1 */ # 454: 3d0c
l32i a2, sp, 4 /* [(local1)] */ # 456: 2811
l32i a4, sp, 0 /* [(local0)] */ # 458: 4801
call0 sdk_SPIRead # 45a: 050000
movi a3, 0 /* 0x00000000 */ # 45d: 0c03
mov a12, a2 # 45f: cd02
movi a4, 1 /* 0x00000001 */ # 461: 0c14
movi a2, 0 /* 0x00000000 */ # 463: 0c02
call0 Cache_Read_Enable # 465: 01f1ffc0
# 469: 0000
call0 vPortExitCritical # 46b: 01f1ffc0
# 46f: 0000
mov a2, a12 # 471: 2d0c
.Lbr024: l32i a12, sp, 12 /* [(local3)] */ # 473: c831
l32i a0, sp, 8 /* [(local2)] */ # 475: 0821
addi sp, sp, 16 /* (top of frame) */ # 477: 12c110
ret # 47a: 0df0
.section .data, "aw", @progbits
.global sdk_flashchip
.type sdk_flashchip, @object
sdk_flashchip:
.word 0x001640ef # 0: ef401600
.Ldata001: .word 0x00400000 # 4: 00004000
# NOTE: The following is apparently unreferenced code/data
.word 0x00010000 # 8: 00000100
.Ldata002: .word 0x00001000 # c: 00100000
.Ldata003: .word 0x00000100 # 10: 00010000
# NOTE: The following is apparently unreferenced code/data
.word 0x0000ffff # 14: ffff0000

232
binary_sdk/libmain/timers.S Normal file
View file

@ -0,0 +1,232 @@
.section .bss, "aw", @nobits
.Ldata001: .word 0x00000000 # 0: 00000000
.Ldata002: .byte 0x00
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# c: 00000000
# 10: 00000000
# Function @ .irom0.text+0x14
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word @ -0x10
# (local5): word[3] @ -0xc
.balign 4
.global sdk_os_timer_setfn
.type sdk_os_timer_setfn, @function
sdk_os_timer_setfn:
addi sp, sp, -32 /* (local0) */ # 14: 12c1e0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 17: 0901
s32i a14, sp, 12 /* a14 -> [(local3)] */ # 19: e931
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 1b: d921
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1d: c911
s32i a15, sp, 16 /* a15 -> [(local4)] */ # 1f: f941
movi a15, .Ldata001 # 21: f1f7ff
mov a12, a2 /* arg0 */ # 24: cd02
l32i a13, a15, 0 /* [.Ldata001] */ # 26: d80f
mov a14, a4 /* arg2 */ # 28: ed04
beqz a13, .Lbr006 # 2a: 16fd04
.Lbr001: l32i a0, a13, 4 # 2d: 081d
bne a0, a12, .Lbr005 # 2f: c79041
l32i a2, a12, 24 /* [arg0+0x18] */ # 32: 286c
l32i a4, a12, 16 /* [arg0+0x10] */ # 34: 484c
bne a2, a14, .Lbr002 # 36: e79202
beq a4, a3, .Lbr007 # 39: 37145f
.Lbr002: l32i a2, a12, 4 /* [arg0+0x4] */ # 3c: 281c
s32i a3, sp, 20 /* arg1 -> [(local5)] */ # 3e: 3951
beqz a2, .Lbr004 # 40: ac32
movi a3, 3 /* 0x00000003 */ # 42: 0c33
movi a4, 0 /* 0x00000000 */ # 44: 0c04
movi a5, 0 /* 0x00000000 */ # 46: 0c05
movi a6, 50 /* 0x00000032 */ # 48: 3c26
call0 xTimerGenericCommand # 4a: 01efffc0
# 4e: 0000
l32i a3, sp, 20 /* [(local5)] */ # 50: 3851
bnez a2, .Lbr003 # 52: cc92
movi a2, .Lstr001 # 54: 21ecff
call0 printf # 57: 01edffc0
# 5b: 0000
l32i a3, sp, 20 /* [(local5)] */ # 5d: 3851
.Lbr003: l8ui a5, a15, 4 /* [.Ldata002] */ # 5f: 520f04
addi a5, a5, -1 /* [.Ldata002]-0x1 */ # 62: 0b55
s8i a5, a15, 4 /* [.Ldata002]-0x1 -> [.Ldata002] */ # 64: 524f04
.Lbr004: s32i a3, a12, 16 /* a3 -> [arg0+0x10] */ # 67: 394c
s32i a14, a12, 24 /* arg2 -> [arg0+0x18] */ # 69: e96c
movi a6, 0 /* 0x00000000 */ # 6b: 0c06
s32i a6, a12, 4 /* 0x00000000 -> [arg0+0x4] */ # 6d: 691c
s32i a6, a12, 12 /* 0x00000000 -> [arg0+0xc] */ # 6f: 693c
j .Lbr007 # 71: c60900
.Lbr005: l32i a0, a13, 0 # 74: 080d
beqz a0, .Lbr006 # 76: 8c30
mov a13, a0 # 78: dd00
bnez a0, .Lbr001 # 7a: 56f0fa
.Lbr006: s32i a3, a12, 16 /* arg1 -> [arg0+0x10] */ # 7d: 394c
s32i a14, a12, 24 /* arg2 -> [arg0+0x18] */ # 7f: e96c
movi a2, 8 /* 0x00000008 */ # 81: 0c82
movi a7, 0 /* 0x00000000 */ # 83: 0c07
s32i a7, a12, 4 /* 0x00000000 -> [arg0+0x4] */ # 85: 791c
s32i a7, a12, 12 /* 0x00000000 -> [arg0+0xc] */ # 87: 793c
call0 pvPortMalloc # 89: 01e1ffc0
# 8d: 0000
s32i a12, a2, 4 # 8f: c912
movi a9, 0 /* 0x00000000 */ # 91: 0c09
l32i a8, a15, 0 /* [.Ldata001] */ # 93: 880f
s32i a9, a2, 0 # 95: 9902
movnez a15, a13, a8 # 97: 80fd93
s32i a2, a15, 0 # 9a: 290f
.Lbr007: l32i a12, sp, 4 /* [(local1)] */ # 9c: c811
l32i a13, sp, 8 /* [(local2)] */ # 9e: d821
l32i a14, sp, 12 /* [(local3)] */ # a0: e831
l32i a15, sp, 16 /* [(local4)] */ # a2: f841
l32i a0, sp, 0 /* [(local0)] */ # a4: 0801
addi sp, sp, 32 /* (top of frame) */ # a6: 12c120
ret # a9: 0df0
.literal_position # ac: 00000000
# b0: 18000000
# b4: 00000000
# b8: 00000000
# bc: 00000000
# c0: 00000000
# c4: 00000000
# c8: 00000000
# cc: 00000000
# Function @ .irom0.text+0xd0
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word[4] @ -0x10
.balign 4
.global sdk_os_timer_arm
.type sdk_os_timer_arm, @function
sdk_os_timer_arm:
addi sp, sp, -32 /* (local0) */ # d0: 12c1e0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # d3: 0901
s32i a13, sp, 8 /* a13 -> [(local2)] */ # d5: d921
s32i a15, sp, 16 /* a15 -> [(local4)] */ # d7: f941
s32i a12, sp, 4 /* a12 -> [(local1)] */ # d9: c911
s32i a14, sp, 12 /* a14 -> [(local3)] */ # db: e931
mov a12, a2 /* arg0 */ # dd: cd02
mov a14, a3 /* arg1 */ # df: ed03
l32i a15, a2, 4 /* [arg0+0x4] */ # e1: f812
mov a13, a4 /* arg2 */ # e3: dd04
bnez a15, .Lbr008 # e5: ecff
s8i a4, a2, 20 /* arg2 -> [arg0+0x14] */ # e7: 424214
s32i a3, a2, 12 /* arg1 -> [arg0+0xc] */ # ea: 3932
mov a2, a3 /* arg1 */ # ec: 2d03
movi a3, 10 /* 0x0000000a */ # ee: 0ca3
call0 __udivsi3 # f0: 01f1ffc0
# f4: 0000
mov a4, a13 /* arg2 */ # f6: 4d0d
l32i a5, a12, 24 /* [arg0+0x18] */ # f8: 586c
mov a3, a2 # fa: 3d02
l32i a6, a12, 16 /* [arg0+0x10] */ # fc: 684c
movi a2, 0 /* 0x00000000 */ # fe: 0c02
call0 xTimerCreate # 100: 01eeffc0
# 104: 0000
movi a3, .Ldata001 # 106: 31e9ff
mov a15, a2 # 109: fd02
l8ui a0, a3, 4 /* [.Ldata002] */ # 10b: 020304
s32i a2, a12, 4 /* a2 -> [arg0+0x4] */ # 10e: 291c
addi a0, a0, 1 /* [.Ldata002]+0x1 */ # 110: 1b00
s8i a0, a3, 4 /* [.Ldata002]+0x1 -> [.Ldata002] */ # 112: 024304
beqz a2, .Lbr011 # 115: 16c204
.Lbr008: l8ui a3, a12, 20 /* [arg0+0x14] */ # 118: 320c14
beq a3, a13, .Lbr009 # 11b: d71304
s8i a13, a12, 20 /* arg2 -> [arg0+0x14] */ # 11e: d24c14
s32i a13, a15, 28 # 121: d97f
.Lbr009: l32i a4, a12, 12 /* [arg0+0xc] */ # 123: 483c
beq a4, a14, .Lbr010 # 125: e7141b
mov a2, a14 /* arg1 */ # 128: 2d0e
s32i a14, a12, 12 /* arg1 -> [arg0+0xc] */ # 12a: e93c
movi a3, 10 /* 0x0000000a */ # 12c: 0ca3
call0 __udivsi3 # 12e: 01e3ffc0
# 132: 0000
movi a3, 2 /* 0x00000002 */ # 134: 0c23
movi a5, 0 /* 0x00000000 */ # 136: 0c05
mov a4, a2 # 138: 4d02
movi a6, 10 /* 0x0000000a */ # 13a: 0ca6
mov a2, a15 # 13c: 2d0f
call0 xTimerGenericCommand # 13e: 01e0ffc0
# 142: 0000
.Lbr010: call0 xTaskGetTickCount # 144: 01e0ffc0
# 148: 0000
movi a3, 0 /* 0x00000000 */ # 14a: 0c03
movi a5, 0 /* 0x00000000 */ # 14c: 0c05
mov a4, a2 # 14e: 4d02
movi a6, 50 /* 0x00000032 */ # 150: 3c26
l32i a2, a12, 4 /* [arg0+0x4] */ # 152: 281c
call0 xTimerGenericCommand # 154: 01ddffc0
# 158: 0000
bnez a2, .Lbr011 # 15a: cc72
movi a2, .Lstr002 # 15c: 21d5ff
call0 printf # 15f: 01dbffc0
# 163: 0000
.Lbr011: l32i a12, sp, 4 /* [(local1)] */ # 165: c811
l32i a13, sp, 8 /* [(local2)] */ # 167: d821
l32i a14, sp, 12 /* [(local3)] */ # 169: e831
l32i a15, sp, 16 /* [(local4)] */ # 16b: f841
l32i a0, sp, 0 /* [(local0)] */ # 16d: 0801
addi sp, sp, 32 /* (top of frame) */ # 16f: 12c120
ret # 172: 0df0
.literal_position # 174: 2c000000
# 178: 00000000
# 17c: 00000000
# Function @ .irom0.text+0x180
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_os_timer_disarm
.type sdk_os_timer_disarm, @function
sdk_os_timer_disarm:
addi sp, sp, -16 /* (local0) */ # 180: 12c1f0
l32i a2, a2, 4 /* [arg0+0x4] */ # 183: 2812
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 185: 0901
beqz a2, .Lbr012 # 187: 9c72
movi a3, 1 /* 0x00000001 */ # 189: 0c13
movi a4, 0 /* 0x00000000 */ # 18b: 0c04
movi a5, 0 /* 0x00000000 */ # 18d: 0c05
movi a6, 50 /* 0x00000032 */ # 18f: 3c26
call0 xTimerGenericCommand # 191: 01f9ffc0
# 195: 0000
bnez a2, .Lbr012 # 197: cc72
movi a2, .Lstr003 # 199: 21f6ff
call0 printf # 19c: 01f8ffc0
# 1a0: 0000
.Lbr012: l32i a0, sp, 0 /* [(local0)] */ # 1a2: 0801
addi sp, sp, 16 /* (top of frame) */ # 1a4: 12c110
ret # 1a7: 0df0
.section .rodata.str1.4, "MSa", @progbits, 1
.Lstr001: .asciz "Timer Delete Failed\n" # 0: 54696d65
# 4: 72204465
# 8: 6c657465
# c: 20466169
# 10: 6c65640a
# 14: 00
.balign 4
.Lstr002: .asciz "Timer Start Failed\n" # 18: 54696d65
# 1c: 72205374
# 20: 61727420
# 24: 4661696c
# 28: 65640a00
.Lstr003: .asciz "Timer Stop Failed\n" # 2c: 54696d65
# 30: 72205374
# 34: 6f702046
# 38: 61696c65
# 3c: 640a00

48
binary_sdk/libmain/uart.S Normal file
View file

@ -0,0 +1,48 @@
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.global sdk_uart_buff_switch
.type sdk_uart_buff_switch, @function
sdk_uart_buff_switch:
ret /* arg0 */ # 0: 0df0
.literal_position # 4: 000f0000
# 8: 00feff5f
# c: 00000600
# 10: fffff9ff
# Function @ .irom0.text+0x14
.balign 4
.global sdk_uart_div_modify
.type sdk_uart_div_modify, @function
sdk_uart_div_modify:
movi a5, 0x00000f00 # 14: 51fcff
movi a6, 0x5ffffe00 # 17: 61fcff
mul16s a5, a5, a2 # 1a: 2055d1
add a5, a5, a6 # 1d: 6a55
memw # 1f: c02000
s32i a3, a5, 0x214 # 22: 326585
movi a8, 0x00060000 # 25: 81f9ff
memw # 28: c02000
l32i a7, a5, 0x220 # 2b: 722588
or a7, a7, a8 # 2e: 807720
memw # 31: c02000
s32i a7, a5, 0x220 # 34: 726588
movi a6, 0xfff9ffff # 37: 61f6ff
memw # 3a: c02000
l32i a4, a5, 0x220 # 3d: 422588
and a4, a4, a6 # 40: 604410
memw # 43: c02000
s32i a4, a5, 0x220 # 46: 426588
ret /* arg0 */ # 49: 0df0
.balign 4
# Function @ .irom0.text+0x4c
.balign 4
.global sdk_Uart_Init
.type sdk_Uart_Init, @function
sdk_Uart_Init:
ret /* arg0 */ # 4c: 0df0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,43 @@
.section .text, "ax", @progbits
# Function @ .text+0x0
.balign 4
.literal_position
.global sdk__xt_context_save
.type sdk__xt_context_save, @function
sdk__xt_context_save:
s32i a2, sp, 20 /* arg0 -> [(FP)+0x14] */ # 0: 2951
s32i a3, sp, 24 /* arg1 -> [(FP)+0x18] */ # 2: 3961
s32i a4, sp, 28 /* arg2 -> [(FP)+0x1c] */ # 4: 4971
s32i a5, sp, 32 /* arg3 -> [(FP)+0x20] */ # 6: 5981
s32i a6, sp, 36 /* arg4 -> [(FP)+0x24] */ # 8: 6991
s32i a7, sp, 40 /* arg5 -> [(FP)+0x28] */ # a: 79a1
s32i a8, sp, 44 /* a8 -> [(FP)+0x2c] */ # c: 89b1
s32i a9, sp, 48 /* a9 -> [(FP)+0x30] */ # e: 99c1
s32i a10, sp, 52 /* a10 -> [(FP)+0x34] */ # 10: a9d1
s32i a11, sp, 56 /* a11 -> [(FP)+0x38] */ # 12: b9e1
rsr a3, sar # 14: 300303
s32i a3, sp, 76 /* a3 -> [(FP)+0x4c] */ # 17: 326113
ret /* arg0 */ # 1a: 0df0
# Function @ .text+0x1c
.balign 4
.global sdk__xt_context_restore
.type sdk__xt_context_restore, @function
sdk__xt_context_restore:
l32i a3, sp, 76 /* [(FP)+0x4c] */ # 1c: 322113
l32i a2, sp, 20 /* [(FP)+0x14] */ # 1f: 2851
wsr a3, sar # 21: 300313
l32i a3, sp, 24 /* [(FP)+0x18] */ # 24: 3861
l32i a4, sp, 28 /* [(FP)+0x1c] */ # 26: 4871
l32i a5, sp, 32 /* [(FP)+0x20] */ # 28: 5881
l32i a6, sp, 36 /* [(FP)+0x24] */ # 2a: 6891
l32i a7, sp, 40 /* [(FP)+0x28] */ # 2c: 78a1
l32i a8, sp, 44 /* [(FP)+0x2c] */ # 2e: 88b1
l32i a9, sp, 48 /* [(FP)+0x30] */ # 30: 98c1
l32i a10, sp, 52 /* [(FP)+0x34] */ # 32: a8d1
l32i a11, sp, 56 /* [(FP)+0x38] */ # 34: b8e1
l32i a12, sp, 60 /* [(FP)+0x3c] */ # 36: c8f1
l32i a13, sp, 64 /* [(FP)+0x40] */ # 38: d22110
ret /* [(FP)+0x14] */ # 3b: 0df0

View file

View file

@ -0,0 +1,602 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .text+0x4
.balign 4
.Lfunc001: movi a5, .Ldata001 # 4: 51ffff
l8ui a2, a5, 0 /* [.Ldata001] */ # 7: 220500
addi a3, a5, 32 /* .bss+0x20 */ # a: 32c520
addi a2, a2, 1 /* [.Ldata001]+0x1 */ # d: 1b22
extui a2, a2, 0, 8 # f: 202074
bltui a2, 5, .Lbr001 # 12: b65208
addi a3, a2, -1 # 15: 0b32
s8i a3, a5, 0 /* a3 -> [.Ldata001] */ # 17: 324500
movi a2, 0 /* 0x00000000 */ # 1a: 0c02
ret /* 0x00000000 */ # 1c: 0df0
.Lbr001: s8i a2, a5, 0 /* a2 -> [.Ldata001] */ # 1e: 224500
l8ui a2, a5, 1 /* [.Ldata002] */ # 21: 220501
addi a4, a2, 1 /* [.Ldata002]+0x1 */ # 24: 1b42
addx8 a2, a2, a3 # 26: 3022b0
extui a4, a4, 0, 8 # 29: 404074
bltui a4, 4, .Lbr002 # 2c: b64401
movi a4, 0 /* 0x00000000 */ # 2f: 0c04
.Lbr002: s8i a4, a5, 1 /* a4 -> [.Ldata002] */ # 31: 424501
ret # 34: 0df0
.literal_position # 38: 24000000
# 3c: 00000000
# 40: 30000000
# 44: 00000000
# 48: 00000000
# 4c: 00000000
# 50: 00000000
# Function @ .text+0x54
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.Lfunc002: addi sp, sp, -16 /* (local0) */ # 54: 12c1f0
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 57: 0921
call0 .Lfunc001 # 59: 85faff
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 5c: 2901
bnez a2, .Lbr003 # 5e: cca2
movi a2, .Lstr004 # 60: 21f6ff
call0 printf # 63: 01f8ffc0
# 67: 0000
j .Lbr005 # 69: 060b00
.Lbr003: mov a3, sp /* (local0) */ # 6c: 3d01
addi a4, sp, 4 /* (local1) */ # 6e: 4b41
movi a5, 0 /* 0x00000000 */ # 70: 0c05
s32i a5, a2, 0 # 72: 5902
movi a2, .Ldata001 # 74: 21f2ff
s32i a5, sp, 4 /* 0x00000000 -> [(local1)] */ # 77: 5911
l32i a2, a2, 16 /* [.Ldata004] */ # 79: 2842
call0 xQueueGenericSendFromISR # 7b: 01f3ffc0
# 7f: 0000
mov a3, a2 # 81: 3d02
beqi a2, 1, .Lbr004 # 83: 261208
movi a2, .Lstr005 # 86: 21eeff
call0 printf # 89: 01f0ffc0
# 8d: 0000
.Lbr004: l32i a3, sp, 4 /* [(local1)] */ # 8f: 3811
beqz a3, .Lbr005 # 91: 8c43
call0 vTaskSwitchContext # 93: 01efffc0
# 97: 0000
.Lbr005: l32i a0, sp, 8 /* [(local2)] */ # 99: 0821
addi sp, sp, 16 /* (top of frame) */ # 9b: 12c110
ret # 9e: 0df0
.section .bss, "aw", @nobits
.Ldata001: .byte 0x00
.Ldata002: .byte 0x00
.byte 0x00, 0x00
.Ldata003: .word 0x00000000 # 4: 00000000
.global debug_timer
.type debug_timer, @object
debug_timer:
.word 0x00000000 # 8: 00000000
.global debug_timerfn
.type debug_timerfn, @object
debug_timerfn:
.word 0x00000000 # c: 00000000
.Ldata004: .word 0x00000000 # 10: 00000000
.space 44
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# Function @ .irom0.text+0xc
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc003: addi sp, sp, -16 /* (local0) */ # c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # f: 0901
call0 vPortEnterCritical # 11: 01fcffc0
# 15: 0000
movi a2, .Ldata001 # 17: 21faff
l8ui a0, a2, 0 /* [.Ldata001] */ # 1a: 020200
addi a0, a0, -1 /* [.Ldata001]-0x1 */ # 1d: 0b00
s8i a0, a2, 0 /* [.Ldata001]-0x1 -> [.Ldata001] */ # 1f: 024200
call0 vPortExitCritical # 22: 01f9ffc0
# 26: 0000
l32i a0, sp, 0 /* [(local0)] */ # 28: 0801
addi sp, sp, 16 /* (top of frame) */ # 2a: 12c110
ret # 2d: 0df0
.literal_position # 30: 00060060
# Function @ .irom0.text+0x34
.balign 4
.Lfunc004: movi a3, 0x60000600 # 34: 31ffff
memw # 37: c02000
s32i a2, a3, 48 /* arg0 -> [0x60000630] */ # 3a: 29c3
ret /* arg0 */ # 3c: 0df0
.literal_position # 40: 00060060
# Function @ .irom0.text+0x44
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc005: addi sp, sp, -16 /* (local0) */ # 44: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 47: 0901
movi a4, 0x60000600 # 49: 41fdff
memw # 4c: c02000
l32i a4, a4, 36 /* [0x60000624] */ # 4f: 4894
sub a0, a2, a4 # 51: 4002c0
addi a3, a0, -40 # 54: 32c0d8
bgei a3, 1, .Lbr007 # 57: e61314
bgei a0, 1, .Lbr006 # 5a: e61008
addi a2, a4, 40 /* [0x60000624]+0x28 */ # 5d: 22c428
call0 .Lfunc004 # 60: 05fdff
j .Lbr008 # 63: c60200
.Lbr006: addi a2, a2, 44 /* arg0+0x2c */ # 66: 22c22c
call0 .Lfunc004 # 69: 85fcff
j .Lbr008 # 6c: 860000
.Lbr007: call0 .Lfunc004 # 6f: 45fcff
.Lbr008: l32i a0, sp, 0 /* [(local0)] */ # 72: 0801
addi sp, sp, 16 /* (top of frame) */ # 74: 12c110
ret # 77: 0df0
.balign 4
# Function @ .irom0.text+0x7c
.balign 4
.global ets_timer_setfn
.type ets_timer_setfn, @function
ets_timer_setfn:
s32i a3, a2, 16 /* arg1 -> [arg0+0x10] */ # 7c: 3942
s32i a4, a2, 24 /* arg2 -> [arg0+0x18] */ # 7e: 4962
movi a5, -1 /* 0xffffffff */ # 80: 7cf5
movi a6, 0 /* 0x00000000 */ # 82: 0c06
s32i a6, a2, 8 /* 0x00000000 -> [arg0+0x8] */ # 84: 6922
s32i a6, a2, 12 /* 0x00000000 -> [arg0+0xc] */ # 86: 6932
s32i a5, a2, 0 /* 0xffffffff -> [arg0] */ # 88: 5902
ret /* arg0 */ # 8a: 0df0
.literal_position # 8c: 00000000
# 90: 00000000
# 94: 08000000
# 98: 00000000
# Function @ .irom0.text+0x9c
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.Lfunc006: addi sp, sp, -16 /* (local0) */ # 9c: 12c1f0
movi a6, .Ldata001 # 9f: 61fbff
s32i a0, sp, 4 /* a0 -> [(local1)] */ # a2: 0911
l32i a0, a6, 4 /* [.Ldata003] */ # a4: 0816
movi a5, 0 /* 0x00000000 */ # a6: 0c05
beqz a0, .Lbr010 # a8: 9c00
.Lbr009: l32i a4, a0, 8 # aa: 4820
sub a4, a2, a4 # ac: 4042c0
blti a4, 1, .Lbr011 # af: a6140b
mov a5, a0 # b2: 5d00
l32i a0, a0, 0 # b4: 0800
bnez a0, .Lbr009 # b6: 5600ff
j .Lbr011 # b9: 460000
.Lbr010: movi a5, 0 /* 0x00000000 */ # bc: 0c05
.Lbr011: s32i a3, sp, 0 /* arg1 -> [(local0)] */ # be: 3901
s32i a0, a3, 0 /* a0 -> [arg1] */ # c0: 0903
s32i a2, a3, 8 /* arg0 -> [arg1+0x8] */ # c2: 2923
beqz a5, .Lbr012 # c4: 8c35
s32i a3, a5, 0 # c6: 3905
j .Lbr013 # c8: 060200
.Lbr012: l32i a5, sp, 0 /* [(local0)] */ # cb: 5801
s32i a5, a6, 4 /* [(local0)] -> [.Ldata003] */ # cd: 5916
call0 .Lfunc005 # cf: 45f7ff
l32i a3, sp, 0 /* [(local0)] */ # d2: 3801
.Lbr013: l32i a6, a3, 0 # d4: 6803
l32i a0, sp, 4 /* [(local1)] */ # d6: 0811
bne a6, a3, .Lbr015 # d8: 379611
movi a2, .Lstr001 # db: 21edff
movi a3, .Lstr002 # de: 31edff
movi a4, 209 /* 0x000000d1 */ # e1: 42a0d1
call0 ets_printf # e4: 01edffc0
# e8: 0000
.Lbr014: j .Lbr014 /* (halt) */ # ea: 06ffff
.Lbr015: addi sp, sp, 16 /* (top of frame) */ # ed: 12c110
ret # f0: 0df0
.literal_position # f4: 14000000
# f8: 404b4c00
# fc: 40420f00
# 100: 00060060
# 104: 00000000
# 108: 00000000
# 10c: 00000000
# 110: 00000000
# Function @ .irom0.text+0x114
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global ets_timer_arm_ms_us
.type ets_timer_arm_ms_us, @function
ets_timer_arm_ms_us:
addi sp, sp, -16 /* (local0) */ # 114: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 117: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 119: d921
mov a12, a2 /* arg0 */ # 11b: cd02
mov a2, a3 /* arg1 */ # 11d: 2d03
mov a3, a4 /* arg2 */ # 11f: 3d04
l32i a4, a12, 0 /* [arg0] */ # 121: 480c
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 123: 0901
beqi a4, -1, .Lbr017 # 125: 26040d
movi a2, .Lstr003 # 128: 21f3ff
mov a3, a12 /* arg0 */ # 12b: 3d0c
call0 printf # 12d: 01f5ffc0
# 131: 0000
.Lbr016: j .Lbr016 /* (halt) */ # 133: 06ffff
.Lbr017: bnei a5, 1, .Lbr018 # 136: 661505
movi a0, 1000 /* 0x000003e8 */ # 139: 02a3e8
mull a2, a2, a0 # 13c: 002282
.Lbr018: beqz a2, .Lbr020 # 13f: ace2
s32i a3, sp, 12 /* arg2 -> [(local3)] */ # 141: 3931
movi a4, 858 /* 0x0000035a */ # 143: 42a35a
bgeu a4, a2, .Lbr019 # 146: 27b411
srli a13, a2, 2 # 149: 20d241
extui a0, a2, 0, 2 # 14c: 200014
addx4 a0, a0, a0 # 14f: 0000a0
addx4 a13, a13, a13 # 152: d0dda0
addx4 a13, a13, a0 # 155: 00dda0
j .Lbr021 # 158: c60500
.Lbr019: movi a4, 0x004c4b40 # 15b: 41e7ff
movi a3, 0x000f4240 # 15e: 31e7ff
mull a2, a2, a4 # 161: 402282
call0 __udivsi3 # 164: 01e9ffc0
# 168: 0000
mov a13, a2 # 16a: dd02
l32i a3, sp, 12 /* [(local3)] */ # 16c: 3831
j .Lbr021 # 16e: 460000
.Lbr020: movi a13, 0 /* 0x00000000 */ # 171: 0c0d
.Lbr021: beqz a3, .Lbr022 # 173: 8c03
s32i a13, a12, 12 /* a13 -> [arg0+0xc] */ # 175: d93c
.Lbr022: call0 vPortEnterCritical # 177: 01e5ffc0
# 17b: 0000
mov a3, a12 /* arg0 */ # 17d: 3d0c
movi a2, 0x60000600 # 17f: 21e0ff
memw # 182: c02000
l32i a2, a2, 36 /* [0x60000624] */ # 185: 2892
add a2, a13, a2 # 187: 2a2d
call0 .Lfunc006 # 189: 05f1ff
call0 vPortExitCritical # 18c: 01e1ffc0
# 190: 0000
l32i a12, sp, 4 /* [(local1)] */ # 192: c811
l32i a13, sp, 8 /* [(local2)] */ # 194: d821
l32i a0, sp, 0 /* [(local0)] */ # 196: 0801
addi sp, sp, 16 /* (top of frame) */ # 198: 12c110
ret # 19b: 0df0
.balign 4
# Function @ .irom0.text+0x1a0
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ets_timer_arm_us
.type ets_timer_arm_us, @function
ets_timer_arm_us:
movi a5, 0 /* 0x00000000 */ # 1a0: 0c05
addi sp, sp, -16 /* (local0) */ # 1a2: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1a5: 0901
call0 ets_timer_arm_ms_us # 1a7: 050000
l32i a0, sp, 0 /* [(local0)] */ # 1aa: 0801
addi sp, sp, 16 /* (top of frame) */ # 1ac: 12c110
ret # 1af: 0df0
.balign 4
# Function @ .irom0.text+0x1b4
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ets_timer_arm
.type ets_timer_arm, @function
ets_timer_arm:
movi a5, 1 /* 0x00000001 */ # 1b4: 0c15
addi sp, sp, -16 /* (local0) */ # 1b6: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1b9: 0901
call0 ets_timer_arm_ms_us # 1bb: 050000
l32i a0, sp, 0 /* [(local0)] */ # 1be: 0801
addi sp, sp, 16 /* (top of frame) */ # 1c0: 12c110
ret # 1c3: 0df0
.literal_position # 1c8: 00000000
# 1cc: 00000000
# 1d0: 00000000
# Function @ .irom0.text+0x1d4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ets_timer_disarm
.type ets_timer_disarm, @function
ets_timer_disarm:
addi sp, sp, -16 /* (local0) */ # 1d4: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1d7: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1d9: 0901
mov a12, a2 /* arg0 */ # 1db: cd02
call0 vPortEnterCritical # 1dd: 01fbffc0
# 1e1: 0000
movi a5, .Ldata001 # 1e3: 51f9ff
l32i a0, a5, 4 /* [.Ldata003] */ # 1e6: 0815
movi a2, 0 /* 0x00000000 */ # 1e8: 0c02
beqz a0, .Lbr024 # 1ea: 8cb0
.Lbr023: beq a12, a0, .Lbr025 # 1ec: 071c0b
mov a2, a0 # 1ef: 2d00
l32i a0, a0, 0 # 1f1: 0800
bnez a0, .Lbr023 # 1f3: 5650ff
j .Lbr027 # 1f6: 860300
.Lbr024: movi a2, 0 /* 0x00000000 */ # 1f9: 0c02
.Lbr025: beqz a0, .Lbr027 # 1fb: 8c90
l32i a0, a0, 0 # 1fd: 0800
bnez a2, .Lbr026 # 1ff: cc32
s32i a0, a5, 4 /* a0 -> [.Ldata003] */ # 201: 0915
j .Lbr027 # 203: 460000
.Lbr026: s32i a0, a2, 0 # 206: 0902
.Lbr027: call0 vPortExitCritical # 208: 01f2ffc0
# 20c: 0000
movi a0, 0 /* 0x00000000 */ # 20e: 0c00
movi a2, -1 /* 0xffffffff */ # 210: 7cf2
s32i a2, a12, 0 /* 0xffffffff -> [arg0] */ # 212: 290c
s32i a0, a12, 12 /* 0x00000000 -> [arg0+0xc] */ # 214: 093c
l32i a12, sp, 4 /* [(local1)] */ # 216: c811
l32i a0, sp, 0 /* [(local0)] */ # 218: 0801
addi sp, sp, 16 /* (top of frame) */ # 21a: 12c110
ret /* 0xffffffff */ # 21d: 0df0
.literal_position # 220: 00000000
# 224: 08000000
# 228: 00000000
# Function @ .irom0.text+0x22c
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ets_timer_done
.type ets_timer_done, @function
ets_timer_done:
addi sp, sp, -16 /* (local0) */ # 22c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 22f: 0901
l32i a0, a2, 0 /* [arg0] */ # 231: 0802
beqi a0, -1, .Lbr029 # 233: 260011
movi a2, .Lstr001 # 236: 21faff
movi a3, .Lstr002 # 239: 31faff
movi a4, 288 /* 0x00000120 */ # 23c: 42a120
call0 ets_printf # 23f: 01faffc0
# 243: 0000
.Lbr028: j .Lbr028 /* (halt) */ # 245: 06ffff
.Lbr029: movi a3, 0 /* 0x00000000 */ # 248: 0c03
movi a4, 0 /* 0x00000000 */ # 24a: 0c04
call0 ets_timer_setfn # 24c: 050000
l32i a0, sp, 0 /* [(local0)] */ # 24f: 0801
addi sp, sp, 16 /* (top of frame) */ # 251: 12c110
ret # 254: 0df0
.literal_position # 258: 00060060
# 25c: 00000000
# 260: 00000000
# 264: 00000000
# 268: 00060060
# 26c: 00000000
# 270: 00000000
# 274: 00000000
# 278: 00000000
# Function @ .irom0.text+0x27c
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ets_timer_handler_isr
.type ets_timer_handler_isr, @function
ets_timer_handler_isr:
addi sp, sp, -16 /* (local0) */ # 27c: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 27f: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 281: 0901
call0 vPortEnterCritical # 283: 01faffc0
# 287: 0000
movi a3, 0x60000600 # 289: 31f3ff
memw # 28c: c02000
movi a0, .Ldata001 # 28f: 01f3ff
l32i a5, a3, 36 /* [0x60000624] */ # 292: 5893
.Lbr030: l32i a12, a0, 4 /* [.Ldata003] */ # 294: c810
beqz a12, .Lbr033 # 296: 162c05
l32i a2, a12, 8 /* [[.Ldata003]+0x8] */ # 299: 282c
sub a4, a2, a5 # 29b: 5042c0
bgei a4, 1, .Lbr032 # 29e: e61445
movi a5, -1 /* 0xffffffff */ # 2a1: 7cf5
movi a7, .Ldata001 # 2a3: 71efff
l32i a8, a12, 16 /* [[.Ldata003]+0x10] */ # 2a6: 884c
s32i a8, a7, 12 /* [[.Ldata003]+0x10] -> [debug_timerfn] */ # 2a8: 8937
s32i a12, a7, 8 /* [.Ldata003] -> [debug_timer] */ # 2aa: c927
l32i a6, a12, 0 /* [[.Ldata003]] */ # 2ac: 680c
s32i a6, a7, 4 /* [[.Ldata003]] -> [.Ldata003] */ # 2ae: 6917
s32i a5, a12, 0 /* 0xffffffff -> [[.Ldata003]] */ # 2b0: 590c
call0 vPortExitCritical # 2b2: 01efffc0
# 2b6: 0000
l32i a0, a12, 16 /* [[.Ldata003]+0x10] */ # 2b8: 084c
l32i a2, a12, 24 /* [[.Ldata003]+0x18] */ # 2ba: 286c
callx0 a0 /* [[.Ldata003]+0x10] */ # 2bc: c00000
call0 vPortEnterCritical # 2bf: 01edffc0
# 2c3: 0000
l32i a2, a12, 0 /* [[.Ldata003]] */ # 2c5: 280c
l32i a0, a12, 12 /* [[.Ldata003]+0xc] */ # 2c7: 083c
bnei a2, -1, .Lbr031 # 2c9: 66020c
beqz a0, .Lbr031 # 2cc: 8c90
l32i a2, a12, 8 /* [[.Ldata003]+0x8] */ # 2ce: 282c
mov a3, a12 /* [.Ldata003] */ # 2d0: 3d0c
add a2, a2, a0 # 2d2: 0a22
s32i a2, a12, 8 /* a2 -> [[.Ldata003]+0x8] */ # 2d4: 292c
call0 .Lfunc006 # 2d6: 45dcff
.Lbr031: movi a0, .Ldata001 # 2d9: 01e2ff
memw # 2dc: c02000
movi a3, 0x60000600 # 2df: 31e2ff
l32i a5, a3, 36 /* [0x60000624] */ # 2e2: 5893
j .Lbr030 # 2e4: 06ebff
.Lbr032: beqz a12, .Lbr033 # 2e7: 8c1c
call0 .Lfunc005 # 2e9: 85d5ff
.Lbr033: call0 vPortExitCritical # 2ec: 01e3ffc0
# 2f0: 0000
l32i a12, sp, 4 /* [(local1)] */ # 2f2: c811
l32i a0, sp, 0 /* [(local0)] */ # 2f4: 0801
addi sp, sp, 16 /* (top of frame) */ # 2f6: 12c110
ret # 2f9: 0df0
.literal_position # 2fc: 00000000
# 300: 00000000
# Function @ .irom0.text+0x304
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.Lfunc007: addi sp, sp, -16 /* (local0) */ # 304: 12c1f0
s32i a12, sp, 8 /* a12 -> [(local2)] */ # 307: c921
movi a12, .Ldata001 # 309: c1fcff
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 30c: 0911
.Lbr034: l32i a2, a12, 16 /* [.Ldata004] */ # 30e: 284c
mov a3, sp /* (local0) */ # 310: 3d01
movi a4, -1 /* 0xffffffff */ # 312: 7cf4
movi a5, 0 /* 0x00000000 */ # 314: 0c05
call0 xQueueGenericReceive # 316: 01faffc0
# 31a: 0000
bnei a2, 1, .Lbr034 # 31c: 6612ee
l32i a0, sp, 0 /* [(local0)] */ # 31f: 0801
l32i a0, a0, 0 /* [[(local0)]] */ # 321: 0800
bnez a0, .Lbr035 # 323: cc30
movi a2, 0 /* 0x00000000 */ # 325: 0c02
call0 ets_timer_handler_isr # 327: 050000
.Lbr035: call0 .Lfunc003 # 32a: 05ceff
j .Lbr034 # 32d: 46f7ff
.literal_position # 330: 00000000
# 334: 54000000
# 338: 00000000
# 33c: 40000000
# 340: 04030000
# 344: 50000000
# 348: 00feef3f
# 34c: 00060060
# 350: 00000000
# 354: 00000000
# 358: 00000000
# 35c: 00000000
# 360: 00000000
# Function @ .irom0.text+0x364
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word[3] @ -0x1c
# (local2): word @ -0x10
# (local3): word[3] @ -0xc
.balign 4
.global ets_timer_init
.type ets_timer_init, @function
ets_timer_init:
movi a3, .Lfunc002 # 364: 31f4ff
addi sp, sp, -32 /* (local0) */ # 367: 12c1e0
movi a2, .Ldata001 # 36a: 21f1ff
s32i a0, sp, 20 /* a0 -> [(local3)] */ # 36d: 0951
movi a0, 0 /* 0x00000000 */ # 36f: 0c00
s32i a0, a2, 4 /* 0x00000000 -> [.Ldata003] */ # 371: 0912
movi a2, 10 /* 0x0000000a */ # 373: 0ca2
call0 _xt_isr_attach # 375: 01f6ffc0
# 379: 0000
movi a2, 4 /* 0x00000004 */ # 37b: 0c42
movi a3, 4 /* 0x00000004 */ # 37d: 0c43
movi a4, 0 /* 0x00000000 */ # 37f: 0c04
call0 xQueueGenericCreate # 381: 01f4ffc0
# 385: 0000
movi a5, 0 /* 0x00000000 */ # 387: 0c05
movi a6, 12 /* 0x0000000c */ # 389: 0cc6
addi a7, sp, 16 /* (local2) */ # 38b: 72c110
movi a4, .Ldata001 # 38e: 41eaff
movi a3, 0 /* 0x00000000 */ # 391: 0c03
s32i a2, a4, 16 /* a2 -> [.Ldata004] */ # 393: 2944
movi a4, 200 /* 0x000000c8 */ # 395: 42a0c8
s32i a3, sp, 0 /* 0x00000000 -> [(local0)] */ # 398: 3901
s32i a3, sp, 4 /* 0x00000000 -> [(local1)] */ # 39a: 3911
movi a2, .Lfunc007 # 39c: 21e9ff
movi a3, .Lstr006 # 39f: 31e7ff
call0 xTaskGenericCreate # 3a2: 01edffc0
# 3a6: 0000
movi a2, .Lstr007 # 3a8: 21e7ff
l32i a3, sp, 16 /* [(local2)] */ # 3ab: 3841
movi a4, 12 /* 0x0000000c */ # 3ad: 0cc4
movi a5, 200 /* 0x000000c8 */ # 3af: 52a0c8
call0 printf # 3b2: 01eaffc0
# 3b6: 0000
movi a6, 0x3feffe00 # 3b8: 61e4ff
movi a9, 0x60000600 # 3bb: 91e4ff
memw # 3be: c02000
movi a8, 0 /* 0x00000000 */ # 3c1: 0c08
s32i a8, a9, 48 /* 0x00000000 -> [0x60000630] */ # 3c3: 89c9
movi a10, 132 /* 0x00000084 */ # 3c5: a2a084
memw # 3c8: c02000
s32i a10, a9, 40 /* 0x00000084 -> [0x60000628] */ # 3cb: a9a9
memw # 3cd: c02000
s32i a8, a9, 32 /* 0x00000000 -> [0x60000620] */ # 3d0: 8989
movi a7, 4 /* 0x00000004 */ # 3d2: 0c47
memw # 3d4: c02000
l32i a5, a6, 0x204 /* [0x3ff00004] */ # 3d7: 522681
or a5, a5, a7 # 3da: 705520
memw # 3dd: c02000
s32i a5, a6, 0x204 /* a5 -> [0x3ff00004] */ # 3e0: 526681
movi a2, 1024 /* 0x00000400 */ # 3e3: 22a400
call0 _xt_isr_unmask # 3e6: 01deffc0
# 3ea: 0000
l32i a0, sp, 20 /* [(local3)] */ # 3ec: 0851
addi sp, sp, 32 /* (top of frame) */ # 3ee: 12c120
ret # 3f1: 0df0
.section .rodata.str1.4, "MSa", @progbits, 1
.Lstr001: .asciz "%s %s \n" # 0: 25732025
# 4: 73200a00
.Lstr002: .asciz "ets_timer.c" # 8: 6574735f
# c: 74696d65
# 10: 722e6300
.Lstr003: .asciz "arm new %x %x\n" # 14: 61726d20
# 18: 6e657720
# 1c: 25782025
# 20: 780a00
.balign 4
.Lstr004: .asciz "TIMQ_NUL\n" # 24: 54494d51
# 28: 5f4e554c
# 2c: 0a00
.balign 4
.Lstr005: .asciz "TIMQ_FL:%d!!" # 30: 54494d51
# 34: 5f464c3a
# 38: 25642121
# 3c: 00
.balign 4
.Lstr006: .asciz "rtc_timer_task" # 40: 7274635f
# 44: 74696d65
# 48: 725f7461
# 4c: 736b00
.balign 4
.Lstr007: .asciz "frc2_timer_task_hdl:%x, prio:%d, stack:%d\n" # 50: 66726332
# 54: 5f74696d
# 58: 65725f74
# 5c: 61736b5f
# 60: 68646c3a
# 64: 25782c20
# 68: 7072696f
# 6c: 3a25642c
# 70: 20737461
# 74: 636b3a25
# 78: 640a00

View file

@ -0,0 +1,156 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .text+0x4
.balign 4
.global os_get_cpu_frequency
.type os_get_cpu_frequency, @function
os_get_cpu_frequency:
movi a2, .Ldata001 # 4: 21ffff
l32i a2, a2, 0 /* [.Ldata001] */ # 7: 2802
ret /* [.Ldata001] */ # 9: 0df0
.section .data, "aw", @progbits
.Ldata001: .word 0x00000050 # 0: 50000000
.section .bss, "aw", @nobits
.global _putc1
.type _putc1, @object
_putc1: .word 0x00000000 # 0: 00000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# Function @ .irom0.text+0xc
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global ets_delay_us
.type ets_delay_us, @function
ets_delay_us:
.global os_delay_us
.type os_delay_us, @function
os_delay_us:
addi sp, sp, -16 /* (local0) */ # c: 12c1f0
s32i a13, sp, 8 /* a13 -> [(local2)] */ # f: d921
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 11: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 13: 0901
mov a12, a2 /* arg0 */ # 15: cd02
call0 xthal_get_ccount # 17: 01fbffc0
# 1b: 0000
movi a0, .Ldata001 # 1d: 01f8ff
l32i a0, a0, 0 /* [.Ldata001] */ # 20: 0800
mov a13, a2 # 22: dd02
mull a12, a0, a12 # 24: c0c082
.Lbr001: call0 xthal_get_ccount # 27: 01f8ffc0
# 2b: 0000
sub a3, a2, a13 # 2d: d032c0
bltu a3, a12, .Lbr001 # 30: c733f3
l32i a12, sp, 4 /* [(local1)] */ # 33: c811
l32i a13, sp, 8 /* [(local2)] */ # 35: d821
l32i a0, sp, 0 /* [(local0)] */ # 37: 0801
addi sp, sp, 16 /* (top of frame) */ # 39: 12c110
ret # 3c: 0df0
.literal_position # 40: 00000000
# Function @ .irom0.text+0x44
.balign 4
.global ets_update_cpu_frequency
.type ets_update_cpu_frequency, @function
ets_update_cpu_frequency:
.global os_update_cpu_frequency
.type os_update_cpu_frequency, @function
os_update_cpu_frequency:
movi a3, .Ldata001 # 44: 31ffff
s32i a2, a3, 0 /* arg0 -> [.Ldata001] */ # 47: 2903
ret /* arg0 */ # 49: 0df0
.literal_position # 4c: 00000000
# Function @ .irom0.text+0x50
.balign 4
.global os_install_putc1
.type os_install_putc1, @function
os_install_putc1:
movi a3, _putc1 # 50: 31ffff
s32i a2, a3, 0 /* arg0 -> [_putc1] */ # 53: 2903
ret /* arg0 */ # 55: 0df0
.literal_position # 58: 00000000
# Function @ .irom0.text+0x5c
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global os_putc
.type os_putc, @function
os_putc: addi sp, sp, -16 /* (local0) */ # 5c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 5f: 0901
movi a0, _putc1 # 61: 01fdff
l32i a0, a0, 0 /* [_putc1] */ # 64: 0800
callx0 a0 /* [_putc1] */ # 66: c00000
l32i a0, sp, 0 /* [(local0)] */ # 69: 0801
addi sp, sp, 16 /* (top of frame) */ # 6b: 12c110
ret # 6e: 0df0
.literal_position # 70: 00020060
# Function @ .irom0.text+0x74
.balign 4
.global gpio_output_set
.type gpio_output_set, @function
gpio_output_set:
movi a6, 0x60000200 # 74: 61ffff
memw # 77: c02000
s32i a2, a6, 0x104 /* arg0 -> [0x60000304] */ # 7a: 226641
memw # 7d: c02000
s32i a3, a6, 0x108 /* arg1 -> [0x60000308] */ # 80: 326642
memw # 83: c02000
s32i a4, a6, 0x110 /* arg2 -> [0x60000310] */ # 86: 426644
memw # 89: c02000
s32i a5, a6, 0x114 /* arg3 -> [0x60000314] */ # 8c: 526645
ret /* arg0 */ # 8f: 0df0
.literal_position # 94: 00060060
# 98: ffffdfff
# Function @ .irom0.text+0x9c
.balign 4
.global rtc_get_reset_reason
.type rtc_get_reset_reason, @function
rtc_get_reset_reason:
movi a4, 0x60000600 # 9c: 41feff
memw # 9f: c02000
l32i a2, a4, 0x114 /* [0x60000714] */ # a2: 222445
extui a2, a2, 0, 4 # a5: 202034
bnei a2, 5, .Lbr003 # a8: 665224
memw # ab: c02000
l32i a3, a4, 0x118 /* [0x60000718] */ # ae: 322446
extui a3, a3, 8, 6 # b1: 303854
bnei a3, 1, .Lbr002 # b4: 661304
movi a2, 6 /* 0x00000006 */ # b7: 0c62
j .Lbr003 # b9: c60400
.Lbr002: memw # bc: c02000
l32i a6, a4, 0x118 /* [0x60000718] */ # bf: 622446
movi a5, 0 /* 0x00000000 */ # c2: 0c05
extui a6, a6, 8, 6 # c4: 606854
addi a6, a6, -8 # c7: 62c6f8
movnez a2, a5, a6 # ca: 602593
extui a2, a2, 0, 8 # cd: 202074
.Lbr003: movi a8, 0xffdfffff # d0: 81f2ff
memw # d3: c02000
l32i a7, a4, 0x108 /* [0x60000708] */ # d6: 722442
and a7, a7, a8 # d9: 807710
memw # dc: c02000
s32i a7, a4, 0x108 /* a7 -> [0x60000708] */ # df: 726442
ret # e2: 0df0

View file

@ -0,0 +1,227 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# c: 00000000
# 10: 00000000
# Function @ .text+0x14
# Local variables/stack:
# (local0): word @ -0x50
# (local1): word @ -0x4c
# (local2): word @ -0x48
# (local3): word @ -0x44
# (local4): word[16] @ -0x40
.balign 4
.global vPortYield
.type vPortYield, @function
vPortYield: wsr a0, excsave1 # 14: 00d113
addi sp, sp, -80 /* (local0) */ # 17: 12c1b0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 1a: 0911
addi a0, sp, 80 /* (top of frame) */ # 1c: 02c150
s32i a0, sp, 16 /* (top of frame) -> [(local4)] */ # 1f: 0941
rsr a0, ps # 21: 00e603
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 24: 0921
rsr a0, excsave1 # 26: 00d103
s32i a0, sp, 12 /* a0 -> [(local3)] */ # 29: 0931
movi a0, _xt_user_exit # 2b: 01f5ff
s32i a0, sp, 0 /* _xt_user_exit -> [(local0)] */ # 2e: 0901
call0 _xt_int_enter # 30: 050000
call0 vPortEnterCritical # 33: 01f4ffc0
# 37: 0000
call0 vTaskSwitchContext # 39: 01f3ffc0
# 3d: 0000
call0 vPortExitCritical # 3f: 01f3ffc0
# 43: 0000
call0 _xt_int_exit # 45: 01f2ffc0
# 49: 0000
ret # 4b: 0df0
.literal_position # 50: 00000000
# 54: 00000000
# 58: 00000000
# 5c: 00000000
# 60: 00000000
# 64: 00350c00
# 68: 00000000
# 6c: 00000000
# 70: 00350c00
# Function @ .text+0x74
.balign 4
.global _xt_int_enter
.type _xt_int_enter, @function
_xt_int_enter:
s32i a12, sp, 60 /* a12 -> [(FP)+0x3c] */ # 74: c9f1
s32i a13, sp, 64 /* a13 -> [(FP)+0x40] */ # 76: d26110
mov a12, a0 # 79: cd00
call0 _xt_context_save # 7b: 01f5ffc0
# 7f: 0000
movi a0, pxCurrentTCB # 81: 01f4ff
l32i a0, a0, 0 /* [pxCurrentTCB] */ # 84: 0800
s32i sp, a0, 0 /* (top of frame) -> [[pxCurrentTCB]] */ # 86: 1900
mov a0, a12 # 88: 0d0c
ret # 8a: 0df0
# Function @ .text+0x8c
.balign 4
.global _xt_int_exit
.type _xt_int_exit, @function
_xt_int_exit:
s32i a14, sp, 68 /* a14 -> [(FP)+0x44] */ # 8c: e26111
s32i a15, sp, 72 /* a15 -> [(FP)+0x48] */ # 8f: f26112
movi sp, pxCurrentTCB # 92: 11f1ff
l32i sp, sp, 0 /* [pxCurrentTCB] */ # 95: 1801
l32i sp, sp, 0 /* [[pxCurrentTCB]] */ # 97: 1801
movi a14, pxCurrentTCB # 99: e1f0ff
l32i a14, a14, 0 /* [pxCurrentTCB] */ # 9c: e80e
addi a15, sp, 80 /* [[pxCurrentTCB]]+0x50 */ # 9e: f2c150
s32i a15, a14, 0 /* [[pxCurrentTCB]]+0x50 -> [[pxCurrentTCB]] */ # a1: f90e
call0 _xt_context_restore # a3: 01efffc0
# a7: 0000
l32i a14, sp, 68 /* [[[pxCurrentTCB]]+0x44] */ # a9: e22111
l32i a15, sp, 72 /* [[[pxCurrentTCB]]+0x48] */ # ac: f22112
l32i a0, sp, 0 /* [[[pxCurrentTCB]]] */ # af: 0801
ret # b1: 0df0
.balign 4
# Function @ .text+0xb4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global _xt_timer_int
.type _xt_timer_int, @function
_xt_timer_int:
addi sp, sp, -16 /* (local0) */ # b4: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # b7: 0901
.Lbr001: movi a2, 0x000c3500 # b9: 21eaff
rsr a3, ccompare0 # bc: 30f003
add a4, a3, a2 # bf: 2a43
wsr a4, ccompare0 # c1: 40f013
esync # c4: 202000
s32i a2, sp, 4 /* 0x000c3500 -> [(local1)] */ # c7: 2911
s32i a3, sp, 8 /* a3 -> [(local2)] */ # c9: 3921
call0 xPortSysTickHandle # cb: 01e7ffc0
# cf: 0000
l32i a2, sp, 4 /* [(local1)] */ # d1: 2811
l32i a3, sp, 8 /* [(local2)] */ # d3: 3821
esync # d5: 202000
rsr a4, ccount # d8: 40ea03
sub a4, a4, a3 # db: 3044c0
blt a2, a4, .Lbr001 # de: 4722d7
l32i a0, sp, 0 /* [(local0)] */ # e1: 0801
addi sp, sp, 16 /* (top of frame) */ # e3: 12c110
ret /* [(local1)] */ # e6: 0df0
# Function @ .text+0xe8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global _xt_timer_int1
.type _xt_timer_int1, @function
_xt_timer_int1:
addi sp, sp, -16 /* (local0) */ # e8: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # eb: 0901
s32i a2, sp, 4 /* arg0 -> [(local1)] */ # ed: 2911
s32i a3, sp, 8 /* arg1 -> [(local2)] */ # ef: 3921
call0 vTaskSwitchContext # f1: 01deffc0
# f5: 0000
l32i a2, sp, 4 /* [(local1)] */ # f7: 2811
l32i a3, sp, 8 /* [(local2)] */ # f9: 3821
l32i a0, sp, 0 /* [(local0)] */ # fb: 0801
addi sp, sp, 16 /* (top of frame) */ # fd: 12c110
ret /* [(local1)] */ # 100: 0df0
.balign 4
# Function @ .text+0x104
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global _xt_tick_timer_init
.type _xt_tick_timer_init, @function
_xt_tick_timer_init:
addi sp, sp, -16 /* (local0) */ # 104: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 107: 0901
movi a3, 0x000c3500 # 109: 31d9ff
rsr a2, ccount # 10c: 20ea03
add a2, a2, a3 # 10f: 3a22
wsr a2, ccompare0 # 111: 20f013
movi a2, 0 /* 0x00000000 */ # 114: 0c02
xsr a2, intenable # 116: 20e461
movi a3, 64 /* 0x00000040 */ # 119: 4c03
or a2, a2, a3 # 11b: 302220
wsr a2, intenable # 11e: 20e413
l32i a0, sp, 0 /* [(local0)] */ # 121: 0801
addi sp, sp, 16 /* (top of frame) */ # 123: 12c110
ret # 126: 0df0
# Function @ .text+0x128
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global _xt_isr_unmask
.type _xt_isr_unmask, @function
_xt_isr_unmask:
addi sp, sp, -16 /* (local0) */ # 128: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 12b: 0901
movi a3, 0 /* 0x00000000 */ # 12d: 0c03
xsr a3, intenable # 12f: 30e461
or a3, a2, a3 # 132: 303220
wsr a3, intenable # 135: 30e413
l32i a0, sp, 0 /* [(local0)] */ # 138: 0801
addi sp, sp, 16 /* (top of frame) */ # 13a: 12c110
ret /* arg0 */ # 13d: 0df0
.balign 4
# Function @ .text+0x140
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global _xt_isr_mask
.type _xt_isr_mask, @function
_xt_isr_mask:
addi sp, sp, -16 /* (local0) */ # 140: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 143: 0901
movi a3, 0 /* 0x00000000 */ # 145: 0c03
xsr a3, intenable # 147: 30e461
and a3, a2, a3 # 14a: 303210
wsr a3, intenable # 14d: 30e413
l32i a0, sp, 0 /* [(local0)] */ # 150: 0801
addi sp, sp, 16 /* (top of frame) */ # 152: 12c110
ret /* arg0 */ # 155: 0df0
.balign 4
# Function @ .text+0x158
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global _xt_read_ints
.type _xt_read_ints, @function
_xt_read_ints:
addi sp, sp, -16 /* (local0) */ # 158: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 15b: 0901
rsr a2, interrupt # 15d: 20e203
l32i a0, sp, 0 /* [(local0)] */ # 160: 0801
addi sp, sp, 16 /* (top of frame) */ # 162: 12c110
ret # 165: 0df0
.balign 4
# Function @ .text+0x168
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global _xt_clear_ints
.type _xt_clear_ints, @function
_xt_clear_ints:
addi sp, sp, -16 /* (local0) */ # 168: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 16b: 0901
wsr a2, intclear # 16d: 20e313
l32i a0, sp, 0 /* [(local0)] */ # 170: 0801
addi sp, sp, 16 /* (top of frame) */ # 172: 12c110
ret # 175: 0df0

View file

@ -0,0 +1,545 @@
.section .text, "ax", @progbits
.literal_position # 0: ff9f6ffe
# 4: 00020060
# 8: 00200000
# c: 00000000
# 10: 00020060
# 14: 00200001
# 18: 00201000
# 1c: 00208000
# 20: 00600000
# 24: 00000000
# 28: 00000000
# Function @ .text+0x2c
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global SPIReadModeCnfig
.type SPIReadModeCnfig, @function
SPIReadModeCnfig:
addi sp, sp, -16 /* (local0) */ # 2c: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 2f: 0901
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 31: c911
movi a4, 0xfe6f9fff # 33: 41f3ff
movi a3, 0x60000200 # 36: 31f3ff
memw # 39: c02000
l32i a0, a3, 8 /* [0x60000208] */ # 3c: 0823
and a0, a0, a4 # 3e: 400010
memw # 41: c02000
s32i a0, a3, 8 /* a0 -> [0x60000208] */ # 44: 0923
movi a0, flashchip # 46: 01f1ff
beqz a2, .Lbr004 # 49: 166204
beqi a2, 1, .Lbr005 # 4c: 261249
beqi a2, 2, .Lbr006 # 4f: 26224c
beqi a2, 3, .Lbr007 # 52: 26324f
addi a6, a2, -4 /* arg0-0x4 */ # 55: 62c2fc
movi a5, 0x00002000 # 58: 51ecff
movi a12, 0 /* 0x00000000 */ # 5b: 0c0c
moveqz a12, a5, a6 # 5d: 60c583
.Lbr001: beqz a2, .Lbr003 # 60: ac42
beqi a2, 1, .Lbr003 # 62: 261222
mov a2, a0 /* flashchip */ # 65: 2d00
call0 Disable_QMode # 67: 01efffc0
# 6b: 0000
.Lbr002: memw # 6d: c02000
movi a8, 0x60000200 # 70: 81e8ff
l32i a7, a8, 8 /* [0x60000208] */ # 73: 7828
or a7, a7, a12 # 75: c07720
memw # 78: c02000
s32i a7, a8, 8 /* a7 -> [0x60000208] */ # 7b: 7928
movi a2, 0 /* 0x00000000 */ # 7d: 0c02
l32i a12, sp, 4 /* [(local1)] */ # 7f: c811
l32i a0, sp, 0 /* [(local0)] */ # 81: 0801
addi sp, sp, 16 /* (top of frame) */ # 83: 12c110
ret /* 0x00000000 */ # 86: 0df0
.Lbr003: mov a2, a0 /* flashchip */ # 88: 2d00
call0 Enable_QMode # 8a: 01e7ffc0
# 8e: 0000
j .Lbr002 # 90: 46f6ff
.Lbr004: movi a12, 0x01002000 # 93: c1e0ff
j .Lbr001 # 96: 86f1ff
.Lbr005: movi a12, 0x00102000 # 99: c1dfff
j .Lbr001 # 9c: 06f0ff
.Lbr006: movi a12, 0x00802000 # 9f: c1dfff
j .Lbr001 # a2: 86eeff
.Lbr007: movi a12, 0x00006000 # a5: c1deff
j .Lbr001 # a8: 06edff
.literal_position # ac: 00000000
# b0: 00000000
# b4: 00000000
# b8: 00000000
# bc: 00000000
# c0: 00000000
# c4: 00000000
# c8: 00000000
# cc: 00000000
# d0: 00000000
# d4: 00000000
# Function @ .text+0xd8
# Local variables/stack:
# (local0): word @ -0x30
# (local1): word @ -0x2c
# (local2): word @ -0x28
# (local3): word @ -0x24
# (local4): word @ -0x20
# (local5): word @ -0x1c
# (local6): word @ -0x18
# (local7): word @ -0x14
# (local8): word @ -0x10
# (local9): word[3] @ -0xc
.balign 4
.global SPIWrite
.type SPIWrite, @function
SPIWrite: mov a5, a4 /* arg2 */ # d8: 5d04
addi sp, sp, -48 /* (local0) */ # da: 12c1d0
s32i a12, sp, 16 /* a12 -> [(local4)] */ # dd: c941
s32i a14, sp, 24 /* a14 -> [(local6)] */ # df: e961
s32i a3, sp, 36 /* arg1 -> [(local9)] */ # e1: 3991
s32i a0, sp, 12 /* a0 -> [(local3)] */ # e3: 0931
movi a4, flashchip # e5: 41f1ff
s32i a15, sp, 28 /* a15 -> [(local7)] */ # e8: f971
s32i a13, sp, 20 /* a13 -> [(local5)] */ # ea: d951
mov a15, a3 /* arg1 */ # ec: fd03
mov a13, a2 /* arg0 */ # ee: dd02
l32i a0, a4, 4 /* [.Ldata001] */ # f0: 0814
add a2, a5, a2 # f2: 2a25
bltu a0, a2, .Lbr008 # f4: 273002
j .Lbr014 # f7: 462000
.Lbr008: movi a2, 1 /* 0x00000001 */ # fa: 0c12
j .Lbr013 # fc: 461b00
.Lbr009: movi a2, flashchip # ff: 21ecff
mov a3, a13 /* arg0 */ # 102: 3d0d
mov a4, a15 /* arg1 */ # 104: 4d0f
mov a5, a12 # 106: 5d0c
call0 SPI_page_program # 108: 01eeffc0
# 10c: 0000
bnez a2, .Lbr008 # 10e: 5682fe
l32i a2, sp, 8 /* [(local2)] */ # 111: 2821
mov a3, a14 /* [.Ldata003] */ # 113: 3d0e
sub a2, a2, a12 # 115: c022c0
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 118: 2901
call0 __udivsi3 # 11a: 01eaffc0
# 11e: 0000
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 120: 2911
beqz a2, .Lbr011 # 122: acf2
movi a3, 0 /* 0x00000000 */ # 124: 0c03
s32i a3, sp, 32 /* 0x00000000 -> [(local8)] */ # 126: 3981
.Lbr010: movi a2, flashchip # 128: 21e3ff
add a3, a13, a12 # 12b: ca3d
mov a5, a14 /* [.Ldata003] */ # 12d: 5d0e
srli a4, a12, 2 # 12f: c04241
addx4 a4, a4, a15 # 132: f044a0
call0 SPI_page_program # 135: 01e4ffc0
# 139: 0000
bnez a2, .Lbr008 # 13b: 56b2fb
add a12, a14, a12 # 13e: cace
l32i a6, sp, 32 /* [(local8)] */ # 140: 6881
l32i a5, sp, 4 /* [(local1)] */ # 142: 5811
addi a7, a6, 1 /* [(local8)]+0x1 */ # 144: 1b76
extui a6, a7, 0, 8 # 146: 706074
s32i a6, sp, 32 /* a6 -> [(local8)] */ # 149: 6981
bne a5, a6, .Lbr010 # 14b: 6795d9
l32i a8, sp, 8 /* [(local2)] */ # 14e: 8821
sub a8, a8, a12 # 150: c088c0
s32i a8, sp, 0 /* a8 -> [(local0)] */ # 153: 8901
.Lbr011: add a3, a13, a12 # 155: ca3d
movi a2, flashchip # 157: 21d8ff
l32i a5, sp, 0 /* [(local0)] */ # 15a: 5801
srli a4, a12, 2 # 15c: c04241
addx4 a4, a4, a15 # 15f: f044a0
call0 SPI_page_program # 162: 01daffc0
# 166: 0000
bnez a2, .Lbr008 # 168: 56e2f8
.Lbr012: movi a2, 0 /* 0x00000000 */ # 16b: 0c02
.Lbr013: l32i a12, sp, 16 /* [(local4)] */ # 16d: c841
l32i a13, sp, 20 /* [(local5)] */ # 16f: d851
l32i a14, sp, 24 /* [(local6)] */ # 171: e861
l32i a15, sp, 28 /* [(local7)] */ # 173: f871
l32i a0, sp, 12 /* [(local3)] */ # 175: 0831
addi sp, sp, 48 /* (top of frame) */ # 177: 12c130
ret # 17a: 0df0
.Lbr014: mov a2, a13 /* arg0 */ # 17c: 2d0d
l32i a14, a4, 16 /* [.Ldata003] */ # 17e: e844
s32i a5, sp, 8 /* arg2 -> [(local2)] */ # 180: 5921
mov a3, a14 /* [.Ldata003] */ # 182: 3d0e
call0 __umodsi3 # 184: 01d3ffc0
# 188: 0000
l32i a5, sp, 8 /* [(local2)] */ # 18a: 5821
sub a12, a14, a2 # 18c: 20cec0
bltu a5, a12, .Lbr015 # 18f: c73502
j .Lbr009 # 192: 46daff
.Lbr015: mov a4, a15 /* arg1 */ # 195: 4d0f
mov a3, a13 /* arg0 */ # 197: 3d0d
movi a2, flashchip # 199: 21c8ff
call0 SPI_page_program # 19c: 01ceffc0
# 1a0: 0000
bnez a2, .Lbr008 # 1a2: 5642f5
j .Lbr012 # 1a5: 86f0ff
.literal_position # 1a8: 00000000
# 1ac: 00000000
# Function @ .text+0x1b0
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global SPIRead
.type SPIRead, @function
SPIRead: mov a5, a4 /* arg2 */ # 1b0: 5d04
mov a7, a3 /* arg1 */ # 1b2: 7d03
addi sp, sp, -16 /* (local0) */ # 1b4: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1b7: 0901
mov a3, a2 /* arg0 */ # 1b9: 3d02
mov a4, a7 /* arg1 */ # 1bb: 4d07
movi a2, flashchip # 1bd: 21faff
call0 SPI_read_data # 1c0: 01fbffc0
# 1c4: 0000
movi a4, 0 /* 0x00000000 */ # 1c6: 0c04
l32i a3, sp, 0 /* [(local0)] */ # 1c8: 3801
movi a0, 1 /* 0x00000001 */ # 1ca: 0c10
addi sp, sp, 16 /* (top of frame) */ # 1cc: 12c110
moveqz a0, a4, a2 # 1cf: 200483
mov a2, a0 # 1d2: 2d00
mov a0, a3 /* [(local0)] */ # 1d4: 0d03
ret # 1d6: 0df0
.literal_position # 1d8: 00000000
# 1dc: 00000000
# 1e0: 00000000
# 1e4: 00000000
# 1e8: 00000000
# 1ec: 00000000
# Function @ .text+0x1f0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global SPIEraseSector
.type SPIEraseSector, @function
SPIEraseSector:
addi sp, sp, -16 /* (local0) */ # 1f0: 12c1f0
movi a3, flashchip # 1f3: 31f9ff
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1f6: c911
mov a12, a2 /* arg0 */ # 1f8: cd02
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1fa: 0901
l32i a2, a3, 4 /* [.Ldata001] */ # 1fc: 2813
l32i a3, a3, 12 /* [.Ldata002] */ # 1fe: 3833
call0 __udivsi3 # 200: 01f9ffc0
# 204: 0000
bgeu a12, a2, .Lbr016 # 206: 27bc1f
movi a2, flashchip # 209: 21f4ff
call0 SPI_write_enable # 20c: 01f7ffc0
# 210: 0000
bnez a2, .Lbr016 # 212: dc32
movi a2, flashchip # 214: 21f3ff
l32i a3, a2, 12 /* [.Ldata002] */ # 217: 3832
mull a3, a3, a12 # 219: c03382
call0 SPI_sector_erase # 21c: 01f4ffc0
# 220: 0000
bnez a2, .Lbr016 # 222: cc32
movi a2, 0 /* 0x00000000 */ # 224: 0c02
j .Lbr017 # 226: 460000
.Lbr016: movi a2, 1 /* 0x00000001 */ # 229: 0c12
.Lbr017: l32i a12, sp, 4 /* [(local1)] */ # 22b: c811
l32i a0, sp, 0 /* [(local0)] */ # 22d: 0801
addi sp, sp, 16 /* (top of frame) */ # 22f: 12c110
ret # 232: 0df0
.literal_position # 234: 00000000
# 238: 00020060
# 23c: 00000010
# 240: ffffff00
# 244: 00000000
# 248: 00000000
# 24c: 00000000
# 250: 00000000
# 254: 00000000
# Function @ .text+0x258
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global spi_flash_get_id
.type spi_flash_get_id, @function
spi_flash_get_id:
addi sp, sp, -16 /* (local0) */ # 258: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 25b: 0911
call0 vPortEnterCritical # 25d: 01f9ffc0
# 261: 0000
call0 Cache_Read_Disable # 263: 01f9ffc0
# 267: 0000
movi a2, flashchip # 269: 21f2ff
call0 Wait_SPI_Idle # 26c: 01f8ffc0
# 270: 0000
movi a4, 0 /* 0x00000000 */ # 272: 0c04
movi a0, 0x60000200 # 274: 01f1ff
memw # 277: c02000
s32i a4, a0, 64 /* 0x00000000 -> [0x60000240] */ # 27a: 426010
movi a3, 0x10000000 # 27d: 31efff
memw # 280: c02000
s32i a3, a0, 0 /* 0x10000000 -> [0x60000200] */ # 283: 3900
memw # 285: c02000
l32i a2, a0, 0 /* [0x60000200] */ # 288: 2800
beqz a2, .Lbr019 # 28a: 8c62
.Lbr018: memw # 28c: c02000
l32i a5, a0, 0 /* [0x60000200] */ # 28f: 5800
bnez a5, .Lbr018 # 291: 5675ff
.Lbr019: movi a7, 0x00ffffff # 294: 71ebff
memw # 297: c02000
movi a2, 0 /* 0x00000000 */ # 29a: 0c02
movi a3, 0 /* 0x00000000 */ # 29c: 0c03
l32i a6, a0, 64 /* [0x60000240] */ # 29e: 622010
movi a4, 1 /* 0x00000001 */ # 2a1: 0c14
and a6, a6, a7 # 2a3: 706610
s32i a6, sp, 0 /* a6 -> [(local0)] */ # 2a6: 6901
call0 Cache_Read_Enable # 2a8: 01eaffc0
# 2ac: 0000
call0 vPortExitCritical # 2ae: 01e9ffc0
# 2b2: 0000
l32i a8, sp, 4 /* [(local1)] */ # 2b4: 8811
l32i a2, sp, 0 /* [(local0)] */ # 2b6: 2801
mov a0, a8 /* [(local1)] */ # 2b8: 0d08
addi sp, sp, 16 /* (top of frame) */ # 2ba: 12c110
ret /* [(local0)] */ # 2bd: 0df0
.literal_position # 2c0: 00000000
# 2c4: 00000000
# 2c8: 00000000
# 2cc: 00000000
# 2d0: 00000000
# 2d4: 00000000
# Function @ .text+0x2d8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global spi_flash_read_status
.type spi_flash_read_status, @function
spi_flash_read_status:
addi sp, sp, -16 /* (local0) */ # 2d8: 12c1f0
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 2db: 2901
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 2dd: 0921
call0 vPortEnterCritical # 2df: 01f9ffc0
# 2e3: 0000
call0 Cache_Read_Disable # 2e5: 01f8ffc0
# 2e9: 0000
movi a2, flashchip # 2eb: 21f5ff
l32i a3, sp, 0 /* [(local0)] */ # 2ee: 3801
call0 SPI_read_status # 2f0: 01f7ffc0
# 2f4: 0000
movi a3, 0 /* 0x00000000 */ # 2f6: 0c03
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 2f8: 2911
movi a4, 1 /* 0x00000001 */ # 2fa: 0c14
movi a2, 0 /* 0x00000000 */ # 2fc: 0c02
call0 Cache_Read_Enable # 2fe: 01f4ffc0
# 302: 0000
call0 vPortExitCritical # 304: 01f4ffc0
# 308: 0000
l32i a3, sp, 8 /* [(local2)] */ # 30a: 3821
l32i a2, sp, 4 /* [(local1)] */ # 30c: 2811
mov a0, a3 /* [(local2)] */ # 30e: 0d03
addi sp, sp, 16 /* (top of frame) */ # 310: 12c110
ret /* [(local1)] */ # 313: 0df0
.literal_position # 318: 00000000
# 31c: 00000000
# 320: 00000000
# 324: 00000000
# 328: 00000000
# 32c: 00000000
# Function @ .text+0x330
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global spi_flash_write_status
.type spi_flash_write_status, @function
spi_flash_write_status:
addi sp, sp, -16 /* (local0) */ # 330: 12c1f0
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 333: 2901
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 335: 0921
call0 vPortEnterCritical # 337: 01f9ffc0
# 33b: 0000
call0 Cache_Read_Disable # 33d: 01f8ffc0
# 341: 0000
movi a2, flashchip # 343: 21f5ff
l32i a3, sp, 0 /* [(local0)] */ # 346: 3801
call0 SPI_write_status # 348: 01f7ffc0
# 34c: 0000
movi a3, 0 /* 0x00000000 */ # 34e: 0c03
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 350: 2911
movi a4, 1 /* 0x00000001 */ # 352: 0c14
movi a2, 0 /* 0x00000000 */ # 354: 0c02
call0 Cache_Read_Enable # 356: 01f4ffc0
# 35a: 0000
call0 vPortExitCritical # 35c: 01f4ffc0
# 360: 0000
l32i a3, sp, 8 /* [(local2)] */ # 362: 3821
l32i a2, sp, 4 /* [(local1)] */ # 364: 2811
mov a0, a3 /* [(local2)] */ # 366: 0d03
addi sp, sp, 16 /* (top of frame) */ # 368: 12c110
ret /* [(local1)] */ # 36b: 0df0
.literal_position # 370: 00000000
# 374: 00000000
# 378: 00000000
# 37c: 00000000
# Function @ .text+0x380
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global spi_flash_erase_sector
.type spi_flash_erase_sector, @function
spi_flash_erase_sector:
addi sp, sp, -16 /* (local0) */ # 380: 12c1f0
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 383: 2901
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 385: 0921
call0 vPortEnterCritical # 387: 01faffc0
# 38b: 0000
call0 Cache_Read_Disable # 38d: 01f9ffc0
# 391: 0000
l32i a2, sp, 0 /* [(local0)] */ # 393: 2801
call0 SPIEraseSector # 395: 050000
movi a3, 0 /* 0x00000000 */ # 398: 0c03
s32i a2, sp, 4 /* a2 -> [(local1)] */ # 39a: 2911
movi a4, 1 /* 0x00000001 */ # 39c: 0c14
movi a2, 0 /* 0x00000000 */ # 39e: 0c02
call0 Cache_Read_Enable # 3a0: 01f6ffc0
# 3a4: 0000
call0 vPortExitCritical # 3a6: 01f5ffc0
# 3aa: 0000
l32i a3, sp, 8 /* [(local2)] */ # 3ac: 3821
l32i a2, sp, 4 /* [(local1)] */ # 3ae: 2811
mov a0, a3 /* [(local2)] */ # 3b0: 0d03
addi sp, sp, 16 /* (top of frame) */ # 3b2: 12c110
ret /* [(local1)] */ # 3b5: 0df0
.literal_position # 3b8: 00000000
# 3bc: 00000000
# 3c0: 00000000
# 3c4: 00000000
# Function @ .text+0x3c8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global spi_flash_write
.type spi_flash_write, @function
spi_flash_write:
addi sp, sp, -16 /* (local0) */ # 3c8: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 3cb: 0911
s32i a13, sp, 12 /* a13 -> [(local3)] */ # 3cd: d931
s32i a12, sp, 8 /* a12 -> [(local2)] */ # 3cf: c921
mov a13, a3 /* arg1 */ # 3d1: dd03
mov a12, a4 /* arg2 */ # 3d3: cd04
bnez a3, .Lbr020 # 3d5: cc33
movi a2, 1 /* 0x00000001 */ # 3d7: 0c12
j .Lbr022 # 3d9: 460e00
.Lbr020: s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 3dc: 2901
movi a0, 3 /* 0x00000003 */ # 3de: 0c30
bnone a0, a4, .Lbr021 # 3e0: 470007
movi a0, 4 /* 0x00000004 */ # 3e3: 0c40
srli a12, a4, 2 # 3e5: 40c241
addx4 a12, a12, a0 # 3e8: 00cca0
.Lbr021: call0 vPortEnterCritical # 3eb: 01f3ffc0
# 3ef: 0000
call0 Cache_Read_Disable # 3f1: 01f2ffc0
# 3f5: 0000
mov a4, a12 # 3f7: 4d0c
mov a3, a13 /* arg1 */ # 3f9: 3d0d
l32i a2, sp, 0 /* [(local0)] */ # 3fb: 2801
call0 SPIWrite # 3fd: 050000
movi a3, 0 /* 0x00000000 */ # 400: 0c03
mov a12, a2 # 402: cd02
movi a4, 1 /* 0x00000001 */ # 404: 0c14
movi a2, 0 /* 0x00000000 */ # 406: 0c02
call0 Cache_Read_Enable # 408: 01eeffc0
# 40c: 0000
call0 vPortExitCritical # 40e: 01edffc0
# 412: 0000
mov a2, a12 # 414: 2d0c
.Lbr022: l32i a12, sp, 8 /* [(local2)] */ # 416: c821
l32i a13, sp, 12 /* [(local3)] */ # 418: d831
l32i a0, sp, 4 /* [(local1)] */ # 41a: 0811
addi sp, sp, 16 /* (top of frame) */ # 41c: 12c110
ret # 41f: 0df0
.literal_position # 424: 00000000
# 428: 00000000
# 42c: 00000000
# 430: 00000000
# Function @ .text+0x434
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global spi_flash_read
.type spi_flash_read, @function
spi_flash_read:
addi sp, sp, -16 /* (local0) */ # 434: 12c1f0
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 437: 0921
s32i a4, sp, 0 /* arg2 -> [(local0)] */ # 439: 4901
s32i a12, sp, 12 /* a12 -> [(local3)] */ # 43b: c931
s32i a2, sp, 4 /* arg0 -> [(local1)] */ # 43d: 2911
mov a12, a3 /* arg1 */ # 43f: cd03
bnez a3, .Lbr023 # 441: cc33
movi a2, 1 /* 0x00000001 */ # 443: 0c12
j .Lbr024 # 445: 860a00
.Lbr023: call0 vPortEnterCritical # 448: 01f7ffc0
# 44c: 0000
call0 Cache_Read_Disable # 44e: 01f6ffc0
# 452: 0000
mov a3, a12 /* arg1 */ # 454: 3d0c
l32i a2, sp, 4 /* [(local1)] */ # 456: 2811
l32i a4, sp, 0 /* [(local0)] */ # 458: 4801
call0 SPIRead # 45a: 050000
movi a3, 0 /* 0x00000000 */ # 45d: 0c03
mov a12, a2 # 45f: cd02
movi a4, 1 /* 0x00000001 */ # 461: 0c14
movi a2, 0 /* 0x00000000 */ # 463: 0c02
call0 Cache_Read_Enable # 465: 01f1ffc0
# 469: 0000
call0 vPortExitCritical # 46b: 01f1ffc0
# 46f: 0000
mov a2, a12 # 471: 2d0c
.Lbr024: l32i a12, sp, 12 /* [(local3)] */ # 473: c831
l32i a0, sp, 8 /* [(local2)] */ # 475: 0821
addi sp, sp, 16 /* (top of frame) */ # 477: 12c110
ret # 47a: 0df0
.section .data, "aw", @progbits
.global flashchip
.type flashchip, @object
flashchip: .word 0x001640ef # 0: ef401600
.Ldata001: .word 0x00400000 # 4: 00004000
# NOTE: The following is apparently unreferenced code/data
.word 0x00010000 # 8: 00000100
.Ldata002: .word 0x00001000 # c: 00100000
.Ldata003: .word 0x00000100 # 10: 00010000
# NOTE: The following is apparently unreferenced code/data
.word 0x0000ffff # 14: ffff0000

View file

@ -0,0 +1,232 @@
.section .bss, "aw", @nobits
.Ldata001: .word 0x00000000 # 0: 00000000
.Ldata002: .byte 0x00
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# 8: 00000000
# c: 00000000
# 10: 00000000
# Function @ .irom0.text+0x14
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word @ -0x10
# (local5): word[3] @ -0xc
.balign 4
.global os_timer_setfn
.type os_timer_setfn, @function
os_timer_setfn:
addi sp, sp, -32 /* (local0) */ # 14: 12c1e0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 17: 0901
s32i a14, sp, 12 /* a14 -> [(local3)] */ # 19: e931
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 1b: d921
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1d: c911
s32i a15, sp, 16 /* a15 -> [(local4)] */ # 1f: f941
movi a15, .Ldata001 # 21: f1f7ff
mov a12, a2 /* arg0 */ # 24: cd02
l32i a13, a15, 0 /* [.Ldata001] */ # 26: d80f
mov a14, a4 /* arg2 */ # 28: ed04
beqz a13, .Lbr006 # 2a: 16fd04
.Lbr001: l32i a0, a13, 4 # 2d: 081d
bne a0, a12, .Lbr005 # 2f: c79041
l32i a2, a12, 24 /* [arg0+0x18] */ # 32: 286c
l32i a4, a12, 16 /* [arg0+0x10] */ # 34: 484c
bne a2, a14, .Lbr002 # 36: e79202
beq a4, a3, .Lbr007 # 39: 37145f
.Lbr002: l32i a2, a12, 4 /* [arg0+0x4] */ # 3c: 281c
s32i a3, sp, 20 /* arg1 -> [(local5)] */ # 3e: 3951
beqz a2, .Lbr004 # 40: ac32
movi a3, 3 /* 0x00000003 */ # 42: 0c33
movi a4, 0 /* 0x00000000 */ # 44: 0c04
movi a5, 0 /* 0x00000000 */ # 46: 0c05
movi a6, 50 /* 0x00000032 */ # 48: 3c26
call0 xTimerGenericCommand # 4a: 01efffc0
# 4e: 0000
l32i a3, sp, 20 /* [(local5)] */ # 50: 3851
bnez a2, .Lbr003 # 52: cc92
movi a2, .Lstr001 # 54: 21ecff
call0 printf # 57: 01edffc0
# 5b: 0000
l32i a3, sp, 20 /* [(local5)] */ # 5d: 3851
.Lbr003: l8ui a5, a15, 4 /* [.Ldata002] */ # 5f: 520f04
addi a5, a5, -1 /* [.Ldata002]-0x1 */ # 62: 0b55
s8i a5, a15, 4 /* [.Ldata002]-0x1 -> [.Ldata002] */ # 64: 524f04
.Lbr004: s32i a3, a12, 16 /* a3 -> [arg0+0x10] */ # 67: 394c
s32i a14, a12, 24 /* arg2 -> [arg0+0x18] */ # 69: e96c
movi a6, 0 /* 0x00000000 */ # 6b: 0c06
s32i a6, a12, 4 /* 0x00000000 -> [arg0+0x4] */ # 6d: 691c
s32i a6, a12, 12 /* 0x00000000 -> [arg0+0xc] */ # 6f: 693c
j .Lbr007 # 71: c60900
.Lbr005: l32i a0, a13, 0 # 74: 080d
beqz a0, .Lbr006 # 76: 8c30
mov a13, a0 # 78: dd00
bnez a0, .Lbr001 # 7a: 56f0fa
.Lbr006: s32i a3, a12, 16 /* arg1 -> [arg0+0x10] */ # 7d: 394c
s32i a14, a12, 24 /* arg2 -> [arg0+0x18] */ # 7f: e96c
movi a2, 8 /* 0x00000008 */ # 81: 0c82
movi a7, 0 /* 0x00000000 */ # 83: 0c07
s32i a7, a12, 4 /* 0x00000000 -> [arg0+0x4] */ # 85: 791c
s32i a7, a12, 12 /* 0x00000000 -> [arg0+0xc] */ # 87: 793c
call0 pvPortMalloc # 89: 01e1ffc0
# 8d: 0000
s32i a12, a2, 4 # 8f: c912
movi a9, 0 /* 0x00000000 */ # 91: 0c09
l32i a8, a15, 0 /* [.Ldata001] */ # 93: 880f
s32i a9, a2, 0 # 95: 9902
movnez a15, a13, a8 # 97: 80fd93
s32i a2, a15, 0 # 9a: 290f
.Lbr007: l32i a12, sp, 4 /* [(local1)] */ # 9c: c811
l32i a13, sp, 8 /* [(local2)] */ # 9e: d821
l32i a14, sp, 12 /* [(local3)] */ # a0: e831
l32i a15, sp, 16 /* [(local4)] */ # a2: f841
l32i a0, sp, 0 /* [(local0)] */ # a4: 0801
addi sp, sp, 32 /* (top of frame) */ # a6: 12c120
ret # a9: 0df0
.literal_position # ac: 00000000
# b0: 18000000
# b4: 00000000
# b8: 00000000
# bc: 00000000
# c0: 00000000
# c4: 00000000
# c8: 00000000
# cc: 00000000
# Function @ .irom0.text+0xd0
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word[4] @ -0x10
.balign 4
.global os_timer_arm
.type os_timer_arm, @function
os_timer_arm:
addi sp, sp, -32 /* (local0) */ # d0: 12c1e0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # d3: 0901
s32i a13, sp, 8 /* a13 -> [(local2)] */ # d5: d921
s32i a15, sp, 16 /* a15 -> [(local4)] */ # d7: f941
s32i a12, sp, 4 /* a12 -> [(local1)] */ # d9: c911
s32i a14, sp, 12 /* a14 -> [(local3)] */ # db: e931
mov a12, a2 /* arg0 */ # dd: cd02
mov a14, a3 /* arg1 */ # df: ed03
l32i a15, a2, 4 /* [arg0+0x4] */ # e1: f812
mov a13, a4 /* arg2 */ # e3: dd04
bnez a15, .Lbr008 # e5: ecff
s8i a4, a2, 20 /* arg2 -> [arg0+0x14] */ # e7: 424214
s32i a3, a2, 12 /* arg1 -> [arg0+0xc] */ # ea: 3932
mov a2, a3 /* arg1 */ # ec: 2d03
movi a3, 10 /* 0x0000000a */ # ee: 0ca3
call0 __udivsi3 # f0: 01f1ffc0
# f4: 0000
mov a4, a13 /* arg2 */ # f6: 4d0d
l32i a5, a12, 24 /* [arg0+0x18] */ # f8: 586c
mov a3, a2 # fa: 3d02
l32i a6, a12, 16 /* [arg0+0x10] */ # fc: 684c
movi a2, 0 /* 0x00000000 */ # fe: 0c02
call0 xTimerCreate # 100: 01eeffc0
# 104: 0000
movi a3, .Ldata001 # 106: 31e9ff
mov a15, a2 # 109: fd02
l8ui a0, a3, 4 /* [.Ldata002] */ # 10b: 020304
s32i a2, a12, 4 /* a2 -> [arg0+0x4] */ # 10e: 291c
addi a0, a0, 1 /* [.Ldata002]+0x1 */ # 110: 1b00
s8i a0, a3, 4 /* [.Ldata002]+0x1 -> [.Ldata002] */ # 112: 024304
beqz a2, .Lbr011 # 115: 16c204
.Lbr008: l8ui a3, a12, 20 /* [arg0+0x14] */ # 118: 320c14
beq a3, a13, .Lbr009 # 11b: d71304
s8i a13, a12, 20 /* arg2 -> [arg0+0x14] */ # 11e: d24c14
s32i a13, a15, 28 # 121: d97f
.Lbr009: l32i a4, a12, 12 /* [arg0+0xc] */ # 123: 483c
beq a4, a14, .Lbr010 # 125: e7141b
mov a2, a14 /* arg1 */ # 128: 2d0e
s32i a14, a12, 12 /* arg1 -> [arg0+0xc] */ # 12a: e93c
movi a3, 10 /* 0x0000000a */ # 12c: 0ca3
call0 __udivsi3 # 12e: 01e3ffc0
# 132: 0000
movi a3, 2 /* 0x00000002 */ # 134: 0c23
movi a5, 0 /* 0x00000000 */ # 136: 0c05
mov a4, a2 # 138: 4d02
movi a6, 10 /* 0x0000000a */ # 13a: 0ca6
mov a2, a15 # 13c: 2d0f
call0 xTimerGenericCommand # 13e: 01e0ffc0
# 142: 0000
.Lbr010: call0 xTaskGetTickCount # 144: 01e0ffc0
# 148: 0000
movi a3, 0 /* 0x00000000 */ # 14a: 0c03
movi a5, 0 /* 0x00000000 */ # 14c: 0c05
mov a4, a2 # 14e: 4d02
movi a6, 50 /* 0x00000032 */ # 150: 3c26
l32i a2, a12, 4 /* [arg0+0x4] */ # 152: 281c
call0 xTimerGenericCommand # 154: 01ddffc0
# 158: 0000
bnez a2, .Lbr011 # 15a: cc72
movi a2, .Lstr002 # 15c: 21d5ff
call0 printf # 15f: 01dbffc0
# 163: 0000
.Lbr011: l32i a12, sp, 4 /* [(local1)] */ # 165: c811
l32i a13, sp, 8 /* [(local2)] */ # 167: d821
l32i a14, sp, 12 /* [(local3)] */ # 169: e831
l32i a15, sp, 16 /* [(local4)] */ # 16b: f841
l32i a0, sp, 0 /* [(local0)] */ # 16d: 0801
addi sp, sp, 32 /* (top of frame) */ # 16f: 12c120
ret # 172: 0df0
.literal_position # 174: 2c000000
# 178: 00000000
# 17c: 00000000
# Function @ .irom0.text+0x180
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global os_timer_disarm
.type os_timer_disarm, @function
os_timer_disarm:
addi sp, sp, -16 /* (local0) */ # 180: 12c1f0
l32i a2, a2, 4 /* [arg0+0x4] */ # 183: 2812
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 185: 0901
beqz a2, .Lbr012 # 187: 9c72
movi a3, 1 /* 0x00000001 */ # 189: 0c13
movi a4, 0 /* 0x00000000 */ # 18b: 0c04
movi a5, 0 /* 0x00000000 */ # 18d: 0c05
movi a6, 50 /* 0x00000032 */ # 18f: 3c26
call0 xTimerGenericCommand # 191: 01f9ffc0
# 195: 0000
bnez a2, .Lbr012 # 197: cc72
movi a2, .Lstr003 # 199: 21f6ff
call0 printf # 19c: 01f8ffc0
# 1a0: 0000
.Lbr012: l32i a0, sp, 0 /* [(local0)] */ # 1a2: 0801
addi sp, sp, 16 /* (top of frame) */ # 1a4: 12c110
ret # 1a7: 0df0
.section .rodata.str1.4, "MSa", @progbits, 1
.Lstr001: .asciz "Timer Delete Failed\n" # 0: 54696d65
# 4: 72204465
# 8: 6c657465
# c: 20466169
# 10: 6c65640a
# 14: 00
.balign 4
.Lstr002: .asciz "Timer Start Failed\n" # 18: 54696d65
# 1c: 72205374
# 20: 61727420
# 24: 4661696c
# 28: 65640a00
.Lstr003: .asciz "Timer Stop Failed\n" # 2c: 54696d65
# 30: 72205374
# 34: 6f702046
# 38: 61696c65
# 3c: 640a00

View file

@ -0,0 +1,47 @@
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.global uart_buff_switch
.type uart_buff_switch, @function
uart_buff_switch:
ret /* arg0 */ # 0: 0df0
.literal_position # 4: 000f0000
# 8: 00feff5f
# c: 00000600
# 10: fffff9ff
# Function @ .irom0.text+0x14
.balign 4
.global uart_div_modify
.type uart_div_modify, @function
uart_div_modify:
movi a5, 0x00000f00 # 14: 51fcff
movi a6, 0x5ffffe00 # 17: 61fcff
mul16s a5, a5, a2 # 1a: 2055d1
add a5, a5, a6 # 1d: 6a55
memw # 1f: c02000
s32i a3, a5, 0x214 # 22: 326585
movi a8, 0x00060000 # 25: 81f9ff
memw # 28: c02000
l32i a7, a5, 0x220 # 2b: 722588
or a7, a7, a8 # 2e: 807720
memw # 31: c02000
s32i a7, a5, 0x220 # 34: 726588
movi a6, 0xfff9ffff # 37: 61f6ff
memw # 3a: c02000
l32i a4, a5, 0x220 # 3d: 422588
and a4, a4, a6 # 40: 604410
memw # 43: c02000
s32i a4, a5, 0x220 # 46: 426588
ret /* arg0 */ # 49: 0df0
.balign 4
# Function @ .irom0.text+0x4c
.balign 4
.global Uart_Init
.type Uart_Init, @function
Uart_Init: ret /* arg0 */ # 4c: 0df0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,43 @@
.section .text, "ax", @progbits
# Function @ .text+0x0
.balign 4
.literal_position
.global _xt_context_save
.type _xt_context_save, @function
_xt_context_save:
s32i a2, sp, 20 /* arg0 -> [(FP)+0x14] */ # 0: 2951
s32i a3, sp, 24 /* arg1 -> [(FP)+0x18] */ # 2: 3961
s32i a4, sp, 28 /* arg2 -> [(FP)+0x1c] */ # 4: 4971
s32i a5, sp, 32 /* arg3 -> [(FP)+0x20] */ # 6: 5981
s32i a6, sp, 36 /* arg4 -> [(FP)+0x24] */ # 8: 6991
s32i a7, sp, 40 /* arg5 -> [(FP)+0x28] */ # a: 79a1
s32i a8, sp, 44 /* a8 -> [(FP)+0x2c] */ # c: 89b1
s32i a9, sp, 48 /* a9 -> [(FP)+0x30] */ # e: 99c1
s32i a10, sp, 52 /* a10 -> [(FP)+0x34] */ # 10: a9d1
s32i a11, sp, 56 /* a11 -> [(FP)+0x38] */ # 12: b9e1
rsr a3, sar # 14: 300303
s32i a3, sp, 76 /* a3 -> [(FP)+0x4c] */ # 17: 326113
ret /* arg0 */ # 1a: 0df0
# Function @ .text+0x1c
.balign 4
.global _xt_context_restore
.type _xt_context_restore, @function
_xt_context_restore:
l32i a3, sp, 76 /* [(FP)+0x4c] */ # 1c: 322113
l32i a2, sp, 20 /* [(FP)+0x14] */ # 1f: 2851
wsr a3, sar # 21: 300313
l32i a3, sp, 24 /* [(FP)+0x18] */ # 24: 3861
l32i a4, sp, 28 /* [(FP)+0x1c] */ # 26: 4871
l32i a5, sp, 32 /* [(FP)+0x20] */ # 28: 5881
l32i a6, sp, 36 /* [(FP)+0x24] */ # 2a: 6891
l32i a7, sp, 40 /* [(FP)+0x28] */ # 2c: 78a1
l32i a8, sp, 44 /* [(FP)+0x2c] */ # 2e: 88b1
l32i a9, sp, 48 /* [(FP)+0x30] */ # 30: 98c1
l32i a10, sp, 52 /* [(FP)+0x34] */ # 32: a8d1
l32i a11, sp, 56 /* [(FP)+0x38] */ # 34: b8e1
l32i a12, sp, 60 /* [(FP)+0x3c] */ # 36: c8f1
l32i a13, sp, 64 /* [(FP)+0x40] */ # 38: d22110
ret /* [(FP)+0x14] */ # 3b: 0df0

View file

View file

@ -0,0 +1,443 @@
.section .bss, "aw", @nobits
.global sdk_g_ic
.type sdk_g_ic, @object
sdk_g_ic: .space 16
.Ldata001: .word 0x00000000 # 10: 00000000
.Ldata002: .word 0x00000000 # 14: 00000000
# NOTE: 1328 non-alignment zero bytes skipped.
.skip 1328
.global sdk_xieee80211Queue
.type sdk_xieee80211Queue, @object
sdk_xieee80211Queue:
.word 0x00000000 # 548: 00000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 6c090000
# 4: b4090000
# 8: b4090000
# c: 00000000
# Function @ .irom0.text+0x10
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word @ -0x10
# (local5): word @ -0xc
# (local6): word[2] @ -0x8
.balign 4
.Lfunc001: movi a5, 131 /* 0x00000083 */ # 10: 52a083
movi a6, 0x000009b4 # 13: 61fcff
addi sp, sp, -32 /* (local0) */ # 16: 12c1e0
s32i a2, sp, 24 /* arg0 -> [(local6)] */ # 19: 2961
s32i a15, sp, 16 /* a15 -> [(local4)] */ # 1b: f941
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1d: 0901
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1f: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 21: d921
s32i a14, sp, 12 /* a14 -> [(local3)] */ # 23: e931
movi a13, 0x0000096c # 25: d1f6ff
movi a14, 0 /* 0x00000000 */ # 28: 0c0e
mov a12, a2 /* arg0 */ # 2a: cd02
movi a0, 156 /* 0x0000009c */ # 2c: 02a09c
mov a15, a2 /* arg0 */ # 2f: fd02
add a0, a15, a0 /* arg0+0x9c */ # 31: 0a0f
movi a2, 14 /* 0x0000000e */ # 33: 0ce2
s32i a2, a15, 128 /* 0x0000000e -> [arg0+0x80] */ # 35: 226f20
.Lbr001: s32i a5, a12, 132 # 38: 526c21
l8ui a3, a12, 138 # 3b: 320c8a
s32i a0, sp, 20 /* a0 -> [(local5)] */ # 3e: 0951
bltu a0, a12, .Lbr002 # 40: c73008
s16i a13, a12, 136 # 43: d25c44
bne a12, a0, .Lbr002 # 46: 079c02
s16i a6, a12, 136 # 49: 625c44
.Lbr002: bnez a3, .Lbr003 # 4c: dc23
l16ui a2, a12, 136 # 4e: 221c44
movi a3, 131 /* 0x00000083 */ # 51: 32a083
call0 sdk_ieee80211_mhz2ieee # 54: 050000
l32i a0, sp, 20 /* [(local5)] */ # 57: 0851
movi a5, 131 /* 0x00000083 */ # 59: 52a083
movi a6, 0x000009b4 # 5c: 61ebff
s8i a2, a12, 138 # 5f: 224c8a
.Lbr003: addi a13, a13, 5 # 62: 5bdd
l8ui a4, a12, 139 # 64: 420c8b
addi a14, a14, 1 # 67: 1bee
bnez a4, .Lbr004 # 69: ccd4
l8ui a7, a12, 141 # 6b: 720c8d
slli a7, a7, 24 # 6e: 807701
srai a7, a7, 24 # 71: 707831
slli a7, a7, 1 # 74: f07711
s8i a7, a12, 139 # 77: 724c8b
.Lbr004: l32i a8, a15, 128 /* [arg0+0x80] */ # 7a: 822f20
addi a12, a12, 12 # 7d: cbcc
blt a14, a8, .Lbr001 # 7f: 872eb5
movi a2, 132 /* 0x00000084 */ # 82: 22a084
add a2, a15, a2 /* arg0+0x84 */ # 85: 2a2f
call0 sdk_ieee80211_get_ratetable # 87: 01e1ffc0
# 8b: 0000
l32i a0, sp, 0 /* [(local0)] */ # 8d: 0801
l32i a12, sp, 4 /* [(local1)] */ # 8f: c811
l32i a13, sp, 8 /* [(local2)] */ # 91: d821
s32i a2, a15, 0x150 /* a2 -> [arg0+0x150] */ # 93: 226f54
l32i a14, sp, 12 /* [(local3)] */ # 96: e831
l32i a15, sp, 16 /* [(local4)] */ # 98: f841
addi sp, sp, 32 /* (top of frame) */ # 9a: 12c120
ret # 9d: 0df0
.literal_position # a0: 00000000
# a4: 00000000
# a8: 00000000
# ac: 00000000
# b0: 00000000
# b4: 00000000
# Function @ .irom0.text+0xb8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ieee80211_ifattach
.type sdk_ieee80211_ifattach, @function
sdk_ieee80211_ifattach:
addi sp, sp, -16 /* (local0) */ # b8: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # bb: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # bd: 0901
mov a12, a2 /* arg0 */ # bf: cd02
call0 .Lfunc001 # c1: c5f4ff
mov a2, a12 /* arg0 */ # c4: 2d0c
movi a0, 100 /* 0x00000064 */ # c6: 02a064
s16i a0, a12, 40 /* 0x0064 -> [arg0+0x28] */ # c9: 025c14
call0 sdk_ieee80211_crypto_attach # cc: 01f6ffc0
# d0: 0000
mov a2, a12 /* arg0 */ # d2: 2d0c
call0 sdk_ieee80211_proto_attach # d4: 01f5ffc0
# d8: 0000
movi a3, 0 /* 0x00000000 */ # da: 0c03
addmi a4, a12, 1280 /* arg0+0x500 */ # dc: 42dc05
l32i a2, a4, 28 /* [arg0+0x51c] */ # df: 2874
s32i a3, a4, 12 /* 0x00000000 -> [arg0+0x50c] */ # e1: 3934
bnei a2, 3, .Lbr005 # e3: 663207
mov a2, a12 /* arg0 */ # e6: 2d0c
call0 sdk_ieee80211_ht_attach # e8: 01f1ffc0
# ec: 0000
.Lbr005: movi a2, sdk_g_ic # ee: 21ecff
call0 sdk_chm_init # f1: 01efffc0
# f5: 0000
mov a2, a12 /* arg0 */ # f7: 2d0c
call0 sdk_ieee80211_scan_attach # f9: 01eeffc0
# fd: 0000
l32i a12, sp, 4 /* [(local1)] */ # ff: c811
l32i a0, sp, 0 /* [(local0)] */ # 101: 0801
addi sp, sp, 16 /* (top of frame) */ # 103: 12c110
ret # 106: 0df0
.literal_position # 108: b4090000
# 10c: b3090000
# 110: 99f6ffff
# 114: 30f6ffff
# 118: 00000000
# 11c: 00000000
# 120: 00000000
# Function @ .irom0.text+0x124
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_mhz2ieee
.type sdk_ieee80211_mhz2ieee, @function
sdk_ieee80211_mhz2ieee:
movi a6, 0x000009b3 # 124: 61faff
movi a7, 0xfffff699 # 127: 71faff
addi sp, sp, -16 /* (local0) */ # 12a: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 12d: 0901
movi a0, 0x000009b4 # 12f: 01f6ff
bbci a3, 7, .Lbr006 # 132: 776312
beq a2, a0, .Lbr010 # 135: 07123d
bltu a6, a2, .Lbr009 # 138: 273628
add a2, a2, a7 /* arg0+0xfffff699 */ # 13b: 7a22
movi a3, 5 /* 0x00000005 */ # 13d: 0c53
call0 __divsi3 # 13f: 01f6ffc0
# 143: 0000
j .Lbr008 # 145: 060500
.Lbr006: beq a2, a0, .Lbr010 # 148: 07122a
bltu a6, a2, .Lbr007 # 14b: 27360c
add a2, a2, a7 /* arg0+0xfffff699 */ # 14e: 7a22
movi a3, 5 /* 0x00000005 */ # 150: 0c53
call0 __divsi3 # 152: 01f2ffc0
# 156: 0000
j .Lbr008 # 158: 460000
.Lbr007: movi a2, -1 /* 0xffffffff */ # 15b: 7cf2
.Lbr008: l32i a0, sp, 0 /* [(local0)] */ # 15d: 0801
addi sp, sp, 16 /* (top of frame) */ # 15f: 12c110
ret # 162: 0df0
.Lbr009: movi a0, 0xfffff630 # 164: 01ecff
movi a3, 20 /* 0x00000014 */ # 167: 1c43
add a2, a2, a0 /* arg0+0xfffff630 */ # 169: 0a22
call0 __udivsi3 # 16b: 01edffc0
# 16f: 0000
addi a2, a2, 15 # 171: fb22
j .Lbr008 # 173: 86f9ff
.Lbr010: movi a2, 14 /* 0x0000000e */ # 176: 0ce2
j .Lbr008 # 178: 46f8ff
.literal_position # 17c: ffff0000
# Function @ .irom0.text+0x180
.balign 4
.global sdk_ieee80211_chan2ieee
.type sdk_ieee80211_chan2ieee, @function
sdk_ieee80211_chan2ieee:
bnez a2, .Lbr011 # 180: cc22
movi a2, 0 /* 0x00000000 */ # 182: 0c02
ret /* 0x00000000 */ # 184: 0df0
.Lbr011: movi a5, 0x0000ffff # 186: 51fdff
beq a2, a5, .Lbr012 # 189: 571204
l8ui a2, a2, 6 /* [arg0+0x6] */ # 18c: 220206
ret /* [arg0+0x6] */ # 18f: 0df0
.Lbr012: mov a2, a5 /* 0x0000ffff */ # 191: 2d05
ret /* 0x0000ffff */ # 193: 0df0
.literal_position # 198: 67090000
# 19c: a4080000
# 1a0: 88130000
# 1a4: b4090000
# Function @ .irom0.text+0x1a8
.balign 4
.global sdk_ieee80211_ieee2mhz
.type sdk_ieee80211_ieee2mhz, @function
sdk_ieee80211_ieee2mhz:
movi a7, 14 /* 0x0000000e */ # 1a8: 0ce7
movi a8, 13 /* 0x0000000d */ # 1aa: 0cd8
movi a6, 0x00000967 # 1ac: 61fbff
movi a9, 0x000008a4 # 1af: 91fbff
bbci a3, 7, .Lbr014 # 1b2: 77630d
beq a2, a7, .Lbr016 # 1b5: 77121f
bgeu a8, a2, .Lbr015 # 1b8: 27b815
.Lbr013: addx4 a2, a2, a2 # 1bb: 2022a0
addx4 a2, a2, a9 # 1be: 9022a0
ret # 1c1: 0df0
.Lbr014: beq a2, a7, .Lbr016 # 1c3: 771211
bgeu a8, a2, .Lbr015 # 1c6: 27b807
movi a3, 26 /* 0x0000001a */ # 1c9: 1ca3
bgeu a3, a2, .Lbr013 # 1cb: 27b3ec
movi a6, 0x00001388 # 1ce: 61f4ff
.Lbr015: addx4 a2, a2, a2 # 1d1: 2022a0
add a2, a2, a6 # 1d4: 6a22
ret # 1d6: 0df0
.Lbr016: movi a2, 0x000009b4 # 1d8: 21f3ff
ret /* 0x000009b4 */ # 1db: 0df0
.balign 4
# Function @ .irom0.text+0x1e0
.balign 4
.global sdk_ieee80211_find_channel
.type sdk_ieee80211_find_channel, @function
sdk_ieee80211_find_channel:
l32i a6, a2, 128 /* [arg0+0x80] */ # 1e0: 622220
blti a6, 1, .Lbr019 # 1e3: a6161d
addx2 a7, a6, a6 # 1e6: 607690
addx4 a7, a7, a2 # 1e9: 2077a0
.Lbr017: l16ui a8, a2, 136 # 1ec: 821244
l32i a9, a2, 132 # 1ef: 922221
bne a3, a8, .Lbr018 # 1f2: 879309
bnone a9, a4, .Lbr018 # 1f5: 470906
movi a10, 132 /* 0x00000084 */ # 1f8: a2a084
add a2, a2, a10 # 1fb: aa22
ret # 1fd: 0df0
.Lbr018: addi a2, a2, 12 # 1ff: cb22
bne a2, a7, .Lbr017 # 201: 7792e7
.Lbr019: movi a2, 0 /* 0x00000000 */ # 204: 0c02
ret /* 0x00000000 */ # 206: 0df0
# Function @ .irom0.text+0x208
.balign 4
.global sdk_ieee80211_find_channel_byieee
.type sdk_ieee80211_find_channel_byieee, @function
sdk_ieee80211_find_channel_byieee:
l32i a6, a2, 128 /* [arg0+0x80] */ # 208: 622220
blti a6, 1, .Lbr022 # 20b: a6161d
addx2 a7, a6, a6 # 20e: 607690
addx4 a7, a7, a2 # 211: 2077a0
.Lbr020: l8ui a8, a2, 138 # 214: 82028a
l32i a9, a2, 132 # 217: 922221
bne a3, a8, .Lbr021 # 21a: 879309
bnone a9, a4, .Lbr021 # 21d: 470906
movi a10, 132 /* 0x00000084 */ # 220: a2a084
add a2, a2, a10 # 223: aa22
ret # 225: 0df0
.Lbr021: addi a2, a2, 12 # 227: cb22
bne a2, a7, .Lbr020 # 229: 7792e7
.Lbr022: movi a2, 0 /* 0x00000000 */ # 22c: 0c02
ret /* 0x00000000 */ # 22e: 0df0
.literal_position # 230: 00000000
# 234: 10000000
# 238: 00000000
# 23c: 14000000
# 240: 00000000
# 244: 00000000
# 248: 00000000
# 24c: 34000000
# 250: 3c000000
# 254: 00000000
# 258: 40000000
# 25c: 00000000
# 260: 14000000
# 264: 34000000
# 268: 08000000
# 26c: 48000000
# 270: 00000000
# 274: 00000000
# 278: 00000000
# 27c: 00000000
# 280: 00000000
# 284: 00000000
# 288: 00000000
# 28c: 00000000
# 290: 00000000
# 294: 00000000
# 298: 00000000
# 29c: 00000000
# 2a0: 00000000
# 2a4: 00000000
# Function @ .irom0.text+0x2a8
# Local variables/stack:
# (local0): word[4] @ -0x20
# (local1): word @ -0x10
# (local2): word[3] @ -0xc
.balign 4
.global sdk_wifi_mode_set
.type sdk_wifi_mode_set, @function
sdk_wifi_mode_set:
addi sp, sp, -32 /* (local0) */ # 2a8: 12c1e0
s32i a12, sp, 20 /* a12 -> [(local2)] */ # 2ab: c951
s32i a0, sp, 16 /* a0 -> [(local1)] */ # 2ad: 0941
mov a12, a2 /* arg0 */ # 2af: cd02
movi a2, .Lstr001 # 2b1: 21dfff
call0 printf # 2b4: 01efffc0
# 2b8: 0000
beqz a12, .Lbr026 # 2ba: 164c0d
beqi a12, 1, .Lbr023 # 2bd: 261c08
beqi a12, 2, .Lbr025 # 2c0: 262c72
addi a0, a12, -3 /* arg0-0x3 */ # 2c3: 02ccfd
bnez a0, .Lbr027 # 2c6: 56100d
.Lbr023: movi a2, .Label001 # 2c9: 21daff
call0 printf # 2cc: 01eaffc0
# 2d0: 0000
movi a2, sdk_info # 2d2: 21d9ff
l8ui a7, a2, 34 /* [sdk_info+0x22] */ # 2d5: 720222
l8ui a6, a2, 33 /* [sdk_info+0x21] */ # 2d8: 620221
l8ui a5, a2, 32 /* [sdk_info+0x20] */ # 2db: 520220
l8ui a4, a2, 31 /* [sdk_info+0x1f] */ # 2de: 42021f
l8ui a3, a2, 30 /* [sdk_info+0x1e] */ # 2e1: 32021e
l8ui a2, a2, 35 /* [sdk_info+0x23] */ # 2e4: 220223
s32i a2, sp, 0 /* [sdk_info+0x23] -> [(local0)] */ # 2e7: 2901
movi a2, .Lstr003 # 2e9: 21d4ff
call0 printf # 2ec: 01e3ffc0
# 2f0: 0000
movi a3, sdk_g_ic # 2f2: 31d3ff
l32i a3, a3, 16 /* [.Ldata001] */ # 2f5: 3843
bnez a3, .Lbr024 # 2f7: ecf3
movi a2, 648 /* 0x00000288 */ # 2f9: 22a288
call0 zalloc # 2fc: 01e0ffc0
# 300: 0000
movi a5, sdk_g_ic # 302: 51d0ff
movi a4, 0 /* 0x00000000 */ # 305: 0c04
s32i a2, a5, 16 /* a2 -> [.Ldata001] */ # 307: 2945
s32i a4, a2, 176 # 309: 42622c
s32i a4, a2, 60 # 30c: 49f2
movi a2, 272 /* 0x00000110 */ # 30e: 22a110
call0 zalloc # 311: 01dbffc0
# 315: 0000
movi a6, sdk_g_ic # 317: 61ccff
movi a3, .Label002 # 31a: 31ccff
l32i a6, a6, 16 /* [.Ldata001] */ # 31d: 6846
movi a4, 6 /* 0x00000006 */ # 31f: 0c64
s32i a2, a6, 140 /* a2 -> [[.Ldata001]+0x8c] */ # 321: 226623
call0 memcpy # 324: 01d8ffc0
# 328: 0000
.Lbr024: beqi a12, 1, .Lbr027 # 32a: 261c6d
movi a2, .Label003 # 32d: 21c8ff
call0 printf # 330: 01d6ffc0
# 334: 0000
.Lbr025: movi a12, sdk_g_ic # 336: c1c7ff
movi a2, .Lstr004 # 339: 21c7ff
call0 printf # 33c: 01d4ffc0
# 340: 0000
movi a8, sdk_info # 342: 81c6ff
movi a2, .Lstr003 # 345: 21c6ff
l8ui a7, a8, 28 /* [sdk_info+0x1c] */ # 348: 72081c
l8ui a6, a8, 27 /* [sdk_info+0x1b] */ # 34b: 62081b
l8ui a5, a8, 26 /* [sdk_info+0x1a] */ # 34e: 52081a
l8ui a4, a8, 25 /* [sdk_info+0x19] */ # 351: 420819
l8ui a3, a8, 24 /* [sdk_info+0x18] */ # 354: 320818
l8ui a8, a8, 29 /* [sdk_info+0x1d] */ # 357: 82081d
s32i a8, sp, 0 /* [sdk_info+0x1d] -> [(local0)] */ # 35a: 8901
call0 printf # 35c: 01cdffc0
# 360: 0000
l32i a9, a12, 20 /* [.Ldata002] */ # 362: 985c
bnez a9, .Lbr027 # 364: fc39
movi a2, 648 /* 0x00000288 */ # 366: 22a288
call0 zalloc # 369: 01caffc0
# 36d: 0000
s32i a2, a12, 20 /* a2 -> [.Ldata002] */ # 36f: 295c
movi a10, 1 /* 0x00000001 */ # 371: 0c1a
s32i a10, a2, 176 # 373: a2622c
movi a2, 272 /* 0x00000110 */ # 376: 22a110
call0 zalloc # 379: 01c7ffc0
# 37d: 0000
movi a3, .Label002 # 37f: 31b9ff
l32i a11, a12, 20 /* [.Ldata002] */ # 382: b85c
movi a4, 6 /* 0x00000006 */ # 384: 0c64
s32i a2, a11, 144 /* a2 -> [[.Ldata002]+0x90] */ # 386: 226b24
call0 memcpy # 389: 01c4ffc0
# 38d: 0000
j .Lbr027 # 38f: 060200
.Lbr026: movi a2, .Lstr002 # 392: 21b5ff
call0 printf # 395: 01c2ffc0
# 399: 0000
.Lbr027: movi a2, .Label004 # 39b: 21b4ff
call0 printf # 39e: 01c1ffc0
# 3a2: 0000
movi a2, 1 /* 0x00000001 */ # 3a4: 0c12
l32i a12, sp, 20 /* [(local2)] */ # 3a6: c851
l32i a0, sp, 16 /* [(local1)] */ # 3a8: 0841
addi sp, sp, 32 /* (top of frame) */ # 3aa: 12c120
ret /* 0x00000001 */ # 3ad: 0df0
.section .rodata, "a", @progbits
.global sdk_ieee80211_opcap
.type sdk_ieee80211_opcap, @object
sdk_ieee80211_opcap:
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00
.section .rodata.str1.4, "MSa", @progbits, 1
.Lstr001: .asciz "mode : " # 0: 6d6f6465
# 4: 203a2000
.Lstr002: .asciz "null" # 8: 6e756c6c
# c: 00
.balign 4
.Label001: .word 0x00617473 # 10: 73746100
.Lstr003: .asciz "(%02x:%02x:%02x:%02x:%02x:%02x)" # 14: 28253032
# 18: 783a2530
# 1c: 32783a25
# 20: 3032783a
# 24: 25303278
# 28: 3a253032
# 2c: 783a2530
# 30: 32782900
.Label002: .byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00
.Label003: .word 0x00202b20 # 3c: 202b2000
.Lstr004: .asciz "softAP" # 40: 736f6674
# 44: 415000
.balign 4
.Label004: .byte 0x0a, 0x00

View file

@ -0,0 +1,206 @@
.section .data, "aw", @progbits
.Lrel001: .word .irom0.text # 0: 00000000
.Lrel002: .word .irom0.text # 4: 00000000
.Lrel003: .word .irom0.text # 8: 00000000
.Lrel004: .word .irom0.text # c: 00000000
.Lrel005: .word .Lfunc002 # 10: bc000000
.Lrel006: .word .Lfunc002 # 14: bc000000
.Lrel007: .word .Lfunc002 # 18: bc000000
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.Lfunc001: movi a2, -1 /* 0xffffffff */ # 0: 7cf2
ret /* 0xffffffff */ # 2: 0df0
.literal_position # 4: 0c000000
# 8: 00000000
# c: 08000000
# Function @ .irom0.text+0x10
.balign 4
.global sdk_ieee80211_send_action_register
.type sdk_ieee80211_send_action_register, @function
sdk_ieee80211_send_action_register:
beqi a2, 3, .Lbr003 # 10: 26321a
beqi a2, 7, .Lbr004 # 13: 267220
movi a5, 127 /* 0x0000007f */ # 16: 52a07f
bne a2, a5, .Lbr002 # 19: 57920d
bnez a3, .Lbr002 # 1c: cca3
movi a2, .Lrel004 # 1e: 21f9ff
.Lbr001: addx4 a6, a3, a2 # 21: 2063a0
s32i a4, a6, 0 # 24: 4906
movi a2, 0 /* 0x00000000 */ # 26: 0c02
ret /* 0x00000000 */ # 28: 0df0
.Lbr002: movi a2, -1 /* 0xffffffff */ # 2a: 7cf2
ret /* 0xffffffff */ # 2c: 0df0
.Lbr003: bgeui a3, 2, .Lbr002 # 2e: f623f8
movi a2, .Lrel001 # 31: 21f5ff
j .Lbr001 # 34: 46faff
.Lbr004: bnez a3, .Lbr002 # 37: 56f3fe
movi a2, .Lrel003 # 3a: 21f4ff
j .Lbr001 # 3d: 06f8ff
.literal_position # 40: 00000000
# Function @ .irom0.text+0x44
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_send_action_unregister
.type sdk_ieee80211_send_action_unregister, @function
sdk_ieee80211_send_action_unregister:
movi a4, .Lfunc001 # 44: 41ffff
addi sp, sp, -16 /* (local0) */ # 47: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 4a: 0901
call0 sdk_ieee80211_send_action_register # 4c: 050000
l32i a0, sp, 0 /* [(local0)] */ # 4f: 0801
addi sp, sp, 16 /* (top of frame) */ # 51: 12c110
ret # 54: 0df0
.literal_position # 58: 00000000
# 5c: 0c000000
# 60: 08000000
# 64: 00000000
# Function @ .irom0.text+0x68
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_send_action
.type sdk_ieee80211_send_action, @function
sdk_ieee80211_send_action:
addi sp, sp, -16 /* (local0) */ # 68: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 6b: 0901
movi a0, .Lfunc001 # 6d: 01faff
beqi a3, 3, .Lbr005 # 70: 263315
beqi a3, 7, .Lbr009 # 73: 267326
movi a6, 127 /* 0x0000007f */ # 76: 62a07f
bne a3, a6, .Lbr006 # 79: 67930f
bnez a4, .Lbr008 # 7c: dc84
movi a7, .Lrel004 # 7e: 71f7ff
addx4 a7, a4, a7 # 81: 7074a0
l32i a7, a7, 0 # 84: 7807
j .Lbr007 # 86: 060100
.Lbr005: bltui a4, 2, .Lbr011 # 89: b62422
.Lbr006: mov a7, a0 /* .Lfunc001 */ # 8c: 7d00
.Lbr007: callx0 a7 # 8e: c00700
l32i a0, sp, 0 /* [(local0)] */ # 91: 0801
addi sp, sp, 16 /* (top of frame) */ # 93: 12c110
ret # 96: 0df0
.Lbr008: mov a7, a0 /* .Lfunc001 */ # 98: 7d00
j .Lbr007 # 9a: 06fcff
.Lbr009: bnez a4, .Lbr010 # 9d: cc94
movi a7, .Lrel003 # 9f: 71f0ff
addx4 a7, a4, a7 # a2: 7074a0
l32i a7, a7, 0 # a5: 7807
j .Lbr007 # a7: c6f8ff
.Lbr010: mov a7, a0 /* .Lfunc001 */ # aa: 7d00
j .Lbr007 # ac: 86f7ff
.Lbr011: movi a7, .Lrel001 # af: 71edff
addx4 a7, a4, a7 # b2: 7074a0
l32i a7, a7, 0 # b5: 7807
j .Lbr007 # b7: c6f4ff
.balign 4
# Function @ .irom0.text+0xbc
.balign 4
.Lfunc002: movi a2, -1 /* 0xffffffff */ # bc: 7cf2
ret /* 0xffffffff */ # be: 0df0
.literal_position # c0: 18000000
# c4: 10000000
# c8: 14000000
# Function @ .irom0.text+0xcc
.balign 4
.global sdk_ieee80211_recv_action_register
.type sdk_ieee80211_recv_action_register, @function
sdk_ieee80211_recv_action_register:
beqi a2, 3, .Lbr014 # cc: 26321a
beqi a2, 7, .Lbr015 # cf: 267220
movi a5, 127 /* 0x0000007f */ # d2: 52a07f
bne a2, a5, .Lbr013 # d5: 57920d
bnez a3, .Lbr013 # d8: cca3
movi a2, .Lrel007 # da: 21f9ff
.Lbr012: addx4 a6, a3, a2 # dd: 2063a0
s32i a4, a6, 0 # e0: 4906
movi a2, 0 /* 0x00000000 */ # e2: 0c02
ret /* 0x00000000 */ # e4: 0df0
.Lbr013: movi a2, -1 /* 0xffffffff */ # e6: 7cf2
ret /* 0xffffffff */ # e8: 0df0
.Lbr014: bnez a3, .Lbr013 # ea: 5683ff
movi a2, .Lrel005 # ed: 21f5ff
j .Lbr012 # f0: 46faff
.Lbr015: bnez a3, .Lbr013 # f3: 56f3fe
movi a2, .Lrel006 # f6: 21f4ff
j .Lbr012 # f9: 06f8ff
.literal_position # fc: bc000000
# Function @ .irom0.text+0x100
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_recv_action_unregister
.type sdk_ieee80211_recv_action_unregister, @function
sdk_ieee80211_recv_action_unregister:
movi a4, .Lfunc002 # 100: 41ffff
addi sp, sp, -16 /* (local0) */ # 103: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 106: 0901
call0 sdk_ieee80211_recv_action_register # 108: 050000
l32i a0, sp, 0 /* [(local0)] */ # 10b: 0801
addi sp, sp, 16 /* (top of frame) */ # 10d: 12c110
ret # 110: 0df0
.literal_position # 114: bc000000
# 118: 18000000
# 11c: 14000000
# 120: 10000000
# Function @ .irom0.text+0x124
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_recv_action
.type sdk_ieee80211_recv_action, @function
sdk_ieee80211_recv_action:
addi sp, sp, -16 /* (local0) */ # 124: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 127: 0901
l8ui a0, a4, 0 /* [arg2] */ # 129: 020400
movi a8, .Lfunc002 # 12c: 81faff
beqi a0, 3, .Lbr016 # 12f: 26301a
beqi a0, 7, .Lbr020 # 132: 26702b
movi a6, 127 /* 0x0000007f */ # 135: 62a07f
bne a0, a6, .Lbr017 # 138: 679016
l8ui a0, a4, 1 /* [arg2+0x1] */ # 13b: 020401
mov a7, a8 /* .Lfunc002 */ # 13e: 7d08
bnez a0, .Lbr019 # 140: dca0
movi a7, .Lrel007 # 142: 71f5ff
addx4 a7, a0, a7 # 145: 7070a0
l32i a7, a7, 0 # 148: 7807
j .Lbr018 # 14a: 860100
.Lbr016: l8ui a0, a4, 1 /* [arg2+0x1] */ # 14d: 020401
beqz a0, .Lbr022 # 150: ac20
.Lbr017: mov a7, a8 /* .Lfunc002 */ # 152: 7d08
.Lbr018: callx0 a7 # 154: c00700
l32i a0, sp, 0 /* [(local0)] */ # 157: 0801
addi sp, sp, 16 /* (top of frame) */ # 159: 12c110
ret # 15c: 0df0
.Lbr019: j .Lbr018 # 15e: 86fcff
.Lbr020: l8ui a0, a4, 1 /* [arg2+0x1] */ # 161: 020401
mov a7, a8 /* .Lfunc002 */ # 164: 7d08
bnez a0, .Lbr021 # 166: cc90
movi a7, .Lrel006 # 168: 71edff
addx4 a7, a0, a7 # 16b: 7070a0
l32i a7, a7, 0 # 16e: 7807
j .Lbr018 # 170: 06f8ff
.Lbr021: j .Lbr018 # 173: 46f7ff
.Lbr022: movi a7, .Lrel005 # 176: 71eaff
addx4 a7, a0, a7 # 179: 7070a0
l32i a7, a7, 0 # 17c: 7807
j .Lbr018 # 17e: 86f4ff

View file

@ -0,0 +1,115 @@
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.global sdk_ieee80211_crypto_attach
.type sdk_ieee80211_crypto_attach, @function
sdk_ieee80211_crypto_attach:
ret /* arg0 */ # 0: 0df0
.balign 4
# Function @ .irom0.text+0x4
.balign 4
.global sdk_ieee80211_crypto_available
.type sdk_ieee80211_crypto_available, @function
sdk_ieee80211_crypto_available:
movi a2, 0 /* 0x00000000 */ # 4: 0c02
ret /* 0x00000000 */ # 6: 0df0
# Function @ .irom0.text+0x8
.balign 4
.global sdk_ieee80211_crypto_setkey
.type sdk_ieee80211_crypto_setkey, @function
sdk_ieee80211_crypto_setkey:
movi a2, 0 /* 0x00000000 */ # 8: 0c02
ret /* 0x00000000 */ # a: 0df0
.literal_position # c: 00000000
# Function @ .irom0.text+0x10
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ieee80211_crypto_encap
.type sdk_ieee80211_crypto_encap, @function
sdk_ieee80211_crypto_encap:
addi sp, sp, -16 /* (local0) */ # 10: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 13: 0911
l32i a4, a3, 32 /* [arg1+0x20] */ # 15: 4883
l32i a0, a2, 136 /* [arg0+0x88] */ # 17: 022222
l32i a4, a4, 0 /* [[arg1+0x20]] */ # 1a: 4804
movi a2, sdk_g_ic # 1c: 21fcff
bbci a4, 7, .Lbr003 # 1f: 776434
l8ui a0, a0, 233 /* [[arg0+0x88]+0xe9] */ # 22: 0200e9
bltui a0, 2, .Lbr001 # 25: b62004
addi a6, a0, -1 /* [[arg0+0x88]+0xe9]-0x1 */ # 28: 0b60
j .Lbr002 # 2a: 460000
.Lbr001: mov a6, a0 /* [[arg0+0x88]+0xe9] */ # 2d: 6d00
.Lbr002: addx4 a2, a0, a2 # 2f: 2020a0
l32i a2, a2, 0x190 # 32: 222264
slli a4, a6, 6 # 35: a04611
l32i a0, a2, 152 # 38: 022226
extui a4, a4, 0, 8 # 3b: 404074
l32i a0, a0, 16 # 3e: 0840
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 40: 2901
callx0 a0 # 42: c00000
l32i a4, sp, 0 /* [(local0)] */ # 45: 4801
l32i a3, sp, 4 /* [(local1)] */ # 47: 3811
movi a0, 0 /* 0x00000000 */ # 49: 0c00
addi sp, sp, 16 /* (top of frame) */ # 4b: 12c110
movnez a0, a4, a2 # 4e: 200493
mov a2, a0 # 51: 2d00
mov a0, a3 /* [(local1)] */ # 53: 0d03
ret # 55: 0df0
.Lbr003: movi a6, 0 /* 0x00000000 */ # 57: 0c06
l8ui a0, a0, 232 /* [[arg0+0x88]+0xe8] */ # 59: 0200e8
j .Lbr002 # 5c: c6f3ff
.literal_position # 60: 00000000
# Function @ .irom0.text+0x64
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ieee80211_crypto_decap
.type sdk_ieee80211_crypto_decap, @function
sdk_ieee80211_crypto_decap:
addi sp, sp, -16 /* (local0) */ # 64: 12c1f0
l16ui a5, a3, 22 /* [arg1+0x16] */ # 67: 52130b
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 6a: 0911
l16ui a0, a3, 20 /* [arg1+0x14] */ # 6c: 02130a
movi a6, sdk_g_ic # 6f: 61fcff
add a0, a0, a5 # 72: 5a00
bltui a0, 32, .Lbr005 # 74: b6c020
l32i a0, a3, 4 /* [arg1+0x4] */ # 77: 0813
l32i a0, a0, 4 /* [[arg1+0x4]+0x4] */ # 79: 0810
l8ui a7, a0, 4 /* [[[arg1+0x4]+0x4]+0x4] */ # 7b: 720004
add a0, a4, a0 # 7e: 0a04
bbci a7, 0, .Lbr008 # 80: 076731
l8ui a0, a0, 3 # 83: 020003
extui a0, a0, 6, 2 # 86: 000614
addi a0, a0, -1 # 89: 0b00
extui a0, a0, 0, 8 # 8b: 000074
.Lbr004: addx4 a2, a0, a6 # 8e: 6020a0
l32i a2, a2, 0x190 # 91: 222264
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 94: 2901
bnez a2, .Lbr006 # 96: cc32
.Lbr005: movi a2, 0 /* 0x00000000 */ # 98: 0c02
j .Lbr007 # 9a: 060400
.Lbr006: l32i a0, a2, 152 # 9d: 022226
l32i a0, a0, 20 # a0: 0850
callx0 a0 # a2: c00000
mov a4, a2 # a5: 4d02
l32i a3, sp, 0 /* [(local0)] */ # a7: 3801
movi a2, 0 /* 0x00000000 */ # a9: 0c02
movnez a2, a3, a4 # ab: 402393
.Lbr007: l32i a0, sp, 4 /* [(local1)] */ # ae: 0811
addi sp, sp, 16 /* (top of frame) */ # b0: 12c110
ret # b3: 0df0
.Lbr008: l32i a0, a2, 136 /* [arg0+0x88] */ # b5: 022222
l8ui a0, a0, 232 /* [[arg0+0x88]+0xe8] */ # b8: 0200e8
j .Lbr004 # bb: c6f3ff

View file

@ -0,0 +1,142 @@
.section .data, "aw", @progbits
.global sdk_ccmp
.type sdk_ccmp, @object
sdk_ccmp: .word 0x00000003 # 0: 03000000
.Ldata001: .word 0x00000008 # 4: 08000000
# NOTE: The following is apparently unreferenced code/data
.word 0x00000008 # 8: 08000000
.word 0x00000000 # c: 00000000
.Lrel001: .word .Lfunc001 # 10: 04000000
.Lrel002: .word .Lfunc002 # 14: 80000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
.balign 4
.Lfunc001: ssai 8 # 4: 004840
l32i a5, a2, 144 /* [arg0+0x90] */ # 7: 522224
l16ui a6, a3, 22 /* [arg1+0x16] */ # a: 62130b
movi a7, sdk_ccmp # d: 71fcff
l32i a9, a3, 4 /* [arg1+0x4] */ # 10: 9813
l32i a10, a7, 4 /* [.Ldata001] */ # 12: a817
l32i a7, a7, 4 /* [.Ldata001] */ # 14: 7817
l32i a8, a9, 4 /* [[arg1+0x4]+0x4] */ # 16: 8819
add a6, a6, a7 # 18: 7a66
sub a8, a8, a10 # 1a: a088c0
addi a7, a5, 1 /* [arg0+0x90]+0x1 */ # 1d: 1b75
s32i a8, a9, 4 /* a8 -> [[arg1+0x4]+0x4] */ # 1f: 8919
s16i a6, a3, 22 /* a6 -> [arg1+0x16] */ # 21: 62530b
movi a9, 32 /* 0x00000020 */ # 24: 2c09
or a11, a4, a9 # 26: 90b420
s32i a7, a2, 144 /* [arg0+0x90]+0x1 -> [arg0+0x90] */ # 29: 726224
l32i a3, a2, 148 /* [arg0+0x94] */ # 2c: 322225
bgeu a7, a5, .Lbr001 # 2f: 57b701
addi a3, a3, 1 /* [arg0+0x94]+0x1 */ # 32: 1b33
.Lbr001: movi a5, 0 /* 0x00000000 */ # 34: 0c05
s32i a3, a2, 148 /* a3 -> [arg0+0x94] */ # 36: 326225
s8i a7, a8, 0 # 39: 724800
l32i a6, a2, 148 /* [arg0+0x94] */ # 3c: 622225
l32i a10, a2, 144 /* [arg0+0x90] */ # 3f: a22224
s8i a5, a8, 2 # 42: 524802
s8i a11, a8, 3 # 45: b24803
src a6, a6, a10 # 48: a06681
s8i a6, a8, 1 # 4b: 624801
l32i a11, a2, 144 /* [arg0+0x90] */ # 4e: b22224
l32i a10, a2, 148 /* [arg0+0x94] */ # 51: a22225
ssai 16 # 54: 104040
src a10, a10, a11 # 57: b0aa81
s8i a10, a8, 4 # 5a: a24804
l32i a6, a2, 144 /* [arg0+0x90] */ # 5d: 622224
l32i a5, a2, 148 /* [arg0+0x94] */ # 60: 522225
ssai 24 # 63: 104840
src a5, a5, a6 # 66: 605581
s8i a5, a8, 5 # 69: 524805
l32i a11, a2, 148 /* [arg0+0x94] */ # 6c: b22225
s8i a11, a8, 6 # 6f: b24806
l32i a10, a2, 148 /* [arg0+0x94] */ # 72: a22225
movi a2, 1 /* 0x00000001 */ # 75: 0c12
srli a10, a10, 8 # 77: a0a841
s8i a10, a8, 7 # 7a: a24807
ret /* 0x00000001 */ # 7d: 0df0
.balign 4
# Function @ .irom0.text+0x80
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.Lfunc002: addi sp, sp, -16 /* (local0) */ # 80: 12c1f0
l32i a8, a3, 4 /* [arg1+0x4] */ # 83: 8813
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 85: 0911
l32i a0, a8, 4 /* [[arg1+0x4]+0x4] */ # 87: 0818
add a7, a4, a0 # 89: 0a74
l8ui a5, a7, 3 # 8b: 520703
movi a9, 140 /* 0x0000008c */ # 8e: 92a08c
extui a5, a5, 5, 1 # 91: 505504
beqz a5, .Lbr006 # 94: 169508
l8ui a5, a7, 6 # 97: 520706
l8ui a11, a7, 7 # 9a: b20707
l8ui a6, a0, 0 /* [[[arg1+0x4]+0x4]] */ # 9d: 620000
slli a11, a11, 8 # a0: 80bb11
and a6, a6, a9 # a3: 906610
or a11, a11, a5 # a6: 50bb20
l8ui a5, a7, 4 # a9: 520704
movi a9, 136 /* 0x00000088 */ # ac: 92a088
slli a5, a5, 16 # af: 005511
bne a6, a9, .Lbr002 # b2: 979611
l8ui a10, a0, 1 /* [[[arg1+0x4]+0x4]+0x1] */ # b5: a20001
extui a10, a10, 0, 2 # b8: a0a014
addi a10, a10, -3 # bb: a2cafd
bnez a10, .Lbr008 # be: 56aa06
l8ui a0, a0, 30 /* [[[arg1+0x4]+0x4]+0x1e] */ # c1: 02001e
j .Lbr009 # c4: c61900
.Lbr002: movi a0, 16 /* 0x00000010 */ # c7: 1c00
.Lbr003: l8ui a9, a7, 0 # c9: 920700
l8ui a10, a7, 5 # cc: a20705
l8ui a6, a7, 1 # cf: 620701
slli a10, a10, 24 # d2: 80aa01
slli a6, a6, 8 # d5: 806611
or a6, a6, a9 # d8: 906620
extui a7, a11, 0, 16 # db: b070f4
addx8 a9, a0, a2 # de: 2090b0
or a5, a5, a6 # e1: 605520
movi a0, 0 /* 0x00000000 */ # e4: 0c00
s32i a9, sp, 0 /* a9 -> [(local0)] */ # e6: 9901
l32i a11, a9, 8 # e8: b829
l32i a9, a9, 12 # ea: 9839
or a10, a10, a5 # ec: 50aa20
bltu a9, a7, .Lbr005 # ef: 773907
bne a9, a7, .Lbr004 # f2: 779902
bltu a11, a10, .Lbr005 # f5: a73b01
.Lbr004: movi a0, 1 /* 0x00000001 */ # f8: 0c10
.Lbr005: bnez a0, .Lbr006 # fa: ec30
l32i a11, sp, 0 /* [(local0)] */ # fc: b801
l16ui a9, a3, 22 /* [arg1+0x16] */ # fe: 92130b
s32i a10, a11, 8 /* a10 -> [[(local0)]+0x8] */ # 101: a92b
s32i a7, a11, 12 /* a7 -> [[(local0)]+0xc] */ # 103: 793b
l32i a11, a2, 152 /* [arg0+0x98] */ # 105: b22226
l32i a5, a8, 4 /* [[arg1+0x4]+0x4] */ # 108: 5818
l32i a0, a11, 4 /* [[arg0+0x98]+0x4] */ # 10a: 081b
l32i a11, a11, 8 /* [[arg0+0x98]+0x8] */ # 10c: b82b
add a6, a4, a0 # 10e: 0a64
add a11, a11, a0 # 110: 0abb
add a5, a5, a6 # 112: 6a55
movi a0, 1 /* 0x00000001 */ # 114: 0c10
s32i a5, a8, 4 /* a5 -> [[arg1+0x4]+0x4] */ # 116: 5918
sub a9, a9, a11 # 118: b099c0
s16i a9, a3, 22 /* a9 -> [arg1+0x16] */ # 11b: 92530b
j .Lbr007 # 11e: 460000
.Lbr006: movi a0, 0 /* 0x00000000 */ # 121: 0c00
.Lbr007: mov a2, a0 # 123: 2d00
l32i a0, sp, 4 /* [(local1)] */ # 125: 0811
addi sp, sp, 16 /* (top of frame) */ # 127: 12c110
ret # 12a: 0df0
.Lbr008: l8ui a0, a0, 24 /* [[[arg1+0x4]+0x4]+0x18] */ # 12c: 020018
.Lbr009: extui a0, a0, 0, 4 # 12f: 000034
j .Lbr003 # 132: c6e4ff

View file

@ -0,0 +1,165 @@
.section .data, "aw", @progbits
.global sdk_tkip
.type sdk_tkip, @object
sdk_tkip: .word 0x00000002 # 0: 02000000
.Ldata001: .word 0x00000008 # 4: 08000000
# NOTE: The following is apparently unreferenced code/data
.word 0x0000000c # 8: 0c000000
.word 0x00000008 # c: 08000000
.Lrel001: .word .Lfunc001 # 10: 08000000
.Lrel002: .word .Lfunc002 # 14: a0000000
.section .bss, "aw", @nobits
.Ldata002: .word 0x00000000 # 0: 00000000
.Ldata003: .word 0x00000000 # 4: 00000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# Function @ .irom0.text+0x8
.balign 4
.Lfunc001: movi a5, sdk_g_ic # 8: 51feff
ssai 8 # b: 004840
l32i a5, a5, 28 /* [sdk_g_ic+0x1c] */ # e: 5875
movi a11, sdk_tkip # 10: b1fdff
bbci a5, 26, .Lbr001 # 13: a77503
movi a2, 0 /* 0x00000000 */ # 16: 0c02
ret /* 0x00000000 */ # 18: 0df0
.Lbr001: l32i a7, a2, 148 /* [arg0+0x94] */ # 1a: 722225
l16ui a10, a3, 22 /* [arg1+0x16] */ # 1d: a2130b
l32i a5, a3, 4 /* [arg1+0x4] */ # 20: 5813
l32i a9, a11, 4 /* [.Ldata001] */ # 22: 981b
l32i a8, a5, 4 /* [[arg1+0x4]+0x4] */ # 24: 8815
l32i a11, a11, 4 /* [.Ldata001] */ # 26: b81b
sub a8, a8, a9 # 28: 9088c0
l32i a9, a2, 144 /* [arg0+0x90] */ # 2b: 922224
add a10, a10, a11 # 2e: baaa
src a7, a7, a9 # 30: 907781
movi a9, 95 /* 0x0000005f */ # 33: 5cf9
s32i a8, a5, 4 /* a8 -> [[arg1+0x4]+0x4] */ # 35: 8915
s16i a10, a3, 22 /* a10 -> [arg1+0x16] */ # 37: a2530b
and a9, a7, a9 # 3a: 909710
movi a10, 32 /* 0x00000020 */ # 3d: 2c0a
or a6, a4, a10 # 3f: a06420
s8i a7, a8, 0 # 42: 724800
or a9, a9, a10 # 45: a09920
s8i a9, a8, 1 # 48: 924801
l32i a5, a2, 144 /* [arg0+0x90] */ # 4b: 522224
s8i a6, a8, 3 # 4e: 624803
s8i a5, a8, 2 # 51: 524802
l32i a4, a2, 144 /* [arg0+0x90] */ # 54: 422224
l32i a3, a2, 148 /* [arg0+0x94] */ # 57: 322225
ssai 16 # 5a: 104040
src a3, a3, a4 # 5d: 403381
s8i a3, a8, 4 # 60: 324804
l32i a11, a2, 144 /* [arg0+0x90] */ # 63: b22224
l32i a10, a2, 148 /* [arg0+0x94] */ # 66: a22225
ssai 24 # 69: 104840
src a10, a10, a11 # 6c: b0aa81
s8i a10, a8, 5 # 6f: a24805
l32i a9, a2, 148 /* [arg0+0x94] */ # 72: 922225
s8i a9, a8, 6 # 75: 924806
l32i a7, a2, 148 /* [arg0+0x94] */ # 78: 722225
srli a7, a7, 8 # 7b: 707841
s8i a7, a8, 7 # 7e: 724807
l32i a6, a2, 144 /* [arg0+0x90] */ # 81: 622224
l32i a3, a2, 148 /* [arg0+0x94] */ # 84: 322225
addi a4, a6, 1 /* [arg0+0x90]+0x1 */ # 87: 1b46
bgeu a4, a6, .Lbr002 # 89: 67b401
addi a3, a3, 1 /* [arg0+0x94]+0x1 */ # 8c: 1b33
.Lbr002: s32i a3, a2, 148 /* a3 -> [arg0+0x94] */ # 8e: 326225
s32i a4, a2, 144 /* [arg0+0x90]+0x1 -> [arg0+0x90] */ # 91: 426224
movi a2, 1 /* 0x00000001 */ # 94: 0c12
ret /* 0x00000001 */ # 96: 0df0
.literal_position # 98: 00000000
# 9c: 00000000
# Function @ .irom0.text+0xa0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.Lfunc002: addi sp, sp, -16 /* (local0) */ # a0: 12c1f0
l32i a8, a3, 4 /* [arg1+0x4] */ # a3: 8813
s32i a0, sp, 4 /* a0 -> [(local1)] */ # a5: 0911
l32i a0, a8, 4 /* [[arg1+0x4]+0x4] */ # a7: 0818
movi a6, sdk_g_ic # a9: 61fbff
add a7, a4, a0 # ac: 0a74
l8ui a5, a7, 3 # ae: 520703
l32i a6, a6, 28 /* [sdk_g_ic+0x1c] */ # b1: 6876
extui a5, a5, 5, 1 # b3: 505504
beqz a5, .Lbr007 # b6: 169509
extui a6, a6, 26, 1 # b9: 606a05
bnez a6, .Lbr007 # bc: 563609
l8ui a6, a7, 6 # bf: 620706
l8ui a5, a7, 7 # c2: 520707
l8ui a9, a0, 0 /* [[[arg1+0x4]+0x4]] */ # c5: 920000
movi a10, 140 /* 0x0000008c */ # c8: a2a08c
and a9, a9, a10 # cb: a09910
slli a5, a5, 8 # ce: 805511
or a5, a5, a6 # d1: 605520
movi a10, 136 /* 0x00000088 */ # d4: a2a088
l8ui a6, a7, 0 # d7: 620700
bne a9, a10, .Lbr003 # da: a79911
l8ui a11, a0, 1 /* [[[arg1+0x4]+0x4]+0x1] */ # dd: b20001
extui a11, a11, 0, 2 # e0: b0b014
addi a11, a11, -3 # e3: b2cbfd
bnez a11, .Lbr009 # e6: 564b07
l8ui a0, a0, 30 /* [[[arg1+0x4]+0x4]+0x1e] */ # e9: 02001e
j .Lbr010 # ec: 461c00
.Lbr003: movi a0, 16 /* 0x00000010 */ # ef: 1c00
.Lbr004: slli a6, a6, 8 # f1: 806611
l8ui a9, a7, 2 # f4: 920702
l8ui a10, a7, 5 # f7: a20705
l8ui a11, a7, 4 # fa: b20704
slli a10, a10, 24 # fd: 80aa01
slli a11, a11, 16 # 100: 00bb11
extui a7, a5, 0, 16 # 103: 5070f4
or a6, a6, a9 # 106: 906620
or a11, a11, a6 # 109: 60bb20
addx8 a9, a0, a2 # 10c: 2090b0
or a10, a10, a11 # 10f: b0aa20
movi a11, .Ldata002 # 112: b1e2ff
s32i a9, sp, 0 /* a9 -> [(local0)] */ # 115: 9901
s32i a7, a11, 4 /* a7 -> [.Ldata003] */ # 117: 791b
s32i a10, a11, 0 /* a10 -> [.Ldata002] */ # 119: a90b
l32i a11, a9, 8 # 11b: b829
l32i a9, a9, 12 # 11d: 9839
movi a0, 0 /* 0x00000000 */ # 11f: 0c00
bltu a9, a7, .Lbr006 # 121: 773907
bne a9, a7, .Lbr005 # 124: 779902
bltu a11, a10, .Lbr006 # 127: a73b01
.Lbr005: movi a0, 1 /* 0x00000001 */ # 12a: 0c10
.Lbr006: bnez a0, .Lbr007 # 12c: ec30
l32i a0, sp, 0 /* [(local0)] */ # 12e: 0801
l16ui a11, a3, 22 /* [arg1+0x16] */ # 130: b2130b
s32i a10, a0, 8 /* a10 -> [[(local0)]+0x8] */ # 133: a920
s32i a7, a0, 12 /* a7 -> [[(local0)]+0xc] */ # 135: 7930
l32i a0, a2, 152 /* [arg0+0x98] */ # 137: 022226
l32i a6, a8, 4 /* [[arg1+0x4]+0x4] */ # 13a: 6818
l32i a5, a0, 4 /* [[arg0+0x98]+0x4] */ # 13c: 5810
l32i a0, a0, 8 /* [[arg0+0x98]+0x8] */ # 13e: 0820
add a9, a4, a5 # 140: 5a94
add a6, a6, a9 # 142: 9a66
add a0, a0, a5 # 144: 5a00
sub a11, a11, a0 # 146: 00bbc0
s32i a6, a8, 4 /* a6 -> [[arg1+0x4]+0x4] */ # 149: 6918
movi a0, 1 /* 0x00000001 */ # 14b: 0c10
s16i a11, a3, 22 /* a11 -> [arg1+0x16] */ # 14d: b2530b
j .Lbr008 # 150: 460000
.Lbr007: movi a0, 0 /* 0x00000000 */ # 153: 0c00
.Lbr008: mov a2, a0 # 155: 2d00
l32i a0, sp, 4 /* [(local1)] */ # 157: 0811
addi sp, sp, 16 /* (top of frame) */ # 159: 12c110
ret # 15c: 0df0
.Lbr009: l8ui a0, a0, 24 /* [[[arg1+0x4]+0x4]+0x18] */ # 15e: 020018
.Lbr010: extui a0, a0, 0, 4 # 161: 000034
j .Lbr004 # 164: 46e2ff

View file

@ -0,0 +1,73 @@
.section .data, "aw", @progbits
.global sdk_wep
.type sdk_wep, @object
sdk_wep: .word 0x00000001 # 0: 01000000
.Ldata001: .word 0x00000004 # 4: 04000000
# NOTE: The following is apparently unreferenced code/data
.word 0x00000004 # 8: 04000000
.word 0x00000000 # c: 00000000
.Lrel001: .word .Lfunc001 # 10: 04000000
.Lrel002: .word .Lfunc002 # 14: 60000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
.balign 4
.Lfunc001: bnez a3, .Lbr001 # 4: cc33
movi a3, 0 /* 0x00000000 */ # 6: 0c03
j .Lbr003 # 8: 461300
.Lbr001: l32i a5, a2, 144 /* [arg0+0x90] */ # b: 522224
l16ui a6, a3, 22 /* [arg1+0x16] */ # e: 62130b
movi a7, sdk_wep # 11: 71fbff
l32i a8, a3, 4 /* [arg1+0x4] */ # 14: 8813
l32i a10, a7, 4 /* [.Ldata001] */ # 16: a817
l32i a7, a7, 4 /* [.Ldata001] */ # 18: 7817
l32i a9, a8, 4 /* [[arg1+0x4]+0x4] */ # 1a: 9818
add a6, a6, a7 # 1c: 7a66
sub a9, a9, a10 # 1e: a099c0
l32i a7, a2, 148 /* [arg0+0x94] */ # 21: 722225
s32i a9, a8, 4 /* a9 -> [[arg1+0x4]+0x4] */ # 24: 9918
s16i a6, a3, 22 /* a6 -> [arg1+0x16] */ # 26: 62530b
addi a8, a5, 1 /* [arg0+0x90]+0x1 */ # 29: 1b85
bgeu a8, a5, .Lbr002 # 2b: 57b801
addi a7, a7, 1 /* [arg0+0x94]+0x1 */ # 2e: 1b77
.Lbr002: movi a3, 1 /* 0x00000001 */ # 30: 0c13
s32i a7, a2, 148 /* a7 -> [arg0+0x94] */ # 32: 726225
s32i a8, a2, 144 /* [arg0+0x90]+0x1 -> [arg0+0x90] */ # 35: 826224
ssai 16 # 38: 104040
src a6, a7, a8 # 3b: 806781
s8i a6, a9, 2 # 3e: 624902
l32i a5, a2, 144 /* [arg0+0x90] */ # 41: 522224
l32i a11, a2, 148 /* [arg0+0x94] */ # 44: b22225
ssai 8 # 47: 004840
src a11, a11, a5 # 4a: 50bb81
s8i a11, a9, 1 # 4d: b24901
l32i a10, a2, 144 /* [arg0+0x90] */ # 50: a22224
s8i a10, a9, 0 # 53: a24900
s8i a4, a9, 3 # 56: 424903
.Lbr003: mov a2, a3 # 59: 2d03
ret # 5b: 0df0
.balign 4
# Function @ .irom0.text+0x60
.balign 4
.Lfunc002: l32i a5, a2, 152 /* [arg0+0x98] */ # 60: 522226
l32i a8, a3, 4 /* [arg1+0x4] */ # 63: 8813
l16ui a2, a3, 22 /* [arg1+0x16] */ # 65: 22130b
l32i a7, a8, 4 /* [[arg1+0x4]+0x4] */ # 68: 7818
l32i a6, a5, 4 /* [[arg0+0x98]+0x4] */ # 6a: 6815
l32i a5, a5, 8 /* [[arg0+0x98]+0x8] */ # 6c: 5825
add a9, a4, a6 # 6e: 6a94
add a7, a7, a9 # 70: 9a77
add a5, a5, a6 # 72: 6a55
sub a2, a2, a5 # 74: 5022c0
s32i a7, a8, 4 /* a7 -> [[arg1+0x4]+0x4] */ # 77: 7918
s16i a2, a3, 22 /* a2 -> [arg1+0x16] */ # 79: 22530b
movi a2, 1 /* 0x00000001 */ # 7c: 0c12
ret /* 0x00000001 */ # 7e: 0df0

View file

@ -0,0 +1,44 @@
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_ieee80211_getmgtframe
.type sdk_ieee80211_getmgtframe, @function
sdk_ieee80211_getmgtframe:
movi a5, -4 /* 0xfffffffc */ # 4: 7cc5
addi sp, sp, -16 /* (local0) */ # 6: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 9: 0911
s32i a12, sp, 8 /* a12 -> [(local2)] */ # b: c921
movi a0, 256 /* 0x00000100 */ # d: 02a100
mov a12, a3 /* arg1 */ # 10: cd03
add a3, a3, a4 # 12: 4a33
addi a3, a3, 3 # 14: 3b33
and a4, a3, a5 # 16: 504310
bgeu a0, a4, .Lbr001 # 19: 47b004
movi a2, 0 /* 0x00000000 */ # 1c: 0c02
j .Lbr003 # 1e: 860700
.Lbr001: movi a3, 4 /* 0x00000004 */ # 21: 0c43
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 23: 2901
movi a5, 65 /* 0x00000041 */ # 25: 4c15
bgeu a4, a5, .Lbr002 # 27: 57b401
movi a3, 5 /* 0x00000005 */ # 2a: 0c53
.Lbr002: movi a2, 0 /* 0x00000000 */ # 2c: 0c02
call0 sdk_esf_buf_alloc # 2e: 01f4ffc0
# 32: 0000
beqz a2, .Lbr003 # 34: 8c82
l32i a6, a2, 4 # 36: 6812
l32i a6, a6, 4 # 38: 6816
l32i a7, sp, 0 /* [(local0)] */ # 3a: 7801
add a6, a12, a6 # 3c: 6a6c
s32i a6, a7, 0 /* a6 -> [[(local0)]] */ # 3e: 6907
.Lbr003: l32i a12, sp, 8 /* [(local2)] */ # 40: c821
l32i a0, sp, 4 /* [(local1)] */ # 42: 0811
addi sp, sp, 16 /* (top of frame) */ # 44: 12c110
ret # 47: 0df0

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

File diff suppressed because it is too large Load diff

View file

View file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,248 @@
.section .data, "aw", @progbits
.Ldata001: .byte 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.word 0x00000000 # 14: 00000000
.byte 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00
.byte 0x3a, 0x01, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00
.byte 0xd0, 0x07, 0x00, 0x00, 0x04, 0x01, 0x84, 0x01
.byte 0x02, 0x01, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x7c, 0x15, 0x00, 0x00, 0x04, 0x02, 0x8b, 0x02
.byte 0xdf, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xf8, 0x2a, 0x00, 0x00, 0x04, 0x03, 0x96, 0x03
.byte 0xd5, 0x00, 0x75, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x70, 0x17, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x04
.byte 0x3c, 0x00, 0x3c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x28, 0x23, 0x00, 0x00, 0x00, 0x0f, 0x12, 0x04
.byte 0x3c, 0x00, 0x3c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xe0, 0x2e, 0x00, 0x00, 0x00, 0x0a, 0x18, 0x06
.byte 0x30, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x50, 0x46, 0x00, 0x00, 0x00, 0x0e, 0x24, 0x06
.byte 0x30, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xc0, 0x5d, 0x00, 0x00, 0x00, 0x09, 0x30, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xa0, 0x8c, 0x00, 0x00, 0x00, 0x0d, 0x48, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x80, 0xbb, 0x00, 0x00, 0x00, 0x08, 0x60, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xf0, 0xd2, 0x00, 0x00, 0x00, 0x0c, 0x6c, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00
.Label001: .byte 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00
.byte 0x3a, 0x01, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00
.byte 0xd0, 0x07, 0x00, 0x00, 0x04, 0x01, 0x84, 0x01
.byte 0x02, 0x01, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x7c, 0x15, 0x00, 0x00, 0x04, 0x02, 0x8b, 0x01
.byte 0xdf, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xf8, 0x2a, 0x00, 0x00, 0x04, 0x03, 0x96, 0x01
.byte 0xd5, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
.balign 4
.global sdk_ieee80211_get_11g_ratetable
.type sdk_ieee80211_get_11g_ratetable, @function
sdk_ieee80211_get_11g_ratetable:
movi a2, .Ldata001 # 4: 21ffff
ret /* .Ldata001 */ # 7: 0df0
.literal_position # c: d4000000
# 10: 00000000
# Function @ .irom0.text+0x14
.balign 4
.global sdk_ieee80211_get_ratetable
.type sdk_ieee80211_get_ratetable, @function
sdk_ieee80211_get_ratetable:
l32i a2, a2, 0 /* [arg0] */ # 14: 2802
movi a3, 192 /* 0x000000c0 */ # 16: 32a0c0
ball a2, a3, .Lbr001 # 19: 37420a
movi a4, 1152 /* 0x00000480 */ # 1c: 42a480
ball a2, a4, .Lbr001 # 1f: 474204
movi a2, .Label001 # 22: 21faff
ret /* .Label001 */ # 25: 0df0
.Lbr001: movi a2, .Ldata001 # 27: 21faff
ret /* .Ldata001 */ # 2a: 0df0
.literal_position # 2c: 00000000
# Function @ .irom0.text+0x30
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ieee80211_phy_init
.type sdk_ieee80211_phy_init, @function
sdk_ieee80211_phy_init:
addi sp, sp, -16 /* (local0) */ # 30: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 33: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 35: 0901
mov a12, a2 /* arg0 */ # 37: cd02
call0 sdk_ieee80211_setup_ratetable # 39: 050000
movi a3, 12 /* 0x0000000c */ # 3c: 0cc3
movi a0, 3 /* 0x00000003 */ # 3e: 0c30
movi a5, 4 /* 0x00000004 */ # 40: 0c45
movi a2, sdk_g_ic # 42: 21faff
addi a4, a12, -1 /* arg0-0x1 */ # 45: 0b4c
movi a6, 0 /* 0x00000000 */ # 47: 0c06
l32i a12, sp, 4 /* [(local1)] */ # 49: c811
s8i a6, a2, 125 /* 0x00 -> [sdk_g_ic+0x7d] */ # 4b: 62427d
s8i a6, a2, 126 /* 0x00 -> [sdk_g_ic+0x7e] */ # 4e: 62427e
s8i a5, a2, 127 /* 0x04 -> [sdk_g_ic+0x7f] */ # 51: 52427f
movnez a0, a3, a4 # 54: 400393
s8i a0, a2, 124 /* a0 -> [sdk_g_ic+0x7c] */ # 57: 02427c
l32i a0, sp, 0 /* [(local0)] */ # 5a: 0801
addi sp, sp, 16 /* (top of frame) */ # 5c: 12c110
ret /* sdk_g_ic */ # 5f: 0df0
.literal_position # 64: 00000000
# Function @ .irom0.text+0x68
.balign 4
.global sdk_ieee80211_phy_type_get
.type sdk_ieee80211_phy_type_get, @function
sdk_ieee80211_phy_type_get:
movi a2, sdk_g_ic+0x200 # 68: 21ffff
l32i a2, a2, 0x31c /* [sdk_g_ic+0x51c] */ # 6b: 2222c7
movi a3, 1 /* 0x00000001 */ # 6e: 0c13
addi a2, a2, -1 /* [sdk_g_ic+0x51c]-0x1 */ # 70: 0b22
movnez a2, a3, a2 # 72: 202393
ret # 75: 0df0
.literal_position # 78: 00000000
# 7c: d4000000
# 80: 00000000
# Function @ .irom0.text+0x84
.balign 4
.global sdk_ieee80211_setup_ratetable
.type sdk_ieee80211_setup_ratetable, @function
sdk_ieee80211_setup_ratetable:
movi a4, .Ldata001 # 84: 41fdff
movi a5, .Label001 # 87: 51fdff
addi a6, a2, -1 /* arg0-0x1 */ # 8a: 0b62
movnez a5, a4, a6 # 8c: 605493
movi a6, sdk_g_ic # 8f: 61fcff
l8ui a3, a5, 0 # 92: 320500
s8i a3, a6, 44 /* a3 -> [sdk_g_ic+0x2c] */ # 95: 32462c
beqz a3, .Lbr003 # 98: 9c83
movi a2, 0 /* 0x00000000 */ # 9a: 0c02
.Lbr002: add a4, a2, a6 # 9c: 6a42
slli a3, a2, 4 # 9e: c03211
add a3, a5, a3 # a1: 3a35
addi a2, a2, 1 # a3: 1b22
l8ui a3, a3, 30 # a5: 32031e
s8i a3, a4, 45 # a8: 32442d
l8ui a7, a6, 44 /* [sdk_g_ic+0x2c] */ # ab: 72062c
extui a2, a2, 0, 8 # ae: 202074
bltu a2, a7, .Lbr002 # b1: 7732e7
.Lbr003: ret # b4: 0df0
.literal_position # b8: 00000000
# bc: 00000000
# c0: 00000000
# Function @ .irom0.text+0xc4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_ieee80211_compute_duration
.type sdk_ieee80211_compute_duration, @function
sdk_ieee80211_compute_duration:
addi sp, sp, -16 /* (local0) */ # c4: 12c1f0
s32i a0, sp, 8 /* a0 -> [(local2)] */ # c7: 0921
add a0, a4, a2 # c9: 2a04
l8ui a0, a0, 4 # cb: 020004
mov a7, a3 /* arg1 */ # ce: 7d03
slli a0, a0, 4 # d0: c00011
add a0, a2, a0 # d3: 0a02
l32i a3, a0, 24 # d5: 3860
l8ui a2, a0, 20 # d7: 220014
bnez a3, .Lbr004 # da: cc33
movi a2, 0 /* 0x00000000 */ # dc: 0c02
j .Lbr008 # de: 061400
.Lbr004: s32i a7, sp, 4 /* arg1 -> [(local1)] */ # e1: 7911
beqz a2, .Lbr005 # e3: ac52
bnei a2, 1, .Lbr007 # e5: 661246
slli a2, a3, 2 # e8: e02311
movi a3, 1000 /* 0x000003e8 */ # eb: 32a3e8
call0 __udivsi3 # ee: 01f2ffc0
# f2: 0000
mov a3, a2 # f4: 3d02
l32i a2, sp, 4 /* [(local1)] */ # f6: 2811
addx8 a2, a2, a3 # f8: 3022b0
addi a2, a2, 21 # fb: 22c215
call0 __udivsi3 # fe: 01efffc0
# 102: 0000
movi a0, 36 /* 0x00000024 */ # 104: 2c40
addx4 a0, a2, a0 # 106: 0002a0
j .Lbr007 # 109: 860800
.Lbr005: beqz a5, .Lbr009 # 10c: ac95
l8ui a2, a0, 28 # 10e: 22001c
movi a4, 96 /* 0x00000060 */ # 111: 42a060
beqz a2, .Lbr009 # 114: ac12
s32i a4, sp, 0 /* 0x00000060 -> [(local0)] */ # 116: 4901
.Lbr006: l32i a2, sp, 4 /* [(local1)] */ # 118: 2811
movi a4, 1000 /* 0x000003e8 */ # 11a: 42a3e8
slli a2, a2, 3 # 11d: d02211
mull a2, a2, a4 # 120: 402282
call0 __udivsi3 # 123: 01e7ffc0
# 127: 0000
l32i a0, sp, 0 /* [(local0)] */ # 129: 0801
add a0, a0, a2 # 12b: 2a00
addi a0, a0, 10 # 12d: ab00
.Lbr007: extui a2, a0, 0, 16 # 12f: 0020f4
.Lbr008: l32i a0, sp, 8 /* [(local2)] */ # 132: 0821
addi sp, sp, 16 /* (top of frame) */ # 134: 12c110
ret # 137: 0df0
.Lbr009: movi a2, 192 /* 0x000000c0 */ # 139: 22a0c0
s32i a2, sp, 0 /* 0x000000c0 -> [(local0)] */ # 13c: 2901
j .Lbr006 # 13e: 86f5ff
.literal_position # 144: 00000000
# Function @ .irom0.text+0x148
.balign 4
.global sdk_ieee80211_dot11Rate_rix
.type sdk_ieee80211_dot11Rate_rix, @function
sdk_ieee80211_dot11Rate_rix:
movi a6, 0 /* 0x00000000 */ # 148: 0c06
movi a8, .Ldata001 # 14a: 81feff
.Lbr010: slli a7, a6, 4 # 14d: c07611
add a7, a8, a7 # 150: 7a78
l8ui a4, a7, 30 # 152: 42071e
bne a4, a2, .Lbr011 # 155: 279409
mov a2, a6 # 158: 2d06
l8ui a8, a7, 29 # 15a: 82071d
s8i a8, a3, 0 /* a8 -> [arg1] */ # 15d: 824300
ret # 160: 0df0
.Lbr011: addi a6, a6, 1 # 162: 1b66
extui a6, a6, 0, 8 # 164: 606074
bnei a6, 12, .Lbr010 # 167: 66a6e2
movi a2, 255 /* 0x000000ff */ # 16a: 22a0ff
ret /* 0x000000ff */ # 16d: 0df0

View file

@ -0,0 +1,196 @@
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.global sdk_ieee80211_psq_init
.type sdk_ieee80211_psq_init, @function
sdk_ieee80211_psq_init:
movi a6, 0 /* 0x00000000 */ # 0: 0c06
movi a5, 0 /* 0x00000000 */ # 2: 0c05
movi a4, 1 /* 0x00000001 */ # 4: 0c14
.Lbr001: addi a4, a4, -1 # 6: 0b44
add a3, a5, a2 # 8: 2a35
s32i a6, a3, 0 # a: 6903
addi a5, a5, 4 # c: 4b55
bgei a4, 1, .Lbr001 # e: e614f4
movi a4, 10 /* 0x0000000a */ # 11: 0ca4
s32i a4, a2, 4 /* 0x0000000a -> [arg0+0x4] */ # 13: 4912
ret /* arg0 */ # 15: 0df0
.balign 4
# Function @ .irom0.text+0x18
.balign 4
.global sdk_ieee80211_psq_cleanup
.type sdk_ieee80211_psq_cleanup, @function
sdk_ieee80211_psq_cleanup:
ret /* arg0 */ # 18: 0df0
.literal_position # 1c: 00000000
# Function @ .irom0.text+0x20
.balign 4
.global sdk_ieee80211_set_tim
.type sdk_ieee80211_set_tim, @function
sdk_ieee80211_set_tim:
movi a10, 1 /* 0x00000001 */ # 20: 0c1a
l16ui a6, a2, 26 /* [arg0+0x1a] */ # 22: 62120d
movi a8, sdk_g_ic+0x152 # 25: 81fdff
extui a7, a6, 0, 3 # 28: 607024
extui a6, a6, 3, 11 # 2b: 6063a4
add a6, a6, a8 # 2e: 8a66
l8ui a5, a6, 128 # 30: 520680
ssr a7 # 33: 000740
sra a4, a5 # 36: 5040b1
extui a4, a4, 0, 1 # 39: 404004
sub a2, a3, a4 # 3c: 4023c0
movnez a2, a10, a2 # 3f: 202a93
beqz a2, .Lbr002 # 42: 9c52
movi a11, -1 /* 0xffffffff */ # 44: 7cfb
ssl a7 # 46: 001740
sll a9, a10 # 49: 009aa1
or a8, a9, a5 # 4c: 508920
xor a9, a9, a11 # 4f: b09930
and a9, a5, a9 # 52: 909510
moveqz a8, a9, a3 # 55: 308983
s8i a8, a6, 128 # 58: 824680
.Lbr002: ret # 5b: 0df0
.literal_position # 60: 00000000
# 64: 00000000
# Function @ .irom0.text+0x68
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ieee80211_pwrsave
.type sdk_ieee80211_pwrsave, @function
sdk_ieee80211_pwrsave:
mov a6, a2 /* arg0 */ # 68: 6d02
addi sp, sp, -16 /* (local0) */ # 6a: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 6d: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 6f: 0901
l32i a2, a2, 196 /* [arg0+0xc4] */ # 71: 222231
l32i a0, a6, 192 /* [arg0+0xc0] */ # 74: 022630
mov a12, a3 /* arg1 */ # 77: cd03
blt a0, a2, .Lbr003 # 79: 27201e
l32i a3, a6, 200 /* [arg0+0xc8] */ # 7c: 322632
l32i a2, a12, 0 /* [arg1] */ # 7f: 280c
addi a3, a3, 1 /* [arg0+0xc8]+0x1 */ # 81: 1b33
s32i a3, a6, 200 /* [arg0+0xc8]+0x1 -> [arg0+0xc8] */ # 83: 326632
call0 pbuf_free # 86: 01f6ffc0
# 8a: 0000
mov a2, a12 /* arg1 */ # 8c: 2d0c
movi a3, 1 /* 0x00000001 */ # 8e: 0c13
call0 sdk_esf_buf_recycle # 90: 01f5ffc0
# 94: 0000
movi a2, 1 /* 0x00000001 */ # 96: 0c12
j .Lbr007 # 98: 060b00
.Lbr003: addi a4, a0, 1 /* [arg0+0xc0]+0x1 */ # 9b: 1b40
movi a7, 0 /* 0x00000000 */ # 9d: 0c07
l32i a5, a6, 212 /* [arg0+0xd4] */ # 9f: 522635
l32i a2, a6, 208 /* [arg0+0xd0] */ # a2: 222634
addi a5, a5, 1 /* [arg0+0xd4]+0x1 */ # a5: 1b55
bnez a2, .Lbr004 # a7: cc42
s32i a3, a6, 204 /* arg1 -> [arg0+0xcc] */ # a9: 326633
j .Lbr005 # ac: 460000
.Lbr004: s32i a3, a2, 28 /* arg1 -> [[arg0+0xd0]+0x1c] */ # af: 3972
.Lbr005: s32i a7, a12, 28 /* 0x00000000 -> [arg1+0x1c] */ # b1: 797c
s32i a12, a6, 208 /* arg1 -> [arg0+0xd0] */ # b3: c26634
s32i a4, a6, 192 /* [arg0+0xc0]+0x1 -> [arg0+0xc0] */ # b6: 426630
s32i a5, a6, 212 /* [arg0+0xd4]+0x1 -> [arg0+0xd4] */ # b9: 526635
bnei a4, 1, .Lbr006 # bc: 661406
mov a2, a6 /* arg0 */ # bf: 2d06
movi a3, 1 /* 0x00000001 */ # c1: 0c13
call0 sdk_ieee80211_set_tim # c3: 050000
.Lbr006: movi a2, 0 /* 0x00000000 */ # c6: 0c02
.Lbr007: l32i a12, sp, 4 /* [(local1)] */ # c8: c811
l32i a0, sp, 0 /* [(local0)] */ # ca: 0801
addi sp, sp, 16 /* (top of frame) */ # cc: 12c110
ret # cf: 0df0
.literal_position # d4: 00000000
# d8: 00000000
# dc: 00000000
# Function @ .irom0.text+0xe0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.Lfunc001: addi sp, sp, -16 /* (local0) */ # e0: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # e3: 0901
s32i a14, sp, 12 /* a14 -> [(local3)] */ # e5: e931
s32i a12, sp, 4 /* a12 -> [(local1)] */ # e7: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # e9: d921
mov a12, a2 /* arg0 */ # eb: cd02
l32i a13, a2, 204 /* [arg0+0xcc] */ # ed: d22233
movi a14, 0 /* 0x00000000 */ # f0: 0c0e
bnez a13, .Lbr008 # f2: cc1d
j .Lbr012 # f4: 061000
.Lbr008: l32i a2, a13, 28 /* [[arg0+0xcc]+0x1c] */ # f7: 287d
s32i a2, a12, 204 /* [[arg0+0xcc]+0x1c] -> [arg0+0xcc] */ # f9: 226c33
call0 sdk_chm_check_same_channel # fc: 01f7ffc0
# 100: 0000
beqz a2, .Lbr009 # 102: 8c92
mov a2, a13 /* [arg0+0xcc] */ # 104: 2d0d
call0 sdk_ppTxPkt # 106: 01f5ffc0
# 10a: 0000
j .Lbr010 # 10c: c60300
.Lbr009: movi a5, sdk_g_ic # 10f: 51f1ff
addi a4, a13, 28 /* [arg0+0xcc]+0x1c */ # 112: 42cd1c
l32i a6, a5, 0x1c4 /* [sdk_g_ic+0x1c4] */ # 115: 622571
s32i a14, a13, 28 /* 0x00000000 -> [[arg0+0xcc]+0x1c] */ # 118: e97d
s32i a13, a6, 0 /* [arg0+0xcc] -> [[sdk_g_ic+0x1c4]] */ # 11a: d906
s32i a4, a5, 0x1c4 /* [arg0+0xcc]+0x1c -> [sdk_g_ic+0x1c4] */ # 11c: 426571
.Lbr010: l32i a7, a12, 192 /* [arg0+0xc0] */ # 11f: 722c30
l32i a13, a12, 204 /* [arg0+0xcc] */ # 122: d22c33
addi a7, a7, -1 /* [arg0+0xc0]-0x1 */ # 125: 0b77
s32i a7, a12, 192 /* [arg0+0xc0]-0x1 -> [arg0+0xc0] */ # 127: 726c30
beqz a13, .Lbr011 # 12a: 8c1d
j .Lbr008 # 12c: c6f1ff
.Lbr011: s32i a14, a12, 208 /* 0x00000000 -> [arg0+0xd0] */ # 12f: e26c34
s32i a14, a12, 204 /* 0x00000000 -> [arg0+0xcc] */ # 132: e26c33
s32i a14, a12, 212 /* 0x00000000 -> [arg0+0xd4] */ # 135: e26c35
.Lbr012: l32i a0, sp, 0 /* [(local0)] */ # 138: 0801
s32i a14, a12, 192 /* 0x00000000 -> [arg0+0xc0] */ # 13a: e26c30
l32i a13, sp, 8 /* [(local2)] */ # 13d: d821
l32i a12, sp, 4 /* [(local1)] */ # 13f: c811
l32i a14, sp, 12 /* [(local3)] */ # 141: e831
addi sp, sp, 16 /* (top of frame) */ # 143: 12c110
ret # 146: 0df0
# Function @ .irom0.text+0x148
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_ieee80211_node_pwrsave
.type sdk_ieee80211_node_pwrsave, @function
sdk_ieee80211_node_pwrsave:
addi sp, sp, -16 /* (local0) */ # 148: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 14b: 0911
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 14d: 2901
l32i a0, a2, 8 /* [arg0+0x8] */ # 14f: 0822
beqz a3, .Lbr013 # 151: 8c83
movi a3, 16 /* 0x00000010 */ # 153: 1c03
or a3, a0, a3 # 155: 303020
s32i a3, a2, 8 /* a3 -> [arg0+0x8] */ # 158: 3922
j .Lbr014 # 15a: c60500
.Lbr013: movi a3, 0 /* 0x00000000 */ # 15d: 0c03
movi a4, -17 /* 0xffffffef */ # 15f: 6cf4
and a4, a0, a4 # 161: 404010
s32i a4, a2, 8 /* a4 -> [arg0+0x8] */ # 164: 4922
call0 sdk_ieee80211_set_tim # 166: 050000
l32i a0, sp, 0 /* [(local0)] */ # 169: 0801
l32i a5, a0, 192 /* [[(local0)]+0xc0] */ # 16b: 522030
beqz a5, .Lbr014 # 16e: 8c35
mov a2, a0 /* [(local0)] */ # 170: 2d00
call0 .Lfunc001 # 172: c5f6ff
.Lbr014: l32i a0, sp, 4 /* [(local1)] */ # 175: 0811
addi sp, sp, 16 /* (top of frame) */ # 177: 12c110
ret # 17a: 0df0

View file

@ -0,0 +1,236 @@
.section .data, "aw", @progbits
.global sdk_ieee80211_addr_bcast
.type sdk_ieee80211_addr_bcast, @object
sdk_ieee80211_addr_bcast:
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000400
# 8: 00000000
# Function @ .irom0.text+0xc
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_proto_attach
.type sdk_ieee80211_proto_attach, @function
sdk_ieee80211_proto_attach:
movi a3, 2 /* 0x00000002 */ # c: 0c23
movi a4, 0x00040000 # e: 41fdff
movi a6, 1 /* 0x00000001 */ # 11: 0c16
mov a5, a2 /* arg0 */ # 13: 5d02
addi sp, sp, -16 /* (local0) */ # 15: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 18: 0901
movi a2, sdk_ieee80211_tx_mgt_cb # 1a: 21f9ff
l32i a0, a5, 28 /* [arg0+0x1c] */ # 1d: 0875
s32i a6, a5, 12 /* 0x00000001 -> [arg0+0xc] */ # 1f: 6935
or a0, a0, a4 # 21: 400020
s32i a0, a5, 28 /* a0 -> [arg0+0x1c] */ # 24: 0975
call0 sdk_ppRegisterTxCallback # 26: 01f8ffc0
# 2a: 0000
l32i a0, sp, 0 /* [(local0)] */ # 2c: 0801
addi sp, sp, 16 /* (top of frame) */ # 2e: 12c110
ret # 31: 0df0
.balign 4
# Function @ .irom0.text+0x34
.balign 4
.global sdk_ieee80211_set_shortslottime
.type sdk_ieee80211_set_shortslottime, @function
sdk_ieee80211_set_shortslottime:
movi a6, 1024 /* 0x00000400 */ # 34: 62a400
l32i a5, a2, 28 /* [arg0+0x1c] */ # 37: 5872
movi a4, -1025 /* 0xfffffbff */ # 39: 42abff
and a4, a5, a4 # 3c: 404510
or a5, a5, a6 # 3f: 605520
moveqz a5, a4, a3 # 42: 305483
s32i a5, a2, 28 /* a5 -> [arg0+0x1c] */ # 45: 5972
ret /* arg0 */ # 47: 0df0
.literal_position # 4c: 00000000
# Function @ .irom0.text+0x50
.balign 4
.global sdk_ieee80211_iserp_rateset
.type sdk_ieee80211_iserp_rateset, @function
sdk_ieee80211_iserp_rateset:
l8ui a8, a2, 0 /* [arg0] */ # 50: 820200
bltui a8, 7, .Lbr003 # 53: b6781e
movi a9, .Ldata001 # 56: 91fdff
movi a10, 0 /* 0x00000000 */ # 59: 0c0a
.Lbr001: blti a8, 1, .Lbr003 # 5b: a61816
movi a5, 0 /* 0x00000000 */ # 5e: 0c05
l32i a6, a9, 0 # 60: 6809
.Lbr002: add a7, a5, a2 # 62: 2a75
l8ui a7, a7, 1 # 64: 720701
extui a7, a7, 0, 7 # 67: 707064
beq a6, a7, .Lbr004 # 6a: 77160b
blt a6, a7, .Lbr003 # 6d: 772604
addi a5, a5, 1 # 70: 1b55
bne a5, a8, .Lbr002 # 72: 8795ec
.Lbr003: movi a2, 0 /* 0x00000000 */ # 75: 0c02
ret /* 0x00000000 */ # 77: 0df0
.Lbr004: addi a9, a9, 4 # 79: 4b99
addi a10, a10, 1 # 7b: 1baa
bnei a10, 7, .Lbr001 # 7d: 667ada
movi a2, 1 /* 0x00000001 */ # 80: 0c12
ret /* 0x00000001 */ # 82: 0df0
.literal_position # 84: 20000000
# Function @ .irom0.text+0x88
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc001: addi sp, sp, -16 /* (local0) */ # 88: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 8b: 0901
l8ui a0, a2, 0 /* [arg0] */ # 8d: 020200
beqz a0, .Lbr009 # 90: bcf0
movi a9, 0 /* 0x00000000 */ # 92: 0c09
movi a11, 128 /* 0x00000080 */ # 94: b2a080
movi a8, .Ldata002 # 97: 81fbff
slli a10, a3, 4 # 9a: c0a311
add a8, a8, a10 # 9d: aa88
l8ui a7, a8, 0 # 9f: 720800
.Lbr005: bnez a4, .Lbr006 # a2: cc94
add a3, a2, a9 # a4: 9a32
l8ui a0, a3, 1 # a6: 020301
extui a0, a0, 0, 7 # a9: 000064
s8i a0, a3, 1 # ac: 024301
.Lbr006: beqz a7, .Lbr008 # af: 9c57
movi a0, 0 /* 0x00000000 */ # b1: 0c00
add a10, a2, a9 # b3: 9aa2
l8ui a3, a10, 1 # b5: 320a01
.Lbr007: add a5, a8, a0 # b8: 0a58
l8ui a5, a5, 1 # ba: 520501
addi a0, a0, 1 # bd: 1b00
bne a5, a3, .Lbr010 # bf: 379517
or a6, a3, a11 # c2: b06320
s8i a6, a10, 1 # c5: 624a01
.Lbr008: l8ui a10, a2, 0 /* [arg0] */ # c8: a20200
addi a9, a9, 1 # cb: 1b99
extui a9, a9, 0, 8 # cd: 909074
bltu a9, a10, .Lbr005 # d0: a739ce
.Lbr009: l32i a0, sp, 0 /* [(local0)] */ # d3: 0801
addi sp, sp, 16 /* (top of frame) */ # d5: 12c110
ret /* arg0 */ # d8: 0df0
.Lbr010: extui a0, a0, 0, 8 # da: 000074
bne a7, a0, .Lbr007 # dd: 0797d7
j .Lbr008 # e0: 06f9ff
.balign 4
# Function @ .irom0.text+0xe4
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_setbasicrates
.type sdk_ieee80211_setbasicrates, @function
sdk_ieee80211_setbasicrates:
movi a4, 0 /* 0x00000000 */ # e4: 0c04
addi sp, sp, -16 /* (local0) */ # e6: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # e9: 0901
call0 .Lfunc001 # eb: c5f9ff
l32i a0, sp, 0 /* [(local0)] */ # ee: 0801
addi sp, sp, 16 /* (top of frame) */ # f0: 12c110
ret # f3: 0df0
.balign 4
# Function @ .irom0.text+0xf8
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_ieee80211_addbasicrates
.type sdk_ieee80211_addbasicrates, @function
sdk_ieee80211_addbasicrates:
movi a4, 1 /* 0x00000001 */ # f8: 0c14
addi sp, sp, -16 /* (local0) */ # fa: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # fd: 0901
call0 .Lfunc001 # ff: 85f8ff
l32i a0, sp, 0 /* [(local0)] */ # 102: 0801
addi sp, sp, 16 /* (top of frame) */ # 104: 12c110
ret # 107: 0df0
.balign 4
# Function @ .irom0.text+0x10c
.balign 4
.global sdk_ieee80211_wme_initparams
.type sdk_ieee80211_wme_initparams, @function
sdk_ieee80211_wme_initparams:
ret /* arg0 */ # 10c: 0df0
.balign 4
# Function @ .irom0.text+0x110
.balign 4
.global sdk_ieee80211_wme_updateparams
.type sdk_ieee80211_wme_updateparams, @function
sdk_ieee80211_wme_updateparams:
ret /* arg0 */ # 110: 0df0
.literal_position # 114: 00000000
# 118: 00000000
# 11c: 00000000
# 120: 00000000
# 124: 00000000
# Function @ .irom0.text+0x128
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_ieee80211_mlme_connect_bss
.type sdk_ieee80211_mlme_connect_bss, @function
sdk_ieee80211_mlme_connect_bss:
mov a3, a2 /* arg0 */ # 128: 3d02
addi sp, sp, -16 /* (local0) */ # 12a: 12c1f0
s32i a5, sp, 4 /* arg3 -> [(local1)] */ # 12d: 5911
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 12f: 0921
movi a2, sdk_g_ic # 131: 21f8ff
s32i a4, sp, 0 /* arg2 -> [(local0)] */ # 134: 4901
l32i a2, a2, 16 /* [sdk_g_ic+0x10] */ # 136: 2842
movi a4, 6 /* 0x00000006 */ # 138: 0c64
s32i a3, a2, 136 /* arg0 -> [[sdk_g_ic+0x10]+0x88] */ # 13a: 326222
addi a2, a2, 64 /* [sdk_g_ic+0x10]+0x40 */ # 13d: 22c240
call0 memcpy # 140: 01f7ffc0
# 144: 0000
l32i a3, sp, 4 /* [(local1)] */ # 146: 3811
movi a0, sdk_g_ic # 148: 01f4ff
beqz a3, .Lbr011 # 14b: 8ce3
movi a3, 2 /* 0x00000002 */ # 14d: 0c23
movi a4, 176 /* 0x000000b0 */ # 14f: 42a0b0
mov a2, a0 /* sdk_g_ic */ # 152: 2d00
call0 sdk_ieee80211_sta_new_state # 154: 01f3ffc0
# 158: 0000
j .Lbr012 # 15a: 860400
.Lbr011: movi a3, 3 /* 0x00000003 */ # 15d: 0c33
mov a2, a0 /* sdk_g_ic */ # 15f: 2d00
l32i a6, sp, 0 /* [(local0)] */ # 161: 6801
movi a5, 32 /* 0x00000020 */ # 163: 2c05
movi a4, 0 /* 0x00000000 */ # 165: 0c04
movnez a4, a5, a6 # 167: 604593
call0 sdk_ieee80211_sta_new_state # 16a: 01eeffc0
# 16e: 0000
.Lbr012: l32i a0, sp, 8 /* [(local2)] */ # 170: 0821
addi sp, sp, 16 /* (top of frame) */ # 172: 12c110
ret # 175: 0df0
.section .rodata, "a", @progbits
.Ldata001: .byte 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
.byte 0x0b, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00
.byte 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00
.byte 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.Ldata002: .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x04, 0x02, 0x04, 0x0b, 0x16, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

View file

@ -0,0 +1,499 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .text+0x4
.balign 4
.global sdk_chm_get_current_channel
.type sdk_chm_get_current_channel, @function
sdk_chm_get_current_channel:
movi a2, .Ldata001 # 4: 21ffff
l32i a2, a2, 60 /* [.Ldata009] */ # 7: 28f2
ret /* [.Ldata009] */ # 9: 0df0
.section .bss, "aw", @nobits
.Ldata001: .word 0x00000000 # 0: 00000000
.Ldata002: .word 0x00000000 # 4: 00000000
.Ldata003: .word 0x00000000 # 8: 00000000
.Ldata004: .word 0x00000000 # c: 00000000
.Ldata005: .word 0x00000000 # 10: 00000000
.Ldata006: .word 0x00000000 # 14: 00000000
.Ldata007: .word 0x00000000 # 18: 00000000
.Ldata008: .word 0x00000000 # 1c: 00000000
.Label001: .space 28
.Ldata009: .word 0x00000000 # 3c: 00000000
.Ldata010: .byte 0x00
.Ldata011: .byte 0x00
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00feef3f
# 4: 00000000
# 8: 00000000
# c: 00000000
# 10: 00000000
# 14: 20000000
# 18: 48020000
# 1c: 00000000
# 20: 00000000
# 24: 00000000
# 28: 00000000
# Function @ .irom0.text+0x2c
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word[4] @ -0x10
.balign 4
.global sdk_chm_init
.type sdk_chm_init, @function
sdk_chm_init:
movi a4, -32 /* 0xffffffe0 */ # 2c: 6c04
movi a5, sdk_NMIIrqIsOn # 2e: 51f7ff
movi a3, sdk_g_ic+0x180 # 31: 31f4ff
movi a6, .Ldata001 # 34: 61f5ff
addi sp, sp, -32 /* (local0) */ # 37: 12c1e0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 3a: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 3c: d921
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 3e: 0901
movi a13, 0x3feffe00 # 40: d1f0ff
movi a0, 0 /* 0x00000000 */ # 43: 0c00
s32i a2, a6, 0 /* arg0 -> [.Ldata001] */ # 45: 2906
mov a12, a2 /* arg0 */ # 47: cd02
l8ui a6, a3, 96 /* [sdk_g_ic+0x1e0] */ # 49: 620360
l8ui a2, a5, 0 /* [sdk_NMIIrqIsOn] */ # 4c: 220500
addmi a3, a3, 256 /* sdk_g_ic+0x280 */ # 4f: 32d301
l8ui a3, a3, 141 /* [sdk_g_ic+0x30d] */ # 52: 32038d
addi a6, a6, -1 /* [sdk_g_ic+0x1e0]-0x1 */ # 55: 0b66
addi a3, a3, -1 /* [sdk_g_ic+0x30d]-0x1 */ # 57: 0b33
extui a3, a3, 0, 8 # 59: 303074
movnez a0, a3, a6 # 5c: 600393
s32i a0, sp, 16 /* a0 -> [(local4)] */ # 5f: 0941
bnez a2, .Lbr002 # 61: ec32
call0 vPortEnterCritical # 63: 01eeffc0
# 67: 0000
movi a4, -32 /* 0xffffffe0 */ # 69: 6c04
.Lbr001: memw # 6b: c02000
l32i a9, a13, 0x200 /* [0x3ff00000] */ # 6e: 922d80
and a9, a9, a4 # 71: 409910
memw # 74: c02000
s32i a9, a13, 0x200 /* a9 -> [0x3ff00000] */ # 77: 926d80
memw # 7a: c02000
l32i a8, a13, 0x200 /* [0x3ff00000] */ # 7d: 822d80
bbsi a8, 0, .Lbr001 # 80: 07e8e7
l32i a0, sp, 16 /* [(local4)] */ # 83: 0841
movi a5, sdk_NMIIrqIsOn # 85: 51e2ff
.Lbr002: movi a2, 132 /* 0x00000084 */ # 88: 22a084
addx2 a0, a0, a0 # 8b: 000090
addx4 a0, a0, a12 # 8e: c000a0
add a0, a0, a2 # 91: 2a00
s32i a0, a12, 0x14c /* a0 -> [arg0+0x14c] */ # 93: 026c53
l8ui a10, a5, 0 /* [sdk_NMIIrqIsOn] */ # 96: a20500
s32i a0, sp, 12 /* a0 -> [(local3)] */ # 99: 0931
bnez a10, .Lbr003 # 9b: dcaa
memw # 9d: c02000
l32i a2, a13, 0x200 /* [0x3ff00000] */ # a0: 222d80
movi a3, 1 /* 0x00000001 */ # a3: 0c13
and a2, a2, a4 # a5: 402210
or a2, a2, a3 # a8: 302220
memw # ab: c02000
s32i a2, a13, 0x200 /* a2 -> [0x3ff00000] */ # ae: 226d80
call0 vPortExitCritical # b1: 01dbffc0
# b5: 0000
l32i a0, sp, 12 /* [(local3)] */ # b7: 0831
.Lbr003: mov a2, a0 # b9: 2d00
call0 sdk_chm_set_current_channel # bb: 01daffc0
# bf: 0000
movi a2, .Label001 # c1: 21d4ff
movi a3, .Lfunc002 # c4: 31d5ff
movi a4, 0 /* 0x00000000 */ # c7: 0c04
call0 sdk_os_timer_setfn # c9: 01d7ffc0
# cd: 0000
l32i a12, sp, 4 /* [(local1)] */ # cf: c811
l32i a13, sp, 8 /* [(local2)] */ # d1: d821
l32i a0, sp, 0 /* [(local0)] */ # d3: 0801
addi sp, sp, 32 /* (top of frame) */ # d5: 12c120
ret # d8: 0df0
.literal_position # dc: 00000000
# e0: 00000000
# Function @ .irom0.text+0xe4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global sdk_chm_acquire_lock
.type sdk_chm_acquire_lock, @function
sdk_chm_acquire_lock:
addi sp, sp, -16 /* (local0) */ # e4: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # e7: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # e9: 0901
mov a12, a2 /* arg0 */ # eb: cd02
movi a0, .Ldata001 # ed: 01fbff
mov a2, a4 /* arg2 */ # f0: 2d04
l8ui a4, a0, 64 /* [.Ldata010] */ # f2: 420040
l8ui a5, a0, 65 /* [.Ldata011] */ # f5: 520041
beqz a4, .Lbr005 # f8: 9c44
s32i a2, sp, 12 /* arg2 -> [(local3)] */ # fa: 2931
s32i a3, sp, 8 /* arg1 -> [(local2)] */ # fc: 3921
bgeu a5, a12, .Lbr004 # fe: c7b504
movi a2, 3 /* 0x00000003 */ # 101: 0c32
j .Lbr006 # 103: c60500
.Lbr004: call0 sdk_chm_cancel_op # 106: 050000
l32i a2, sp, 12 /* [(local3)] */ # 109: 2831
movi a0, .Ldata001 # 10b: 01f5ff
l32i a3, sp, 8 /* [(local2)] */ # 10e: 3821
.Lbr005: s8i a12, a0, 65 /* arg0 -> [.Ldata011] */ # 110: c24041
s32i a3, a0, 24 /* a3 -> [.Ldata007] */ # 113: 3960
s32i a2, a0, 28 /* a2 -> [.Ldata008] */ # 115: 2970
movi a6, 1 /* 0x00000001 */ # 117: 0c16
movi a2, 0 /* 0x00000000 */ # 119: 0c02
s8i a6, a0, 64 /* 0x01 -> [.Ldata010] */ # 11b: 624040
.Lbr006: l32i a12, sp, 4 /* [(local1)] */ # 11e: c811
l32i a0, sp, 0 /* [(local0)] */ # 120: 0801
addi sp, sp, 16 /* (top of frame) */ # 122: 12c110
ret # 125: 0df0
.literal_position # 128: 00000000
# Function @ .irom0.text+0x12c
.balign 4
.global sdk_chm_release_lock
.type sdk_chm_release_lock, @function
sdk_chm_release_lock:
movi a3, .Ldata001 # 12c: 31ffff
movi a2, 0 /* 0x00000000 */ # 12f: 0c02
s32i a2, a3, 28 /* 0x00000000 -> [.Ldata008] */ # 131: 2973
s32i a2, a3, 24 /* 0x00000000 -> [.Ldata007] */ # 133: 2963
s8i a2, a3, 64 /* 0x00 -> [.Ldata010] */ # 135: 224340
s8i a2, a3, 65 /* 0x00 -> [.Ldata011] */ # 138: 224341
ret /* 0x00000000 */ # 13b: 0df0
.literal_position # 140: 00000000
# 144: 00000000
# Function @ .irom0.text+0x148
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_chm_start_op
.type sdk_chm_start_op, @function
sdk_chm_start_op:
addi sp, sp, -16 /* (local0) */ # 148: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 14b: 0901
movi a0, .Ldata001 # 14d: 01fcff
l32i a7, a0, 4 /* [.Ldata002] */ # 150: 7810
beqz a7, .Lbr010 # 152: 8cf7
movi a2, 3 /* 0x00000003 */ # 154: 0c32
j .Lbr009 # 156: 060100
.Lbr007: call0 .Lfunc001 # 159: 450400
.Lbr008: movi a2, 0 /* 0x00000000 */ # 15c: 0c02
.Lbr009: l32i a0, sp, 0 /* [(local0)] */ # 15e: 0801
addi sp, sp, 16 /* (top of frame) */ # 160: 12c110
ret # 163: 0df0
.Lbr010: s32i a2, a0, 4 /* arg0 -> [.Ldata002] */ # 165: 2910
s32i a4, a0, 16 /* arg2 -> [.Ldata005] */ # 167: 4940
movi a8, sdk_g_ic # 169: 81f6ff
s32i a5, a0, 20 /* arg3 -> [.Ldata006] */ # 16c: 5950
l32i a8, a8, 0 /* [sdk_g_ic] */ # 16e: 8808
s32i a3, a0, 8 /* arg1 -> [.Ldata003] */ # 170: 3920
l32i a8, a8, 0 /* [[sdk_g_ic]] */ # 172: 8808
s32i a6, a0, 12 /* arg4 -> [.Ldata004] */ # 174: 6930
bbci a8, 1, .Lbr007 # 176: 1768df
call0 .Lfunc001 # 179: 450200
j .Lbr008 # 17c: 06f7ff
.literal_position # 180: 00000000
# 184: 04000000
# 188: 20000000
# 18c: 00000000
# 190: 00000000
# 194: 00000000
# 198: 00000000
# 19c: 00000000
# Function @ .irom0.text+0x1a0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.Lfunc001: addi sp, sp, -16 /* (local0) */ # 1a0: 12c1f0
s32i a13, sp, 12 /* a13 -> [(local3)] */ # 1a3: d931
s32i a12, sp, 8 /* a12 -> [(local2)] */ # 1a5: c921
movi a13, .Ldata001 # 1a7: d1f6ff
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 1aa: 0911
l32i a12, a13, 16 /* [.Ldata005] */ # 1ac: c84d
l32i a0, a13, 12 /* [.Ldata004] */ # 1ae: 083d
s32i a0, sp, 0 /* [.Ldata004] -> [(local0)] */ # 1b0: 0901
call0 sdk_chm_get_current_channel # 1b2: 01f6ffc0
# 1b6: 0000
mov a3, a2 # 1b8: 3d02
l32i a2, a13, 4 /* [.Ldata002] */ # 1ba: 281d
l16ui a3, a3, 4 # 1bc: 321302
l16ui a4, a2, 4 /* [[.Ldata002]+0x4] */ # 1bf: 421202
beq a3, a4, .Lbr011 # 1c2: 471305
call0 sdk_chm_set_current_channel # 1c5: 01f2ffc0
# 1c9: 0000
.Lbr011: beqz a12, .Lbr012 # 1cb: 8c5c
l32i a2, sp, 0 /* [(local0)] */ # 1cd: 2801
movi a3, 0 /* 0x00000000 */ # 1cf: 0c03
callx0 a12 /* [.Ldata005] */ # 1d1: c00c00
.Lbr012: l32i a4, a13, 8 /* [.Ldata003] */ # 1d4: 482d
bnez a4, .Lbr013 # 1d6: ccc4
movi a2, .Ldata002 # 1d8: 21ebff
movi a3, 20 /* 0x00000014 */ # 1db: 1c43
call0 bzero # 1dd: 01edffc0
# 1e1: 0000
j .Lbr014 # 1e3: 860500
.Lbr013: movi a12, .Label001 # 1e6: c1e8ff
mov a2, a12 /* .Label001 */ # 1e9: 2d0c
call0 sdk_os_timer_disarm # 1eb: 01ebffc0
# 1ef: 0000
mov a2, a12 /* .Label001 */ # 1f1: 2d0c
l32i a3, a13, 8 /* [.Ldata003] */ # 1f3: 382d
movi a4, 0 /* 0x00000000 */ # 1f5: 0c04
call0 sdk_os_timer_arm # 1f7: 01e9ffc0
# 1fb: 0000
.Lbr014: l32i a12, sp, 8 /* [(local2)] */ # 1fd: c821
l32i a13, sp, 12 /* [(local3)] */ # 1ff: d831
l32i a0, sp, 4 /* [(local1)] */ # 201: 0811
addi sp, sp, 16 /* (top of frame) */ # 203: 12c110
ret # 206: 0df0
.literal_position # 208: 00000000
# 20c: 00000000
# 210: 00000000
# Function @ .irom0.text+0x214
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_chm_end_op
.type sdk_chm_end_op, @function
sdk_chm_end_op:
movi a3, -4 /* 0xfffffffc */ # 214: 7cc3
addi sp, sp, -16 /* (local0) */ # 216: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 219: 0911
movi a0, .Ldata001 # 21b: 01fbff
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 21e: 2901
beq a0, a3, .Lbr015 # 220: 37101d
mov a2, a0 /* .Ldata001 */ # 223: 2d00
l32i a3, a2, 20 /* [.Ldata006] */ # 225: 3852
s32i a3, sp, 8 /* [.Ldata006] -> [(local2)] */ # 227: 3921
addi a2, a2, 4 /* .Ldata002 */ # 229: 4b22
movi a3, 20 /* 0x00000014 */ # 22b: 1c43
call0 bzero # 22d: 01f8ffc0
# 231: 0000
l32i a5, sp, 8 /* [(local2)] */ # 233: 5821
beqz a5, .Lbr015 # 235: 8c85
movi a2, .Ldata001 # 237: 21f5ff
l32i a3, sp, 0 /* [(local0)] */ # 23a: 3801
l32i a2, a2, 12 /* [.Ldata004] */ # 23c: 2832
callx0 a5 /* [(local2)] */ # 23e: c00500
.Lbr015: l32i a0, sp, 4 /* [(local1)] */ # 241: 0811
addi sp, sp, 16 /* (top of frame) */ # 243: 12c110
ret # 246: 0df0
# Function @ .irom0.text+0x248
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc002: movi a2, 0 /* 0x00000000 */ # 248: 0c02
addi sp, sp, -16 /* (local0) */ # 24a: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 24d: 0901
call0 sdk_chm_end_op # 24f: 050000
l32i a0, sp, 0 /* [(local0)] */ # 252: 0801
addi sp, sp, 16 /* (top of frame) */ # 254: 12c110
ret # 257: 0df0
.literal_position # 25c: 00000000
# 260: 00000000
# 264: 00000000
# Function @ .irom0.text+0x268
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global sdk_chm_cancel_op
.type sdk_chm_cancel_op, @function
sdk_chm_cancel_op:
addi sp, sp, -16 /* (local0) */ # 268: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 26b: 0901
movi a0, .Ldata001 # 26d: 01fbff
l32i a2, a0, 4 /* [.Ldata002] */ # 270: 2810
beqz a2, .Lbr016 # 272: 9c12
mov a2, a0 /* .Ldata001 */ # 274: 2d00
addi a2, a2, 32 /* .Label001 */ # 276: 22c220
call0 sdk_os_timer_disarm # 279: 01faffc0
# 27d: 0000
movi a2, 4 /* 0x00000004 */ # 27f: 0c42
call0 sdk_chm_end_op # 281: 050000
movi a0, .Ldata001 # 284: 01f7ff
.Lbr016: l32i a5, a0, 24 /* [.Ldata007] */ # 287: 5860
beqz a5, .Lbr017 # 289: 8c55
movi a3, 4 /* 0x00000004 */ # 28b: 0c43
l32i a2, a0, 28 /* [.Ldata008] */ # 28d: 2870
callx0 a5 /* [.Ldata007] */ # 28f: c00500
.Lbr017: l32i a0, sp, 0 /* [(local0)] */ # 292: 0801
addi sp, sp, 16 /* (top of frame) */ # 294: 12c110
ret # 297: 0df0
.literal_position # 29c: 00000000
# 2a0: 00000000
# 2a4: 00000000
# Function @ .irom0.text+0x2a8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_chm_return_home_channel
.type sdk_chm_return_home_channel, @function
sdk_chm_return_home_channel:
addi sp, sp, -16 /* (local0) */ # 2a8: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 2ab: c911
movi a12, sdk_g_ic # 2ad: c1fbff
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 2b0: 0901
l32i a12, a12, 0x14c /* [sdk_g_ic+0x14c] */ # 2b2: c22c53
call0 sdk_chm_get_current_channel # 2b5: 01faffc0
# 2b9: 0000
l16ui a0, a2, 4 # 2bb: 021202
l16ui a2, a12, 4 /* [[sdk_g_ic+0x14c]+0x4] */ # 2be: 221c02
beq a0, a2, .Lbr018 # 2c1: 271007
mov a2, a12 /* [sdk_g_ic+0x14c] */ # 2c4: 2d0c
call0 sdk_chm_set_current_channel # 2c6: 01f7ffc0
# 2ca: 0000
.Lbr018: l32i a12, sp, 4 /* [(local1)] */ # 2cc: c811
l32i a0, sp, 0 /* [(local0)] */ # 2ce: 0801
addi sp, sp, 16 /* (top of frame) */ # 2d0: 12c110
ret # 2d3: 0df0
.literal_position # 2d8: 00000000
# 2dc: 00feef3f
# 2e0: 00000000
# 2e4: 00000000
# 2e8: 00000000
# 2ec: 00000000
# 2f0: 00000000
# Function @ .irom0.text+0x2f4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global sdk_chm_set_current_channel
.type sdk_chm_set_current_channel, @function
sdk_chm_set_current_channel:
movi a3, 1 /* 0x00000001 */ # 2f4: 0c13
movi a4, 0 /* 0x00000000 */ # 2f6: 0c04
addi sp, sp, -16 /* (local0) */ # 2f8: 12c1f0
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 2fb: d921
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 2fd: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 2ff: 0901
mov a12, a2 /* arg0 */ # 301: cd02
l16ui a2, a2, 4 /* [arg0+0x4] */ # 303: 221202
call0 sdk_phy_change_channel # 306: 01f8ffc0
# 30a: 0000
movi a2, sdk_NMIIrqIsOn # 30c: 21f3ff
movi a0, -32 /* 0xffffffe0 */ # 30f: 6c00
l8ui a2, a2, 0 /* [sdk_NMIIrqIsOn] */ # 311: 220200
movi a13, 0x3feffe00 # 314: d1f2ff
bnez a2, .Lbr020 # 317: ec42
call0 vPortEnterCritical # 319: 01f4ffc0
# 31d: 0000
movi a0, -32 /* 0xffffffe0 */ # 31f: 6c00
.Lbr019: memw # 321: c02000
l32i a5, a13, 0x200 /* [0x3ff00000] */ # 324: 522d80
and a5, a5, a0 # 327: 005510
memw # 32a: c02000
s32i a5, a13, 0x200 /* a5 -> [0x3ff00000] */ # 32d: 526d80
memw # 330: c02000
l32i a4, a13, 0x200 /* [0x3ff00000] */ # 333: 422d80
bbsi a4, 0, .Lbr019 # 336: 07e4e7
movi a2, sdk_NMIIrqIsOn # 339: 21e9ff
l8ui a2, a2, 0 /* [sdk_NMIIrqIsOn] */ # 33c: 220200
.Lbr020: movi a3, .Ldata001 # 33f: 31e9ff
s32i a12, a3, 60 /* arg0 -> [.Ldata009] */ # 342: c9f3
bnez a2, .Lbr021 # 344: dc82
memw # 346: c02000
l32i a4, a13, 0x200 /* [0x3ff00000] */ # 349: 422d80
movi a5, 1 /* 0x00000001 */ # 34c: 0c15
and a4, a4, a0 # 34e: 004410
or a4, a4, a5 # 351: 504420
memw # 354: c02000
s32i a4, a13, 0x200 /* a4 -> [0x3ff00000] */ # 357: 426d80
call0 vPortExitCritical # 35a: 01e5ffc0
# 35e: 0000
.Lbr021: l32i a12, sp, 4 /* [(local1)] */ # 360: c811
l32i a13, sp, 8 /* [(local2)] */ # 362: d821
l32i a0, sp, 0 /* [(local0)] */ # 364: 0801
addi sp, sp, 16 /* (top of frame) */ # 366: 12c110
ret # 369: 0df0
.literal_position # 36c: 00000000
# Function @ .irom0.text+0x370
.balign 4
.global sdk_chm_freq2index
.type sdk_chm_freq2index, @function
sdk_chm_freq2index:
movi a5, 0 /* 0x00000000 */ # 370: 0c05
movi a6, .Ldata001 # 372: 61feff
movi a7, 14 /* 0x0000000e */ # 375: 0ce7
l32i a6, a6, 0 /* [.Ldata001] */ # 377: 6806
.Lbr022: addx2 a8, a5, a5 # 379: 508590
addx4 a8, a8, a6 # 37c: 6088a0
l16ui a8, a8, 136 # 37f: 821844
bne a8, a2, .Lbr023 # 382: 279803
mov a2, a5 # 385: 2d05
ret # 387: 0df0
.Lbr023: addi a5, a5, 1 # 389: 1b55
extui a5, a5, 0, 8 # 38b: 505074
bne a5, a7, .Lbr022 # 38e: 7795e7
movi a2, 255 /* 0x000000ff */ # 391: 22a0ff
ret /* 0x000000ff */ # 394: 0df0
.literal_position # 398: 00000000
# 39c: 00000000
# 3a0: 00000000
# 3a4: 00000000
# Function @ .irom0.text+0x3a8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global sdk_chm_check_same_channel
.type sdk_chm_check_same_channel, @function
sdk_chm_check_same_channel:
movi a2, sdk_g_ic # 3a8: 21fcff
addi sp, sp, -16 /* (local0) */ # 3ab: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 3ae: 0911
l32i a2, a2, 0x14c /* [sdk_g_ic+0x14c] */ # 3b0: 222253
call0 sdk_ieee80211_chan2ieee # 3b3: 01faffc0
# 3b7: 0000
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 3b9: 2901
call0 sdk_chm_get_current_channel # 3bb: 01f9ffc0
# 3bf: 0000
call0 sdk_ieee80211_chan2ieee # 3c1: 01f8ffc0
# 3c5: 0000
movi a3, 0 /* 0x00000000 */ # 3c7: 0c03
l32i a4, sp, 0 /* [(local0)] */ # 3c9: 4801
l32i a0, sp, 4 /* [(local1)] */ # 3cb: 0811
sub a4, a4, a2 # 3cd: 2044c0
addi sp, sp, 16 /* (top of frame) */ # 3d0: 12c110
movi a2, 1 /* 0x00000001 */ # 3d3: 0c12
movnez a2, a3, a4 # 3d5: 402393
ret # 3d8: 0df0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,443 @@
.section .bss, "aw", @nobits
.global g_ic
.type g_ic, @object
g_ic: .space 16
.Ldata001: .word 0x00000000 # 10: 00000000
.Ldata002: .word 0x00000000 # 14: 00000000
# NOTE: 1328 non-alignment zero bytes skipped.
.skip 1328
.global xieee80211Queue
.type xieee80211Queue, @object
xieee80211Queue:
.word 0x00000000 # 548: 00000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 6c090000
# 4: b4090000
# 8: b4090000
# c: 00000000
# Function @ .irom0.text+0x10
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word @ -0x10
# (local5): word @ -0xc
# (local6): word[2] @ -0x8
.balign 4
.Lfunc001: movi a5, 131 /* 0x00000083 */ # 10: 52a083
movi a6, 0x000009b4 # 13: 61fcff
addi sp, sp, -32 /* (local0) */ # 16: 12c1e0
s32i a2, sp, 24 /* arg0 -> [(local6)] */ # 19: 2961
s32i a15, sp, 16 /* a15 -> [(local4)] */ # 1b: f941
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 1d: 0901
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 1f: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 21: d921
s32i a14, sp, 12 /* a14 -> [(local3)] */ # 23: e931
movi a13, 0x0000096c # 25: d1f6ff
movi a14, 0 /* 0x00000000 */ # 28: 0c0e
mov a12, a2 /* arg0 */ # 2a: cd02
movi a0, 156 /* 0x0000009c */ # 2c: 02a09c
mov a15, a2 /* arg0 */ # 2f: fd02
add a0, a15, a0 /* arg0+0x9c */ # 31: 0a0f
movi a2, 14 /* 0x0000000e */ # 33: 0ce2
s32i a2, a15, 128 /* 0x0000000e -> [arg0+0x80] */ # 35: 226f20
.Lbr001: s32i a5, a12, 132 # 38: 526c21
l8ui a3, a12, 138 # 3b: 320c8a
s32i a0, sp, 20 /* a0 -> [(local5)] */ # 3e: 0951
bltu a0, a12, .Lbr002 # 40: c73008
s16i a13, a12, 136 # 43: d25c44
bne a12, a0, .Lbr002 # 46: 079c02
s16i a6, a12, 136 # 49: 625c44
.Lbr002: bnez a3, .Lbr003 # 4c: dc23
l16ui a2, a12, 136 # 4e: 221c44
movi a3, 131 /* 0x00000083 */ # 51: 32a083
call0 ieee80211_mhz2ieee # 54: 050000
l32i a0, sp, 20 /* [(local5)] */ # 57: 0851
movi a5, 131 /* 0x00000083 */ # 59: 52a083
movi a6, 0x000009b4 # 5c: 61ebff
s8i a2, a12, 138 # 5f: 224c8a
.Lbr003: addi a13, a13, 5 # 62: 5bdd
l8ui a4, a12, 139 # 64: 420c8b
addi a14, a14, 1 # 67: 1bee
bnez a4, .Lbr004 # 69: ccd4
l8ui a7, a12, 141 # 6b: 720c8d
slli a7, a7, 24 # 6e: 807701
srai a7, a7, 24 # 71: 707831
slli a7, a7, 1 # 74: f07711
s8i a7, a12, 139 # 77: 724c8b
.Lbr004: l32i a8, a15, 128 /* [arg0+0x80] */ # 7a: 822f20
addi a12, a12, 12 # 7d: cbcc
blt a14, a8, .Lbr001 # 7f: 872eb5
movi a2, 132 /* 0x00000084 */ # 82: 22a084
add a2, a15, a2 /* arg0+0x84 */ # 85: 2a2f
call0 ieee80211_get_ratetable # 87: 01e1ffc0
# 8b: 0000
l32i a0, sp, 0 /* [(local0)] */ # 8d: 0801
l32i a12, sp, 4 /* [(local1)] */ # 8f: c811
l32i a13, sp, 8 /* [(local2)] */ # 91: d821
s32i a2, a15, 0x150 /* a2 -> [arg0+0x150] */ # 93: 226f54
l32i a14, sp, 12 /* [(local3)] */ # 96: e831
l32i a15, sp, 16 /* [(local4)] */ # 98: f841
addi sp, sp, 32 /* (top of frame) */ # 9a: 12c120
ret # 9d: 0df0
.literal_position # a0: 00000000
# a4: 00000000
# a8: 00000000
# ac: 00000000
# b0: 00000000
# b4: 00000000
# Function @ .irom0.text+0xb8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ieee80211_ifattach
.type ieee80211_ifattach, @function
ieee80211_ifattach:
addi sp, sp, -16 /* (local0) */ # b8: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # bb: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # bd: 0901
mov a12, a2 /* arg0 */ # bf: cd02
call0 .Lfunc001 # c1: c5f4ff
mov a2, a12 /* arg0 */ # c4: 2d0c
movi a0, 100 /* 0x00000064 */ # c6: 02a064
s16i a0, a12, 40 /* 0x0064 -> [arg0+0x28] */ # c9: 025c14
call0 ieee80211_crypto_attach # cc: 01f6ffc0
# d0: 0000
mov a2, a12 /* arg0 */ # d2: 2d0c
call0 ieee80211_proto_attach # d4: 01f5ffc0
# d8: 0000
movi a3, 0 /* 0x00000000 */ # da: 0c03
addmi a4, a12, 1280 /* arg0+0x500 */ # dc: 42dc05
l32i a2, a4, 28 /* [arg0+0x51c] */ # df: 2874
s32i a3, a4, 12 /* 0x00000000 -> [arg0+0x50c] */ # e1: 3934
bnei a2, 3, .Lbr005 # e3: 663207
mov a2, a12 /* arg0 */ # e6: 2d0c
call0 ieee80211_ht_attach # e8: 01f1ffc0
# ec: 0000
.Lbr005: movi a2, g_ic # ee: 21ecff
call0 chm_init # f1: 01efffc0
# f5: 0000
mov a2, a12 /* arg0 */ # f7: 2d0c
call0 ieee80211_scan_attach # f9: 01eeffc0
# fd: 0000
l32i a12, sp, 4 /* [(local1)] */ # ff: c811
l32i a0, sp, 0 /* [(local0)] */ # 101: 0801
addi sp, sp, 16 /* (top of frame) */ # 103: 12c110
ret # 106: 0df0
.literal_position # 108: b4090000
# 10c: b3090000
# 110: 99f6ffff
# 114: 30f6ffff
# 118: 00000000
# 11c: 00000000
# 120: 00000000
# Function @ .irom0.text+0x124
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_mhz2ieee
.type ieee80211_mhz2ieee, @function
ieee80211_mhz2ieee:
movi a6, 0x000009b3 # 124: 61faff
movi a7, 0xfffff699 # 127: 71faff
addi sp, sp, -16 /* (local0) */ # 12a: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 12d: 0901
movi a0, 0x000009b4 # 12f: 01f6ff
bbci a3, 7, .Lbr006 # 132: 776312
beq a2, a0, .Lbr010 # 135: 07123d
bltu a6, a2, .Lbr009 # 138: 273628
add a2, a2, a7 /* arg0+0xfffff699 */ # 13b: 7a22
movi a3, 5 /* 0x00000005 */ # 13d: 0c53
call0 __divsi3 # 13f: 01f6ffc0
# 143: 0000
j .Lbr008 # 145: 060500
.Lbr006: beq a2, a0, .Lbr010 # 148: 07122a
bltu a6, a2, .Lbr007 # 14b: 27360c
add a2, a2, a7 /* arg0+0xfffff699 */ # 14e: 7a22
movi a3, 5 /* 0x00000005 */ # 150: 0c53
call0 __divsi3 # 152: 01f2ffc0
# 156: 0000
j .Lbr008 # 158: 460000
.Lbr007: movi a2, -1 /* 0xffffffff */ # 15b: 7cf2
.Lbr008: l32i a0, sp, 0 /* [(local0)] */ # 15d: 0801
addi sp, sp, 16 /* (top of frame) */ # 15f: 12c110
ret # 162: 0df0
.Lbr009: movi a0, 0xfffff630 # 164: 01ecff
movi a3, 20 /* 0x00000014 */ # 167: 1c43
add a2, a2, a0 /* arg0+0xfffff630 */ # 169: 0a22
call0 __udivsi3 # 16b: 01edffc0
# 16f: 0000
addi a2, a2, 15 # 171: fb22
j .Lbr008 # 173: 86f9ff
.Lbr010: movi a2, 14 /* 0x0000000e */ # 176: 0ce2
j .Lbr008 # 178: 46f8ff
.literal_position # 17c: ffff0000
# Function @ .irom0.text+0x180
.balign 4
.global ieee80211_chan2ieee
.type ieee80211_chan2ieee, @function
ieee80211_chan2ieee:
bnez a2, .Lbr011 # 180: cc22
movi a2, 0 /* 0x00000000 */ # 182: 0c02
ret /* 0x00000000 */ # 184: 0df0
.Lbr011: movi a5, 0x0000ffff # 186: 51fdff
beq a2, a5, .Lbr012 # 189: 571204
l8ui a2, a2, 6 /* [arg0+0x6] */ # 18c: 220206
ret /* [arg0+0x6] */ # 18f: 0df0
.Lbr012: mov a2, a5 /* 0x0000ffff */ # 191: 2d05
ret /* 0x0000ffff */ # 193: 0df0
.literal_position # 198: 67090000
# 19c: a4080000
# 1a0: 88130000
# 1a4: b4090000
# Function @ .irom0.text+0x1a8
.balign 4
.global ieee80211_ieee2mhz
.type ieee80211_ieee2mhz, @function
ieee80211_ieee2mhz:
movi a7, 14 /* 0x0000000e */ # 1a8: 0ce7
movi a8, 13 /* 0x0000000d */ # 1aa: 0cd8
movi a6, 0x00000967 # 1ac: 61fbff
movi a9, 0x000008a4 # 1af: 91fbff
bbci a3, 7, .Lbr014 # 1b2: 77630d
beq a2, a7, .Lbr016 # 1b5: 77121f
bgeu a8, a2, .Lbr015 # 1b8: 27b815
.Lbr013: addx4 a2, a2, a2 # 1bb: 2022a0
addx4 a2, a2, a9 # 1be: 9022a0
ret # 1c1: 0df0
.Lbr014: beq a2, a7, .Lbr016 # 1c3: 771211
bgeu a8, a2, .Lbr015 # 1c6: 27b807
movi a3, 26 /* 0x0000001a */ # 1c9: 1ca3
bgeu a3, a2, .Lbr013 # 1cb: 27b3ec
movi a6, 0x00001388 # 1ce: 61f4ff
.Lbr015: addx4 a2, a2, a2 # 1d1: 2022a0
add a2, a2, a6 # 1d4: 6a22
ret # 1d6: 0df0
.Lbr016: movi a2, 0x000009b4 # 1d8: 21f3ff
ret /* 0x000009b4 */ # 1db: 0df0
.balign 4
# Function @ .irom0.text+0x1e0
.balign 4
.global ieee80211_find_channel
.type ieee80211_find_channel, @function
ieee80211_find_channel:
l32i a6, a2, 128 /* [arg0+0x80] */ # 1e0: 622220
blti a6, 1, .Lbr019 # 1e3: a6161d
addx2 a7, a6, a6 # 1e6: 607690
addx4 a7, a7, a2 # 1e9: 2077a0
.Lbr017: l16ui a8, a2, 136 # 1ec: 821244
l32i a9, a2, 132 # 1ef: 922221
bne a3, a8, .Lbr018 # 1f2: 879309
bnone a9, a4, .Lbr018 # 1f5: 470906
movi a10, 132 /* 0x00000084 */ # 1f8: a2a084
add a2, a2, a10 # 1fb: aa22
ret # 1fd: 0df0
.Lbr018: addi a2, a2, 12 # 1ff: cb22
bne a2, a7, .Lbr017 # 201: 7792e7
.Lbr019: movi a2, 0 /* 0x00000000 */ # 204: 0c02
ret /* 0x00000000 */ # 206: 0df0
# Function @ .irom0.text+0x208
.balign 4
.global ieee80211_find_channel_byieee
.type ieee80211_find_channel_byieee, @function
ieee80211_find_channel_byieee:
l32i a6, a2, 128 /* [arg0+0x80] */ # 208: 622220
blti a6, 1, .Lbr022 # 20b: a6161d
addx2 a7, a6, a6 # 20e: 607690
addx4 a7, a7, a2 # 211: 2077a0
.Lbr020: l8ui a8, a2, 138 # 214: 82028a
l32i a9, a2, 132 # 217: 922221
bne a3, a8, .Lbr021 # 21a: 879309
bnone a9, a4, .Lbr021 # 21d: 470906
movi a10, 132 /* 0x00000084 */ # 220: a2a084
add a2, a2, a10 # 223: aa22
ret # 225: 0df0
.Lbr021: addi a2, a2, 12 # 227: cb22
bne a2, a7, .Lbr020 # 229: 7792e7
.Lbr022: movi a2, 0 /* 0x00000000 */ # 22c: 0c02
ret /* 0x00000000 */ # 22e: 0df0
.literal_position # 230: 00000000
# 234: 10000000
# 238: 00000000
# 23c: 14000000
# 240: 00000000
# 244: 00000000
# 248: 00000000
# 24c: 34000000
# 250: 3c000000
# 254: 00000000
# 258: 40000000
# 25c: 00000000
# 260: 14000000
# 264: 34000000
# 268: 08000000
# 26c: 48000000
# 270: 00000000
# 274: 00000000
# 278: 00000000
# 27c: 00000000
# 280: 00000000
# 284: 00000000
# 288: 00000000
# 28c: 00000000
# 290: 00000000
# 294: 00000000
# 298: 00000000
# 29c: 00000000
# 2a0: 00000000
# 2a4: 00000000
# Function @ .irom0.text+0x2a8
# Local variables/stack:
# (local0): word[4] @ -0x20
# (local1): word @ -0x10
# (local2): word[3] @ -0xc
.balign 4
.global wifi_mode_set
.type wifi_mode_set, @function
wifi_mode_set:
addi sp, sp, -32 /* (local0) */ # 2a8: 12c1e0
s32i a12, sp, 20 /* a12 -> [(local2)] */ # 2ab: c951
s32i a0, sp, 16 /* a0 -> [(local1)] */ # 2ad: 0941
mov a12, a2 /* arg0 */ # 2af: cd02
movi a2, .Lstr001 # 2b1: 21dfff
call0 printf # 2b4: 01efffc0
# 2b8: 0000
beqz a12, .Lbr026 # 2ba: 164c0d
beqi a12, 1, .Lbr023 # 2bd: 261c08
beqi a12, 2, .Lbr025 # 2c0: 262c72
addi a0, a12, -3 /* arg0-0x3 */ # 2c3: 02ccfd
bnez a0, .Lbr027 # 2c6: 56100d
.Lbr023: movi a2, .Label001 # 2c9: 21daff
call0 printf # 2cc: 01eaffc0
# 2d0: 0000
movi a2, info # 2d2: 21d9ff
l8ui a7, a2, 34 /* [info+0x22] */ # 2d5: 720222
l8ui a6, a2, 33 /* [info+0x21] */ # 2d8: 620221
l8ui a5, a2, 32 /* [info+0x20] */ # 2db: 520220
l8ui a4, a2, 31 /* [info+0x1f] */ # 2de: 42021f
l8ui a3, a2, 30 /* [info+0x1e] */ # 2e1: 32021e
l8ui a2, a2, 35 /* [info+0x23] */ # 2e4: 220223
s32i a2, sp, 0 /* [info+0x23] -> [(local0)] */ # 2e7: 2901
movi a2, .Lstr003 # 2e9: 21d4ff
call0 printf # 2ec: 01e3ffc0
# 2f0: 0000
movi a3, g_ic # 2f2: 31d3ff
l32i a3, a3, 16 /* [.Ldata001] */ # 2f5: 3843
bnez a3, .Lbr024 # 2f7: ecf3
movi a2, 648 /* 0x00000288 */ # 2f9: 22a288
call0 zalloc # 2fc: 01e0ffc0
# 300: 0000
movi a5, g_ic # 302: 51d0ff
movi a4, 0 /* 0x00000000 */ # 305: 0c04
s32i a2, a5, 16 /* a2 -> [.Ldata001] */ # 307: 2945
s32i a4, a2, 176 # 309: 42622c
s32i a4, a2, 60 # 30c: 49f2
movi a2, 272 /* 0x00000110 */ # 30e: 22a110
call0 zalloc # 311: 01dbffc0
# 315: 0000
movi a6, g_ic # 317: 61ccff
movi a3, .Label002 # 31a: 31ccff
l32i a6, a6, 16 /* [.Ldata001] */ # 31d: 6846
movi a4, 6 /* 0x00000006 */ # 31f: 0c64
s32i a2, a6, 140 /* a2 -> [[.Ldata001]+0x8c] */ # 321: 226623
call0 memcpy # 324: 01d8ffc0
# 328: 0000
.Lbr024: beqi a12, 1, .Lbr027 # 32a: 261c6d
movi a2, .Label003 # 32d: 21c8ff
call0 printf # 330: 01d6ffc0
# 334: 0000
.Lbr025: movi a12, g_ic # 336: c1c7ff
movi a2, .Lstr004 # 339: 21c7ff
call0 printf # 33c: 01d4ffc0
# 340: 0000
movi a8, info # 342: 81c6ff
movi a2, .Lstr003 # 345: 21c6ff
l8ui a7, a8, 28 /* [info+0x1c] */ # 348: 72081c
l8ui a6, a8, 27 /* [info+0x1b] */ # 34b: 62081b
l8ui a5, a8, 26 /* [info+0x1a] */ # 34e: 52081a
l8ui a4, a8, 25 /* [info+0x19] */ # 351: 420819
l8ui a3, a8, 24 /* [info+0x18] */ # 354: 320818
l8ui a8, a8, 29 /* [info+0x1d] */ # 357: 82081d
s32i a8, sp, 0 /* [info+0x1d] -> [(local0)] */ # 35a: 8901
call0 printf # 35c: 01cdffc0
# 360: 0000
l32i a9, a12, 20 /* [.Ldata002] */ # 362: 985c
bnez a9, .Lbr027 # 364: fc39
movi a2, 648 /* 0x00000288 */ # 366: 22a288
call0 zalloc # 369: 01caffc0
# 36d: 0000
s32i a2, a12, 20 /* a2 -> [.Ldata002] */ # 36f: 295c
movi a10, 1 /* 0x00000001 */ # 371: 0c1a
s32i a10, a2, 176 # 373: a2622c
movi a2, 272 /* 0x00000110 */ # 376: 22a110
call0 zalloc # 379: 01c7ffc0
# 37d: 0000
movi a3, .Label002 # 37f: 31b9ff
l32i a11, a12, 20 /* [.Ldata002] */ # 382: b85c
movi a4, 6 /* 0x00000006 */ # 384: 0c64
s32i a2, a11, 144 /* a2 -> [[.Ldata002]+0x90] */ # 386: 226b24
call0 memcpy # 389: 01c4ffc0
# 38d: 0000
j .Lbr027 # 38f: 060200
.Lbr026: movi a2, .Lstr002 # 392: 21b5ff
call0 printf # 395: 01c2ffc0
# 399: 0000
.Lbr027: movi a2, .Label004 # 39b: 21b4ff
call0 printf # 39e: 01c1ffc0
# 3a2: 0000
movi a2, 1 /* 0x00000001 */ # 3a4: 0c12
l32i a12, sp, 20 /* [(local2)] */ # 3a6: c851
l32i a0, sp, 16 /* [(local1)] */ # 3a8: 0841
addi sp, sp, 32 /* (top of frame) */ # 3aa: 12c120
ret /* 0x00000001 */ # 3ad: 0df0
.section .rodata, "a", @progbits
.global ieee80211_opcap
.type ieee80211_opcap, @object
ieee80211_opcap:
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00
.section .rodata.str1.4, "MSa", @progbits, 1
.Lstr001: .asciz "mode : " # 0: 6d6f6465
# 4: 203a2000
.Lstr002: .asciz "null" # 8: 6e756c6c
# c: 00
.balign 4
.Label001: .word 0x00617473 # 10: 73746100
.Lstr003: .asciz "(%02x:%02x:%02x:%02x:%02x:%02x)" # 14: 28253032
# 18: 783a2530
# 1c: 32783a25
# 20: 3032783a
# 24: 25303278
# 28: 3a253032
# 2c: 783a2530
# 30: 32782900
.Label002: .byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00
.Label003: .word 0x00202b20 # 3c: 202b2000
.Lstr004: .asciz "softAP" # 40: 736f6674
# 44: 415000
.balign 4
.Label004: .byte 0x0a, 0x00

View file

@ -0,0 +1,206 @@
.section .data, "aw", @progbits
.Lrel001: .word .irom0.text # 0: 00000000
.Lrel002: .word .irom0.text # 4: 00000000
.Lrel003: .word .irom0.text # 8: 00000000
.Lrel004: .word .irom0.text # c: 00000000
.Lrel005: .word .Lfunc002 # 10: bc000000
.Lrel006: .word .Lfunc002 # 14: bc000000
.Lrel007: .word .Lfunc002 # 18: bc000000
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.Lfunc001: movi a2, -1 /* 0xffffffff */ # 0: 7cf2
ret /* 0xffffffff */ # 2: 0df0
.literal_position # 4: 0c000000
# 8: 00000000
# c: 08000000
# Function @ .irom0.text+0x10
.balign 4
.global ieee80211_send_action_register
.type ieee80211_send_action_register, @function
ieee80211_send_action_register:
beqi a2, 3, .Lbr003 # 10: 26321a
beqi a2, 7, .Lbr004 # 13: 267220
movi a5, 127 /* 0x0000007f */ # 16: 52a07f
bne a2, a5, .Lbr002 # 19: 57920d
bnez a3, .Lbr002 # 1c: cca3
movi a2, .Lrel004 # 1e: 21f9ff
.Lbr001: addx4 a6, a3, a2 # 21: 2063a0
s32i a4, a6, 0 # 24: 4906
movi a2, 0 /* 0x00000000 */ # 26: 0c02
ret /* 0x00000000 */ # 28: 0df0
.Lbr002: movi a2, -1 /* 0xffffffff */ # 2a: 7cf2
ret /* 0xffffffff */ # 2c: 0df0
.Lbr003: bgeui a3, 2, .Lbr002 # 2e: f623f8
movi a2, .Lrel001 # 31: 21f5ff
j .Lbr001 # 34: 46faff
.Lbr004: bnez a3, .Lbr002 # 37: 56f3fe
movi a2, .Lrel003 # 3a: 21f4ff
j .Lbr001 # 3d: 06f8ff
.literal_position # 40: 00000000
# Function @ .irom0.text+0x44
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_send_action_unregister
.type ieee80211_send_action_unregister, @function
ieee80211_send_action_unregister:
movi a4, .Lfunc001 # 44: 41ffff
addi sp, sp, -16 /* (local0) */ # 47: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 4a: 0901
call0 ieee80211_send_action_register # 4c: 050000
l32i a0, sp, 0 /* [(local0)] */ # 4f: 0801
addi sp, sp, 16 /* (top of frame) */ # 51: 12c110
ret # 54: 0df0
.literal_position # 58: 00000000
# 5c: 0c000000
# 60: 08000000
# 64: 00000000
# Function @ .irom0.text+0x68
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_send_action
.type ieee80211_send_action, @function
ieee80211_send_action:
addi sp, sp, -16 /* (local0) */ # 68: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 6b: 0901
movi a0, .Lfunc001 # 6d: 01faff
beqi a3, 3, .Lbr005 # 70: 263315
beqi a3, 7, .Lbr009 # 73: 267326
movi a6, 127 /* 0x0000007f */ # 76: 62a07f
bne a3, a6, .Lbr006 # 79: 67930f
bnez a4, .Lbr008 # 7c: dc84
movi a7, .Lrel004 # 7e: 71f7ff
addx4 a7, a4, a7 # 81: 7074a0
l32i a7, a7, 0 # 84: 7807
j .Lbr007 # 86: 060100
.Lbr005: bltui a4, 2, .Lbr011 # 89: b62422
.Lbr006: mov a7, a0 /* .Lfunc001 */ # 8c: 7d00
.Lbr007: callx0 a7 # 8e: c00700
l32i a0, sp, 0 /* [(local0)] */ # 91: 0801
addi sp, sp, 16 /* (top of frame) */ # 93: 12c110
ret # 96: 0df0
.Lbr008: mov a7, a0 /* .Lfunc001 */ # 98: 7d00
j .Lbr007 # 9a: 06fcff
.Lbr009: bnez a4, .Lbr010 # 9d: cc94
movi a7, .Lrel003 # 9f: 71f0ff
addx4 a7, a4, a7 # a2: 7074a0
l32i a7, a7, 0 # a5: 7807
j .Lbr007 # a7: c6f8ff
.Lbr010: mov a7, a0 /* .Lfunc001 */ # aa: 7d00
j .Lbr007 # ac: 86f7ff
.Lbr011: movi a7, .Lrel001 # af: 71edff
addx4 a7, a4, a7 # b2: 7074a0
l32i a7, a7, 0 # b5: 7807
j .Lbr007 # b7: c6f4ff
.balign 4
# Function @ .irom0.text+0xbc
.balign 4
.Lfunc002: movi a2, -1 /* 0xffffffff */ # bc: 7cf2
ret /* 0xffffffff */ # be: 0df0
.literal_position # c0: 18000000
# c4: 10000000
# c8: 14000000
# Function @ .irom0.text+0xcc
.balign 4
.global ieee80211_recv_action_register
.type ieee80211_recv_action_register, @function
ieee80211_recv_action_register:
beqi a2, 3, .Lbr014 # cc: 26321a
beqi a2, 7, .Lbr015 # cf: 267220
movi a5, 127 /* 0x0000007f */ # d2: 52a07f
bne a2, a5, .Lbr013 # d5: 57920d
bnez a3, .Lbr013 # d8: cca3
movi a2, .Lrel007 # da: 21f9ff
.Lbr012: addx4 a6, a3, a2 # dd: 2063a0
s32i a4, a6, 0 # e0: 4906
movi a2, 0 /* 0x00000000 */ # e2: 0c02
ret /* 0x00000000 */ # e4: 0df0
.Lbr013: movi a2, -1 /* 0xffffffff */ # e6: 7cf2
ret /* 0xffffffff */ # e8: 0df0
.Lbr014: bnez a3, .Lbr013 # ea: 5683ff
movi a2, .Lrel005 # ed: 21f5ff
j .Lbr012 # f0: 46faff
.Lbr015: bnez a3, .Lbr013 # f3: 56f3fe
movi a2, .Lrel006 # f6: 21f4ff
j .Lbr012 # f9: 06f8ff
.literal_position # fc: bc000000
# Function @ .irom0.text+0x100
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_recv_action_unregister
.type ieee80211_recv_action_unregister, @function
ieee80211_recv_action_unregister:
movi a4, .Lfunc002 # 100: 41ffff
addi sp, sp, -16 /* (local0) */ # 103: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 106: 0901
call0 ieee80211_recv_action_register # 108: 050000
l32i a0, sp, 0 /* [(local0)] */ # 10b: 0801
addi sp, sp, 16 /* (top of frame) */ # 10d: 12c110
ret # 110: 0df0
.literal_position # 114: bc000000
# 118: 18000000
# 11c: 14000000
# 120: 10000000
# Function @ .irom0.text+0x124
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_recv_action
.type ieee80211_recv_action, @function
ieee80211_recv_action:
addi sp, sp, -16 /* (local0) */ # 124: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 127: 0901
l8ui a0, a4, 0 /* [arg2] */ # 129: 020400
movi a8, .Lfunc002 # 12c: 81faff
beqi a0, 3, .Lbr016 # 12f: 26301a
beqi a0, 7, .Lbr020 # 132: 26702b
movi a6, 127 /* 0x0000007f */ # 135: 62a07f
bne a0, a6, .Lbr017 # 138: 679016
l8ui a0, a4, 1 /* [arg2+0x1] */ # 13b: 020401
mov a7, a8 /* .Lfunc002 */ # 13e: 7d08
bnez a0, .Lbr019 # 140: dca0
movi a7, .Lrel007 # 142: 71f5ff
addx4 a7, a0, a7 # 145: 7070a0
l32i a7, a7, 0 # 148: 7807
j .Lbr018 # 14a: 860100
.Lbr016: l8ui a0, a4, 1 /* [arg2+0x1] */ # 14d: 020401
beqz a0, .Lbr022 # 150: ac20
.Lbr017: mov a7, a8 /* .Lfunc002 */ # 152: 7d08
.Lbr018: callx0 a7 # 154: c00700
l32i a0, sp, 0 /* [(local0)] */ # 157: 0801
addi sp, sp, 16 /* (top of frame) */ # 159: 12c110
ret # 15c: 0df0
.Lbr019: j .Lbr018 # 15e: 86fcff
.Lbr020: l8ui a0, a4, 1 /* [arg2+0x1] */ # 161: 020401
mov a7, a8 /* .Lfunc002 */ # 164: 7d08
bnez a0, .Lbr021 # 166: cc90
movi a7, .Lrel006 # 168: 71edff
addx4 a7, a0, a7 # 16b: 7070a0
l32i a7, a7, 0 # 16e: 7807
j .Lbr018 # 170: 06f8ff
.Lbr021: j .Lbr018 # 173: 46f7ff
.Lbr022: movi a7, .Lrel005 # 176: 71eaff
addx4 a7, a0, a7 # 179: 7070a0
l32i a7, a7, 0 # 17c: 7807
j .Lbr018 # 17e: 86f4ff

View file

@ -0,0 +1,115 @@
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.global ieee80211_crypto_attach
.type ieee80211_crypto_attach, @function
ieee80211_crypto_attach:
ret /* arg0 */ # 0: 0df0
.balign 4
# Function @ .irom0.text+0x4
.balign 4
.global ieee80211_crypto_available
.type ieee80211_crypto_available, @function
ieee80211_crypto_available:
movi a2, 0 /* 0x00000000 */ # 4: 0c02
ret /* 0x00000000 */ # 6: 0df0
# Function @ .irom0.text+0x8
.balign 4
.global ieee80211_crypto_setkey
.type ieee80211_crypto_setkey, @function
ieee80211_crypto_setkey:
movi a2, 0 /* 0x00000000 */ # 8: 0c02
ret /* 0x00000000 */ # a: 0df0
.literal_position # c: 00000000
# Function @ .irom0.text+0x10
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ieee80211_crypto_encap
.type ieee80211_crypto_encap, @function
ieee80211_crypto_encap:
addi sp, sp, -16 /* (local0) */ # 10: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 13: 0911
l32i a4, a3, 32 /* [arg1+0x20] */ # 15: 4883
l32i a0, a2, 136 /* [arg0+0x88] */ # 17: 022222
l32i a4, a4, 0 /* [[arg1+0x20]] */ # 1a: 4804
movi a2, g_ic # 1c: 21fcff
bbci a4, 7, .Lbr003 # 1f: 776434
l8ui a0, a0, 233 /* [[arg0+0x88]+0xe9] */ # 22: 0200e9
bltui a0, 2, .Lbr001 # 25: b62004
addi a6, a0, -1 /* [[arg0+0x88]+0xe9]-0x1 */ # 28: 0b60
j .Lbr002 # 2a: 460000
.Lbr001: mov a6, a0 /* [[arg0+0x88]+0xe9] */ # 2d: 6d00
.Lbr002: addx4 a2, a0, a2 # 2f: 2020a0
l32i a2, a2, 0x190 # 32: 222264
slli a4, a6, 6 # 35: a04611
l32i a0, a2, 152 # 38: 022226
extui a4, a4, 0, 8 # 3b: 404074
l32i a0, a0, 16 # 3e: 0840
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 40: 2901
callx0 a0 # 42: c00000
l32i a4, sp, 0 /* [(local0)] */ # 45: 4801
l32i a3, sp, 4 /* [(local1)] */ # 47: 3811
movi a0, 0 /* 0x00000000 */ # 49: 0c00
addi sp, sp, 16 /* (top of frame) */ # 4b: 12c110
movnez a0, a4, a2 # 4e: 200493
mov a2, a0 # 51: 2d00
mov a0, a3 /* [(local1)] */ # 53: 0d03
ret # 55: 0df0
.Lbr003: movi a6, 0 /* 0x00000000 */ # 57: 0c06
l8ui a0, a0, 232 /* [[arg0+0x88]+0xe8] */ # 59: 0200e8
j .Lbr002 # 5c: c6f3ff
.literal_position # 60: 00000000
# Function @ .irom0.text+0x64
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ieee80211_crypto_decap
.type ieee80211_crypto_decap, @function
ieee80211_crypto_decap:
addi sp, sp, -16 /* (local0) */ # 64: 12c1f0
l16ui a5, a3, 22 /* [arg1+0x16] */ # 67: 52130b
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 6a: 0911
l16ui a0, a3, 20 /* [arg1+0x14] */ # 6c: 02130a
movi a6, g_ic # 6f: 61fcff
add a0, a0, a5 # 72: 5a00
bltui a0, 32, .Lbr005 # 74: b6c020
l32i a0, a3, 4 /* [arg1+0x4] */ # 77: 0813
l32i a0, a0, 4 /* [[arg1+0x4]+0x4] */ # 79: 0810
l8ui a7, a0, 4 /* [[[arg1+0x4]+0x4]+0x4] */ # 7b: 720004
add a0, a4, a0 # 7e: 0a04
bbci a7, 0, .Lbr008 # 80: 076731
l8ui a0, a0, 3 # 83: 020003
extui a0, a0, 6, 2 # 86: 000614
addi a0, a0, -1 # 89: 0b00
extui a0, a0, 0, 8 # 8b: 000074
.Lbr004: addx4 a2, a0, a6 # 8e: 6020a0
l32i a2, a2, 0x190 # 91: 222264
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 94: 2901
bnez a2, .Lbr006 # 96: cc32
.Lbr005: movi a2, 0 /* 0x00000000 */ # 98: 0c02
j .Lbr007 # 9a: 060400
.Lbr006: l32i a0, a2, 152 # 9d: 022226
l32i a0, a0, 20 # a0: 0850
callx0 a0 # a2: c00000
mov a4, a2 # a5: 4d02
l32i a3, sp, 0 /* [(local0)] */ # a7: 3801
movi a2, 0 /* 0x00000000 */ # a9: 0c02
movnez a2, a3, a4 # ab: 402393
.Lbr007: l32i a0, sp, 4 /* [(local1)] */ # ae: 0811
addi sp, sp, 16 /* (top of frame) */ # b0: 12c110
ret # b3: 0df0
.Lbr008: l32i a0, a2, 136 /* [arg0+0x88] */ # b5: 022222
l8ui a0, a0, 232 /* [[arg0+0x88]+0xe8] */ # b8: 0200e8
j .Lbr004 # bb: c6f3ff

View file

@ -0,0 +1,142 @@
.section .data, "aw", @progbits
.global ccmp
.type ccmp, @object
ccmp: .word 0x00000003 # 0: 03000000
.Ldata001: .word 0x00000008 # 4: 08000000
# NOTE: The following is apparently unreferenced code/data
.word 0x00000008 # 8: 08000000
.word 0x00000000 # c: 00000000
.Lrel001: .word .Lfunc001 # 10: 04000000
.Lrel002: .word .Lfunc002 # 14: 80000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
.balign 4
.Lfunc001: ssai 8 # 4: 004840
l32i a5, a2, 144 /* [arg0+0x90] */ # 7: 522224
l16ui a6, a3, 22 /* [arg1+0x16] */ # a: 62130b
movi a7, ccmp # d: 71fcff
l32i a9, a3, 4 /* [arg1+0x4] */ # 10: 9813
l32i a10, a7, 4 /* [.Ldata001] */ # 12: a817
l32i a7, a7, 4 /* [.Ldata001] */ # 14: 7817
l32i a8, a9, 4 /* [[arg1+0x4]+0x4] */ # 16: 8819
add a6, a6, a7 # 18: 7a66
sub a8, a8, a10 # 1a: a088c0
addi a7, a5, 1 /* [arg0+0x90]+0x1 */ # 1d: 1b75
s32i a8, a9, 4 /* a8 -> [[arg1+0x4]+0x4] */ # 1f: 8919
s16i a6, a3, 22 /* a6 -> [arg1+0x16] */ # 21: 62530b
movi a9, 32 /* 0x00000020 */ # 24: 2c09
or a11, a4, a9 # 26: 90b420
s32i a7, a2, 144 /* [arg0+0x90]+0x1 -> [arg0+0x90] */ # 29: 726224
l32i a3, a2, 148 /* [arg0+0x94] */ # 2c: 322225
bgeu a7, a5, .Lbr001 # 2f: 57b701
addi a3, a3, 1 /* [arg0+0x94]+0x1 */ # 32: 1b33
.Lbr001: movi a5, 0 /* 0x00000000 */ # 34: 0c05
s32i a3, a2, 148 /* a3 -> [arg0+0x94] */ # 36: 326225
s8i a7, a8, 0 # 39: 724800
l32i a6, a2, 148 /* [arg0+0x94] */ # 3c: 622225
l32i a10, a2, 144 /* [arg0+0x90] */ # 3f: a22224
s8i a5, a8, 2 # 42: 524802
s8i a11, a8, 3 # 45: b24803
src a6, a6, a10 # 48: a06681
s8i a6, a8, 1 # 4b: 624801
l32i a11, a2, 144 /* [arg0+0x90] */ # 4e: b22224
l32i a10, a2, 148 /* [arg0+0x94] */ # 51: a22225
ssai 16 # 54: 104040
src a10, a10, a11 # 57: b0aa81
s8i a10, a8, 4 # 5a: a24804
l32i a6, a2, 144 /* [arg0+0x90] */ # 5d: 622224
l32i a5, a2, 148 /* [arg0+0x94] */ # 60: 522225
ssai 24 # 63: 104840
src a5, a5, a6 # 66: 605581
s8i a5, a8, 5 # 69: 524805
l32i a11, a2, 148 /* [arg0+0x94] */ # 6c: b22225
s8i a11, a8, 6 # 6f: b24806
l32i a10, a2, 148 /* [arg0+0x94] */ # 72: a22225
movi a2, 1 /* 0x00000001 */ # 75: 0c12
srli a10, a10, 8 # 77: a0a841
s8i a10, a8, 7 # 7a: a24807
ret /* 0x00000001 */ # 7d: 0df0
.balign 4
# Function @ .irom0.text+0x80
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.Lfunc002: addi sp, sp, -16 /* (local0) */ # 80: 12c1f0
l32i a8, a3, 4 /* [arg1+0x4] */ # 83: 8813
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 85: 0911
l32i a0, a8, 4 /* [[arg1+0x4]+0x4] */ # 87: 0818
add a7, a4, a0 # 89: 0a74
l8ui a5, a7, 3 # 8b: 520703
movi a9, 140 /* 0x0000008c */ # 8e: 92a08c
extui a5, a5, 5, 1 # 91: 505504
beqz a5, .Lbr006 # 94: 169508
l8ui a5, a7, 6 # 97: 520706
l8ui a11, a7, 7 # 9a: b20707
l8ui a6, a0, 0 /* [[[arg1+0x4]+0x4]] */ # 9d: 620000
slli a11, a11, 8 # a0: 80bb11
and a6, a6, a9 # a3: 906610
or a11, a11, a5 # a6: 50bb20
l8ui a5, a7, 4 # a9: 520704
movi a9, 136 /* 0x00000088 */ # ac: 92a088
slli a5, a5, 16 # af: 005511
bne a6, a9, .Lbr002 # b2: 979611
l8ui a10, a0, 1 /* [[[arg1+0x4]+0x4]+0x1] */ # b5: a20001
extui a10, a10, 0, 2 # b8: a0a014
addi a10, a10, -3 # bb: a2cafd
bnez a10, .Lbr008 # be: 56aa06
l8ui a0, a0, 30 /* [[[arg1+0x4]+0x4]+0x1e] */ # c1: 02001e
j .Lbr009 # c4: c61900
.Lbr002: movi a0, 16 /* 0x00000010 */ # c7: 1c00
.Lbr003: l8ui a9, a7, 0 # c9: 920700
l8ui a10, a7, 5 # cc: a20705
l8ui a6, a7, 1 # cf: 620701
slli a10, a10, 24 # d2: 80aa01
slli a6, a6, 8 # d5: 806611
or a6, a6, a9 # d8: 906620
extui a7, a11, 0, 16 # db: b070f4
addx8 a9, a0, a2 # de: 2090b0
or a5, a5, a6 # e1: 605520
movi a0, 0 /* 0x00000000 */ # e4: 0c00
s32i a9, sp, 0 /* a9 -> [(local0)] */ # e6: 9901
l32i a11, a9, 8 # e8: b829
l32i a9, a9, 12 # ea: 9839
or a10, a10, a5 # ec: 50aa20
bltu a9, a7, .Lbr005 # ef: 773907
bne a9, a7, .Lbr004 # f2: 779902
bltu a11, a10, .Lbr005 # f5: a73b01
.Lbr004: movi a0, 1 /* 0x00000001 */ # f8: 0c10
.Lbr005: bnez a0, .Lbr006 # fa: ec30
l32i a11, sp, 0 /* [(local0)] */ # fc: b801
l16ui a9, a3, 22 /* [arg1+0x16] */ # fe: 92130b
s32i a10, a11, 8 /* a10 -> [[(local0)]+0x8] */ # 101: a92b
s32i a7, a11, 12 /* a7 -> [[(local0)]+0xc] */ # 103: 793b
l32i a11, a2, 152 /* [arg0+0x98] */ # 105: b22226
l32i a5, a8, 4 /* [[arg1+0x4]+0x4] */ # 108: 5818
l32i a0, a11, 4 /* [[arg0+0x98]+0x4] */ # 10a: 081b
l32i a11, a11, 8 /* [[arg0+0x98]+0x8] */ # 10c: b82b
add a6, a4, a0 # 10e: 0a64
add a11, a11, a0 # 110: 0abb
add a5, a5, a6 # 112: 6a55
movi a0, 1 /* 0x00000001 */ # 114: 0c10
s32i a5, a8, 4 /* a5 -> [[arg1+0x4]+0x4] */ # 116: 5918
sub a9, a9, a11 # 118: b099c0
s16i a9, a3, 22 /* a9 -> [arg1+0x16] */ # 11b: 92530b
j .Lbr007 # 11e: 460000
.Lbr006: movi a0, 0 /* 0x00000000 */ # 121: 0c00
.Lbr007: mov a2, a0 # 123: 2d00
l32i a0, sp, 4 /* [(local1)] */ # 125: 0811
addi sp, sp, 16 /* (top of frame) */ # 127: 12c110
ret # 12a: 0df0
.Lbr008: l8ui a0, a0, 24 /* [[[arg1+0x4]+0x4]+0x18] */ # 12c: 020018
.Lbr009: extui a0, a0, 0, 4 # 12f: 000034
j .Lbr003 # 132: c6e4ff

View file

@ -0,0 +1,165 @@
.section .data, "aw", @progbits
.global tkip
.type tkip, @object
tkip: .word 0x00000002 # 0: 02000000
.Ldata001: .word 0x00000008 # 4: 08000000
# NOTE: The following is apparently unreferenced code/data
.word 0x0000000c # 8: 0c000000
.word 0x00000008 # c: 08000000
.Lrel001: .word .Lfunc001 # 10: 08000000
.Lrel002: .word .Lfunc002 # 14: a0000000
.section .bss, "aw", @nobits
.Ldata002: .word 0x00000000 # 0: 00000000
.Ldata003: .word 0x00000000 # 4: 00000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000000
# Function @ .irom0.text+0x8
.balign 4
.Lfunc001: movi a5, g_ic # 8: 51feff
ssai 8 # b: 004840
l32i a5, a5, 28 /* [g_ic+0x1c] */ # e: 5875
movi a11, tkip # 10: b1fdff
bbci a5, 26, .Lbr001 # 13: a77503
movi a2, 0 /* 0x00000000 */ # 16: 0c02
ret /* 0x00000000 */ # 18: 0df0
.Lbr001: l32i a7, a2, 148 /* [arg0+0x94] */ # 1a: 722225
l16ui a10, a3, 22 /* [arg1+0x16] */ # 1d: a2130b
l32i a5, a3, 4 /* [arg1+0x4] */ # 20: 5813
l32i a9, a11, 4 /* [.Ldata001] */ # 22: 981b
l32i a8, a5, 4 /* [[arg1+0x4]+0x4] */ # 24: 8815
l32i a11, a11, 4 /* [.Ldata001] */ # 26: b81b
sub a8, a8, a9 # 28: 9088c0
l32i a9, a2, 144 /* [arg0+0x90] */ # 2b: 922224
add a10, a10, a11 # 2e: baaa
src a7, a7, a9 # 30: 907781
movi a9, 95 /* 0x0000005f */ # 33: 5cf9
s32i a8, a5, 4 /* a8 -> [[arg1+0x4]+0x4] */ # 35: 8915
s16i a10, a3, 22 /* a10 -> [arg1+0x16] */ # 37: a2530b
and a9, a7, a9 # 3a: 909710
movi a10, 32 /* 0x00000020 */ # 3d: 2c0a
or a6, a4, a10 # 3f: a06420
s8i a7, a8, 0 # 42: 724800
or a9, a9, a10 # 45: a09920
s8i a9, a8, 1 # 48: 924801
l32i a5, a2, 144 /* [arg0+0x90] */ # 4b: 522224
s8i a6, a8, 3 # 4e: 624803
s8i a5, a8, 2 # 51: 524802
l32i a4, a2, 144 /* [arg0+0x90] */ # 54: 422224
l32i a3, a2, 148 /* [arg0+0x94] */ # 57: 322225
ssai 16 # 5a: 104040
src a3, a3, a4 # 5d: 403381
s8i a3, a8, 4 # 60: 324804
l32i a11, a2, 144 /* [arg0+0x90] */ # 63: b22224
l32i a10, a2, 148 /* [arg0+0x94] */ # 66: a22225
ssai 24 # 69: 104840
src a10, a10, a11 # 6c: b0aa81
s8i a10, a8, 5 # 6f: a24805
l32i a9, a2, 148 /* [arg0+0x94] */ # 72: 922225
s8i a9, a8, 6 # 75: 924806
l32i a7, a2, 148 /* [arg0+0x94] */ # 78: 722225
srli a7, a7, 8 # 7b: 707841
s8i a7, a8, 7 # 7e: 724807
l32i a6, a2, 144 /* [arg0+0x90] */ # 81: 622224
l32i a3, a2, 148 /* [arg0+0x94] */ # 84: 322225
addi a4, a6, 1 /* [arg0+0x90]+0x1 */ # 87: 1b46
bgeu a4, a6, .Lbr002 # 89: 67b401
addi a3, a3, 1 /* [arg0+0x94]+0x1 */ # 8c: 1b33
.Lbr002: s32i a3, a2, 148 /* a3 -> [arg0+0x94] */ # 8e: 326225
s32i a4, a2, 144 /* [arg0+0x90]+0x1 -> [arg0+0x90] */ # 91: 426224
movi a2, 1 /* 0x00000001 */ # 94: 0c12
ret /* 0x00000001 */ # 96: 0df0
.literal_position # 98: 00000000
# 9c: 00000000
# Function @ .irom0.text+0xa0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.Lfunc002: addi sp, sp, -16 /* (local0) */ # a0: 12c1f0
l32i a8, a3, 4 /* [arg1+0x4] */ # a3: 8813
s32i a0, sp, 4 /* a0 -> [(local1)] */ # a5: 0911
l32i a0, a8, 4 /* [[arg1+0x4]+0x4] */ # a7: 0818
movi a6, g_ic # a9: 61fbff
add a7, a4, a0 # ac: 0a74
l8ui a5, a7, 3 # ae: 520703
l32i a6, a6, 28 /* [g_ic+0x1c] */ # b1: 6876
extui a5, a5, 5, 1 # b3: 505504
beqz a5, .Lbr007 # b6: 169509
extui a6, a6, 26, 1 # b9: 606a05
bnez a6, .Lbr007 # bc: 563609
l8ui a6, a7, 6 # bf: 620706
l8ui a5, a7, 7 # c2: 520707
l8ui a9, a0, 0 /* [[[arg1+0x4]+0x4]] */ # c5: 920000
movi a10, 140 /* 0x0000008c */ # c8: a2a08c
and a9, a9, a10 # cb: a09910
slli a5, a5, 8 # ce: 805511
or a5, a5, a6 # d1: 605520
movi a10, 136 /* 0x00000088 */ # d4: a2a088
l8ui a6, a7, 0 # d7: 620700
bne a9, a10, .Lbr003 # da: a79911
l8ui a11, a0, 1 /* [[[arg1+0x4]+0x4]+0x1] */ # dd: b20001
extui a11, a11, 0, 2 # e0: b0b014
addi a11, a11, -3 # e3: b2cbfd
bnez a11, .Lbr009 # e6: 564b07
l8ui a0, a0, 30 /* [[[arg1+0x4]+0x4]+0x1e] */ # e9: 02001e
j .Lbr010 # ec: 461c00
.Lbr003: movi a0, 16 /* 0x00000010 */ # ef: 1c00
.Lbr004: slli a6, a6, 8 # f1: 806611
l8ui a9, a7, 2 # f4: 920702
l8ui a10, a7, 5 # f7: a20705
l8ui a11, a7, 4 # fa: b20704
slli a10, a10, 24 # fd: 80aa01
slli a11, a11, 16 # 100: 00bb11
extui a7, a5, 0, 16 # 103: 5070f4
or a6, a6, a9 # 106: 906620
or a11, a11, a6 # 109: 60bb20
addx8 a9, a0, a2 # 10c: 2090b0
or a10, a10, a11 # 10f: b0aa20
movi a11, .Ldata002 # 112: b1e2ff
s32i a9, sp, 0 /* a9 -> [(local0)] */ # 115: 9901
s32i a7, a11, 4 /* a7 -> [.Ldata003] */ # 117: 791b
s32i a10, a11, 0 /* a10 -> [.Ldata002] */ # 119: a90b
l32i a11, a9, 8 # 11b: b829
l32i a9, a9, 12 # 11d: 9839
movi a0, 0 /* 0x00000000 */ # 11f: 0c00
bltu a9, a7, .Lbr006 # 121: 773907
bne a9, a7, .Lbr005 # 124: 779902
bltu a11, a10, .Lbr006 # 127: a73b01
.Lbr005: movi a0, 1 /* 0x00000001 */ # 12a: 0c10
.Lbr006: bnez a0, .Lbr007 # 12c: ec30
l32i a0, sp, 0 /* [(local0)] */ # 12e: 0801
l16ui a11, a3, 22 /* [arg1+0x16] */ # 130: b2130b
s32i a10, a0, 8 /* a10 -> [[(local0)]+0x8] */ # 133: a920
s32i a7, a0, 12 /* a7 -> [[(local0)]+0xc] */ # 135: 7930
l32i a0, a2, 152 /* [arg0+0x98] */ # 137: 022226
l32i a6, a8, 4 /* [[arg1+0x4]+0x4] */ # 13a: 6818
l32i a5, a0, 4 /* [[arg0+0x98]+0x4] */ # 13c: 5810
l32i a0, a0, 8 /* [[arg0+0x98]+0x8] */ # 13e: 0820
add a9, a4, a5 # 140: 5a94
add a6, a6, a9 # 142: 9a66
add a0, a0, a5 # 144: 5a00
sub a11, a11, a0 # 146: 00bbc0
s32i a6, a8, 4 /* a6 -> [[arg1+0x4]+0x4] */ # 149: 6918
movi a0, 1 /* 0x00000001 */ # 14b: 0c10
s16i a11, a3, 22 /* a11 -> [arg1+0x16] */ # 14d: b2530b
j .Lbr008 # 150: 460000
.Lbr007: movi a0, 0 /* 0x00000000 */ # 153: 0c00
.Lbr008: mov a2, a0 # 155: 2d00
l32i a0, sp, 4 /* [(local1)] */ # 157: 0811
addi sp, sp, 16 /* (top of frame) */ # 159: 12c110
ret # 15c: 0df0
.Lbr009: l8ui a0, a0, 24 /* [[[arg1+0x4]+0x4]+0x18] */ # 15e: 020018
.Lbr010: extui a0, a0, 0, 4 # 161: 000034
j .Lbr004 # 164: 46e2ff

View file

@ -0,0 +1,73 @@
.section .data, "aw", @progbits
.global wep
.type wep, @object
wep: .word 0x00000001 # 0: 01000000
.Ldata001: .word 0x00000004 # 4: 04000000
# NOTE: The following is apparently unreferenced code/data
.word 0x00000004 # 8: 04000000
.word 0x00000000 # c: 00000000
.Lrel001: .word .Lfunc001 # 10: 04000000
.Lrel002: .word .Lfunc002 # 14: 60000000
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
.balign 4
.Lfunc001: bnez a3, .Lbr001 # 4: cc33
movi a3, 0 /* 0x00000000 */ # 6: 0c03
j .Lbr003 # 8: 461300
.Lbr001: l32i a5, a2, 144 /* [arg0+0x90] */ # b: 522224
l16ui a6, a3, 22 /* [arg1+0x16] */ # e: 62130b
movi a7, wep # 11: 71fbff
l32i a8, a3, 4 /* [arg1+0x4] */ # 14: 8813
l32i a10, a7, 4 /* [.Ldata001] */ # 16: a817
l32i a7, a7, 4 /* [.Ldata001] */ # 18: 7817
l32i a9, a8, 4 /* [[arg1+0x4]+0x4] */ # 1a: 9818
add a6, a6, a7 # 1c: 7a66
sub a9, a9, a10 # 1e: a099c0
l32i a7, a2, 148 /* [arg0+0x94] */ # 21: 722225
s32i a9, a8, 4 /* a9 -> [[arg1+0x4]+0x4] */ # 24: 9918
s16i a6, a3, 22 /* a6 -> [arg1+0x16] */ # 26: 62530b
addi a8, a5, 1 /* [arg0+0x90]+0x1 */ # 29: 1b85
bgeu a8, a5, .Lbr002 # 2b: 57b801
addi a7, a7, 1 /* [arg0+0x94]+0x1 */ # 2e: 1b77
.Lbr002: movi a3, 1 /* 0x00000001 */ # 30: 0c13
s32i a7, a2, 148 /* a7 -> [arg0+0x94] */ # 32: 726225
s32i a8, a2, 144 /* [arg0+0x90]+0x1 -> [arg0+0x90] */ # 35: 826224
ssai 16 # 38: 104040
src a6, a7, a8 # 3b: 806781
s8i a6, a9, 2 # 3e: 624902
l32i a5, a2, 144 /* [arg0+0x90] */ # 41: 522224
l32i a11, a2, 148 /* [arg0+0x94] */ # 44: b22225
ssai 8 # 47: 004840
src a11, a11, a5 # 4a: 50bb81
s8i a11, a9, 1 # 4d: b24901
l32i a10, a2, 144 /* [arg0+0x90] */ # 50: a22224
s8i a10, a9, 0 # 53: a24900
s8i a4, a9, 3 # 56: 424903
.Lbr003: mov a2, a3 # 59: 2d03
ret # 5b: 0df0
.balign 4
# Function @ .irom0.text+0x60
.balign 4
.Lfunc002: l32i a5, a2, 152 /* [arg0+0x98] */ # 60: 522226
l32i a8, a3, 4 /* [arg1+0x4] */ # 63: 8813
l16ui a2, a3, 22 /* [arg1+0x16] */ # 65: 22130b
l32i a7, a8, 4 /* [[arg1+0x4]+0x4] */ # 68: 7818
l32i a6, a5, 4 /* [[arg0+0x98]+0x4] */ # 6a: 6815
l32i a5, a5, 8 /* [[arg0+0x98]+0x8] */ # 6c: 5825
add a9, a4, a6 # 6e: 6a94
add a7, a7, a9 # 70: 9a77
add a5, a5, a6 # 72: 6a55
sub a2, a2, a5 # 74: 5022c0
s32i a7, a8, 4 /* a7 -> [[arg1+0x4]+0x4] */ # 77: 7918
s16i a2, a3, 22 /* a2 -> [arg1+0x16] */ # 79: 22530b
movi a2, 1 /* 0x00000001 */ # 7c: 0c12
ret /* 0x00000001 */ # 7e: 0df0

View file

@ -0,0 +1,44 @@
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global ieee80211_getmgtframe
.type ieee80211_getmgtframe, @function
ieee80211_getmgtframe:
movi a5, -4 /* 0xfffffffc */ # 4: 7cc5
addi sp, sp, -16 /* (local0) */ # 6: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 9: 0911
s32i a12, sp, 8 /* a12 -> [(local2)] */ # b: c921
movi a0, 256 /* 0x00000100 */ # d: 02a100
mov a12, a3 /* arg1 */ # 10: cd03
add a3, a3, a4 # 12: 4a33
addi a3, a3, 3 # 14: 3b33
and a4, a3, a5 # 16: 504310
bgeu a0, a4, .Lbr001 # 19: 47b004
movi a2, 0 /* 0x00000000 */ # 1c: 0c02
j .Lbr003 # 1e: 860700
.Lbr001: movi a3, 4 /* 0x00000004 */ # 21: 0c43
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 23: 2901
movi a5, 65 /* 0x00000041 */ # 25: 4c15
bgeu a4, a5, .Lbr002 # 27: 57b401
movi a3, 5 /* 0x00000005 */ # 2a: 0c53
.Lbr002: movi a2, 0 /* 0x00000000 */ # 2c: 0c02
call0 esf_buf_alloc # 2e: 01f4ffc0
# 32: 0000
beqz a2, .Lbr003 # 34: 8c82
l32i a6, a2, 4 # 36: 6812
l32i a6, a6, 4 # 38: 6816
l32i a7, sp, 0 /* [(local0)] */ # 3a: 7801
add a6, a12, a6 # 3c: 6a6c
s32i a6, a7, 0 /* a6 -> [[(local0)]] */ # 3e: 6907
.Lbr003: l32i a12, sp, 8 /* [(local2)] */ # 40: c821
l32i a0, sp, 4 /* [(local1)] */ # 42: 0811
addi sp, sp, 16 /* (top of frame) */ # 44: 12c110
ret # 47: 0df0

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,248 @@
.section .data, "aw", @progbits
.Ldata001: .byte 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.word 0x00000000 # 14: 00000000
.byte 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00
.byte 0x3a, 0x01, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00
.byte 0xd0, 0x07, 0x00, 0x00, 0x04, 0x01, 0x84, 0x01
.byte 0x02, 0x01, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x7c, 0x15, 0x00, 0x00, 0x04, 0x02, 0x8b, 0x02
.byte 0xdf, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xf8, 0x2a, 0x00, 0x00, 0x04, 0x03, 0x96, 0x03
.byte 0xd5, 0x00, 0x75, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x70, 0x17, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x04
.byte 0x3c, 0x00, 0x3c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x28, 0x23, 0x00, 0x00, 0x00, 0x0f, 0x12, 0x04
.byte 0x3c, 0x00, 0x3c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xe0, 0x2e, 0x00, 0x00, 0x00, 0x0a, 0x18, 0x06
.byte 0x30, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x50, 0x46, 0x00, 0x00, 0x00, 0x0e, 0x24, 0x06
.byte 0x30, 0x00, 0x30, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xc0, 0x5d, 0x00, 0x00, 0x00, 0x09, 0x30, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xa0, 0x8c, 0x00, 0x00, 0x00, 0x0d, 0x48, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0x80, 0xbb, 0x00, 0x00, 0x00, 0x08, 0x60, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00, 0x01, 0x00, 0x00, 0x00
.byte 0xf0, 0xd2, 0x00, 0x00, 0x00, 0x0c, 0x6c, 0x08
.byte 0x2c, 0x00, 0x2c, 0x00
.Label001: .byte 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xe8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00
.byte 0x3a, 0x01, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00
.byte 0xd0, 0x07, 0x00, 0x00, 0x04, 0x01, 0x84, 0x01
.byte 0x02, 0x01, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x7c, 0x15, 0x00, 0x00, 0x04, 0x02, 0x8b, 0x01
.byte 0xdf, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xf8, 0x2a, 0x00, 0x00, 0x04, 0x03, 0x96, 0x01
.byte 0xd5, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .irom0.text+0x4
.balign 4
.global ieee80211_get_11g_ratetable
.type ieee80211_get_11g_ratetable, @function
ieee80211_get_11g_ratetable:
movi a2, .Ldata001 # 4: 21ffff
ret /* .Ldata001 */ # 7: 0df0
.literal_position # c: d4000000
# 10: 00000000
# Function @ .irom0.text+0x14
.balign 4
.global ieee80211_get_ratetable
.type ieee80211_get_ratetable, @function
ieee80211_get_ratetable:
l32i a2, a2, 0 /* [arg0] */ # 14: 2802
movi a3, 192 /* 0x000000c0 */ # 16: 32a0c0
ball a2, a3, .Lbr001 # 19: 37420a
movi a4, 1152 /* 0x00000480 */ # 1c: 42a480
ball a2, a4, .Lbr001 # 1f: 474204
movi a2, .Label001 # 22: 21faff
ret /* .Label001 */ # 25: 0df0
.Lbr001: movi a2, .Ldata001 # 27: 21faff
ret /* .Ldata001 */ # 2a: 0df0
.literal_position # 2c: 00000000
# Function @ .irom0.text+0x30
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ieee80211_phy_init
.type ieee80211_phy_init, @function
ieee80211_phy_init:
addi sp, sp, -16 /* (local0) */ # 30: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 33: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 35: 0901
mov a12, a2 /* arg0 */ # 37: cd02
call0 ieee80211_setup_ratetable # 39: 050000
movi a3, 12 /* 0x0000000c */ # 3c: 0cc3
movi a0, 3 /* 0x00000003 */ # 3e: 0c30
movi a5, 4 /* 0x00000004 */ # 40: 0c45
movi a2, g_ic # 42: 21faff
addi a4, a12, -1 /* arg0-0x1 */ # 45: 0b4c
movi a6, 0 /* 0x00000000 */ # 47: 0c06
l32i a12, sp, 4 /* [(local1)] */ # 49: c811
s8i a6, a2, 125 /* 0x00 -> [g_ic+0x7d] */ # 4b: 62427d
s8i a6, a2, 126 /* 0x00 -> [g_ic+0x7e] */ # 4e: 62427e
s8i a5, a2, 127 /* 0x04 -> [g_ic+0x7f] */ # 51: 52427f
movnez a0, a3, a4 # 54: 400393
s8i a0, a2, 124 /* a0 -> [g_ic+0x7c] */ # 57: 02427c
l32i a0, sp, 0 /* [(local0)] */ # 5a: 0801
addi sp, sp, 16 /* (top of frame) */ # 5c: 12c110
ret /* g_ic */ # 5f: 0df0
.literal_position # 64: 00000000
# Function @ .irom0.text+0x68
.balign 4
.global ieee80211_phy_type_get
.type ieee80211_phy_type_get, @function
ieee80211_phy_type_get:
movi a2, g_ic+0x200 # 68: 21ffff
l32i a2, a2, 0x31c /* [g_ic+0x51c] */ # 6b: 2222c7
movi a3, 1 /* 0x00000001 */ # 6e: 0c13
addi a2, a2, -1 /* [g_ic+0x51c]-0x1 */ # 70: 0b22
movnez a2, a3, a2 # 72: 202393
ret # 75: 0df0
.literal_position # 78: 00000000
# 7c: d4000000
# 80: 00000000
# Function @ .irom0.text+0x84
.balign 4
.global ieee80211_setup_ratetable
.type ieee80211_setup_ratetable, @function
ieee80211_setup_ratetable:
movi a4, .Ldata001 # 84: 41fdff
movi a5, .Label001 # 87: 51fdff
addi a6, a2, -1 /* arg0-0x1 */ # 8a: 0b62
movnez a5, a4, a6 # 8c: 605493
movi a6, g_ic # 8f: 61fcff
l8ui a3, a5, 0 # 92: 320500
s8i a3, a6, 44 /* a3 -> [g_ic+0x2c] */ # 95: 32462c
beqz a3, .Lbr003 # 98: 9c83
movi a2, 0 /* 0x00000000 */ # 9a: 0c02
.Lbr002: add a4, a2, a6 # 9c: 6a42
slli a3, a2, 4 # 9e: c03211
add a3, a5, a3 # a1: 3a35
addi a2, a2, 1 # a3: 1b22
l8ui a3, a3, 30 # a5: 32031e
s8i a3, a4, 45 # a8: 32442d
l8ui a7, a6, 44 /* [g_ic+0x2c] */ # ab: 72062c
extui a2, a2, 0, 8 # ae: 202074
bltu a2, a7, .Lbr002 # b1: 7732e7
.Lbr003: ret # b4: 0df0
.literal_position # b8: 00000000
# bc: 00000000
# c0: 00000000
# Function @ .irom0.text+0xc4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global ieee80211_compute_duration
.type ieee80211_compute_duration, @function
ieee80211_compute_duration:
addi sp, sp, -16 /* (local0) */ # c4: 12c1f0
s32i a0, sp, 8 /* a0 -> [(local2)] */ # c7: 0921
add a0, a4, a2 # c9: 2a04
l8ui a0, a0, 4 # cb: 020004
mov a7, a3 /* arg1 */ # ce: 7d03
slli a0, a0, 4 # d0: c00011
add a0, a2, a0 # d3: 0a02
l32i a3, a0, 24 # d5: 3860
l8ui a2, a0, 20 # d7: 220014
bnez a3, .Lbr004 # da: cc33
movi a2, 0 /* 0x00000000 */ # dc: 0c02
j .Lbr008 # de: 061400
.Lbr004: s32i a7, sp, 4 /* arg1 -> [(local1)] */ # e1: 7911
beqz a2, .Lbr005 # e3: ac52
bnei a2, 1, .Lbr007 # e5: 661246
slli a2, a3, 2 # e8: e02311
movi a3, 1000 /* 0x000003e8 */ # eb: 32a3e8
call0 __udivsi3 # ee: 01f2ffc0
# f2: 0000
mov a3, a2 # f4: 3d02
l32i a2, sp, 4 /* [(local1)] */ # f6: 2811
addx8 a2, a2, a3 # f8: 3022b0
addi a2, a2, 21 # fb: 22c215
call0 __udivsi3 # fe: 01efffc0
# 102: 0000
movi a0, 36 /* 0x00000024 */ # 104: 2c40
addx4 a0, a2, a0 # 106: 0002a0
j .Lbr007 # 109: 860800
.Lbr005: beqz a5, .Lbr009 # 10c: ac95
l8ui a2, a0, 28 # 10e: 22001c
movi a4, 96 /* 0x00000060 */ # 111: 42a060
beqz a2, .Lbr009 # 114: ac12
s32i a4, sp, 0 /* 0x00000060 -> [(local0)] */ # 116: 4901
.Lbr006: l32i a2, sp, 4 /* [(local1)] */ # 118: 2811
movi a4, 1000 /* 0x000003e8 */ # 11a: 42a3e8
slli a2, a2, 3 # 11d: d02211
mull a2, a2, a4 # 120: 402282
call0 __udivsi3 # 123: 01e7ffc0
# 127: 0000
l32i a0, sp, 0 /* [(local0)] */ # 129: 0801
add a0, a0, a2 # 12b: 2a00
addi a0, a0, 10 # 12d: ab00
.Lbr007: extui a2, a0, 0, 16 # 12f: 0020f4
.Lbr008: l32i a0, sp, 8 /* [(local2)] */ # 132: 0821
addi sp, sp, 16 /* (top of frame) */ # 134: 12c110
ret # 137: 0df0
.Lbr009: movi a2, 192 /* 0x000000c0 */ # 139: 22a0c0
s32i a2, sp, 0 /* 0x000000c0 -> [(local0)] */ # 13c: 2901
j .Lbr006 # 13e: 86f5ff
.literal_position # 144: 00000000
# Function @ .irom0.text+0x148
.balign 4
.global ieee80211_dot11Rate_rix
.type ieee80211_dot11Rate_rix, @function
ieee80211_dot11Rate_rix:
movi a6, 0 /* 0x00000000 */ # 148: 0c06
movi a8, .Ldata001 # 14a: 81feff
.Lbr010: slli a7, a6, 4 # 14d: c07611
add a7, a8, a7 # 150: 7a78
l8ui a4, a7, 30 # 152: 42071e
bne a4, a2, .Lbr011 # 155: 279409
mov a2, a6 # 158: 2d06
l8ui a8, a7, 29 # 15a: 82071d
s8i a8, a3, 0 /* a8 -> [arg1] */ # 15d: 824300
ret # 160: 0df0
.Lbr011: addi a6, a6, 1 # 162: 1b66
extui a6, a6, 0, 8 # 164: 606074
bnei a6, 12, .Lbr010 # 167: 66a6e2
movi a2, 255 /* 0x000000ff */ # 16a: 22a0ff
ret /* 0x000000ff */ # 16d: 0df0

View file

@ -0,0 +1,196 @@
.section .irom0.text, "ax", @progbits
# Function @ .irom0.text+0x0
.balign 4
.literal_position
.global ieee80211_psq_init
.type ieee80211_psq_init, @function
ieee80211_psq_init:
movi a6, 0 /* 0x00000000 */ # 0: 0c06
movi a5, 0 /* 0x00000000 */ # 2: 0c05
movi a4, 1 /* 0x00000001 */ # 4: 0c14
.Lbr001: addi a4, a4, -1 # 6: 0b44
add a3, a5, a2 # 8: 2a35
s32i a6, a3, 0 # a: 6903
addi a5, a5, 4 # c: 4b55
bgei a4, 1, .Lbr001 # e: e614f4
movi a4, 10 /* 0x0000000a */ # 11: 0ca4
s32i a4, a2, 4 /* 0x0000000a -> [arg0+0x4] */ # 13: 4912
ret /* arg0 */ # 15: 0df0
.balign 4
# Function @ .irom0.text+0x18
.balign 4
.global ieee80211_psq_cleanup
.type ieee80211_psq_cleanup, @function
ieee80211_psq_cleanup:
ret /* arg0 */ # 18: 0df0
.literal_position # 1c: 00000000
# Function @ .irom0.text+0x20
.balign 4
.global ieee80211_set_tim
.type ieee80211_set_tim, @function
ieee80211_set_tim:
movi a10, 1 /* 0x00000001 */ # 20: 0c1a
l16ui a6, a2, 26 /* [arg0+0x1a] */ # 22: 62120d
movi a8, g_ic+0x152 # 25: 81fdff
extui a7, a6, 0, 3 # 28: 607024
extui a6, a6, 3, 11 # 2b: 6063a4
add a6, a6, a8 # 2e: 8a66
l8ui a5, a6, 128 # 30: 520680
ssr a7 # 33: 000740
sra a4, a5 # 36: 5040b1
extui a4, a4, 0, 1 # 39: 404004
sub a2, a3, a4 # 3c: 4023c0
movnez a2, a10, a2 # 3f: 202a93
beqz a2, .Lbr002 # 42: 9c52
movi a11, -1 /* 0xffffffff */ # 44: 7cfb
ssl a7 # 46: 001740
sll a9, a10 # 49: 009aa1
or a8, a9, a5 # 4c: 508920
xor a9, a9, a11 # 4f: b09930
and a9, a5, a9 # 52: 909510
moveqz a8, a9, a3 # 55: 308983
s8i a8, a6, 128 # 58: 824680
.Lbr002: ret # 5b: 0df0
.literal_position # 60: 00000000
# 64: 00000000
# Function @ .irom0.text+0x68
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ieee80211_pwrsave
.type ieee80211_pwrsave, @function
ieee80211_pwrsave:
mov a6, a2 /* arg0 */ # 68: 6d02
addi sp, sp, -16 /* (local0) */ # 6a: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 6d: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 6f: 0901
l32i a2, a2, 196 /* [arg0+0xc4] */ # 71: 222231
l32i a0, a6, 192 /* [arg0+0xc0] */ # 74: 022630
mov a12, a3 /* arg1 */ # 77: cd03
blt a0, a2, .Lbr003 # 79: 27201e
l32i a3, a6, 200 /* [arg0+0xc8] */ # 7c: 322632
l32i a2, a12, 0 /* [arg1] */ # 7f: 280c
addi a3, a3, 1 /* [arg0+0xc8]+0x1 */ # 81: 1b33
s32i a3, a6, 200 /* [arg0+0xc8]+0x1 -> [arg0+0xc8] */ # 83: 326632
call0 pbuf_free # 86: 01f6ffc0
# 8a: 0000
mov a2, a12 /* arg1 */ # 8c: 2d0c
movi a3, 1 /* 0x00000001 */ # 8e: 0c13
call0 esf_buf_recycle # 90: 01f5ffc0
# 94: 0000
movi a2, 1 /* 0x00000001 */ # 96: 0c12
j .Lbr007 # 98: 060b00
.Lbr003: addi a4, a0, 1 /* [arg0+0xc0]+0x1 */ # 9b: 1b40
movi a7, 0 /* 0x00000000 */ # 9d: 0c07
l32i a5, a6, 212 /* [arg0+0xd4] */ # 9f: 522635
l32i a2, a6, 208 /* [arg0+0xd0] */ # a2: 222634
addi a5, a5, 1 /* [arg0+0xd4]+0x1 */ # a5: 1b55
bnez a2, .Lbr004 # a7: cc42
s32i a3, a6, 204 /* arg1 -> [arg0+0xcc] */ # a9: 326633
j .Lbr005 # ac: 460000
.Lbr004: s32i a3, a2, 28 /* arg1 -> [[arg0+0xd0]+0x1c] */ # af: 3972
.Lbr005: s32i a7, a12, 28 /* 0x00000000 -> [arg1+0x1c] */ # b1: 797c
s32i a12, a6, 208 /* arg1 -> [arg0+0xd0] */ # b3: c26634
s32i a4, a6, 192 /* [arg0+0xc0]+0x1 -> [arg0+0xc0] */ # b6: 426630
s32i a5, a6, 212 /* [arg0+0xd4]+0x1 -> [arg0+0xd4] */ # b9: 526635
bnei a4, 1, .Lbr006 # bc: 661406
mov a2, a6 /* arg0 */ # bf: 2d06
movi a3, 1 /* 0x00000001 */ # c1: 0c13
call0 ieee80211_set_tim # c3: 050000
.Lbr006: movi a2, 0 /* 0x00000000 */ # c6: 0c02
.Lbr007: l32i a12, sp, 4 /* [(local1)] */ # c8: c811
l32i a0, sp, 0 /* [(local0)] */ # ca: 0801
addi sp, sp, 16 /* (top of frame) */ # cc: 12c110
ret # cf: 0df0
.literal_position # d4: 00000000
# d8: 00000000
# dc: 00000000
# Function @ .irom0.text+0xe0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.Lfunc001: addi sp, sp, -16 /* (local0) */ # e0: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # e3: 0901
s32i a14, sp, 12 /* a14 -> [(local3)] */ # e5: e931
s32i a12, sp, 4 /* a12 -> [(local1)] */ # e7: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # e9: d921
mov a12, a2 /* arg0 */ # eb: cd02
l32i a13, a2, 204 /* [arg0+0xcc] */ # ed: d22233
movi a14, 0 /* 0x00000000 */ # f0: 0c0e
bnez a13, .Lbr008 # f2: cc1d
j .Lbr012 # f4: 061000
.Lbr008: l32i a2, a13, 28 /* [[arg0+0xcc]+0x1c] */ # f7: 287d
s32i a2, a12, 204 /* [[arg0+0xcc]+0x1c] -> [arg0+0xcc] */ # f9: 226c33
call0 chm_check_same_channel # fc: 01f7ffc0
# 100: 0000
beqz a2, .Lbr009 # 102: 8c92
mov a2, a13 /* [arg0+0xcc] */ # 104: 2d0d
call0 ppTxPkt # 106: 01f5ffc0
# 10a: 0000
j .Lbr010 # 10c: c60300
.Lbr009: movi a5, g_ic # 10f: 51f1ff
addi a4, a13, 28 /* [arg0+0xcc]+0x1c */ # 112: 42cd1c
l32i a6, a5, 0x1c4 /* [g_ic+0x1c4] */ # 115: 622571
s32i a14, a13, 28 /* 0x00000000 -> [[arg0+0xcc]+0x1c] */ # 118: e97d
s32i a13, a6, 0 /* [arg0+0xcc] -> [[g_ic+0x1c4]] */ # 11a: d906
s32i a4, a5, 0x1c4 /* [arg0+0xcc]+0x1c -> [g_ic+0x1c4] */ # 11c: 426571
.Lbr010: l32i a7, a12, 192 /* [arg0+0xc0] */ # 11f: 722c30
l32i a13, a12, 204 /* [arg0+0xcc] */ # 122: d22c33
addi a7, a7, -1 /* [arg0+0xc0]-0x1 */ # 125: 0b77
s32i a7, a12, 192 /* [arg0+0xc0]-0x1 -> [arg0+0xc0] */ # 127: 726c30
beqz a13, .Lbr011 # 12a: 8c1d
j .Lbr008 # 12c: c6f1ff
.Lbr011: s32i a14, a12, 208 /* 0x00000000 -> [arg0+0xd0] */ # 12f: e26c34
s32i a14, a12, 204 /* 0x00000000 -> [arg0+0xcc] */ # 132: e26c33
s32i a14, a12, 212 /* 0x00000000 -> [arg0+0xd4] */ # 135: e26c35
.Lbr012: l32i a0, sp, 0 /* [(local0)] */ # 138: 0801
s32i a14, a12, 192 /* 0x00000000 -> [arg0+0xc0] */ # 13a: e26c30
l32i a13, sp, 8 /* [(local2)] */ # 13d: d821
l32i a12, sp, 4 /* [(local1)] */ # 13f: c811
l32i a14, sp, 12 /* [(local3)] */ # 141: e831
addi sp, sp, 16 /* (top of frame) */ # 143: 12c110
ret # 146: 0df0
# Function @ .irom0.text+0x148
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global ieee80211_node_pwrsave
.type ieee80211_node_pwrsave, @function
ieee80211_node_pwrsave:
addi sp, sp, -16 /* (local0) */ # 148: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 14b: 0911
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 14d: 2901
l32i a0, a2, 8 /* [arg0+0x8] */ # 14f: 0822
beqz a3, .Lbr013 # 151: 8c83
movi a3, 16 /* 0x00000010 */ # 153: 1c03
or a3, a0, a3 # 155: 303020
s32i a3, a2, 8 /* a3 -> [arg0+0x8] */ # 158: 3922
j .Lbr014 # 15a: c60500
.Lbr013: movi a3, 0 /* 0x00000000 */ # 15d: 0c03
movi a4, -17 /* 0xffffffef */ # 15f: 6cf4
and a4, a0, a4 # 161: 404010
s32i a4, a2, 8 /* a4 -> [arg0+0x8] */ # 164: 4922
call0 ieee80211_set_tim # 166: 050000
l32i a0, sp, 0 /* [(local0)] */ # 169: 0801
l32i a5, a0, 192 /* [[(local0)]+0xc0] */ # 16b: 522030
beqz a5, .Lbr014 # 16e: 8c35
mov a2, a0 /* [(local0)] */ # 170: 2d00
call0 .Lfunc001 # 172: c5f6ff
.Lbr014: l32i a0, sp, 4 /* [(local1)] */ # 175: 0811
addi sp, sp, 16 /* (top of frame) */ # 177: 12c110
ret # 17a: 0df0

View file

@ -0,0 +1,236 @@
.section .data, "aw", @progbits
.global ieee80211_addr_bcast
.type ieee80211_addr_bcast, @object
ieee80211_addr_bcast:
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00000000
# 4: 00000400
# 8: 00000000
# Function @ .irom0.text+0xc
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_proto_attach
.type ieee80211_proto_attach, @function
ieee80211_proto_attach:
movi a3, 2 /* 0x00000002 */ # c: 0c23
movi a4, 0x00040000 # e: 41fdff
movi a6, 1 /* 0x00000001 */ # 11: 0c16
mov a5, a2 /* arg0 */ # 13: 5d02
addi sp, sp, -16 /* (local0) */ # 15: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 18: 0901
movi a2, ieee80211_tx_mgt_cb # 1a: 21f9ff
l32i a0, a5, 28 /* [arg0+0x1c] */ # 1d: 0875
s32i a6, a5, 12 /* 0x00000001 -> [arg0+0xc] */ # 1f: 6935
or a0, a0, a4 # 21: 400020
s32i a0, a5, 28 /* a0 -> [arg0+0x1c] */ # 24: 0975
call0 ppRegisterTxCallback # 26: 01f8ffc0
# 2a: 0000
l32i a0, sp, 0 /* [(local0)] */ # 2c: 0801
addi sp, sp, 16 /* (top of frame) */ # 2e: 12c110
ret # 31: 0df0
.balign 4
# Function @ .irom0.text+0x34
.balign 4
.global ieee80211_set_shortslottime
.type ieee80211_set_shortslottime, @function
ieee80211_set_shortslottime:
movi a6, 1024 /* 0x00000400 */ # 34: 62a400
l32i a5, a2, 28 /* [arg0+0x1c] */ # 37: 5872
movi a4, -1025 /* 0xfffffbff */ # 39: 42abff
and a4, a5, a4 # 3c: 404510
or a5, a5, a6 # 3f: 605520
moveqz a5, a4, a3 # 42: 305483
s32i a5, a2, 28 /* a5 -> [arg0+0x1c] */ # 45: 5972
ret /* arg0 */ # 47: 0df0
.literal_position # 4c: 00000000
# Function @ .irom0.text+0x50
.balign 4
.global ieee80211_iserp_rateset
.type ieee80211_iserp_rateset, @function
ieee80211_iserp_rateset:
l8ui a8, a2, 0 /* [arg0] */ # 50: 820200
bltui a8, 7, .Lbr003 # 53: b6781e
movi a9, .Ldata001 # 56: 91fdff
movi a10, 0 /* 0x00000000 */ # 59: 0c0a
.Lbr001: blti a8, 1, .Lbr003 # 5b: a61816
movi a5, 0 /* 0x00000000 */ # 5e: 0c05
l32i a6, a9, 0 # 60: 6809
.Lbr002: add a7, a5, a2 # 62: 2a75
l8ui a7, a7, 1 # 64: 720701
extui a7, a7, 0, 7 # 67: 707064
beq a6, a7, .Lbr004 # 6a: 77160b
blt a6, a7, .Lbr003 # 6d: 772604
addi a5, a5, 1 # 70: 1b55
bne a5, a8, .Lbr002 # 72: 8795ec
.Lbr003: movi a2, 0 /* 0x00000000 */ # 75: 0c02
ret /* 0x00000000 */ # 77: 0df0
.Lbr004: addi a9, a9, 4 # 79: 4b99
addi a10, a10, 1 # 7b: 1baa
bnei a10, 7, .Lbr001 # 7d: 667ada
movi a2, 1 /* 0x00000001 */ # 80: 0c12
ret /* 0x00000001 */ # 82: 0df0
.literal_position # 84: 20000000
# Function @ .irom0.text+0x88
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc001: addi sp, sp, -16 /* (local0) */ # 88: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 8b: 0901
l8ui a0, a2, 0 /* [arg0] */ # 8d: 020200
beqz a0, .Lbr009 # 90: bcf0
movi a9, 0 /* 0x00000000 */ # 92: 0c09
movi a11, 128 /* 0x00000080 */ # 94: b2a080
movi a8, .Ldata002 # 97: 81fbff
slli a10, a3, 4 # 9a: c0a311
add a8, a8, a10 # 9d: aa88
l8ui a7, a8, 0 # 9f: 720800
.Lbr005: bnez a4, .Lbr006 # a2: cc94
add a3, a2, a9 # a4: 9a32
l8ui a0, a3, 1 # a6: 020301
extui a0, a0, 0, 7 # a9: 000064
s8i a0, a3, 1 # ac: 024301
.Lbr006: beqz a7, .Lbr008 # af: 9c57
movi a0, 0 /* 0x00000000 */ # b1: 0c00
add a10, a2, a9 # b3: 9aa2
l8ui a3, a10, 1 # b5: 320a01
.Lbr007: add a5, a8, a0 # b8: 0a58
l8ui a5, a5, 1 # ba: 520501
addi a0, a0, 1 # bd: 1b00
bne a5, a3, .Lbr010 # bf: 379517
or a6, a3, a11 # c2: b06320
s8i a6, a10, 1 # c5: 624a01
.Lbr008: l8ui a10, a2, 0 /* [arg0] */ # c8: a20200
addi a9, a9, 1 # cb: 1b99
extui a9, a9, 0, 8 # cd: 909074
bltu a9, a10, .Lbr005 # d0: a739ce
.Lbr009: l32i a0, sp, 0 /* [(local0)] */ # d3: 0801
addi sp, sp, 16 /* (top of frame) */ # d5: 12c110
ret /* arg0 */ # d8: 0df0
.Lbr010: extui a0, a0, 0, 8 # da: 000074
bne a7, a0, .Lbr007 # dd: 0797d7
j .Lbr008 # e0: 06f9ff
.balign 4
# Function @ .irom0.text+0xe4
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_setbasicrates
.type ieee80211_setbasicrates, @function
ieee80211_setbasicrates:
movi a4, 0 /* 0x00000000 */ # e4: 0c04
addi sp, sp, -16 /* (local0) */ # e6: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # e9: 0901
call0 .Lfunc001 # eb: c5f9ff
l32i a0, sp, 0 /* [(local0)] */ # ee: 0801
addi sp, sp, 16 /* (top of frame) */ # f0: 12c110
ret # f3: 0df0
.balign 4
# Function @ .irom0.text+0xf8
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global ieee80211_addbasicrates
.type ieee80211_addbasicrates, @function
ieee80211_addbasicrates:
movi a4, 1 /* 0x00000001 */ # f8: 0c14
addi sp, sp, -16 /* (local0) */ # fa: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # fd: 0901
call0 .Lfunc001 # ff: 85f8ff
l32i a0, sp, 0 /* [(local0)] */ # 102: 0801
addi sp, sp, 16 /* (top of frame) */ # 104: 12c110
ret # 107: 0df0
.balign 4
# Function @ .irom0.text+0x10c
.balign 4
.global ieee80211_wme_initparams
.type ieee80211_wme_initparams, @function
ieee80211_wme_initparams:
ret /* arg0 */ # 10c: 0df0
.balign 4
# Function @ .irom0.text+0x110
.balign 4
.global ieee80211_wme_updateparams
.type ieee80211_wme_updateparams, @function
ieee80211_wme_updateparams:
ret /* arg0 */ # 110: 0df0
.literal_position # 114: 00000000
# 118: 00000000
# 11c: 00000000
# 120: 00000000
# 124: 00000000
# Function @ .irom0.text+0x128
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global ieee80211_mlme_connect_bss
.type ieee80211_mlme_connect_bss, @function
ieee80211_mlme_connect_bss:
mov a3, a2 /* arg0 */ # 128: 3d02
addi sp, sp, -16 /* (local0) */ # 12a: 12c1f0
s32i a5, sp, 4 /* arg3 -> [(local1)] */ # 12d: 5911
s32i a0, sp, 8 /* a0 -> [(local2)] */ # 12f: 0921
movi a2, g_ic # 131: 21f8ff
s32i a4, sp, 0 /* arg2 -> [(local0)] */ # 134: 4901
l32i a2, a2, 16 /* [g_ic+0x10] */ # 136: 2842
movi a4, 6 /* 0x00000006 */ # 138: 0c64
s32i a3, a2, 136 /* arg0 -> [[g_ic+0x10]+0x88] */ # 13a: 326222
addi a2, a2, 64 /* [g_ic+0x10]+0x40 */ # 13d: 22c240
call0 memcpy # 140: 01f7ffc0
# 144: 0000
l32i a3, sp, 4 /* [(local1)] */ # 146: 3811
movi a0, g_ic # 148: 01f4ff
beqz a3, .Lbr011 # 14b: 8ce3
movi a3, 2 /* 0x00000002 */ # 14d: 0c23
movi a4, 176 /* 0x000000b0 */ # 14f: 42a0b0
mov a2, a0 /* g_ic */ # 152: 2d00
call0 ieee80211_sta_new_state # 154: 01f3ffc0
# 158: 0000
j .Lbr012 # 15a: 860400
.Lbr011: movi a3, 3 /* 0x00000003 */ # 15d: 0c33
mov a2, a0 /* g_ic */ # 15f: 2d00
l32i a6, sp, 0 /* [(local0)] */ # 161: 6801
movi a5, 32 /* 0x00000020 */ # 163: 2c05
movi a4, 0 /* 0x00000000 */ # 165: 0c04
movnez a4, a5, a6 # 167: 604593
call0 ieee80211_sta_new_state # 16a: 01eeffc0
# 16e: 0000
.Lbr012: l32i a0, sp, 8 /* [(local2)] */ # 170: 0821
addi sp, sp, 16 /* (top of frame) */ # 172: 12c110
ret # 175: 0df0
.section .rodata, "a", @progbits
.Ldata001: .byte 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00
.byte 0x0b, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00
.byte 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00
.byte 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.Ldata002: .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x04, 0x02, 0x04, 0x0b, 0x16, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

View file

@ -0,0 +1,497 @@
.section .text, "ax", @progbits
.literal_position # 0: 00000000
# Function @ .text+0x4
.balign 4
.global chm_get_current_channel
.type chm_get_current_channel, @function
chm_get_current_channel:
movi a2, .Ldata001 # 4: 21ffff
l32i a2, a2, 60 /* [.Ldata009] */ # 7: 28f2
ret /* [.Ldata009] */ # 9: 0df0
.section .bss, "aw", @nobits
.Ldata001: .word 0x00000000 # 0: 00000000
.Ldata002: .word 0x00000000 # 4: 00000000
.Ldata003: .word 0x00000000 # 8: 00000000
.Ldata004: .word 0x00000000 # c: 00000000
.Ldata005: .word 0x00000000 # 10: 00000000
.Ldata006: .word 0x00000000 # 14: 00000000
.Ldata007: .word 0x00000000 # 18: 00000000
.Ldata008: .word 0x00000000 # 1c: 00000000
.Label001: .space 28
.Ldata009: .word 0x00000000 # 3c: 00000000
.Ldata010: .byte 0x00
.Ldata011: .byte 0x00
.section .irom0.text, "ax", @progbits
.literal_position # 0: 00feef3f
# 4: 00000000
# 8: 00000000
# c: 00000000
# 10: 00000000
# 14: 20000000
# 18: 48020000
# 1c: 00000000
# 20: 00000000
# 24: 00000000
# 28: 00000000
# Function @ .irom0.text+0x2c
# Local variables/stack:
# (local0): word @ -0x20
# (local1): word @ -0x1c
# (local2): word @ -0x18
# (local3): word @ -0x14
# (local4): word[4] @ -0x10
.balign 4
.global chm_init
.type chm_init, @function
chm_init: movi a4, -32 /* 0xffffffe0 */ # 2c: 6c04
movi a5, NMIIrqIsOn # 2e: 51f7ff
movi a3, g_ic+0x180 # 31: 31f4ff
movi a6, .Ldata001 # 34: 61f5ff
addi sp, sp, -32 /* (local0) */ # 37: 12c1e0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 3a: c911
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 3c: d921
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 3e: 0901
movi a13, 0x3feffe00 # 40: d1f0ff
movi a0, 0 /* 0x00000000 */ # 43: 0c00
s32i a2, a6, 0 /* arg0 -> [.Ldata001] */ # 45: 2906
mov a12, a2 /* arg0 */ # 47: cd02
l8ui a6, a3, 96 /* [g_ic+0x1e0] */ # 49: 620360
l8ui a2, a5, 0 /* [NMIIrqIsOn] */ # 4c: 220500
addmi a3, a3, 256 /* g_ic+0x280 */ # 4f: 32d301
l8ui a3, a3, 141 /* [g_ic+0x30d] */ # 52: 32038d
addi a6, a6, -1 /* [g_ic+0x1e0]-0x1 */ # 55: 0b66
addi a3, a3, -1 /* [g_ic+0x30d]-0x1 */ # 57: 0b33
extui a3, a3, 0, 8 # 59: 303074
movnez a0, a3, a6 # 5c: 600393
s32i a0, sp, 16 /* a0 -> [(local4)] */ # 5f: 0941
bnez a2, .Lbr002 # 61: ec32
call0 vPortEnterCritical # 63: 01eeffc0
# 67: 0000
movi a4, -32 /* 0xffffffe0 */ # 69: 6c04
.Lbr001: memw # 6b: c02000
l32i a9, a13, 0x200 /* [0x3ff00000] */ # 6e: 922d80
and a9, a9, a4 # 71: 409910
memw # 74: c02000
s32i a9, a13, 0x200 /* a9 -> [0x3ff00000] */ # 77: 926d80
memw # 7a: c02000
l32i a8, a13, 0x200 /* [0x3ff00000] */ # 7d: 822d80
bbsi a8, 0, .Lbr001 # 80: 07e8e7
l32i a0, sp, 16 /* [(local4)] */ # 83: 0841
movi a5, NMIIrqIsOn # 85: 51e2ff
.Lbr002: movi a2, 132 /* 0x00000084 */ # 88: 22a084
addx2 a0, a0, a0 # 8b: 000090
addx4 a0, a0, a12 # 8e: c000a0
add a0, a0, a2 # 91: 2a00
s32i a0, a12, 0x14c /* a0 -> [arg0+0x14c] */ # 93: 026c53
l8ui a10, a5, 0 /* [NMIIrqIsOn] */ # 96: a20500
s32i a0, sp, 12 /* a0 -> [(local3)] */ # 99: 0931
bnez a10, .Lbr003 # 9b: dcaa
memw # 9d: c02000
l32i a2, a13, 0x200 /* [0x3ff00000] */ # a0: 222d80
movi a3, 1 /* 0x00000001 */ # a3: 0c13
and a2, a2, a4 # a5: 402210
or a2, a2, a3 # a8: 302220
memw # ab: c02000
s32i a2, a13, 0x200 /* a2 -> [0x3ff00000] */ # ae: 226d80
call0 vPortExitCritical # b1: 01dbffc0
# b5: 0000
l32i a0, sp, 12 /* [(local3)] */ # b7: 0831
.Lbr003: mov a2, a0 # b9: 2d00
call0 chm_set_current_channel # bb: 01daffc0
# bf: 0000
movi a2, .Label001 # c1: 21d4ff
movi a3, .Lfunc002 # c4: 31d5ff
movi a4, 0 /* 0x00000000 */ # c7: 0c04
call0 os_timer_setfn # c9: 01d7ffc0
# cd: 0000
l32i a12, sp, 4 /* [(local1)] */ # cf: c811
l32i a13, sp, 8 /* [(local2)] */ # d1: d821
l32i a0, sp, 0 /* [(local0)] */ # d3: 0801
addi sp, sp, 32 /* (top of frame) */ # d5: 12c120
ret # d8: 0df0
.literal_position # dc: 00000000
# e0: 00000000
# Function @ .irom0.text+0xe4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.global chm_acquire_lock
.type chm_acquire_lock, @function
chm_acquire_lock:
addi sp, sp, -16 /* (local0) */ # e4: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # e7: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # e9: 0901
mov a12, a2 /* arg0 */ # eb: cd02
movi a0, .Ldata001 # ed: 01fbff
mov a2, a4 /* arg2 */ # f0: 2d04
l8ui a4, a0, 64 /* [.Ldata010] */ # f2: 420040
l8ui a5, a0, 65 /* [.Ldata011] */ # f5: 520041
beqz a4, .Lbr005 # f8: 9c44
s32i a2, sp, 12 /* arg2 -> [(local3)] */ # fa: 2931
s32i a3, sp, 8 /* arg1 -> [(local2)] */ # fc: 3921
bgeu a5, a12, .Lbr004 # fe: c7b504
movi a2, 3 /* 0x00000003 */ # 101: 0c32
j .Lbr006 # 103: c60500
.Lbr004: call0 chm_cancel_op # 106: 050000
l32i a2, sp, 12 /* [(local3)] */ # 109: 2831
movi a0, .Ldata001 # 10b: 01f5ff
l32i a3, sp, 8 /* [(local2)] */ # 10e: 3821
.Lbr005: s8i a12, a0, 65 /* arg0 -> [.Ldata011] */ # 110: c24041
s32i a3, a0, 24 /* a3 -> [.Ldata007] */ # 113: 3960
s32i a2, a0, 28 /* a2 -> [.Ldata008] */ # 115: 2970
movi a6, 1 /* 0x00000001 */ # 117: 0c16
movi a2, 0 /* 0x00000000 */ # 119: 0c02
s8i a6, a0, 64 /* 0x01 -> [.Ldata010] */ # 11b: 624040
.Lbr006: l32i a12, sp, 4 /* [(local1)] */ # 11e: c811
l32i a0, sp, 0 /* [(local0)] */ # 120: 0801
addi sp, sp, 16 /* (top of frame) */ # 122: 12c110
ret # 125: 0df0
.literal_position # 128: 00000000
# Function @ .irom0.text+0x12c
.balign 4
.global chm_release_lock
.type chm_release_lock, @function
chm_release_lock:
movi a3, .Ldata001 # 12c: 31ffff
movi a2, 0 /* 0x00000000 */ # 12f: 0c02
s32i a2, a3, 28 /* 0x00000000 -> [.Ldata008] */ # 131: 2973
s32i a2, a3, 24 /* 0x00000000 -> [.Ldata007] */ # 133: 2963
s8i a2, a3, 64 /* 0x00 -> [.Ldata010] */ # 135: 224340
s8i a2, a3, 65 /* 0x00 -> [.Ldata011] */ # 138: 224341
ret /* 0x00000000 */ # 13b: 0df0
.literal_position # 140: 00000000
# 144: 00000000
# Function @ .irom0.text+0x148
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global chm_start_op
.type chm_start_op, @function
chm_start_op:
addi sp, sp, -16 /* (local0) */ # 148: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 14b: 0901
movi a0, .Ldata001 # 14d: 01fcff
l32i a7, a0, 4 /* [.Ldata002] */ # 150: 7810
beqz a7, .Lbr010 # 152: 8cf7
movi a2, 3 /* 0x00000003 */ # 154: 0c32
j .Lbr009 # 156: 060100
.Lbr007: call0 .Lfunc001 # 159: 450400
.Lbr008: movi a2, 0 /* 0x00000000 */ # 15c: 0c02
.Lbr009: l32i a0, sp, 0 /* [(local0)] */ # 15e: 0801
addi sp, sp, 16 /* (top of frame) */ # 160: 12c110
ret # 163: 0df0
.Lbr010: s32i a2, a0, 4 /* arg0 -> [.Ldata002] */ # 165: 2910
s32i a4, a0, 16 /* arg2 -> [.Ldata005] */ # 167: 4940
movi a8, g_ic # 169: 81f6ff
s32i a5, a0, 20 /* arg3 -> [.Ldata006] */ # 16c: 5950
l32i a8, a8, 0 /* [g_ic] */ # 16e: 8808
s32i a3, a0, 8 /* arg1 -> [.Ldata003] */ # 170: 3920
l32i a8, a8, 0 /* [[g_ic]] */ # 172: 8808
s32i a6, a0, 12 /* arg4 -> [.Ldata004] */ # 174: 6930
bbci a8, 1, .Lbr007 # 176: 1768df
call0 .Lfunc001 # 179: 450200
j .Lbr008 # 17c: 06f7ff
.literal_position # 180: 00000000
# 184: 04000000
# 188: 20000000
# 18c: 00000000
# 190: 00000000
# 194: 00000000
# 198: 00000000
# 19c: 00000000
# Function @ .irom0.text+0x1a0
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word @ -0x8
# (local3): word @ -0x4
.balign 4
.Lfunc001: addi sp, sp, -16 /* (local0) */ # 1a0: 12c1f0
s32i a13, sp, 12 /* a13 -> [(local3)] */ # 1a3: d931
s32i a12, sp, 8 /* a12 -> [(local2)] */ # 1a5: c921
movi a13, .Ldata001 # 1a7: d1f6ff
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 1aa: 0911
l32i a12, a13, 16 /* [.Ldata005] */ # 1ac: c84d
l32i a0, a13, 12 /* [.Ldata004] */ # 1ae: 083d
s32i a0, sp, 0 /* [.Ldata004] -> [(local0)] */ # 1b0: 0901
call0 chm_get_current_channel # 1b2: 01f6ffc0
# 1b6: 0000
mov a3, a2 # 1b8: 3d02
l32i a2, a13, 4 /* [.Ldata002] */ # 1ba: 281d
l16ui a3, a3, 4 # 1bc: 321302
l16ui a4, a2, 4 /* [[.Ldata002]+0x4] */ # 1bf: 421202
beq a3, a4, .Lbr011 # 1c2: 471305
call0 chm_set_current_channel # 1c5: 01f2ffc0
# 1c9: 0000
.Lbr011: beqz a12, .Lbr012 # 1cb: 8c5c
l32i a2, sp, 0 /* [(local0)] */ # 1cd: 2801
movi a3, 0 /* 0x00000000 */ # 1cf: 0c03
callx0 a12 /* [.Ldata005] */ # 1d1: c00c00
.Lbr012: l32i a4, a13, 8 /* [.Ldata003] */ # 1d4: 482d
bnez a4, .Lbr013 # 1d6: ccc4
movi a2, .Ldata002 # 1d8: 21ebff
movi a3, 20 /* 0x00000014 */ # 1db: 1c43
call0 bzero # 1dd: 01edffc0
# 1e1: 0000
j .Lbr014 # 1e3: 860500
.Lbr013: movi a12, .Label001 # 1e6: c1e8ff
mov a2, a12 /* .Label001 */ # 1e9: 2d0c
call0 os_timer_disarm # 1eb: 01ebffc0
# 1ef: 0000
mov a2, a12 /* .Label001 */ # 1f1: 2d0c
l32i a3, a13, 8 /* [.Ldata003] */ # 1f3: 382d
movi a4, 0 /* 0x00000000 */ # 1f5: 0c04
call0 os_timer_arm # 1f7: 01e9ffc0
# 1fb: 0000
.Lbr014: l32i a12, sp, 8 /* [(local2)] */ # 1fd: c821
l32i a13, sp, 12 /* [(local3)] */ # 1ff: d831
l32i a0, sp, 4 /* [(local1)] */ # 201: 0811
addi sp, sp, 16 /* (top of frame) */ # 203: 12c110
ret # 206: 0df0
.literal_position # 208: 00000000
# 20c: 00000000
# 210: 00000000
# Function @ .irom0.text+0x214
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global chm_end_op
.type chm_end_op, @function
chm_end_op: movi a3, -4 /* 0xfffffffc */ # 214: 7cc3
addi sp, sp, -16 /* (local0) */ # 216: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 219: 0911
movi a0, .Ldata001 # 21b: 01fbff
s32i a2, sp, 0 /* arg0 -> [(local0)] */ # 21e: 2901
beq a0, a3, .Lbr015 # 220: 37101d
mov a2, a0 /* .Ldata001 */ # 223: 2d00
l32i a3, a2, 20 /* [.Ldata006] */ # 225: 3852
s32i a3, sp, 8 /* [.Ldata006] -> [(local2)] */ # 227: 3921
addi a2, a2, 4 /* .Ldata002 */ # 229: 4b22
movi a3, 20 /* 0x00000014 */ # 22b: 1c43
call0 bzero # 22d: 01f8ffc0
# 231: 0000
l32i a5, sp, 8 /* [(local2)] */ # 233: 5821
beqz a5, .Lbr015 # 235: 8c85
movi a2, .Ldata001 # 237: 21f5ff
l32i a3, sp, 0 /* [(local0)] */ # 23a: 3801
l32i a2, a2, 12 /* [.Ldata004] */ # 23c: 2832
callx0 a5 /* [(local2)] */ # 23e: c00500
.Lbr015: l32i a0, sp, 4 /* [(local1)] */ # 241: 0811
addi sp, sp, 16 /* (top of frame) */ # 243: 12c110
ret # 246: 0df0
# Function @ .irom0.text+0x248
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.Lfunc002: movi a2, 0 /* 0x00000000 */ # 248: 0c02
addi sp, sp, -16 /* (local0) */ # 24a: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 24d: 0901
call0 chm_end_op # 24f: 050000
l32i a0, sp, 0 /* [(local0)] */ # 252: 0801
addi sp, sp, 16 /* (top of frame) */ # 254: 12c110
ret # 257: 0df0
.literal_position # 25c: 00000000
# 260: 00000000
# 264: 00000000
# Function @ .irom0.text+0x268
# Local variables/stack:
# (local0): word[4] @ -0x10
.balign 4
.global chm_cancel_op
.type chm_cancel_op, @function
chm_cancel_op:
addi sp, sp, -16 /* (local0) */ # 268: 12c1f0
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 26b: 0901
movi a0, .Ldata001 # 26d: 01fbff
l32i a2, a0, 4 /* [.Ldata002] */ # 270: 2810
beqz a2, .Lbr016 # 272: 9c12
mov a2, a0 /* .Ldata001 */ # 274: 2d00
addi a2, a2, 32 /* .Label001 */ # 276: 22c220
call0 os_timer_disarm # 279: 01faffc0
# 27d: 0000
movi a2, 4 /* 0x00000004 */ # 27f: 0c42
call0 chm_end_op # 281: 050000
movi a0, .Ldata001 # 284: 01f7ff
.Lbr016: l32i a5, a0, 24 /* [.Ldata007] */ # 287: 5860
beqz a5, .Lbr017 # 289: 8c55
movi a3, 4 /* 0x00000004 */ # 28b: 0c43
l32i a2, a0, 28 /* [.Ldata008] */ # 28d: 2870
callx0 a5 /* [.Ldata007] */ # 28f: c00500
.Lbr017: l32i a0, sp, 0 /* [(local0)] */ # 292: 0801
addi sp, sp, 16 /* (top of frame) */ # 294: 12c110
ret # 297: 0df0
.literal_position # 29c: 00000000
# 2a0: 00000000
# 2a4: 00000000
# Function @ .irom0.text+0x2a8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global chm_return_home_channel
.type chm_return_home_channel, @function
chm_return_home_channel:
addi sp, sp, -16 /* (local0) */ # 2a8: 12c1f0
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 2ab: c911
movi a12, g_ic # 2ad: c1fbff
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 2b0: 0901
l32i a12, a12, 0x14c /* [g_ic+0x14c] */ # 2b2: c22c53
call0 chm_get_current_channel # 2b5: 01faffc0
# 2b9: 0000
l16ui a0, a2, 4 # 2bb: 021202
l16ui a2, a12, 4 /* [[g_ic+0x14c]+0x4] */ # 2be: 221c02
beq a0, a2, .Lbr018 # 2c1: 271007
mov a2, a12 /* [g_ic+0x14c] */ # 2c4: 2d0c
call0 chm_set_current_channel # 2c6: 01f7ffc0
# 2ca: 0000
.Lbr018: l32i a12, sp, 4 /* [(local1)] */ # 2cc: c811
l32i a0, sp, 0 /* [(local0)] */ # 2ce: 0801
addi sp, sp, 16 /* (top of frame) */ # 2d0: 12c110
ret # 2d3: 0df0
.literal_position # 2d8: 00000000
# 2dc: 00feef3f
# 2e0: 00000000
# 2e4: 00000000
# 2e8: 00000000
# 2ec: 00000000
# 2f0: 00000000
# Function @ .irom0.text+0x2f4
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word @ -0xc
# (local2): word[2] @ -0x8
.balign 4
.global chm_set_current_channel
.type chm_set_current_channel, @function
chm_set_current_channel:
movi a3, 1 /* 0x00000001 */ # 2f4: 0c13
movi a4, 0 /* 0x00000000 */ # 2f6: 0c04
addi sp, sp, -16 /* (local0) */ # 2f8: 12c1f0
s32i a13, sp, 8 /* a13 -> [(local2)] */ # 2fb: d921
s32i a12, sp, 4 /* a12 -> [(local1)] */ # 2fd: c911
s32i a0, sp, 0 /* a0 -> [(local0)] */ # 2ff: 0901
mov a12, a2 /* arg0 */ # 301: cd02
l16ui a2, a2, 4 /* [arg0+0x4] */ # 303: 221202
call0 phy_change_channel # 306: 01f8ffc0
# 30a: 0000
movi a2, NMIIrqIsOn # 30c: 21f3ff
movi a0, -32 /* 0xffffffe0 */ # 30f: 6c00
l8ui a2, a2, 0 /* [NMIIrqIsOn] */ # 311: 220200
movi a13, 0x3feffe00 # 314: d1f2ff
bnez a2, .Lbr020 # 317: ec42
call0 vPortEnterCritical # 319: 01f4ffc0
# 31d: 0000
movi a0, -32 /* 0xffffffe0 */ # 31f: 6c00
.Lbr019: memw # 321: c02000
l32i a5, a13, 0x200 /* [0x3ff00000] */ # 324: 522d80
and a5, a5, a0 # 327: 005510
memw # 32a: c02000
s32i a5, a13, 0x200 /* a5 -> [0x3ff00000] */ # 32d: 526d80
memw # 330: c02000
l32i a4, a13, 0x200 /* [0x3ff00000] */ # 333: 422d80
bbsi a4, 0, .Lbr019 # 336: 07e4e7
movi a2, NMIIrqIsOn # 339: 21e9ff
l8ui a2, a2, 0 /* [NMIIrqIsOn] */ # 33c: 220200
.Lbr020: movi a3, .Ldata001 # 33f: 31e9ff
s32i a12, a3, 60 /* arg0 -> [.Ldata009] */ # 342: c9f3
bnez a2, .Lbr021 # 344: dc82
memw # 346: c02000
l32i a4, a13, 0x200 /* [0x3ff00000] */ # 349: 422d80
movi a5, 1 /* 0x00000001 */ # 34c: 0c15
and a4, a4, a0 # 34e: 004410
or a4, a4, a5 # 351: 504420
memw # 354: c02000
s32i a4, a13, 0x200 /* a4 -> [0x3ff00000] */ # 357: 426d80
call0 vPortExitCritical # 35a: 01e5ffc0
# 35e: 0000
.Lbr021: l32i a12, sp, 4 /* [(local1)] */ # 360: c811
l32i a13, sp, 8 /* [(local2)] */ # 362: d821
l32i a0, sp, 0 /* [(local0)] */ # 364: 0801
addi sp, sp, 16 /* (top of frame) */ # 366: 12c110
ret # 369: 0df0
.literal_position # 36c: 00000000
# Function @ .irom0.text+0x370
.balign 4
.global chm_freq2index
.type chm_freq2index, @function
chm_freq2index:
movi a5, 0 /* 0x00000000 */ # 370: 0c05
movi a6, .Ldata001 # 372: 61feff
movi a7, 14 /* 0x0000000e */ # 375: 0ce7
l32i a6, a6, 0 /* [.Ldata001] */ # 377: 6806
.Lbr022: addx2 a8, a5, a5 # 379: 508590
addx4 a8, a8, a6 # 37c: 6088a0
l16ui a8, a8, 136 # 37f: 821844
bne a8, a2, .Lbr023 # 382: 279803
mov a2, a5 # 385: 2d05
ret # 387: 0df0
.Lbr023: addi a5, a5, 1 # 389: 1b55
extui a5, a5, 0, 8 # 38b: 505074
bne a5, a7, .Lbr022 # 38e: 7795e7
movi a2, 255 /* 0x000000ff */ # 391: 22a0ff
ret /* 0x000000ff */ # 394: 0df0
.literal_position # 398: 00000000
# 39c: 00000000
# 3a0: 00000000
# 3a4: 00000000
# Function @ .irom0.text+0x3a8
# Local variables/stack:
# (local0): word @ -0x10
# (local1): word[3] @ -0xc
.balign 4
.global chm_check_same_channel
.type chm_check_same_channel, @function
chm_check_same_channel:
movi a2, g_ic # 3a8: 21fcff
addi sp, sp, -16 /* (local0) */ # 3ab: 12c1f0
s32i a0, sp, 4 /* a0 -> [(local1)] */ # 3ae: 0911
l32i a2, a2, 0x14c /* [g_ic+0x14c] */ # 3b0: 222253
call0 ieee80211_chan2ieee # 3b3: 01faffc0
# 3b7: 0000
s32i a2, sp, 0 /* a2 -> [(local0)] */ # 3b9: 2901
call0 chm_get_current_channel # 3bb: 01f9ffc0
# 3bf: 0000
call0 ieee80211_chan2ieee # 3c1: 01f8ffc0
# 3c5: 0000
movi a3, 0 /* 0x00000000 */ # 3c7: 0c03
l32i a4, sp, 0 /* [(local0)] */ # 3c9: 4801
l32i a0, sp, 4 /* [(local1)] */ # 3cb: 0811
sub a4, a4, a2 # 3cd: 2044c0
addi sp, sp, 16 /* (top of frame) */ # 3d0: 12c110
movi a2, 1 /* 0x00000001 */ # 3d3: 0c12
movnez a2, a3, a4 # 3d5: 402393
ret # 3d8: 0df0

File diff suppressed because it is too large Load diff

View file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more