added more samples, reorganized library, publishing library code

pull/1/head
Jonathan Brandenburg 8 years ago
parent fa9cb7621f
commit 9f479800cb

12
.gitignore vendored

@ -0,0 +1,12 @@
*.o
*.a
radiochat
radiopiglatin
testax5043
testax5043tx
testax5043rx
testax5043init
testax50432freq
doc/html/
doc/latex/
/.metadata/

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state 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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

@ -0,0 +1,245 @@
all: libax5043.a
all: radiochat
all: radiopiglatin
all: testax5043rx
all: testax5043tx
all: testax50432freq
all: testax5043init
rebuild: clean
rebuild: all
lib: libax5043.a
clean:
rm -f radiochat
rm -f radiopiglatin
rm -f testax5043rx
rm -f testax5043tx
rm -f testax50432freq
rm -f testax5043init
rm -f libax5043.a
rm -f */*.o
rm -f */*/*.o
rm -rf ax5043/doc/html
rm -rf ax5043/doc/latex
docs:
mkdir -p ax5043/doc; cd ax5043; doxygen Doxyfile
cd ax5043/doc/latex && make && cd ../.. && cp doc/latex/refman.pdf doc/TransceiverFramework.pdf
libax5043.a: ax5043/crc/crc.o
libax5043.a: ax5043/ax5043support/ax5043tx.o
libax5043.a: ax5043/ax5043support/ax5043init.o
libax5043.a: ax5043/ax5043support/ax5043rx.o
libax5043.a: ax5043/axradio/axradiorx.o
libax5043.a: ax5043/axradio/axradiomode.o
libax5043.a: ax5043/axradio/axradiotx.o
libax5043.a: ax5043/axradio/axradioinit.o
libax5043.a: ax5043/generated/configrx.o
libax5043.a: ax5043/generated/configtx.o
libax5043.a: ax5043/generated/config.o
libax5043.a: ax5043/generated/configcommon.o
libax5043.a: ax5043/spi/ax5043spi.o
ar rcsv libax5043.a ax5043/generated/configcommon.o ax5043/generated/configtx.o ax5043/generated/configrx.o ax5043/generated/config.o ax5043/axradio/axradioinit.o ax5043/axradio/axradiomode.o ax5043/axradio/axradiotx.o ax5043/axradio/axradiorx.o ax5043/crc/crc.o ax5043/spi/ax5043spi.o ax5043/ax5043support/ax5043tx.o ax5043/ax5043support/ax5043init.o ax5043/ax5043support/ax5043rx.o
radiochat: libax5043.a
radiochat: chat/chat_main.o
gcc -o radiochat -pthread -L./ chat/chat_main.o -lwiringPi -lax5043
radiopiglatin: libax5043.a
radiopiglatin: piglatin/piglatin_main.o
gcc -o radiopiglatin -L./ piglatin/piglatin_main.o -lwiringPi -lax5043
testax5043tx: libax5043.a
testax5043tx: transmit/transmit_main.o
gcc -o testax5043tx -L./ transmit/transmit_main.o -lwiringPi -lax5043
testax5043rx: libax5043.a
testax5043rx: receive/receive_main.o
gcc -o testax5043rx -L./ receive/receive_main.o -lwiringPi -lax5043
testax5043init: libax5043.a
testax5043init: init/init_main.o
gcc -o testax5043init -L./ init/init_main.o -lwiringPi -lax5043
testax50432freq: libax5043.a
testax50432freq: transmit2freq/transmit2freq_main.o
gcc -o testax50432freq -L./ transmit2freq/transmit2freq_main.o -lwiringPi -lax5043
ax5043/generated/configcommon.o: ax5043/generated/configcommon.c
ax5043/generated/configcommon.o: ax5043/generated/configrx.h
ax5043/generated/configcommon.o: ax5043/generated/configtx.h
ax5043/generated/configcommon.o: ax5043/axradio/axradioinit.h
ax5043/generated/configcommon.o: ax5043/axradio/axradioinit_p.h
cd ax5043/generated; gcc -pedantic -Wall -Wextra -c configcommon.c
ax5043/generated/configrx.o: ax5043/generated/configrx.c
ax5043/generated/configrx.o: ax5043/generated/configrx.h
ax5043/generated/configrx.o: ax5043/axradio/axradioinit.h
ax5043/generated/configrx.o: ax5043/axradio/axradioinit_p.h
cd ax5043/generated; gcc -pedantic -Wall -Wextra -c configrx.c
ax5043/generated/configtx.o: ax5043/generated/configtx.c
ax5043/generated/configtx.o: ax5043/generated/configtx.h
ax5043/generated/configtx.o: ax5043/axradio/axradioinit.h
ax5043/generated/configtx.o: ax5043/axradio/axradioinit_p.h
cd ax5043/generated; gcc -pedantic -Wall -Wextra -c configtx.c
ax5043/generated/config.o: ax5043/generated/config.c
ax5043/generated/config.o: ax5043/generated/config.h
ax5043/generated/config.o: ax5043/axradio/axradioinit.h
ax5043/generated/config.o: ax5043/axradio/axradioinit_p.h
ax5043/generated/config.o: ax5043/spi/ax5043spi.h
ax5043/generated/config.o: ax5043/spi/ax5043spi_p.h
ax5043/generated/config.o: ax5043/crc/crc.h
cd ax5043/generated; gcc -pedantic -Wall -Wextra -c config.c
ax5043/spi/ax5043spi.o: ax5043/spi/ax5043spi.c
ax5043/spi/ax5043spi.o: ax5043/spi/ax5043spi.h
ax5043/spi/ax5043spi.o: ax5043/spi/ax5043spi_p.h
cd ax5043/spi; gcc -pedantic -Wall -Wextra -c ax5043spi.c
ax5043/ax5043support/ax5043init.o: ax5043/ax5043support/ax5043init.c
ax5043/ax5043support/ax5043init.o: ax5043/ax5043support/ax5043init.h
ax5043/ax5043support/ax5043init.o: ax5043/axradio/axradioinit.h
ax5043/ax5043support/ax5043init.o: ax5043/axradio/axradioinit_p.h
ax5043/ax5043support/ax5043init.o: ax5043/spi/ax5043spi.h
ax5043/ax5043support/ax5043init.o: ax5043/spi/ax5043spi_p.h
cd ax5043/ax5043support; gcc -pedantic -Wall -Wextra -c ax5043init.c
ax5043/ax5043support/ax5043rx.o: ax5043/ax5043support/ax5043rx.c
ax5043/ax5043support/ax5043rx.o: ax5043/ax5043support/ax5043rx.h
ax5043/ax5043support/ax5043rx.o: ax5043/axradio/axradioinit.h
ax5043/ax5043support/ax5043rx.o: ax5043/axradio/axradioinit_p.h
ax5043/ax5043support/ax5043rx.o: ax5043/spi/ax5043spi.h
ax5043/ax5043support/ax5043rx.o: ax5043/spi/ax5043spi_p.h
cd ax5043/ax5043support; gcc -pedantic -Wall -Wextra -c ax5043rx.c
ax5043/ax5043support/ax5043tx.o: ax5043/ax5043support/ax5043tx.c
ax5043/ax5043support/ax5043tx.o: ax5043/ax5043support/ax5043tx.h
ax5043/ax5043support/ax5043tx.o: ax5043/axradio/axradioinit.h
ax5043/ax5043support/ax5043tx.o: ax5043/axradio/axradioinit_p.h
ax5043/ax5043support/ax5043tx.o: ax5043/spi/ax5043spi.h
ax5043/ax5043support/ax5043tx.o: ax5043/spi/ax5043spi_p.h
cd ax5043/ax5043support; gcc -pedantic -Wall -Wextra -c ax5043tx.c
ax5043/axradio/axradioinit.o: ax5043/axradio/axradioinit.c
ax5043/axradio/axradioinit.o: ax5043/axradio/axradioinit.h
ax5043/axradio/axradioinit.o: ax5043/axradio/axradioinit_p.h
ax5043/axradio/axradioinit.o: ax5043/ax5043support/ax5043init.h
ax5043/axradio/axradioinit.o: ax5043/spi/ax5043spi.h
ax5043/axradio/axradioinit.o: ax5043/spi/ax5043spi_p.h
ax5043/axradio/axradioinit.o: ax5043/generated/config.h
ax5043/axradio/axradioinit.o: ax5043/crc/crc.h
cd ax5043/axradio; gcc -pedantic -Wall -Wextra -c axradioinit.c
ax5043/axradio/axradiomode.o: ax5043/axradio/axradiomode.c
ax5043/axradio/axradiomode.o: ax5043/axradio/axradiomode.h
ax5043/axradio/axradiomode.o: ax5043/axradio/axradiomode_p.h
ax5043/axradio/axradiomode.o: ax5043/axradio/axradioinit.h
ax5043/axradio/axradiomode.o: ax5043/axradio/axradioinit_p.h
ax5043/axradio/axradiomode.o: ax5043/spi/ax5043spi.h
ax5043/axradio/axradiomode.o: ax5043/spi/ax5043spi_p.h
ax5043/axradio/axradiomode.o: ax5043/generated/config.h
cd ax5043/axradio; gcc -pedantic -Wall -Wextra -c axradiomode.c
ax5043/axradio/axradiorx.o: ax5043/axradio/axradiorx.c
ax5043/axradio/axradiorx.o: ax5043/axradio/axradiorx.h
ax5043/axradio/axradiorx.o: ax5043/axradio/axradiorx_p.h
ax5043/axradio/axradiorx.o: ax5043/ax5043support/ax5043rx.h
ax5043/axradio/axradiorx.o: ax5043/axradio/axradioinit.h
ax5043/axradio/axradiorx.o: ax5043/axradio/axradioinit_p.h
ax5043/axradio/axradiorx.o: ax5043/spi/ax5043spi.h
ax5043/axradio/axradiorx.o: ax5043/spi/ax5043spi_p.h
cd ax5043/axradio; gcc -pedantic -Wall -Wextra -c axradiorx.c
ax5043/axradio/axradiotx.o: ax5043/axradio/axradiotx.c
ax5043/axradio/axradiotx.o: ax5043/axradio/axradiotx.h
ax5043/axradio/axradiotx.o: ax5043/axradio/axradiotx_p.h
ax5043/axradio/axradiotx.o: ax5043/ax5043support/ax5043tx.h
ax5043/axradio/axradiotx.o: ax5043/axradio/axradioinit.h
ax5043/axradio/axradiotx.o: ax5043/axradio/axradioinit_p.h
ax5043/axradio/axradiotx.o: ax5043/spi/ax5043spi.h
ax5043/axradio/axradiotx.o: ax5043/spi/ax5043spi_p.h
ax5043/axradio/axradiotx.o: ax5043/generated/config.h
ax5043/axradio/axradiotx.o: ax5043/axradio/axradiomode.h
ax5043/axradio/axradiotx.o: ax5043/axradio/axradiomode_p.h
ax5043/axradio/axradiotx.o: ax5043/crc/crc.h
cd ax5043/axradio; gcc -pedantic -Wall -Wextra -c axradiotx.c
ax5043/crc/crc.o: ax5043/crc/crc.c
ax5043/crc/crc.o: ax5043/crc/crc.h
cd ax5043/crc; gcc -pedantic -Wall -Wextra -c crc.c
chat/chat_main.o: chat/chat_main.c
chat/chat_main.o: ax5043/spi/ax5043spi.h
chat/chat_main.o: ax5043/spi/ax5043spi_p.h
chat/chat_main.o: ax5043/axradio/axradioinit.h
chat/chat_main.o: ax5043/axradio/axradioinit_p.h
chat/chat_main.o: ax5043/axradio/axradiomode.h
chat/chat_main.o: ax5043/axradio/axradiomode_p.h
chat/chat_main.o: ax5043/axradio/axradiorx.h
chat/chat_main.o: ax5043/axradio/axradiorx_p.h
chat/chat_main.o: ax5043/axradio/axradiotx.h
chat/chat_main.o: ax5043/axradio/axradiotx_p.h
chat/chat_main.o: ax5043/generated/configtx.h
cd chat; gcc -I../ax5043 -pedantic -Wconversion -Wall -Wextra -c chat_main.c; cd ..
piglatin/piglatin_main.o: piglatin/piglatin_main.c
piglatin/piglatin_main.o: ax5043/spi/ax5043spi.h
piglatin/piglatin_main.o: ax5043/spi/ax5043spi_p.h
piglatin/piglatin_main.o: ax5043/axradio/axradioinit.h
piglatin/piglatin_main.o: ax5043/axradio/axradioinit_p.h
piglatin/piglatin_main.o: ax5043/axradio/axradiomode.h
piglatin/piglatin_main.o: ax5043/axradio/axradiomode_p.h
piglatin/piglatin_main.o: ax5043/axradio/axradiorx.h
piglatin/piglatin_main.o: ax5043/axradio/axradiorx_p.h
piglatin/piglatin_main.o: ax5043/axradio/axradiotx.h
piglatin/piglatin_main.o: ax5043/axradio/axradiotx_p.h
piglatin/piglatin_main.o: ax5043/generated/configtx.h
cd piglatin; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c piglatin_main.c; cd ..
receive/receive_main.o: receive/receive_main.c
receive/receive_main.o: ax5043/axradio/axradioinit.h
receive/receive_main.o: ax5043/axradio/axradioinit_p.h
receive/receive_main.o: ax5043/spi/ax5043spi.h
receive/receive_main.o: ax5043/spi/ax5043spi_p.h
receive/receive_main.o: ax5043/axradio/axradiomode.h
receive/receive_main.o: ax5043/axradio/axradiomode_p.h
receive/receive_main.o: ax5043/axradio/axradiorx.h
receive/receive_main.o: ax5043/axradio/axradiorx_p.h
receive/receive_main.o: ax5043/generated/configrx.h
cd receive; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c receive_main.c; cd ..
transmit/transmit_main.o: transmit/transmit_main.c
transmit/transmit_main.o: ax5043/axradio/axradioinit.h
transmit/transmit_main.o: ax5043/axradio/axradioinit_p.h
transmit/transmit_main.o: ax5043/spi/ax5043spi.h
transmit/transmit_main.o: ax5043/spi/ax5043spi_p.h
transmit/transmit_main.o: ax5043/axradio/axradiomode.h
transmit/transmit_main.o: ax5043/axradio/axradiomode_p.h
transmit/transmit_main.o: ax5043/axradio/axradiotx.h
transmit/transmit_main.o: ax5043/axradio/axradiotx_p.h
transmit/transmit_main.o: ax5043/generated/configtx.h
cd transmit; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c transmit_main.c; cd ..
transmit2freq/transmit2freq_main.o: transmit2freq/transmit2freq_main.c
transmit2freq/transmit2freq_main.o: ax5043/axradio/axradioinit.h
transmit2freq/transmit2freq_main.o: ax5043/axradio/axradioinit_p.h
transmit2freq/transmit2freq_main.o: ax5043/spi/ax5043spi.h
transmit2freq/transmit2freq_main.o: ax5043/spi/ax5043spi_p.h
transmit2freq/transmit2freq_main.o: ax5043/axradio/axradiomode.h
transmit2freq/transmit2freq_main.o: ax5043/axradio/axradiomode_p.h
transmit2freq/transmit2freq_main.o: ax5043/axradio/axradiotx.h
transmit2freq/transmit2freq_main.o: ax5043/axradio/axradiotx_p.h
transmit2freq/transmit2freq_main.o: ax5043/generated/configtx.h
cd transmit2freq; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c transmit2freq_main.c; cd ..
init/init_main.o: init/init_main.c
init/init_main.o: ax5043/axradio/axradioinit.h
init/init_main.o: ax5043/axradio/axradioinit_p.h
init/init_main.o: ax5043/spi/ax5043spi.h
init/init_main.o: ax5043/spi/ax5043spi_p.h
cd init; gcc -I ../ax5043 -pedantic -Wconversion -Wall -Wextra -c init_main.c; cd ..

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RemoteSystemsTempFiles</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>org.eclipse.rse.ui.remoteSystemsTempNature</nature>
</natures>
</projectDescription>

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.lib.debug.88294304">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.debug.88294304" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/ax5043"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/ax5043/Debug"/>
<entry flags="RESOLVED" kind="libraryFile" name="ax5043" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.88294304" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.debug.88294304." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.debug.197377432" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.debug.1336701940" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.debug"/>
<builder buildPath="${workspace_loc:/ax5043}/Debug" id="cdt.managedbuild.tool.gnu.builder.mingw.base.726972612" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.lib.debug.1288816837" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.lib.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1496973488" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.lib.debug.568286040" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.lib.debug"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug.1300763161" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug">
<option id="gnu.cpp.compiler.mingw.lib.debug.option.optimization.level.1207855135" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.lib.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.lib.debug.option.debugging.level.656327886" name="Debug Level" superClass="gnu.cpp.compiler.mingw.lib.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.1010123358" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.lib.debug.option.optimization.level.108973155" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.debug.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.lib.debug.option.debugging.level.278472452" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.warnings.extrawarn.1271547433" name="Extra warnings (-Wextra)" superClass="gnu.c.compiler.option.warnings.extrawarn" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.pedantic.479578199" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.wconversion.1640364586" name="Implicit conversion warnings (-Wconversion)" superClass="gnu.c.compiler.option.warnings.wconversion" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1024079700" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.1776927287" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base.2119978082" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.lib.release.968850596">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.release.968850596" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings>
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/ax5043"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/ax5043/Release"/>
<entry flags="RESOLVED" kind="libraryFile" name="ax5043" srcPrefixMapping="" srcRootPath=""/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.release.968850596" name="Release" parent="cdt.managedbuild.config.gnu.mingw.lib.release">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.release.968850596." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.release.348415646" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.release.222856300" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.release"/>
<builder buildPath="${workspace_loc:/ax5043}/Release" id="cdt.managedbuild.tool.gnu.builder.mingw.base.514772713" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.lib.release.712428608" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.lib.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1631019156" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.lib.release.1251365408" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.lib.release"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release.1674602728" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release">
<option id="gnu.cpp.compiler.mingw.lib.release.option.optimization.level.464156666" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.lib.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.lib.release.option.debugging.level.1476912772" name="Debug Level" superClass="gnu.cpp.compiler.mingw.lib.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.1559102199" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.lib.release.option.optimization.level.617919276" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.release.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.lib.release.option.debugging.level.2145653852" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.571629490" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.184379049" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base.363981546" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="ax5043.cdt.managedbuild.target.gnu.mingw.lib.1598634356" name="Static Library" projectType="cdt.managedbuild.target.gnu.mingw.lib"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.release.1845373832;cdt.managedbuild.config.gnu.mingw.lib.release.1845373832.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.2132210169;cdt.managedbuild.tool.gnu.c.compiler.input.116423428">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.88294304;cdt.managedbuild.config.gnu.mingw.lib.debug.88294304.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.1010123358;cdt.managedbuild.tool.gnu.c.compiler.input.1024079700">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154;cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.1080077527;cdt.managedbuild.tool.gnu.c.compiler.input.2089154284">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.release.968850596;cdt.managedbuild.config.gnu.mingw.lib.release.968850596.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.1559102199;cdt.managedbuild.tool.gnu.c.compiler.input.571629490">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
</cproject>

1
ax5043/.gitignore vendored

@ -0,0 +1 @@
/Debug/

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>framework</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.config.gnu.mingw.lib.debug.88294304" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1896922210155201054" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="cdt.managedbuild.config.gnu.mingw.lib.release.968850596" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1896922210155201054" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>

@ -0,0 +1,13 @@
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.1761616154/appendContributed=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.88294304/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.88294304/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.88294304/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.88294304/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.88294304/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.88294304/appendContributed=true

File diff suppressed because it is too large Load Diff

@ -0,0 +1,16 @@
## Overview
The AX5043 library provides an interface to program the transceiver. The library is currently configured with the following settings:
- Carrier Frequency - 435.3 MHz
- Symbol Rate - 4.8 kS/s
- Modulation - GFSK
- Transmit Deviation - 13.6 kHz
- Transmit Power - 15.0 dBm
- Receive Bandwidth - 28.2 kHz
- Encoding: HDLC with FEC
- Error Detection: CRC-16
## Next Steps
Over time, the AX5043 library will have new functions to change these settings.

@ -0,0 +1,65 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The Lib MF documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#include "ax5043init.h"
#include <unistd.h>
#include "../axradio/axradioinit.h"
#include "../spi/ax5043spi.h"
uint8_t ax5043_reset(void)
{
//printf("INFO: Resetting AX5043 (ax5043_reset)\n");
uint8_t i;
// Initialize Interface
// Reset Device
ax5043WriteReg(AX5043_PWRMODE, 0x80);
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_POWERDOWN);
// Wait some time for regulator startup
usleep(10000);
// Check Scratch
i = ax5043ReadReg(AX5043_SILICONREVISION);
i = ax5043ReadReg(AX5043_SILICONREVISION);
if (i != SILICONREV1)
return RADIO_ERR_REVISION;
ax5043WriteReg(AX5043_SCRATCH, 0x55);
if (ax5043ReadReg(AX5043_SCRATCH) != 0x55)
return RADIO_ERR_COMM;
ax5043WriteReg(AX5043_SCRATCH, 0xAA);
if (ax5043ReadReg(AX5043_SCRATCH) != 0xAA)
return RADIO_ERR_COMM;
return RADIO_OK;
}

@ -0,0 +1,36 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The Lib MF documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#ifndef AX5043_AX5043INIT_H_
#define AX5043_AX5043INIT_H_
#include <stdint.h>
uint8_t ax5043_reset(void);
#endif /* AX5043_AX5043INIT_H_ */

@ -0,0 +1,41 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The Lib MF documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#include "ax5043rx.h"
#include "../axradio/axradioinit.h"
#include "../spi/ax5043spi.h"
uint8_t ax5043_readfifo(uint8_t axradio_rxbuffer[], uint8_t len) {
uint8_t loc = 0;
while (len--) {
axradio_rxbuffer[loc++] = ax5043ReadReg(AX5043_FIFODATA);
}
return loc;
}

@ -0,0 +1,37 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The Lib MF documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#ifndef AX5043SUPPORT_AX5043RX_H_
#define AX5043SUPPORT_AX5043RX_H_
#include <stdint.h>
uint8_t ax5043_readfifo(uint8_t axradio_rxbuffer[], uint8_t len);
#endif /* AX5043SUPPORT_AX5043RX_H_ */

@ -0,0 +1,42 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The Lib MF documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#include "ax5043tx.h"
#include "../axradio/axradioinit.h"
#include "../spi/ax5043spi.h"
void ax5043_writefifo(const uint8_t *ptr, uint8_t len)
{
if (!len)
return;
do {
ax5043WriteReg(AX5043_FIFODATA, *ptr++);
} while (--len);
}

@ -0,0 +1,36 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The Lib MF documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#ifndef AX5043SUPPORT_AX5043TX_H_
#define AX5043SUPPORT_AX5043TX_H_
#include <stdint.h>
void ax5043_writefifo(const uint8_t *ptr, uint8_t len);
#endif /* AX5043SUPPORT_AX5043TX_H_ */

@ -0,0 +1,440 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "axradioinit.h"
#include <unistd.h>
#include "axradioinit_p.h"
#include "../ax5043support/ax5043init.h"
#include "../crc/crc.h"
#include "../generated/config.h"
#include "../spi/ax5043spi_p.h"
volatile uint8_t axradio_mode = AXRADIO_MODE_UNINIT;
volatile axradio_trxstate_t axradio_trxstate = trxstate_off;
struct axradio_address_mask axradio_localaddr;
uint8_t axradio_rxbuffer[PKTDATA_BUFLEN];
extern const uint32_t axradio_phy_chanfreq[];
extern const uint8_t axradio_phy_chanpllrnginit[];
extern uint8_t axradio_phy_chanpllrng[];
extern const uint8_t axradio_phy_vcocalib;
extern uint8_t axradio_phy_chanvcoi[];
extern const uint8_t axradio_phy_chanvcoiinit[];
extern const uint8_t axradio_framing_swcrclen;
extern const uint8_t axradio_phy_innerfreqloop;
extern const uint8_t axradio_phy_pn9;
extern const uint8_t axradio_framing_addrlen;
extern const uint8_t axradio_framing_destaddrpos;
static void axradio_setaddrregs(void)
{
uint8_t regValue;
ax5043WriteReg(AX5043_PKTADDR0, axradio_localaddr.addr[0]);
ax5043WriteReg(AX5043_PKTADDR1, axradio_localaddr.addr[1]);
ax5043WriteReg(AX5043_PKTADDR2, axradio_localaddr.addr[2]);
ax5043WriteReg(AX5043_PKTADDR3, axradio_localaddr.addr[3]);
ax5043WriteReg(AX5043_PKTADDRMASK0, axradio_localaddr.mask[0]);
ax5043WriteReg(AX5043_PKTADDRMASK1, axradio_localaddr.mask[1]);
ax5043WriteReg(AX5043_PKTADDRMASK2, axradio_localaddr.mask[2]);
ax5043WriteReg(AX5043_PKTADDRMASK3, axradio_localaddr.mask[3]);
if (axradio_phy_pn9 && axradio_framing_addrlen) {
uint16_t pn = 0x1ff;
uint8_t inv = -(ax5043ReadReg(AX5043_ENCODING) & 0x01);
if (axradio_framing_destaddrpos != 0xff) {
pn = pn9_advance_bits(pn, axradio_framing_destaddrpos << 3);
}
regValue = ax5043ReadReg(AX5043_PKTADDR0);
regValue ^= pn ^ inv;
ax5043WriteReg(AX5043_PKTADDR0, regValue);
pn = pn9_advance_byte(pn);
regValue = ax5043ReadReg(AX5043_PKTADDR1);
regValue ^= pn ^ inv;
ax5043WriteReg(AX5043_PKTADDR1, regValue);
pn = pn9_advance_byte(pn);
regValue = ax5043ReadReg(AX5043_PKTADDR2);
regValue ^= pn ^ inv;
ax5043WriteReg(AX5043_PKTADDR2, regValue);
pn = pn9_advance_byte(pn);
regValue = ax5043ReadReg(AX5043_PKTADDR3);
regValue ^= pn ^ inv;
ax5043WriteReg(AX5043_PKTADDR3, regValue);
}
}
static void ax5043_init_registers(void)
{
uint8_t regValue;
ax5043_set_registers();
regValue = ax5043ReadReg(AX5043_PKTLENOFFSET);
regValue += axradio_framing_swcrclen; // add len offs for software CRC16 (used for both, fixed and variable length packets
ax5043WriteReg(AX5043_PKTLENOFFSET, regValue);
ax5043WriteReg(AX5043_PINFUNCIRQ, 0x00); // No IRQ used for now
ax5043WriteReg(AX5043_PKTSTOREFLAGS, axradio_phy_innerfreqloop ? 0x13 : 0x15); // store RF offset, RSSI and delimiter timing
axradio_setaddrregs();
}
void axradio_wait_for_xtal(void) {
//printf("INFO: Waiting for crystal (axradio_wait_for_xtal)\n");
while ((ax5043ReadReg(AX5043_XTALSTATUS) & 0x01) == 0) {
usleep(1000);
}
//printf("INFO: Crystal is ready\n");
}
static int16_t axradio_tunevoltage(void)
{
int16_t r = 0;
uint8_t cnt = 64;
do {
ax5043WriteReg(AX5043_GPADCCTRL, 0x84);
do {} while (ax5043ReadReg(AX5043_GPADCCTRL) & 0x80);
} while (--cnt);
cnt = 32;
do {
ax5043WriteReg(AX5043_GPADCCTRL, 0x84);
do {} while (ax5043ReadReg(AX5043_GPADCCTRL) & 0x80);
{
int16_t x = ax5043ReadReg(AX5043_GPADC13VALUE1) & 0x03;
x <<= 8;
x |= ax5043ReadReg(AX5043_GPADC13VALUE0);
r += x;
}
} while (--cnt);
return r;
}
static uint8_t axradio_adjustvcoi(uint8_t rng)
{
uint8_t offs;
uint8_t bestrng;
uint16_t bestval = ~0;
rng &= 0x7F;
bestrng = rng;
for (offs = 0; offs != 16; ++offs) {
uint16_t val;
if (!((uint8_t)(rng + offs) & 0xC0)) {
ax5043WriteReg(AX5043_PLLVCOI, 0x80 | (rng + offs));
val = axradio_tunevoltage();
if (val < bestval) {
bestval = val;
bestrng = rng + offs;
}
}
if (!offs)
continue;
if (!((uint8_t)(rng - offs) & 0xC0)) {
ax5043WriteReg(AX5043_PLLVCOI, 0x80 | (rng - offs));
val = axradio_tunevoltage();
if (val < bestval) {
bestval = val;
bestrng = rng - offs;
}
}
}
// if we hit the lower rail, do not change anything
if (bestval <= 0x0010)
return rng | 0x80;
return bestrng | 0x80;
}
static uint8_t axradio_calvcoi(void)
{
uint8_t i;
uint8_t r = 0;
uint16_t vmin = 0xffff;
uint16_t vmax = 0x0000;
for (i = 0x40; i != 0;) {
uint16_t curtune;
--i;
ax5043WriteReg(AX5043_PLLVCOI, 0x80 | i);
ax5043ReadReg(AX5043_PLLRANGINGA); // clear PLL lock loss
curtune = axradio_tunevoltage();
ax5043ReadReg(AX5043_PLLRANGINGA); // clear PLL lock loss
((uint16_t *)axradio_rxbuffer)[i] = curtune;
if (curtune > vmax)
vmax = curtune;
if (curtune < vmin) {
vmin = curtune;
// check whether the PLL is locked
if (!(0xC0 & (uint8_t)~ax5043ReadReg(AX5043_PLLRANGINGA)))
r = i | 0x80;
}
}
if (!(r & 0x80) || vmax >= 0xFF00 || vmin < 0x0100 || vmax - vmin < 0x6000)
return 0;
return r;
}
uint8_t axradio_init(void)
{
uint8_t regValue;
axradio_mode = AXRADIO_MODE_UNINIT;
axradio_trxstate = trxstate_off;
if (ax5043_reset())
return AXRADIO_ERR_NOCHIP;
ax5043_init_registers();
ax5043_set_registers_tx();
ax5043WriteReg(AX5043_PLLLOOP, 0x09); // default 100kHz loop BW for ranging
ax5043WriteReg(AX5043_PLLCPI, 0x08);
// range all channels
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_XTAL_ON);
ax5043WriteReg(AX5043_MODULATION, 0x08);
ax5043WriteReg(AX5043_FSKDEV2, 0x00);
ax5043WriteReg(AX5043_FSKDEV1, 0x00);
ax5043WriteReg(AX5043_FSKDEV0, 0x00);
axradio_wait_for_xtal();
{
uint32_t f = axradio_phy_chanfreq[0];
ax5043WriteReg(AX5043_FREQA0, f);
ax5043WriteReg(AX5043_FREQA1, f >> 8);
ax5043WriteReg(AX5043_FREQA2, f >> 16);
ax5043WriteReg(AX5043_FREQA3, f >> 24);
}
axradio_trxstate = trxstate_pll_ranging;
{
uint8_t r;
if( !(axradio_phy_chanpllrnginit[0] & 0xF0) ) { // start values for ranging available
r = axradio_phy_chanpllrnginit[0] | 0x10;
}
else {
r = 0x18;
}
ax5043WriteReg(AX5043_PLLRANGINGA, r); // init ranging process starting from "range"
}
//printf("INFO: Waiting for PLL ranging process\n");
while ((ax5043ReadReg(AX5043_PLLRANGINGA) & 0x10) != 0) {
usleep(1000);
}
//printf("INFO: PLL ranging process complete\n");
axradio_trxstate = trxstate_off;
axradio_phy_chanpllrng[0] = ax5043ReadReg(AX5043_PLLRANGINGA);
// VCOI Calibration
if (axradio_phy_vcocalib) {
ax5043_set_registers_tx();
ax5043WriteReg(AX5043_MODULATION, 0x08);
ax5043WriteReg(AX5043_FSKDEV2, 0x00);
ax5043WriteReg(AX5043_FSKDEV1, 0x00);
ax5043WriteReg(AX5043_FSKDEV0, 0x00);
regValue = ax5043ReadReg(AX5043_PLLLOOP);
regValue |= 0x04;
ax5043WriteReg(AX5043_PLLLOOP, regValue);
{
uint8_t x = ax5043ReadReg(AX5043_0xF35);
x |= 0x80;
if (2 & (uint8_t)~x)
++x;
ax5043WriteReg(AX5043_0xF35, x);
}
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_SYNTH_TX);
{
uint8_t vcoisave = ax5043ReadReg(AX5043_PLLVCOI);
uint8_t j = 2;
axradio_phy_chanvcoi[0] = 0;
ax5043WriteReg(AX5043_PLLRANGINGA, axradio_phy_chanpllrng[0] & 0x0F);
{
uint32_t f = axradio_phy_chanfreq[0];
ax5043WriteReg(AX5043_FREQA0, f);
ax5043WriteReg(AX5043_FREQA1, f >> 8);
ax5043WriteReg(AX5043_FREQA2, f >> 16);
ax5043WriteReg(AX5043_FREQA3, f >> 24);
}
do {
if (axradio_phy_chanvcoiinit[0]) {
uint8_t x = axradio_phy_chanvcoiinit[0];
if (!(axradio_phy_chanpllrnginit[0] & 0xF0))
x += (axradio_phy_chanpllrng[0] & 0x0F) - (axradio_phy_chanpllrnginit[0] & 0x0F);
axradio_phy_chanvcoi[0] = axradio_adjustvcoi(x);
} else {
axradio_phy_chanvcoi[0] = axradio_calvcoi();
}
} while (--j);
j = 1;
ax5043WriteReg(AX5043_PLLVCOI, vcoisave);
}
}
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_POWERDOWN);
ax5043_init_registers();
ax5043_set_registers_rx();
ax5043WriteReg(AX5043_PLLRANGINGA, axradio_phy_chanpllrng[0] & 0x0F);
{
uint32_t f = axradio_phy_chanfreq[0];
ax5043WriteReg(AX5043_FREQA0, f);
ax5043WriteReg(AX5043_FREQA1, f >> 8);
ax5043WriteReg(AX5043_FREQA2, f >> 16);
ax5043WriteReg(AX5043_FREQA3, f >> 24);
}
axradio_mode = AXRADIO_MODE_OFF;
if (axradio_phy_chanpllrng[0] & 0x20)
return AXRADIO_ERR_RANGING;
return AXRADIO_ERR_NOERROR;
}
uint8_t axradio_setfreq(int32_t f) {
uint8_t regValue;
// range all channels
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_XTAL_ON);
axradio_wait_for_xtal();
{
int32_t f1 = axradio_conv_freq_fromhz(f);
/* Set LSB, per AX5043 documentation, to prevent synthesizer spurs */
f1 |= 1;
ax5043WriteReg(AX5043_FREQA0, f1);
ax5043WriteReg(AX5043_FREQA1, f1 >> 8);
ax5043WriteReg(AX5043_FREQA2, f1 >> 16);
ax5043WriteReg(AX5043_FREQA3, f1 >> 24);
}
axradio_trxstate = trxstate_pll_ranging;
{
uint8_t r;
if( !(axradio_phy_chanpllrnginit[0] & 0xF0) ) { // start values for ranging available
r = axradio_phy_chanpllrnginit[0] | 0x10;
}
else {
r = 0x18;
}
ax5043WriteReg(AX5043_PLLRANGINGA, r); // init ranging process starting from "range"
}
//printf("INFO: Waiting for PLL ranging process\n");
while ((ax5043ReadReg(AX5043_PLLRANGINGA) & 0x10) != 0) {
usleep(1000);
}
//printf("INFO: PLL ranging process complete\n");
axradio_trxstate = trxstate_off;
axradio_phy_chanpllrng[0] = ax5043ReadReg(AX5043_PLLRANGINGA);
// VCOI Calibration
if (axradio_phy_vcocalib) {
ax5043_set_registers_tx();
ax5043WriteReg(AX5043_MODULATION, 0x08);
ax5043WriteReg(AX5043_FSKDEV2, 0x00);
ax5043WriteReg(AX5043_FSKDEV1, 0x00);
ax5043WriteReg(AX5043_FSKDEV0, 0x00);
regValue = ax5043ReadReg(AX5043_PLLLOOP);
regValue |= 0x04;
ax5043WriteReg(AX5043_PLLLOOP, regValue);
{
uint8_t x = ax5043ReadReg(AX5043_0xF35);
x |= 0x80;
if (2 & (uint8_t)~x)
++x;
ax5043WriteReg(AX5043_0xF35, x);
}
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_SYNTH_TX);
{
uint8_t vcoisave = ax5043ReadReg(AX5043_PLLVCOI);
uint8_t j = 2;
axradio_phy_chanvcoi[0] = 0;
ax5043WriteReg(AX5043_PLLRANGINGA, axradio_phy_chanpllrng[0] & 0x0F);
{
int32_t f1 = axradio_conv_freq_fromhz(f);
/* Set LSB, per AX5043 documentation, to prevent synthesizer spurs */
f1 |= 1;
ax5043WriteReg(AX5043_FREQA0, f1);
ax5043WriteReg(AX5043_FREQA1, f1 >> 8);
ax5043WriteReg(AX5043_FREQA2, f1 >> 16);
ax5043WriteReg(AX5043_FREQA3, f1 >> 24);
}
do {
if (axradio_phy_chanvcoiinit[0]) {
uint8_t x = axradio_phy_chanvcoiinit[0];
if (!(axradio_phy_chanpllrnginit[0] & 0xF0))
x += (axradio_phy_chanpllrng[0] & 0x0F) - (axradio_phy_chanpllrnginit[0] & 0x0F);
axradio_phy_chanvcoi[0] = axradio_adjustvcoi(x);
} else {
axradio_phy_chanvcoi[0] = axradio_calvcoi();
}
} while (--j);
j = 1;
ax5043WriteReg(AX5043_PLLVCOI, vcoisave);
}
}
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_POWERDOWN);
ax5043_init_registers();
ax5043_set_registers_rx();
ax5043WriteReg(AX5043_PLLRANGINGA, axradio_phy_chanpllrng[0] & 0x0F);
{
int32_t f1 = axradio_conv_freq_fromhz(f);
/* Set LSB, per AX5043 documentation, to prevent synthesizer spurs */
f1 |= 1;
ax5043WriteReg(AX5043_FREQA0, f1);
ax5043WriteReg(AX5043_FREQA1, f1 >> 8);
ax5043WriteReg(AX5043_FREQA2, f1 >> 16);
ax5043WriteReg(AX5043_FREQA3, f1 >> 24);
}
axradio_mode = AXRADIO_MODE_OFF;
if (axradio_phy_chanpllrng[0] & 0x20)
return AXRADIO_ERR_RANGING;
return AXRADIO_ERR_NOERROR;
}

@ -0,0 +1,428 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AX5043INIT_H_
#define AX5043INIT_H_
#include <stdint.h>
#define AXRADIO_MODE_UNINIT 0x00
#define AXRADIO_MODE_OFF 0x01
#define AXRADIO_MODE_DEEPSLEEP 0x02
#define AXRADIO_MODE_CW_TRANSMIT 0x03
#define AXRADIO_MODE_ASYNC_TRANSMIT 0x10
#define AXRADIO_MODE_WOR_TRANSMIT 0x11
#define AXRADIO_MODE_ACK_TRANSMIT 0x12
#define AXRADIO_MODE_WOR_ACK_TRANSMIT 0x13
#define AXRADIO_MODE_STREAM_TRANSMIT_UNENC 0x18
#define AXRADIO_MODE_STREAM_TRANSMIT_SCRAM 0x19
#define AXRADIO_MODE_STREAM_TRANSMIT_UNENC_LSB 0x1A
#define AXRADIO_MODE_STREAM_TRANSMIT_SCRAM_LSB 0x1B
#define AXRADIO_MODE_STREAM_TRANSMIT 0x1C
#define AXRADIO_MODE_ASYNC_RECEIVE 0x20
#define AXRADIO_MODE_WOR_RECEIVE 0x21
#define AXRADIO_MODE_ACK_RECEIVE 0x22
#define AXRADIO_MODE_WOR_ACK_RECEIVE 0x23
#define AXRADIO_MODE_STREAM_RECEIVE_UNENC 0x28
#define AXRADIO_MODE_STREAM_RECEIVE_SCRAM 0x29
#define AXRADIO_MODE_STREAM_RECEIVE_UNENC_LSB 0x2A
#define AXRADIO_MODE_STREAM_RECEIVE_SCRAM_LSB 0x2B
#define AXRADIO_MODE_STREAM_RECEIVE 0x2C
#define AXRADIO_MODE_STREAM_RECEIVE_DATAPIN 0x2D
#define AXRADIO_MODE_SYNC_MASTER 0x30
#define AXRADIO_MODE_SYNC_ACK_MASTER 0x31
#define AXRADIO_MODE_SYNC_SLAVE 0x32
#define AXRADIO_MODE_SYNC_ACK_SLAVE 0x33
#define AX5043_AFSKCTRL 0x114 /* AFSK Control */
#define AX5043_AFSKMARK0 0x113 /* AFSK Mark (1) Frequency 0 */
#define AX5043_AFSKMARK1 0x112 /* AFSK Mark (1) Frequency 1 */
#define AX5043_AFSKSPACE0 0x111 /* AFSK Space (0) Frequency 0 */
#define AX5043_AFSKSPACE1 0x110 /* AFSK Space (0) Frequency 1 */
#define AX5043_AGCCOUNTER 0x043 /* AGC Counter */
#define AX5043_AMPLFILTER 0x115 /* Amplitude Filter */
#define AX5043_BBOFFSCAP 0x189 /* Baseband Offset Compensation Capacitors */
#define AX5043_BBTUNE 0x188 /* Baseband Tuning */
#define AX5043_BGNDRSSI 0x041 /* Background RSSI */
#define AX5043_BGNDRSSIGAIN 0x22E /* Background RSSI Averaging Time Constant */
#define AX5043_BGNDRSSITHR 0x22F /* Background RSSI Relative Threshold */
#define AX5043_CRCINIT0 0x017 /* CRC Initial Value 0 */
#define AX5043_CRCINIT1 0x016 /* CRC Initial Value 1 */
#define AX5043_CRCINIT2 0x015 /* CRC Initial Value 2 */
#define AX5043_CRCINIT3 0x014 /* CRC Initial Value 3 */
#define AX5043_DACCONFIG 0x332 /* DAC Configuration */
#define AX5043_DACVALUE0 0x331 /* DAC Value 0 */
#define AX5043_DACVALUE1 0x330 /* DAC Value 1 */
#define AX5043_DECIMATION 0x102 /* Decimation Factor */
#define AX5043_DIVERSITY 0x042 /* Antenna Diversity Configuration */
#define AX5043_ENCODING 0x011 /* Encoding */
#define AX5043_FEC 0x018 /* Forward Error Correction */
#define AX5043_FECSTATUS 0x01A /* Forward Error Correction Status */
#define AX5043_FECSYNC 0x019 /* Forward Error Correction Sync Threshold */
#define AX5043_FIFOCOUNT0 0x02B /* Number of Words currently in FIFO 0 */
#define AX5043_FIFOCOUNT1 0x02A /* Number of Words currently in FIFO 1 */
#define AX5043_FIFODATA 0x029 /* FIFO Data */
#define AX5043_FIFOFREE0 0x02D /* Number of Words that can be written to FIFO 0 */
#define AX5043_FIFOFREE1 0x02C /* Number of Words that can be written to FIFO 1 */
#define AX5043_FIFOSTAT 0x028 /* FIFO Control */
#define AX5043_FIFOTHRESH0 0x02F /* FIFO Threshold 0 */
#define AX5043_FIFOTHRESH1 0x02E /* FIFO Threshold 1 */
#define AX5043_FRAMING 0x012 /* Framing Mode */
#define AX5043_FREQA0 0x037 /* Frequency A 0 */
#define AX5043_FREQA1 0x036 /* Frequency A 1 */
#define AX5043_FREQA2 0x035 /* Frequency A 2 */
#define AX5043_FREQA3 0x034 /* Frequency A 3 */
#define AX5043_FREQB0 0x03F /* Frequency B 0 */
#define AX5043_FREQB1 0x03E /* Frequency B 1 */
#define AX5043_FREQB2 0x03D /* Frequency B 2 */
#define AX5043_FREQB3 0x03C /* Frequency B 3 */
#define AX5043_FSKDEV0 0x163 /* FSK Deviation 0 */
#define AX5043_FSKDEV1 0x162 /* FSK Deviation 1 */
#define AX5043_FSKDEV2 0x161 /* FSK Deviation 2 */
#define AX5043_FSKDMAX0 0x10D /* Four FSK Rx Maximum Deviation 0 */
#define AX5043_FSKDMAX1 0x10C /* Four FSK Rx Maximum Deviation 1 */
#define AX5043_FSKDMIN0 0x10F /* Four FSK Rx Minimum Deviation 0 */
#define AX5043_FSKDMIN1 0x10E /* Four FSK Rx Minimum Deviation 1 */
#define AX5043_GPADC13VALUE0 0x309 /* GPADC13 Value 0 */
#define AX5043_GPADC13VALUE1 0x308 /* GPADC13 Value 1 */
#define AX5043_GPADCCTRL 0x300 /* General Purpose ADC Control */
#define AX5043_GPADCPERIOD 0x301 /* GPADC Sampling Period */
#define AX5043_IFFREQ0 0x101 /* 2nd LO / IF Frequency 0 */
#define AX5043_IFFREQ1 0x100 /* 2nd LO / IF Frequency 1 */
#define AX5043_IRQINVERSION0 0x00B /* IRQ Inversion 0 */
#define AX5043_IRQINVERSION1 0x00A /* IRQ Inversion 1 */
#define AX5043_IRQMASK0 0x007 /* IRQ Mask 0 */
#define AX5043_IRQMASK1 0x006 /* IRQ Mask 1 */
#define AX5043_IRQREQUEST0 0x00D /* IRQ Request 0 */
#define AX5043_IRQREQUEST1 0x00C /* IRQ Request 1 */
#define AX5043_LPOSCCONFIG 0x310 /* Low Power Oscillator Calibration Configuration */
#define AX5043_LPOSCFREQ0 0x317 /* Low Power Oscillator Frequency Tuning Low Byte */
#define AX5043_LPOSCFREQ1 0x316 /* Low Power Oscillator Frequency Tuning High Byte */
#define AX5043_LPOSCKFILT0 0x313 /* Low Power Oscillator Calibration Filter Constant Low Byte */
#define AX5043_LPOSCKFILT1 0x312 /* Low Power Oscillator Calibration Filter Constant High Byte */
#define AX5043_LPOSCPER0 0x319 /* Low Power Oscillator Period Low Byte */
#define AX5043_LPOSCPER1 0x318 /* Low Power Oscillator Period High Byte */
#define AX5043_LPOSCREF0 0x315 /* Low Power Oscillator Reference Frequency Low Byte */
#define AX5043_LPOSCREF1 0x314 /* Low Power Oscillator Reference Frequency High Byte */
#define AX5043_LPOSCSTATUS 0x311 /* Low Power Oscillator Calibration Status */
#define AX5043_MATCH0LEN 0x214 /* Pattern Match Unit 0, Pattern Length */
#define AX5043_MATCH0MAX 0x216 /* Pattern Match Unit 0, Maximum Match */
#define AX5043_MATCH0MIN 0x215 /* Pattern Match Unit 0, Minimum Match */
#define AX5043_MATCH0PAT0 0x213 /* Pattern Match Unit 0, Pattern 0 */
#define AX5043_MATCH0PAT1 0x212 /* Pattern Match Unit 0, Pattern 1 */
#define AX5043_MATCH0PAT2 0x211 /* Pattern Match Unit 0, Pattern 2 */
#define AX5043_MATCH0PAT3 0x210 /* Pattern Match Unit 0, Pattern 3 */
#define AX5043_MATCH1LEN 0x21C /* Pattern Match Unit 1, Pattern Length */
#define AX5043_MATCH1MAX 0x21E /* Pattern Match Unit 1, Maximum Match */
#define AX5043_MATCH1MIN 0x21D /* Pattern Match Unit 1, Minimum Match */
#define AX5043_MATCH1PAT0 0x219 /* Pattern Match Unit 1, Pattern 0 */
#define AX5043_MATCH1PAT1 0x218 /* Pattern Match Unit 1, Pattern 1 */
#define AX5043_MAXDROFFSET0 0x108 /* Maximum Receiver Datarate Offset 0 */
#define AX5043_MAXDROFFSET1 0x107 /* Maximum Receiver Datarate Offset 1 */
#define AX5043_MAXDROFFSET2 0x106 /* Maximum Receiver Datarate Offset 2 */
#define AX5043_MAXRFOFFSET0 0x10B /* Maximum Receiver RF Offset 0 */
#define AX5043_MAXRFOFFSET1 0x10A /* Maximum Receiver RF Offset 1 */
#define AX5043_MAXRFOFFSET2 0x109 /* Maximum Receiver RF Offset 2 */
#define AX5043_MODCFGA 0x164 /* Modulator Configuration A */
#define AX5043_MODCFGF 0x160 /* Modulator Configuration F */
#define AX5043_MODCFGP 0xF5F /* Modulator Configuration P */
#define AX5043_MODULATION 0x010 /* Modulation */
#define AX5043_PINFUNCANTSEL 0x025 /* Pin Function ANTSEL */
#define AX5043_PINFUNCDATA 0x023 /* Pin Function DATA */
#define AX5043_PINFUNCDCLK 0x022 /* Pin Function DCLK */
#define AX5043_PINFUNCIRQ 0x024 /* Pin Function IRQ */
#define AX5043_PINFUNCPWRAMP 0x026 /* Pin Function PWRAMP */
#define AX5043_PINFUNCSYSCLK 0x021 /* Pin Function SYSCLK */
#define AX5043_PINSTATE 0x020 /* Pin State */
#define AX5043_PKTACCEPTFLAGS 0x233 /* Packet Controller Accept Flags */
#define AX5043_PKTCHUNKSIZE 0x230 /* Packet Chunk Size */
#define AX5043_PKTMISCFLAGS 0x231 /* Packet Controller Miscellaneous Flags */
#define AX5043_PKTSTOREFLAGS 0x232 /* Packet Controller Store Flags */
#define AX5043_PLLCPI 0x031 /* PLL Charge Pump Current */
#define AX5043_PLLCPIBOOST 0x039 /* PLL Charge Pump Current (Boosted) */
#define AX5043_PLLLOCKDET 0x182 /* PLL Lock Detect Delay */
#define AX5043_PLLLOOP 0x030 /* PLL Loop Filter Settings */
#define AX5043_PLLLOOPBOOST 0x038 /* PLL Loop Filter Settings (Boosted) */
#define AX5043_PLLRANGINGA 0x033 /* PLL Autoranging A */
#define AX5043_PLLRANGINGB 0x03B /* PLL Autoranging B */
#define AX5043_PLLRNGCLK 0x183 /* PLL Autoranging Clock */
#define AX5043_PLLVCODIV 0x032 /* PLL Divider Settings */
#define AX5043_PLLVCOI 0x180 /* PLL VCO Current */
#define AX5043_PLLVCOIR 0x181 /* PLL VCO Current Readback */
#define AX5043_POWCTRL1 0xF08 /* Power Control 1 */
#define AX5043_POWIRQMASK 0x005 /* Power Management Interrupt Mask */
#define AX5043_POWSTAT 0x003 /* Power Management Status */
#define AX5043_POWSTICKYSTAT 0x004 /* Power Management Sticky Status */
#define AX5043_PWRAMP 0x027 /* PWRAMP Control */
#define AX5043_PWRMODE 0x002 /* Power Mode */
#define AX5043_RADIOEVENTMASK0 0x009 /* Radio Event Mask 0 */
#define AX5043_RADIOEVENTMASK1 0x008 /* Radio Event Mask 1 */
#define AX5043_RADIOEVENTREQ0 0x00F /* Radio Event Request 0 */
#define AX5043_RADIOEVENTREQ1 0x00E /* Radio Event Request 1 */
#define AX5043_RADIOSTATE 0x01C /* Radio Controller State */
#define AX5043_REF 0xF0D /* Reference */
#define AX5043_RSSI 0x040 /* Received Signal Strength Indicator */
#define AX5043_RSSIABSTHR 0x22D /* RSSI Absolute Threshold */
#define AX5043_RSSIREFERENCE 0x22C /* RSSI Offset */
#define AX5043_RXDATARATE0 0x105 /* Receiver Datarate 0 */
#define AX5043_RXDATARATE1 0x104 /* Receiver Datarate 1 */
#define AX5043_RXDATARATE2 0x103 /* Receiver Datarate 2 */
#define AX5043_SCRATCH 0x001 /* Scratch */
#define AX5043_SILICONREVISION 0x000 /* Silicon Revision */
#define AX5043_TIMER0 0x05B /* 1MHz Timer 0 */
#define AX5043_TIMER1 0x05A /* 1MHz Timer 1 */
#define AX5043_TIMER2 0x059 /* 1MHz Timer 2 */
#define AX5043_TMGRXAGC 0x227 /* Receiver AGC Settling Time */
#define AX5043_TMGRXBOOST 0x223 /* Receive PLL Boost Time */
#define AX5043_TMGRXCOARSEAGC 0x226 /* Receive Coarse AGC Time */
#define AX5043_TMGRXOFFSACQ 0x225 /* Receive Baseband DC Offset Acquisition Time */
#define AX5043_TMGRXPREAMBLE1 0x229 /* Receiver Preamble 1 Timeout */
#define AX5043_TMGRXPREAMBLE2 0x22A /* Receiver Preamble 2 Timeout */
#define AX5043_TMGRXPREAMBLE3 0x22B /* Receiver Preamble 3 Timeout */
#define AX5043_TMGRXRSSI 0x228 /* Receiver RSSI Settling Time */
#define AX5043_TMGRXSETTLE 0x224 /* Receive PLL (post Boost) Settling Time */
#define AX5043_TMGTXBOOST 0x220 /* Transmit PLL Boost Time */
#define AX5043_TMGTXSETTLE 0x221 /* Transmit PLL (post Boost) Settling Time */
#define AX5043_TRKAFSKDEMOD0 0x055 /* AFSK Demodulator Tracking 0 */
#define AX5043_TRKAFSKDEMOD1 0x054 /* AFSK Demodulator Tracking 1 */
#define AX5043_TRKAMPLITUDE0 0x049 /* Amplitude Tracking 0 */
#define AX5043_TRKAMPLITUDE1 0x048 /* Amplitude Tracking 1 */
#define AX5043_TRKDATARATE0 0x047 /* Datarate Tracking 0 */
#define AX5043_TRKDATARATE1 0x046 /* Datarate Tracking 1 */
#define AX5043_TRKDATARATE2 0x045 /* Datarate Tracking 2 */
#define AX5043_TRKFREQ0 0x051 /* Frequency Tracking 0 */
#define AX5043_TRKFREQ1 0x050 /* Frequency Tracking 1 */
#define AX5043_TRKFSKDEMOD0 0x053 /* FSK Demodulator Tracking 0 */
#define AX5043_TRKFSKDEMOD1 0x052 /* FSK Demodulator Tracking 1 */
#define AX5043_TRKPHASE0 0x04B /* Phase Tracking 0 */
#define AX5043_TRKPHASE1 0x04A /* Phase Tracking 1 */
#define AX5043_TRKRFFREQ0 0x04F /* RF Frequency Tracking 0 */
#define AX5043_TRKRFFREQ1 0x04E /* RF Frequency Tracking 1 */
#define AX5043_TRKRFFREQ2 0x04D /* RF Frequency Tracking 2 */
#define AX5043_TXPWRCOEFFA0 0x169 /* Transmitter Predistortion Coefficient A 0 */
#define AX5043_TXPWRCOEFFA1 0x168 /* Transmitter Predistortion Coefficient A 1 */
#define AX5043_TXPWRCOEFFB0 0x16B /* Transmitter Predistortion Coefficient B 0 */
#define AX5043_TXPWRCOEFFB1 0x16A /* Transmitter Predistortion Coefficient B 1 */
#define AX5043_TXPWRCOEFFC0 0x16D /* Transmitter Predistortion Coefficient C 0 */
#define AX5043_TXPWRCOEFFC1 0x16C /* Transmitter Predistortion Coefficient C 1 */
#define AX5043_TXPWRCOEFFD0 0x16F /* Transmitter Predistortion Coefficient D 0 */
#define AX5043_TXPWRCOEFFD1 0x16E /* Transmitter Predistortion Coefficient D 1 */
#define AX5043_TXPWRCOEFFE0 0x171 /* Transmitter Predistortion Coefficient E 0 */
#define AX5043_TXPWRCOEFFE1 0x170 /* Transmitter Predistortion Coefficient E 1 */
#define AX5043_TXRATE0 0x167 /* Transmitter Bitrate 0 */
#define AX5043_TXRATE1 0x166 /* Transmitter Bitrate 1 */
#define AX5043_TXRATE2 0x165 /* Transmitter Bitrate 2 */
#define AX5043_WAKEUP0 0x06B /* Wakeup Time 0 */
#define AX5043_WAKEUP1 0x06A /* Wakeup Time 1 */
#define AX5043_WAKEUPFREQ0 0x06D /* Wakeup Frequency 0 */
#define AX5043_WAKEUPFREQ1 0x06C /* Wakeup Frequency 1 */
#define AX5043_WAKEUPTIMER0 0x069 /* Wakeup Timer 0 */
#define AX5043_WAKEUPTIMER1 0x068 /* Wakeup Timer 1 */
#define AX5043_WAKEUPXOEARLY 0x06E /* Wakeup Crystal Oscillator Early */
#define AX5043_XTALAMPL 0xF11 /* Crystal Oscillator Amplitude Control */
#define AX5043_XTALCAP 0x184 /* Crystal Oscillator Load Capacitance */
#define AX5043_XTALOSC 0xF10 /* Crystal Oscillator Control */
#define AX5043_XTALSTATUS 0x01D /* Crystal Oscillator Status */
#define AX5043_0xF00 0xF00
#define AX5043_0xF0C 0xF0C
#define AX5043_0xF18 0xF18
#define AX5043_0xF1C 0xF1C
#define AX5043_0xF21 0xF21
#define AX5043_0xF22 0xF22
#define AX5043_0xF23 0xF23
#define AX5043_0xF26 0xF26
#define AX5043_0xF30 0xF30
#define AX5043_0xF31 0xF31
#define AX5043_0xF32 0xF32
#define AX5043_0xF33 0xF33
#define AX5043_0xF34 0xF34
#define AX5043_0xF35 0xF35
#define AX5043_0xF44 0xF44
#define AX5043_AGCAHYST0 0x122 /* AGC Analog Hysteresis */
#define AX5043_AGCAHYST1 0x132 /* AGC Analog Hysteresis */
#define AX5043_AGCAHYST2 0x142 /* AGC Analog Hysteresis */
#define AX5043_AGCAHYST3 0x152 /* AGC Analog Hysteresis */
#define AX5043_AGCGAIN0 0x120 /* AGC Speed */
#define AX5043_AGCGAIN1 0x130 /* AGC Speed */
#define AX5043_AGCGAIN2 0x140 /* AGC Speed */
#define AX5043_AGCGAIN3 0x150 /* AGC Speed */
#define AX5043_AGCMINMAX0 0x123 /* AGC Analog Update Behaviour */
#define AX5043_AGCMINMAX1 0x133 /* AGC Analog Update Behaviour */
#define AX5043_AGCMINMAX2 0x143 /* AGC Analog Update Behaviour */
#define AX5043_AGCMINMAX3 0x153 /* AGC Analog Update Behaviour */
#define AX5043_AGCTARGET0 0x121 /* AGC Target */
#define AX5043_AGCTARGET1 0x131 /* AGC Target */
#define AX5043_AGCTARGET2 0x141 /* AGC Target */
#define AX5043_AGCTARGET3 0x151 /* AGC Target */
#define AX5043_AMPLITUDEGAIN0 0x12B /* Amplitude Estimator Bandwidth */
#define AX5043_AMPLITUDEGAIN1 0x13B /* Amplitude Estimator Bandwidth */
#define AX5043_AMPLITUDEGAIN2 0x14B /* Amplitude Estimator Bandwidth */
#define AX5043_AMPLITUDEGAIN3 0x15B /* Amplitude Estimator Bandwidth */
#define AX5043_BBOFFSRES0 0x12F /* Baseband Offset Compensation Resistors */
#define AX5043_BBOFFSRES1 0x13F /* Baseband Offset Compensation Resistors */
#define AX5043_BBOFFSRES2 0x14F /* Baseband Offset Compensation Resistors */
#define AX5043_BBOFFSRES3 0x15F /* Baseband Offset Compensation Resistors */
#define AX5043_DRGAIN0 0x125 /* Data Rate Estimator Bandwidth */
#define AX5043_DRGAIN1 0x135 /* Data Rate Estimator Bandwidth */
#define AX5043_DRGAIN2 0x145 /* Data Rate Estimator Bandwidth */
#define AX5043_DRGAIN3 0x155 /* Data Rate Estimator Bandwidth */
#define AX5043_FOURFSK0 0x12E /* Four FSK Control */
#define AX5043_FOURFSK1 0x13E /* Four FSK Control */
#define AX5043_FOURFSK2 0x14E /* Four FSK Control */
#define AX5043_FOURFSK3 0x15E /* Four FSK Control */
#define AX5043_FREQDEV00 0x12D /* Receiver Frequency Deviation 0 */
#define AX5043_FREQDEV01 0x13D /* Receiver Frequency Deviation 0 */
#define AX5043_FREQDEV02 0x14D /* Receiver Frequency Deviation 0 */
#define AX5043_FREQDEV03 0x15D /* Receiver Frequency Deviation 0 */
#define AX5043_FREQDEV10 0x12C /* Receiver Frequency Deviation 1 */
#define AX5043_FREQDEV11 0x13C /* Receiver Frequency Deviation 1 */
#define AX5043_FREQDEV12 0x14C /* Receiver Frequency Deviation 1 */
#define AX5043_FREQDEV13 0x15C /* Receiver Frequency Deviation 1 */
#define AX5043_FREQUENCYGAINA0 0x127 /* Frequency Estimator Bandwidth A */
#define AX5043_FREQUENCYGAINA1 0x137 /* Frequency Estimator Bandwidth A */
#define AX5043_FREQUENCYGAINA2 0x147 /* Frequency Estimator Bandwidth A */
#define AX5043_FREQUENCYGAINA3 0x157 /* Frequency Estimator Bandwidth A */
#define AX5043_FREQUENCYGAINB0 0x128 /* Frequency Estimator Bandwidth B */
#define AX5043_FREQUENCYGAINB1 0x138 /* Frequency Estimator Bandwidth B */
#define AX5043_FREQUENCYGAINB2 0x148 /* Frequency Estimator Bandwidth B */
#define AX5043_FREQUENCYGAINB3 0x158 /* Frequency Estimator Bandwidth B */
#define AX5043_FREQUENCYGAINC0 0x129 /* Frequency Estimator Bandwidth C */
#define AX5043_FREQUENCYGAINC1 0x139 /* Frequency Estimator Bandwidth C */
#define AX5043_FREQUENCYGAINC2 0x149 /* Frequency Estimator Bandwidth C */
#define AX5043_FREQUENCYGAINC3 0x159 /* Frequency Estimator Bandwidth C */
#define AX5043_FREQUENCYGAIND0 0x12A /* Frequency Estimator Bandwidth D */
#define AX5043_FREQUENCYGAIND1 0x13A /* Frequency Estimator Bandwidth D */
#define AX5043_FREQUENCYGAIND2 0x14A /* Frequency Estimator Bandwidth D */
#define AX5043_FREQUENCYGAIND3 0x15A /* Frequency Estimator Bandwidth D */
#define AX5043_FREQUENCYLEAK 0x116 /* Baseband Frequency Recovery Loop Leakiness */
#define AX5043_PHASEGAIN0 0x126 /* Phase Estimator Bandwidth */
#define AX5043_PHASEGAIN1 0x136 /* Phase Estimator Bandwidth */
#define AX5043_PHASEGAIN2 0x146 /* Phase Estimator Bandwidth */
#define AX5043_PHASEGAIN3 0x156 /* Phase Estimator Bandwidth */
#define AX5043_PKTADDR0 0x207 /* Packet Address 0 */
#define AX5043_PKTADDR1 0x206 /* Packet Address 1 */
#define AX5043_PKTADDR2 0x205 /* Packet Address 2 */
#define AX5043_PKTADDR3 0x204 /* Packet Address 3 */
#define AX5043_PKTADDRCFG 0x200 /* Packet Address Config */
#define AX5043_PKTADDRMASK0 0x20B /* Packet Address Mask 0 */
#define AX5043_PKTADDRMASK1 0x20A /* Packet Address Mask 1 */
#define AX5043_PKTADDRMASK2 0x209 /* Packet Address Mask 2 */
#define AX5043_PKTADDRMASK3 0x208 /* Packet Address Mask 3 */
#define AX5043_PKTLENCFG 0x201 /* Packet Length Configuration */
#define AX5043_PKTLENOFFSET 0x202 /* Packet Length Offset */
#define AX5043_PKTMAXLEN 0x203 /* Packet Maximum Length */
#define AX5043_RXPARAMCURSET 0x118 /* Receiver Parameter Current Set */
#define AX5043_RXPARAMSETS 0x117 /* Receiver Parameter Set Indirection */
#define AX5043_TIMEGAIN0 0x124 /* Time Estimator Bandwidth */
#define AX5043_TIMEGAIN1 0x134 /* Time Estimator Bandwidth */
#define AX5043_TIMEGAIN2 0x144 /* Time Estimator Bandwidth */
#define AX5043_TIMEGAIN3 0x154 /* Time Estimator Bandwidth */
// power states
#define AX5043_PWRSTATE_POWERDOWN 0x0
#define AX5043_PWRSTATE_DEEPSLEEP 0x1
#define AX5043_PWRSTATE_REGS_ON 0x4
#define AX5043_PWRSTATE_XTAL_ON 0x5
#define AX5043_PWRSTATE_FIFO_ON 0x7
#define AX5043_PWRSTATE_SYNTH_RX 0x8
#define AX5043_PWRSTATE_FULL_RX 0x9
#define AX5043_PWRSTATE_WOR_RX 0xb
#define AX5043_PWRSTATE_SYNTH_TX 0xc
#define AX5043_PWRSTATE_FULL_TX 0xd
//fifo commands
#define AX5043_FIFOCMD_NOP 0x00
#define AX5043_FIFOCMD_DATA 0x01
#define AX5043_FIFOCMD_REPEATDATA 0x02
#define AX5043_FIFOCMD_TIMER 0x10
#define AX5043_FIFOCMD_RSSI 0x11
#define AX5043_FIFOCMD_FREQOFFS 0x12
#define AX5043_FIFOCMD_RFFREQOFFS 0x13
#define AX5043_FIFOCMD_DATARATE 0x14
#define AX5043_FIFOCMD_ANTRSSI 0x15
#define AX5043_FIFOCMD_TXCTRL 0x1C
#define AX5043_FIFOCMD_TXPWR 0x1D
#define SILICONREV1 0x51
\
#define RADIO_OK 0
#define RADIO_ERR_REVISION 1
#define RADIO_ERR_COMM 2
#define RADIO_ERR_IRQ 3
#define RADIO_ERR_WAKEUPTIMEOUT 4
#define PKTDATA_BUFLEN 260
typedef enum {
trxstate_off,
trxstate_rx,
trxstate_rxwor,
trxstate_wait_xtal,
trxstate_xtal_ready,
trxstate_pll_ranging,
trxstate_pll_ranging_done,
trxstate_pll_settling,
trxstate_pll_settled,
trxstate_tx_xtalwait,
trxstate_tx_longpreamble,
trxstate_tx_shortpreamble,
trxstate_tx_packet,
trxstate_tx_waitdone,
trxstate_txcw_xtalwait,
trxstate_txstream_xtalwait,
trxstate_txstream
} axradio_trxstate_t;
struct axradio_address_mask {
uint8_t addr[4];
uint8_t mask[4];
};
void axradio_wait_for_xtal(void);
#endif /* AX5043INIT_H_ */

@ -0,0 +1,91 @@
/*!
\copyright
Copyright (c) 2018 Brandenburg Tech, LLC
All rights reserved.
THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1.Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3.Neither the name of AXSEM AG, Duebendorf nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
4.All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by AXSEM AG and its contributors.
5.The usage of this source code is only granted for operation with AX5043
and AX8052F143. Porting to other radio or communication devices is
strictly prohibited.
THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\file axradioinit_p.h
\brief Provides an interface to initialze the AX5043 transceiver.
*/
#ifndef AX5043INIT_P_H_
#define AX5043INIT_P_H_
#include <stdint.h>
#define AXRADIO_ERR_NOERROR 0x00 //!< Operation successful
#define AXRADIO_ERR_NOTSUPPORTED 0x01 //!< Operation not supported
#define AXRADIO_ERR_BUSY 0x02 //!< Transceiver busy
#define AXRADIO_ERR_TIMEOUT 0x03 //!< Operation timed out
#define AXRADIO_ERR_INVALID 0x04 //!< Invalid parameter
#define AXRADIO_ERR_NOCHIP 0x05 //!< Transceiver not found
#define AXRADIO_ERR_RANGING 0x06 //!< Frequency could not be ranged
#define AXRADIO_ERR_LOCKLOST 0x07 //!< Lost PLL lock
#define AXRADIO_ERR_RETRANSMISSION 0x08 //!< Retrasnmitted packet
#define AXRADIO_ERR_RESYNC 0x09 //!< Restarts synchronization
#define AXRADIO_ERR_RESYNCTIMEOUT 0x0a //!< Synchronization timed out
#define AXRADIO_ERR_RECEIVESTART 0x0b //!< Receiver restarted
//! Structure containing a four byte X.25 address
struct axradio_address {
uint8_t addr[4]; //!< Four byte X.25 address
};
/*! \fn uint8_t axradio_init(void)
\brief Initialize the AX5043 radio transceiver.
\return AXRADIO_ERR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t axradio_init(void);
/*! \fn uint8_t axradio_setfreq(int32_t f)
\brief Set the receive and transmit frequency.
\param f The frequency in Hertz.
\return AXRADIO_ERR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t axradio_setfreq(int32_t f);
#endif /* AX5043INIT_P_H_ */

@ -0,0 +1,188 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "axradiomode.h"
#include "../generated/config.h"
#include "../spi/ax5043spi_p.h"
#include "axradioinit.h"
#include "axradioinit_p.h"
extern uint8_t axradio_phy_chanpllrng[];
extern const uint8_t axradio_phy_vcocalib;
extern uint8_t axradio_phy_chanvcoi[];
extern const uint8_t axradio_phy_chanvcoiinit[];
extern const uint8_t axradio_phy_chanpllrnginit[];
extern const int8_t axradio_phy_rssireference;
static uint8_t ax5043_init_registers_common(void);
uint8_t mode_tx() {
int retVal;
retVal = ax5043_off();
if (retVal != AXRADIO_ERR_NOERROR) {
return retVal;
}
retVal = ax5043_init_registers_tx();
if (retVal != AXRADIO_ERR_NOERROR) {
return retVal;
}
return AXRADIO_ERR_NOERROR;
}
uint8_t mode_rx() {
int retVal;
retVal = ax5043_off();
if (retVal != AXRADIO_ERR_NOERROR) {
return retVal;
}
retVal = ax5043_init_registers_rx();
if (retVal != AXRADIO_ERR_NOERROR) {
return retVal;
}
retVal = ax5043_receiver_on_continuous();
if (retVal != AXRADIO_ERR_NOERROR) {
return retVal;
}
return AXRADIO_ERR_NOERROR;
}
uint8_t ax5043_off(void)
{
uint8_t retVal;
retVal = ax5043_off_xtal();
if (retVal != AXRADIO_ERR_NOERROR) {
return retVal;
}
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_POWERDOWN);
return AXRADIO_ERR_NOERROR;
}
uint8_t ax5043_off_xtal(void)
{
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_XTAL_ON);
ax5043WriteReg(AX5043_LPOSCCONFIG, 0x00); // LPOSC off
return AXRADIO_ERR_NOERROR;
}
uint8_t ax5043_init_registers_tx(void)
{
ax5043_set_registers_tx();
return ax5043_init_registers_common();
}
static uint8_t ax5043_init_registers_common(void)
{
uint8_t rng = axradio_phy_chanpllrng[0];
if (rng & 0x20)
return AXRADIO_ERR_RANGING;
if (ax5043ReadReg(AX5043_PLLLOOP) & 0x80) {
ax5043WriteReg(AX5043_PLLRANGINGB, rng & 0x0F);
} else {
ax5043WriteReg(AX5043_PLLRANGINGA, rng & 0x0F);
}
rng = axradio_get_pllvcoi();
if (rng & 0x80)
ax5043WriteReg(AX5043_PLLVCOI, rng);
return AXRADIO_ERR_NOERROR;
}
uint8_t axradio_get_pllvcoi(void)
{
if (axradio_phy_vcocalib) {
uint8_t x = axradio_phy_chanvcoi[0];
if (x & 0x80)
return x;
}
{
uint8_t x = axradio_phy_chanvcoiinit[0];
if (x & 0x80) {
if (!(axradio_phy_chanpllrnginit[0] & 0xF0)) {
x += (axradio_phy_chanpllrng[0] & 0x0F) - (axradio_phy_chanpllrnginit[0] & 0x0F);
x &= 0x3f;
x |= 0x80;
}
return x;
}
}
return ax5043ReadReg(AX5043_PLLVCOI);
}
uint8_t ax5043_init_registers_rx(void) {
ax5043_set_registers_rx();
return ax5043_init_registers_common();
}
uint8_t ax5043_receiver_on_continuous(void) {
uint8_t regValue;
ax5043WriteReg(AX5043_RSSIREFERENCE, axradio_phy_rssireference);
ax5043_set_registers_rxcont();
regValue = ax5043ReadReg(AX5043_PKTSTOREFLAGS);
regValue &= (uint8_t)~0x40;
ax5043WriteReg(AX5043_PKTSTOREFLAGS, regValue);
ax5043WriteReg(AX5043_FIFOSTAT, 3); // clear FIFO data & flags
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_FULL_RX);
return AXRADIO_ERR_NOERROR;
}

@ -0,0 +1,61 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AX5043MODE_H_
#define AX5043MODE_H_
#include <stdint.h>
uint8_t ax5043_off(void);
uint8_t ax5043_off_xtal(void);
uint8_t ax5043_init_registers_tx(void);
uint8_t axradio_get_pllvcoi(void);
uint8_t ax5043_init_registers_rx(void);
uint8_t ax5043_receiver_on_continuous(void);
#endif /* AX5043MODE_H_ */

@ -0,0 +1,75 @@
/*!
\copyright
Copyright (c) 2018 Brandenburg Tech, LLC
All rights reserved.
THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1.Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3.Neither the name of AXSEM AG, Duebendorf nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
4.All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by AXSEM AG and its contributors.
5.The usage of this source code is only granted for operation with AX5043
and AX8052F143. Porting to other radio or communication devices is
strictly prohibited.
THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\file axradiomode_p.h
\brief Provides an interface to change the transceiver mode.
*/
#ifndef AX5043MODE_P_H_
#define AX5043MODE_P_H_
#include <stdint.h>
/*! \fn uint8_t mode_tx()
\brief Switch the tranceiver into transmit mode.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t mode_tx(void);
/*! \fn uint8_t mode_rx()
\brief Switch the tranceiver into receive mode.
The receive buffer may contain garbage and reading from the buffer
will obtain and discard that garbage.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t mode_rx(void);
#endif /* AX5043MODE_P_H_ */

@ -0,0 +1,147 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "axradiorx.h"
#include "../ax5043support/ax5043rx.h"
#include "../spi/ax5043spi_p.h"
#include "axradioinit.h"
extern const uint8_t axradio_phy_innerfreqloop;
extern uint8_t axradio_rxbuffer[];
static uint8_t receive_loop(void);
uint8_t receive_packet(void) {
return receive_loop();
}
uint8_t receive_loop(void) {
uint8_t fifo_cmd;
uint8_t i;
uint8_t b0 __attribute__((unused));
uint8_t b1 __attribute__((unused));
uint8_t b2 __attribute__((unused));
uint8_t b3 __attribute__((unused));
uint8_t len = ax5043ReadReg(AX5043_RADIOEVENTREQ0); // clear request so interrupt does not fire again. sync_rx enables interrupt on radio state changed in order to wake up on SDF detected
uint8_t bytesRead = 0;
//printf("INFO: Waiting for a packet\n");
while ((ax5043ReadReg(AX5043_FIFOSTAT) & 0x01) != 1) { // FIFO not empty
fifo_cmd = ax5043ReadReg(AX5043_FIFODATA); // read command
len = (fifo_cmd & 0xE0) >> 5; // top 3 bits encode payload len
if (len == 7)
len = ax5043ReadReg(AX5043_FIFODATA); // 7 means variable length, -> get length byte
fifo_cmd &= 0x1F;
switch (fifo_cmd) {
case AX5043_FIFOCMD_DATA:
if (!len)
break;
ax5043ReadReg(AX5043_FIFODATA); // Discard the flags
--len;
bytesRead = ax5043_readfifo(axradio_rxbuffer, len);
break;
case AX5043_FIFOCMD_RFFREQOFFS:
if (axradio_phy_innerfreqloop || len != 3)
goto dropchunk;
i = ax5043ReadReg(AX5043_FIFODATA);
i &= 0x0F;
i |= 1 + (uint8_t)~(i & 0x08);
b3 = ((int8_t)i) >> 8;
b2 = i;
b1 = ax5043ReadReg(AX5043_FIFODATA);
b0 = ax5043ReadReg(AX5043_FIFODATA);
//printf("INFO: RF Frequency Offset: 0x%02x%02x%02x%02x\n", b3, b2, b1, b0);
break;
case AX5043_FIFOCMD_FREQOFFS:
if (!axradio_phy_innerfreqloop || len != 2)
goto dropchunk;
b1 = ax5043ReadReg(AX5043_FIFODATA);
b0 = ax5043ReadReg(AX5043_FIFODATA);
//printf("INFO: Frequency offset: 0x%02x%02x\n", b1, b2);
break;
case AX5043_FIFOCMD_RSSI:
if (len != 1)
goto dropchunk;
{
int8_t r __attribute__((unused));
r = ax5043ReadReg(AX5043_FIFODATA);
//printf("INFO: RSSI %d\n", (int)r);
}
break;
default:
//fprintf(stderr, "ERROR: Unknown chunk in FIFO\n");
dropchunk:
//fprintf(stderr, "WARNING: Discarding chunk in FIFO\n");
if (!len)
break;
i = len;
do {
ax5043ReadReg(AX5043_FIFODATA); // purge FIFO
}
while (--i);
break;
}
}
//printf("INFO: Done waiting for a packet\n");
return bytesRead;
}

@ -0,0 +1,55 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AX5043RX_H_
#define AX5043RX_H_
#include <stdint.h>
#include "axradiorx_p.h"
#endif /* AX5043RX_H_ */

@ -0,0 +1,65 @@
/*!
\copyright
Copyright (c) 2018 Brandenburg Tech, LLC
All rights reserved.
THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1.Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3.Neither the name of AXSEM AG, Duebendorf nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
4.All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by AXSEM AG and its contributors.
5.The usage of this source code is only granted for operation with AX5043
and AX8052F143. Porting to other radio or communication devices is
strictly prohibited.
THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\file axradiorx_p.h
\brief Provides an interface to receive packets using the digital transceiver.
*/
#ifndef AX5043RX_P_H_
#define AX5043RX_P_H_
#include <stdint.h>
/*! \fn uint8_t receive_packet(void)
\brief Receive a packet from the digital transceiver receive buffer.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t receive_packet(void);
#endif /* AX5043RX_P_H_ */

@ -0,0 +1,301 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "axradiotx.h"
//#include <process.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../ax5043support/ax5043tx.h"
#include "../crc/crc.h"
#include "../generated/config.h"
#include "../spi/ax5043spi_p.h"
#include "axradioinit.h"
#include "axradioinit_p.h"
#include "axradiomode.h"
static void transmit_loop(axradio_trxstate_t axradio_trxstate, uint16_t axradio_txbuffer_len,
uint8_t axradio_txbuffer[], uint16_t axradio_txbuffer_cnt);
extern const uint16_t axradio_phy_preamble_len;
extern const uint8_t axradio_phy_preamble_flags;
extern const uint8_t axradio_phy_preamble_byte;
extern const uint8_t axradio_phy_preamble_appendbits;
extern const uint8_t axradio_phy_preamble_appendpattern;
extern const uint16_t axradio_phy_preamble_longlen;
extern const uint8_t axradio_phy_pn9;
extern const uint8_t axradio_framing_synclen;
extern const uint8_t axradio_framing_syncflags;
extern const uint8_t axradio_framing_syncword[];
extern const uint8_t axradio_framing_maclen;
extern const uint8_t axradio_framing_addrlen;
extern const uint8_t axradio_framing_destaddrpos;
extern const uint8_t axradio_framing_sourceaddrpos;
extern const uint8_t axradio_framing_lenpos;
extern const uint8_t axradio_framing_lenoffs;
extern const uint8_t axradio_framing_lenmask;
extern const uint8_t axradio_framing_swcrclen;
uint8_t transmit_packet(const struct axradio_address *addr, const uint8_t *pkt, uint16_t pktlen) {
axradio_trxstate_t axradio_trxstate;
uint16_t axradio_txbuffer_len;
uint8_t axradio_txbuffer[PKTDATA_BUFLEN];
struct axradio_address_mask axradio_localaddr;
uint16_t axradio_txbuffer_cnt = 0;
axradio_txbuffer_len = pktlen + axradio_framing_maclen;
if (axradio_txbuffer_len > sizeof(axradio_txbuffer))
return AXRADIO_ERR_INVALID;
memset(axradio_txbuffer, 0, axradio_framing_maclen);
memcpy(&axradio_txbuffer[axradio_framing_maclen], pkt, pktlen);
if (axradio_framing_destaddrpos != 0xff)
memcpy(&axradio_txbuffer[axradio_framing_destaddrpos], &addr->addr, axradio_framing_addrlen);
if (axradio_framing_sourceaddrpos != 0xff)
memcpy(&axradio_txbuffer[axradio_framing_sourceaddrpos], &axradio_localaddr.addr, axradio_framing_addrlen);
if (axradio_framing_lenmask) {
uint8_t len_byte = (uint8_t)(axradio_txbuffer_len - axradio_framing_lenoffs) & axradio_framing_lenmask; // if you prefer not counting the len byte itself, set LENOFFS = 1
axradio_txbuffer[axradio_framing_lenpos] = (axradio_txbuffer[axradio_framing_lenpos] & (uint8_t)~axradio_framing_lenmask) | len_byte;
}
if (axradio_framing_swcrclen)
axradio_txbuffer_len = axradio_framing_append_crc(axradio_txbuffer, axradio_txbuffer_len);
if (axradio_phy_pn9)
pn9_buffer(axradio_txbuffer, axradio_txbuffer_len, 0x1ff, -(ax5043ReadReg(AX5043_ENCODING) & 0x01));
axradio_txbuffer_cnt = axradio_phy_preamble_longlen;
ax5043_prepare_tx();
ax5043ReadReg(AX5043_RADIOEVENTREQ0); // make sure REVRDONE bit is cleared, so it is a reliable indicator that the packet is out
ax5043WriteReg(AX5043_FIFOSTAT, 3); // clear FIFO data & flags (prevent transmitting anything left over in the FIFO, this has no effect if the FIFO is not powerered, in this case it is reset any way)
axradio_trxstate = trxstate_tx_longpreamble;
if ((ax5043ReadReg(AX5043_MODULATION) & 0x0F) == 9) { // 4-FSK
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_DATA | (7 << 5));
ax5043WriteReg(AX5043_FIFODATA, 2); // length (including flags)
ax5043WriteReg(AX5043_FIFODATA, 0x01); // flag PKTSTART -> dibit sync
ax5043WriteReg(AX5043_FIFODATA, 0x11); // dummy byte for forcing dibit sync
}
transmit_loop(axradio_trxstate, axradio_txbuffer_len, axradio_txbuffer, axradio_txbuffer_cnt);
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_FULL_TX);
ax5043ReadReg(AX5043_RADIOEVENTREQ0);
//printf("INFO: Waiting for transmission to complete\n");
while (ax5043ReadReg(AX5043_RADIOSTATE) != 0) {
usleep(1000);
}
//printf("INFO: Transmission complete\n");
ax5043WriteReg(AX5043_RADIOEVENTMASK0, 0x00);
return AXRADIO_ERR_NOERROR;
}
static void transmit_loop(axradio_trxstate_t axradio_trxstate, uint16_t axradio_txbuffer_len,
uint8_t axradio_txbuffer[], uint16_t axradio_txbuffer_cnt)
{
for (;;) {
uint8_t cnt = ax5043ReadReg(AX5043_FIFOFREE0);
if (ax5043ReadReg(AX5043_FIFOFREE1))
cnt = 0xff;
switch (axradio_trxstate) {
case trxstate_tx_longpreamble:
if (!axradio_txbuffer_cnt) {
axradio_trxstate = trxstate_tx_shortpreamble;
axradio_txbuffer_cnt = axradio_phy_preamble_len;
goto shortpreamble;
}
if (cnt < 4) {
ax5043WriteReg(AX5043_FIFOSTAT, 4); // commit
usleep(1000);
continue;
}
cnt = 7;
if (axradio_txbuffer_cnt < 7)
cnt = axradio_txbuffer_cnt;
axradio_txbuffer_cnt -= cnt;
cnt <<= 5;
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_REPEATDATA | (3 << 5));
ax5043WriteReg(AX5043_FIFODATA, axradio_phy_preamble_flags);
ax5043WriteReg(AX5043_FIFODATA, cnt);
ax5043WriteReg(AX5043_FIFODATA, axradio_phy_preamble_byte);
break;
case trxstate_tx_shortpreamble:
shortpreamble:
if (!axradio_txbuffer_cnt) {
if (cnt < 15) {
ax5043WriteReg(AX5043_FIFOSTAT, 4); // commit
usleep(1000);
continue;
}
if (axradio_phy_preamble_appendbits) {
uint8_t byte;
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_DATA | (2 << 5));
ax5043WriteReg(AX5043_FIFODATA, 0x1C);
byte = axradio_phy_preamble_appendpattern;
if (ax5043ReadReg(AX5043_PKTADDRCFG) & 0x80) {
// msb first -> stop bit below
byte &= 0xFF << (8-axradio_phy_preamble_appendbits);
byte |= 0x80 >> axradio_phy_preamble_appendbits;
} else {
// lsb first -> stop bit above
byte &= 0xFF >> (8-axradio_phy_preamble_appendbits);
byte |= 0x01 << axradio_phy_preamble_appendbits;
}
ax5043WriteReg(AX5043_FIFODATA, byte);
}
if ((ax5043ReadReg(AX5043_FRAMING) & 0x0E) == 0x06 && axradio_framing_synclen) {
// write SYNC word if framing mode is raw_patternmatch, might use SYNCLEN > 0 as a criterion, but need to make sure SYNCLEN=0 for WMBUS (chip automatically sends SYNCWORD but matching in RX works via MATCH0PAT)
uint8_t len_byte = axradio_framing_synclen;
uint8_t i = (len_byte & 0x07) ? 0x04 : 0;
// SYNCLEN in bytes, rather than bits. Ceiled to next integer e.g. fractional bits are counted as full bits;
len_byte += 7;
len_byte >>= 3;
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_DATA | ((len_byte + 1) << 5));
ax5043WriteReg(AX5043_FIFODATA, axradio_framing_syncflags | i);
for (i = 0; i < len_byte; ++i) {
// better put a brace, it might prevent SDCC from optimizing away the assignement...
ax5043WriteReg(AX5043_FIFODATA, axradio_framing_syncword[i]);
}
}
axradio_trxstate = trxstate_tx_packet;
continue;
}
if (cnt < 4) {
ax5043WriteReg(AX5043_FIFOSTAT, 4); // commit
usleep(1000);
continue;
}
cnt = 255;
if (axradio_txbuffer_cnt < 255*8)
cnt = axradio_txbuffer_cnt >> 3;
if (cnt) {
axradio_txbuffer_cnt -= ((uint16_t)cnt) << 3;
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_REPEATDATA | (3 << 5));
ax5043WriteReg(AX5043_FIFODATA, axradio_phy_preamble_flags);
ax5043WriteReg(AX5043_FIFODATA, cnt);
ax5043WriteReg(AX5043_FIFODATA, axradio_phy_preamble_byte);
continue;
}
{
uint8_t byte = axradio_phy_preamble_byte;
cnt = axradio_txbuffer_cnt;
axradio_txbuffer_cnt = 0;
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_DATA | (2 << 5));
ax5043WriteReg(AX5043_FIFODATA, 0x1C);
if (ax5043ReadReg(AX5043_PKTADDRCFG) & 0x80) {
// msb first -> stop bit below
byte &= 0xFF << (8-cnt);
byte |= 0x80 >> cnt;
} else {
// lsb first -> stop bit above
byte &= 0xFF >> (8-cnt);
byte |= 0x01 << cnt;
}
ax5043WriteReg(AX5043_FIFODATA, byte);
}
continue;
case trxstate_tx_packet:
if (cnt < 11) {
ax5043WriteReg(AX5043_FIFOSTAT, 4); // commit
usleep(1000);
continue;
}
{
uint8_t flags = 0;
if (!axradio_txbuffer_cnt)
flags |= 0x01; // flag byte: pkt_start
{
uint16_t len = axradio_txbuffer_len - axradio_txbuffer_cnt;
cnt -= 3;
if (cnt >= len) {
cnt = len;
flags |= 0x02; // flag byte: pkt_end
}
}
if (!cnt)
goto pktend;
ax5043WriteReg(AX5043_FIFODATA, AX5043_FIFOCMD_DATA | (7 << 5));
ax5043WriteReg(AX5043_FIFODATA, cnt + 1); // write FIFO chunk length byte (length includes the flag byte, thus the +1)
ax5043WriteReg(AX5043_FIFODATA, flags);
ax5043_writefifo(&axradio_txbuffer[axradio_txbuffer_cnt], cnt);
axradio_txbuffer_cnt += cnt;
if (flags & 0x02)
goto pktend;
}
break;
default:
fprintf(stderr, "ERROR: Unexpected state found in transmit_isr\n");
exit(EXIT_FAILURE);
}
}
pktend:
ax5043WriteReg(AX5043_RADIOEVENTMASK0, 0x01); // enable REVRDONE event
ax5043WriteReg(AX5043_FIFOSTAT, 4); // commit
}
void ax5043_prepare_tx(void)
{
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_XTAL_ON);
ax5043WriteReg(AX5043_PWRMODE, AX5043_PWRSTATE_FIFO_ON);
ax5043_init_registers_tx();
ax5043WriteReg(AX5043_FIFOTHRESH1, 0);
ax5043WriteReg(AX5043_FIFOTHRESH0, 0x80);
axradio_wait_for_xtal();
ax5043ReadReg(AX5043_POWSTICKYSTAT); // clear pwr management sticky status --> brownout gate works
}

@ -0,0 +1,53 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AX5043TX_H_
#define AX5043TX_H_
void ax5043_prepare_tx(void);
#endif /* AX5043TX_H_ */

@ -0,0 +1,68 @@
/*!
\copyright
Copyright (c) 2018 Brandenburg Tech, LLC
All rights reserved.
THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1.Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3.Neither the name of AXSEM AG, Duebendorf nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
4.All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by AXSEM AG and its contributors.
5.The usage of this source code is only granted for operation with AX5043
and AX8052F143. Porting to other radio or communication devices is
strictly prohibited.
THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\file axradiotx_p.h
\brief Provides an interface to transmit packets using the digital transceiver.
*/
#ifndef AX5043TX_P_H_
#define AX5043TX_P_H_
#include <stdint.h>
/*! \fn uint8_t transmit_packet(const struct axradio_address *addr, const uint8_t *pkt, uint16_t pktlen)
\brief Transmit a packet using the digital transceiver
\param addr The address of the desired destiantion radio, if used.
\param pkt The byte data to be transmitted.
\param pktlen The number of bytes in pkt to be transmitted.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t transmit_packet(const struct axradio_address *addr, const uint8_t *pkt, uint16_t pktlen);
#endif /* AX5043TX_P_H_ */

@ -0,0 +1,111 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#include "crc.h"
/* Polynomial: x^16 + x^15 + x^2 + 1 = 0x18005 LSB first */
const uint16_t crc_crc16_table[256] = {
0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40,
0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841,
0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40,
0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41,
0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641,
0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040,
0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240,
0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441,
0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41,
0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840,
0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41,
0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40,
0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640,
0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041,
0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240,
0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441,
0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41,
0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840,
0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41,
0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40,
0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640,
0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041,
0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241,
0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440,
0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40,
0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841,
0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40,
0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41,
0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641,
0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040
};
uint16_t crc_crc16(const uint8_t *buf, uint16_t buflen, uint16_t crc)
{
if (!buflen)
return crc;
do {
crc = crc_crc16_byte(crc, *buf++);
} while (--buflen);
return crc;
}
uint16_t crc_crc16_byte(uint16_t crc, uint8_t c)
{
return (crc >> 8) ^ crc_crc16_table[((uint8_t)crc ^ c) & (uint8_t)0xff];
}
uint16_t pn9_buffer(uint8_t *buf, uint16_t buflen, uint16_t pn9, uint8_t xor)
{
if (!buflen)
return pn9;
do {
*buf++ ^= pn9 ^ xor;
pn9 = pn9_advance_byte(pn9);
} while (--buflen);
return pn9;
}
uint16_t pn9_advance_bits(uint16_t pn9, uint16_t bits)
{
if (!bits)
return pn9;
do {
pn9 = (uint8_t)(pn9 >> 1) | (((pn9 << 3) ^ (pn9 << 8)) & 0x100);
} while (--bits);
return pn9;
}
uint16_t pn9_advance_byte(uint16_t pn9)
{
uint8_t bits = 8;
do {
pn9 = (uint8_t)(pn9 >> 1) | (((pn9 << 3) ^ (pn9 << 8)) & 0x100);
} while (--bits);
return pn9;
}

@ -0,0 +1,40 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
//
// This file is derived from LibMF, a library provided AXSEM AG. Based on the
// context of the library and the provision of source code, it is assumed
// the source code can be modified for specific applications of the AX5043.
//
// The documentation provides the following notice:
// LibMF is available in source and binary form for SDCC, Keil C51 and IAR
// ICC.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The original files did not contain a copyright notice for AXSEM AG, but the
// documentation contained the following notice.
//
// Copyright (c) 2011, 2012, 2013 AXSEM AG
#ifndef CRC_H_
#define CRC_H_
#include <stdint.h>
uint16_t crc_crc16(const uint8_t *buf, uint16_t buflen, uint16_t crc);
uint16_t crc_crc16_byte(uint16_t crc, uint8_t c);
uint16_t pn9_buffer(uint8_t *buf, uint16_t buflen, uint16_t pn9, uint8_t xor);
uint16_t pn9_advance_bits(uint16_t pn9, uint16_t bits);
uint16_t pn9_advance_byte(uint16_t pn9);
#endif /* CRC_H_ */

@ -0,0 +1,399 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Warning: This file is automatically generated by AX-RadioLAB.
Manual changes are overwritten! */
#include "config.h"
#include "../axradio/axradioinit.h"
#include "../spi/ax5043spi.h"
#include "../crc/crc.h"
// TX: fcarrier=435.300MHz dev= 13.600kHz br= 4.800kBit/s pwr= 15.0dBm
// RX: fcarrier=435.300MHz bw= 28.200kHz br= 4.800kBit/s
void ax5043_set_registers(void)
{
ax5043WriteReg(AX5043_MODULATION, 0x08);
ax5043WriteReg(AX5043_ENCODING, 0x00);
ax5043WriteReg(AX5043_FRAMING, 0x24);
ax5043WriteReg(AX5043_FEC, 0x13);
ax5043WriteReg(AX5043_PINFUNCSYSCLK, 0x01);
ax5043WriteReg(AX5043_PINFUNCDCLK, 0x01);
ax5043WriteReg(AX5043_PINFUNCDATA, 0x01);
ax5043WriteReg(AX5043_PINFUNCANTSEL, 0x01);
ax5043WriteReg(AX5043_PINFUNCPWRAMP, 0x01);
ax5043WriteReg(AX5043_WAKEUPXOEARLY, 0x01);
ax5043WriteReg(AX5043_IFFREQ1, 0x06);
ax5043WriteReg(AX5043_IFFREQ0, 0x04);
ax5043WriteReg(AX5043_DECIMATION, 0x07);
ax5043WriteReg(AX5043_RXDATARATE2, 0x00);
ax5043WriteReg(AX5043_RXDATARATE1, 0xEE);
ax5043WriteReg(AX5043_RXDATARATE0, 0x18);
ax5043WriteReg(AX5043_MAXDROFFSET2, 0x00);
ax5043WriteReg(AX5043_MAXDROFFSET1, 0x00);
ax5043WriteReg(AX5043_MAXDROFFSET0, 0x00);
ax5043WriteReg(AX5043_MAXRFOFFSET2, 0x80);
ax5043WriteReg(AX5043_MAXRFOFFSET1, 0x23);
ax5043WriteReg(AX5043_MAXRFOFFSET0, 0xA9);
ax5043WriteReg(AX5043_FSKDMAX1, 0x05);
ax5043WriteReg(AX5043_FSKDMAX0, 0x76);
ax5043WriteReg(AX5043_FSKDMIN1, 0xFA);
ax5043WriteReg(AX5043_FSKDMIN0, 0x8A);
ax5043WriteReg(AX5043_AMPLFILTER, 0x00);
ax5043WriteReg(AX5043_RXPARAMSETS, 0xF4);
ax5043WriteReg(AX5043_AGCGAIN0, 0xC6);
ax5043WriteReg(AX5043_AGCTARGET0, 0x84);
ax5043WriteReg(AX5043_TIMEGAIN0, 0xEA);
ax5043WriteReg(AX5043_DRGAIN0, 0xE4);
ax5043WriteReg(AX5043_PHASEGAIN0, 0xC3);
ax5043WriteReg(AX5043_FREQUENCYGAINA0, 0x0F);
ax5043WriteReg(AX5043_FREQUENCYGAINB0, 0x1F);
ax5043WriteReg(AX5043_FREQUENCYGAINC0, 0x0A);
ax5043WriteReg(AX5043_FREQUENCYGAIND0, 0x0A);
ax5043WriteReg(AX5043_AMPLITUDEGAIN0, 0x06);
ax5043WriteReg(AX5043_FREQDEV10, 0x00);
ax5043WriteReg(AX5043_FREQDEV00, 0x00);
ax5043WriteReg(AX5043_BBOFFSRES0, 0x00);
ax5043WriteReg(AX5043_AGCGAIN1, 0xC6);
ax5043WriteReg(AX5043_AGCTARGET1, 0x84);
ax5043WriteReg(AX5043_AGCAHYST1, 0x00);
ax5043WriteReg(AX5043_AGCMINMAX1, 0x00);
ax5043WriteReg(AX5043_TIMEGAIN1, 0xE8);
ax5043WriteReg(AX5043_DRGAIN1, 0xE3);
ax5043WriteReg(AX5043_PHASEGAIN1, 0xC3);
ax5043WriteReg(AX5043_FREQUENCYGAINA1, 0x0F);
ax5043WriteReg(AX5043_FREQUENCYGAINB1, 0x1F);
ax5043WriteReg(AX5043_FREQUENCYGAINC1, 0x0A);
ax5043WriteReg(AX5043_FREQUENCYGAIND1, 0x0A);
ax5043WriteReg(AX5043_AMPLITUDEGAIN1, 0x06);
ax5043WriteReg(AX5043_FREQDEV11, 0x02);
ax5043WriteReg(AX5043_FREQDEV01, 0x36);
ax5043WriteReg(AX5043_FOURFSK1, 0x16);
ax5043WriteReg(AX5043_BBOFFSRES1, 0x00);
ax5043WriteReg(AX5043_AGCGAIN3, 0xFF);
ax5043WriteReg(AX5043_AGCTARGET3, 0x84);
ax5043WriteReg(AX5043_AGCAHYST3, 0x00);
ax5043WriteReg(AX5043_AGCMINMAX3, 0x00);
ax5043WriteReg(AX5043_TIMEGAIN3, 0xE7);
ax5043WriteReg(AX5043_DRGAIN3, 0xE2);
ax5043WriteReg(AX5043_PHASEGAIN3, 0xC3);
ax5043WriteReg(AX5043_FREQUENCYGAINA3, 0x0F);
ax5043WriteReg(AX5043_FREQUENCYGAINB3, 0x1F);
ax5043WriteReg(AX5043_FREQUENCYGAINC3, 0x0D);
ax5043WriteReg(AX5043_FREQUENCYGAIND3, 0x0D);
ax5043WriteReg(AX5043_AMPLITUDEGAIN3, 0x06);
ax5043WriteReg(AX5043_FREQDEV13, 0x02);
ax5043WriteReg(AX5043_FREQDEV03, 0x36);
ax5043WriteReg(AX5043_FOURFSK3, 0x16);
ax5043WriteReg(AX5043_BBOFFSRES3, 0x00);
ax5043WriteReg(AX5043_MODCFGF, 0x03);
ax5043WriteReg(AX5043_FSKDEV2, 0x00);
ax5043WriteReg(AX5043_FSKDEV1, 0x37);
ax5043WriteReg(AX5043_FSKDEV0, 0xB5);
ax5043WriteReg(AX5043_MODCFGA, 0x05);
ax5043WriteReg(AX5043_TXRATE2, 0x00);
ax5043WriteReg(AX5043_TXRATE1, 0x13);
ax5043WriteReg(AX5043_TXRATE0, 0xA9);
ax5043WriteReg(AX5043_TXPWRCOEFFB1, 0x0F);
ax5043WriteReg(AX5043_TXPWRCOEFFB0, 0xFF);
ax5043WriteReg(AX5043_PLLVCOI, 0x99);
ax5043WriteReg(AX5043_PLLRNGCLK, 0x03);
ax5043WriteReg(AX5043_BBTUNE, 0x0F);
ax5043WriteReg(AX5043_BBOFFSCAP, 0x77);
ax5043WriteReg(AX5043_PKTADDRCFG, 0x00);
ax5043WriteReg(AX5043_PKTLENCFG, 0x80);
ax5043WriteReg(AX5043_PKTLENOFFSET, 0x00);
ax5043WriteReg(AX5043_PKTMAXLEN, 0xC8);
ax5043WriteReg(AX5043_MATCH0PAT3, 0xAA);
ax5043WriteReg(AX5043_MATCH0PAT2, 0xCC);
ax5043WriteReg(AX5043_MATCH0PAT1, 0xAA);
ax5043WriteReg(AX5043_MATCH0PAT0, 0xCC);
ax5043WriteReg(AX5043_MATCH1PAT1, 0x7E);
ax5043WriteReg(AX5043_MATCH1PAT0, 0x7E);
ax5043WriteReg(AX5043_MATCH1LEN, 0x8A);
ax5043WriteReg(AX5043_MATCH1MAX, 0x0A);
ax5043WriteReg(AX5043_TMGTXBOOST, 0x32);
ax5043WriteReg(AX5043_TMGTXSETTLE, 0x14);
ax5043WriteReg(AX5043_TMGRXBOOST, 0x32);
ax5043WriteReg(AX5043_TMGRXSETTLE, 0x14);
ax5043WriteReg(AX5043_TMGRXOFFSACQ, 0x00);
ax5043WriteReg(AX5043_TMGRXCOARSEAGC, 0x73);
ax5043WriteReg(AX5043_TMGRXRSSI, 0x03);
ax5043WriteReg(AX5043_TMGRXPREAMBLE2, 0x17);
ax5043WriteReg(AX5043_RSSIABSTHR, 0xE6);
ax5043WriteReg(AX5043_BGNDRSSITHR, 0x00);
ax5043WriteReg(AX5043_PKTCHUNKSIZE, 0x0D);
ax5043WriteReg(AX5043_PKTACCEPTFLAGS, 0x20);
ax5043WriteReg(AX5043_DACVALUE1, 0x00);
ax5043WriteReg(AX5043_DACVALUE0, 0x00);
ax5043WriteReg(AX5043_DACCONFIG, 0x00);
ax5043WriteReg(AX5043_REF, 0x03);
ax5043WriteReg(AX5043_XTALOSC, 0x03);
ax5043WriteReg(AX5043_XTALAMPL, 0x07);
ax5043WriteReg(AX5043_0xF1C, 0x07);
ax5043WriteReg(AX5043_0xF21, 0x68);
ax5043WriteReg(AX5043_0xF22, 0xFF);
ax5043WriteReg(AX5043_0xF23, 0x84);
ax5043WriteReg(AX5043_0xF26, 0x98);
ax5043WriteReg(AX5043_0xF34, 0x28);
ax5043WriteReg(AX5043_0xF35, 0x10);
ax5043WriteReg(AX5043_0xF44, 0x25);
}
void ax5043_set_registers_tx(void)
{
ax5043WriteReg(AX5043_PLLLOOP, 0x09);
ax5043WriteReg(AX5043_PLLCPI, 0x02);
ax5043WriteReg(AX5043_PLLVCODIV, 0x24);
ax5043WriteReg(AX5043_XTALCAP, 0x0C);
ax5043WriteReg(AX5043_0xF00, 0x0F);
ax5043WriteReg(AX5043_0xF18, 0x06);
}
void ax5043_set_registers_rx(void)
{
ax5043WriteReg(AX5043_PLLLOOP, 0x0B);
ax5043WriteReg(AX5043_PLLCPI, 0x10);
ax5043WriteReg(AX5043_PLLVCODIV, 0x24);
ax5043WriteReg(AX5043_XTALCAP, 0x0C);
ax5043WriteReg(AX5043_0xF00, 0x0F);
ax5043WriteReg(AX5043_0xF18, 0x02);
}
void ax5043_set_registers_rxwor(void)
{
ax5043WriteReg(AX5043_TMGRXAGC, 0x37);
ax5043WriteReg(AX5043_TMGRXPREAMBLE1, 0x19);
ax5043WriteReg(AX5043_PKTMISCFLAGS, 0x03);
}
void ax5043_set_registers_rxcont(void)
{
ax5043WriteReg(AX5043_TMGRXAGC, 0x00);
ax5043WriteReg(AX5043_TMGRXPREAMBLE1, 0x00);
ax5043WriteReg(AX5043_PKTMISCFLAGS, 0x00);
}
void ax5043_set_registers_rxcont_singleparamset(void)
{
ax5043WriteReg(AX5043_RXPARAMSETS, 0xFF);
ax5043WriteReg(AX5043_FREQDEV13, 0x00);
ax5043WriteReg(AX5043_FREQDEV03, 0x00);
ax5043WriteReg(AX5043_AGCGAIN3, 0xE8);
}
#define MUL8_16(x,y) ((uint8_t)((x)&0xff)*(uint16_t)(uint8_t)((y)&0xff))
#define CONSTMULFIX24(x) \
if (f >= 0) { \
uint32_t r = MUL8_16((x)>>16,f); \
r += MUL8_16((x)>>8,f>>8); \
r += MUL8_16((x),f>>16); \
r >>= 8; \
r += MUL8_16((x)>>24,f); \
r += MUL8_16((x)>>16,f>>8); \
r += MUL8_16((x)>>8,f>>16); \
r += MUL8_16((x),f>>24); \
r += ((uint32_t)MUL8_16((x)>>24,f>>8))<<8; \
r += ((uint32_t)MUL8_16((x)>>16,f>>16))<<8; \
r += ((uint32_t)MUL8_16((x)>>8,f>>24))<<8; \
r += ((uint32_t)MUL8_16((x)>>24,f>>16))<<16; \
r += ((uint32_t)MUL8_16((x)>>16,f>>24))<<16; \
r += ((uint32_t)MUL8_16((x)>>24,f>>24))<<24; \
return r; \
} \
{ \
int32_t r; \
f = -f; \
r = -(uint32_t)MUL8_16((x)>>16,f); \
r -= (uint32_t)MUL8_16((x)>>8,f>>8); \
r -= (uint32_t)MUL8_16((x),f>>16); \
r >>= 8; \
r -= (uint32_t)MUL8_16((x)>>24,f); \
r -= (uint32_t)MUL8_16((x)>>16,f>>8); \
r -= (uint32_t)MUL8_16((x)>>8,f>>16); \
r -= (uint32_t)MUL8_16((x),f>>24); \
r -= ((uint32_t)MUL8_16((x)>>24,f>>8))<<8; \
r -= ((uint32_t)MUL8_16((x)>>16,f>>16))<<8; \
r -= ((uint32_t)MUL8_16((x)>>8,f>>24))<<8; \
r -= ((uint32_t)MUL8_16((x)>>24,f>>16))<<16; \
r -= ((uint32_t)MUL8_16((x)>>16,f>>24))<<16; \
r -= ((uint32_t)MUL8_16((x)>>24,f>>24))<<24; \
return r; \
}
#define CONSTMULFIX16(x) \
if (f >= 0) { \
uint32_t r = MUL8_16((x)>>16,f); \
r += MUL8_16((x)>>8,f>>8); \
r >>= 8; \
r += MUL8_16((x)>>24,f); \
r += MUL8_16((x)>>16,f>>8); \
r += ((uint32_t)MUL8_16((x)>>24,f>>8))<<8; \
return r; \
} \
{ \
int32_t r; \
f = -f; \
r = -(uint32_t)MUL8_16((x)>>16,f); \
r -= (uint32_t)MUL8_16((x)>>8,f>>8); \
r >>= 8; \
r -= (uint32_t)MUL8_16((x)>>24,f); \
r -= (uint32_t)MUL8_16((x)>>16,f>>8); \
r -= ((uint32_t)MUL8_16((x)>>24,f>>8))<<8; \
return r; \
}
int32_t axradio_conv_freq_fromhz(int32_t f)
{
/* scale by 1.048576 (true 1.048576) */
CONSTMULFIX24(0x10c6f7a);
}
int32_t axradio_conv_freq_tohz(int32_t f)
{
/* scale by 0.953674 (true 0.953674) */
CONSTMULFIX24(0xf42400);
}
const uint8_t axradio_phy_innerfreqloop = 0;
int32_t axradio_conv_freq_fromreg(int32_t f)
{
/* scale by 1.000000 (true 1.000000) */
CONSTMULFIX16(0x1000000);
}
int32_t axradio_conv_timeinterval_totimer0(int32_t dt)
{
/* scale by 0.032776 (true 0.032768) */
int32_t r;
dt >>= 5;
r = dt;
dt >>= 4;
r += dt;
dt >>= 2;
r -= dt;
dt >>= 3;
r += dt;
return r;
}
uint8_t axradio_byteconv(uint8_t b)
{
return b;
}
void axradio_byteconv_buffer(uint8_t *buf __attribute__((unused)), uint16_t buflen __attribute__((unused)))
{
}
uint16_t axradio_framing_check_crc(uint8_t *pkt, uint16_t cnt)
{
if (crc_crc16(pkt, cnt, 0xFFFF) != 0xB001)
return 0;
return cnt;
}
uint16_t axradio_framing_append_crc(uint8_t *pkt, uint16_t cnt)
{
uint16_t s = 0xFFFF;
s = crc_crc16(pkt, cnt, s);
pkt += cnt;
*pkt++ = ~(uint8_t)(s);
*pkt++ = ~(uint8_t)(s >> 8);
return cnt + 2;
}
// physical layer
const uint8_t axradio_phy_pn9 = 0;
const uint8_t axradio_phy_nrchannels = 1;
const uint32_t axradio_phy_chanfreq[1] = { 0x1b34cccd };
const uint8_t axradio_phy_chanpllrnginit[1] = { 0x0a };
const uint8_t axradio_phy_chanvcoiinit[1] = { 0x99 };
uint8_t axradio_phy_chanpllrng[1];
uint8_t axradio_phy_chanvcoi[1];
const uint8_t axradio_phy_vcocalib = 0;
const int32_t axradio_phy_maxfreqoffset = 27387;
const int8_t axradio_phy_rssioffset = 64;
// axradio_phy_rssioffset is added to AX5043_RSSIREFERENCE and subtracted from chip RSSI value to prevent overflows (8bit RSSI only goes down to -128)
// axradio_phy_rssioffset is also added to AX5043_RSSIABSTHR
const int8_t axradio_phy_rssireference = (int8_t)(0xF8 + 64);
const int8_t axradio_phy_channelbusy = -90 + 64;
const uint16_t axradio_phy_cs_period = 7; // timer0 units, 10ms
const uint8_t axradio_phy_cs_enabled = 0;
const uint8_t axradio_phy_lbt_retries = 0;
const uint8_t axradio_phy_lbt_forcetx = 0;
const uint16_t axradio_phy_preamble_wor_longlen = 2; // wor_longlen + wor_len totals to 240.0ms plus 112bits
const uint16_t axradio_phy_preamble_wor_len = 176;
const uint16_t axradio_phy_preamble_longlen = 0;
const uint16_t axradio_phy_preamble_len = 112;
const uint8_t axradio_phy_preamble_byte = 0x7e;
const uint8_t axradio_phy_preamble_flags = 0x38;
const uint8_t axradio_phy_preamble_appendbits = 0;
const uint8_t axradio_phy_preamble_appendpattern = 0x00;
//framing
const uint8_t axradio_framing_maclen = 1;
const uint8_t axradio_framing_addrlen = 0;
const uint8_t axradio_framing_destaddrpos = 0;
const uint8_t axradio_framing_sourceaddrpos = 0xff;
const uint8_t axradio_framing_lenpos = 0;
const uint8_t axradio_framing_lenoffs = 0;
const uint8_t axradio_framing_lenmask = 0xff;
const uint8_t axradio_framing_swcrclen = 0;
const uint8_t axradio_framing_synclen = 32;
const uint8_t axradio_framing_syncword[] = { 0xcc, 0xaa, 0xcc, 0xaa};
const uint8_t axradio_framing_syncflags = 0x18;
const uint8_t axradio_framing_enable_sfdcallback = 0;
const uint32_t axradio_framing_ack_timeout = 65; // 98.9ms in wtimer0 units (640Hz)
const uint32_t axradio_framing_ack_delay = 313; // 1.0ms in wtimer1 units (20MHz/64)
const uint8_t axradio_framing_ack_retransmissions = 0;
const uint8_t axradio_framing_ack_seqnrpos = 0xff;
const uint8_t axradio_framing_minpayloadlen = 0; // must be set to 1 if the payload directly follows the destination address, and a CRC is configured
//WOR
const uint16_t axradio_wor_period = 128;
// synchronous mode
const uint32_t axradio_sync_period = 32768; // ACTUALLY FREQ, NOT PERIOD!
const uint32_t axradio_sync_xoscstartup = 49;
const uint32_t axradio_sync_slave_syncwindow = 98304; // 3.000s
const uint32_t axradio_sync_slave_initialsyncwindow = 5898240; //180.000s
const uint32_t axradio_sync_slave_syncpause = 19660800; // 600.000s
const int16_t axradio_sync_slave_maxperiod = 2020; // in (2^SYNC_K1) * wtimer0 units
const uint8_t axradio_sync_slave_resyncloss = 11; // resyncloss is one more than the number of missed packets to cause a resync
// window 0 is the first window after synchronisation
// window 1 is the window normally used when there are no lost packets
// window 2 is used after one packet is lost, etc
const uint8_t axradio_sync_slave_nrrx = 3;
const uint32_t axradio_sync_slave_rxadvance[] = { 1833, 1796, 1874 };// 55.918ms, 54.788ms, 57.167ms
const uint32_t axradio_sync_slave_rxwindow[] = { 1847, 1773, 1929 }; // 56.346ms, 54.086ms, 58.844ms
const uint32_t axradio_sync_slave_rxtimeout = 3032; // 92.5ms, maximum duration of a packet

@ -0,0 +1,29 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CONFIG_H_
#define CONFIG_H_
#include <stdint.h>
void ax5043_set_registers(void);
void ax5043_set_registers_tx(void);
void ax5043_set_registers_rx(void);
void ax5043_set_registers_rxcont(void);
int32_t axradio_conv_freq_fromhz(int32_t f);
uint16_t axradio_framing_append_crc(uint8_t *pkt, uint16_t cnt);
#endif /* CONFIG_H_ */

@ -0,0 +1,23 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../axradio/axradioinit.h"
#include "configrx.h"
#include "configtx.h"
const uint8_t framing_insert_counter = 1;
const uint8_t framing_counter_pos = 0;
const uint16_t lpxosc_settlingtime = 3000;

@ -0,0 +1,32 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Warning: This file is automatically generated by AX-RadioLAB.
Manual changes are overwritten! */
#include "configrx.h"
#include "../axradio/axradioinit.h"
#include "../axradio/axradioinit_p.h"
const struct axradio_address remoteaddr_rx = {
{ 0x32, 0x34, 0x00, 0x00}
};
const struct axradio_address_mask localaddr_rx = {
{ 0x33, 0x34, 0x00, 0x00},
{ 0x00, 0x00, 0x00, 0x00}
};
const uint16_t lposckfiltmax = 0xaec;

@ -0,0 +1,40 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Warning: This file is automatically generated by AX-RadioLAB.
Manual changes are overwritten! */
#include "../axradio/axradioinit.h"
#define USE_LCD
#define USE_DBGLINK
//#define USE_COM0
//#define DEBUGMSG
#define MCU_SLEEP
#define WTIMER0_CLKSRC CLKSRC_LPOSC
#define WTIMER0_PRESCALER 0x01
#define RADIO_MODE_RX AXRADIO_MODE_ASYNC_RECEIVE
#define FXTAL 48000000
extern const struct axradio_address remoteaddr_rx;
extern const struct axradio_address_mask localaddr_rx;
extern const uint8_t framing_insert_counter;
extern const uint8_t framing_counter_pos;
extern const uint16_t lposckfiltmax;
extern const uint16_t lpxosc_settlingtime;

@ -0,0 +1,32 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Warning: This file is automatically generated by AX-RadioLAB.
Manual changes are overwritten! */
#include "configtx.h"
#include "../axradio/axradioinit.h"
const struct axradio_address remoteaddr_tx = {
{ 0x33, 0x34, 0x00, 0x00}
};
const struct axradio_address_mask localaddr_tx = {
{ 0x32, 0x34, 0x00, 0x00},
{ 0x00, 0x00, 0x00, 0x00}
};
const uint8_t demo_packet[] = { 0x00, 0x00, 0x55, 0x66, 0x77, 0x88 };

@ -0,0 +1,36 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Warning: This file is automatically generated by AX-RadioLAB.
Manual changes are overwritten! */
#include "../axradio/axradioinit_p.h"
//#define USE_LCD
//#define USE_DBGLINK
#define USE_COM0
//#define DEBUGMSG
//#define MCU_SLEEP
#define WTIMER0_CLKSRC CLKSRC_LPOSC
#define WTIMER0_PRESCALER 0x01
#define WTIMER0_PERIOD 0x0280
#define RADIO_MODE_TX AXRADIO_MODE_ASYNC_TRANSMIT
extern const struct axradio_address remoteaddr_tx;
extern const struct axradio_address_mask localaddr_tx;
extern const uint8_t demo_packet[6];
extern const uint8_t framing_insert_counter;
extern const uint8_t framing_counter_pos;
extern const uint16_t lpxosc_settlingtime;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

@ -0,0 +1,111 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ax5043spi.h"
//#include <process.h>
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include "dummyspi.h"
//#warning "For production builds, must not include dummyspi.h"
#include <wiringPiSPI.h>
#include <wiringPi.h>
int spiChannel = -1;
int spiSpeed = -1;
void setSpiChannel(int newSpiChannel) {
spiChannel = newSpiChannel;
}
void setSpiSpeed(int newSpiSpeed) {
spiSpeed = newSpiSpeed;
}
void initializeSpi() {
//printf("INFO: Initializing SPI\n");
if (spiChannel < 0) {
fprintf(stderr, "ERROR: invalid SPI channel %d\n", spiChannel);
exit(EXIT_FAILURE);
}
if (spiSpeed < 0) {
fprintf(stderr, "ERROR: invalid SPI speed %d\n", spiSpeed);
exit(EXIT_FAILURE);
}
int fd;
wiringPiSetup();
fd = wiringPiSPISetup(spiChannel, spiSpeed);
if (fd < 0) {
fprintf(stderr, "ERROR: Cannot open SPI bus with error %d, %s\n",
errno, strerror(errno));
exit(EXIT_FAILURE);
}
//printf("INFO: Finished initializing SPI\n");
}
void ax5043WriteReg(uint16_t reg, uint8_t val) {
uint8_t buf[3];
int result;
if (spiChannel < 0) {
fprintf(stderr, "ERROR: invalid SPI channel %d\n", spiChannel);
exit(EXIT_FAILURE);
}
buf[0] = (unsigned char)(0x00f0 | ((reg & 0xf00) >> 8));
buf[1] = (reg & 0xff);
buf[2] = val & 0xff;
result = wiringPiSPIDataRW(spiChannel, buf, sizeof(buf));
if (result < 0) {
fprintf(stderr, "Failed to write the register with result %d and error %s\n",
result, strerror(result));
exit(EXIT_FAILURE);
}
}
uint8_t ax5043ReadReg(uint16_t reg) {
uint8_t buf[3];
int result;
if (spiChannel < 0) {
fprintf(stderr, "ERROR: invalid SPI channel %d\n", spiChannel);
exit(EXIT_FAILURE);
}
buf[0] = (unsigned char)(0x0070 | ((reg & 0xf00) >> 8));
buf[1] = (reg & 0xff);
buf[2] = 0x0000;
result = wiringPiSPIDataRW(spiChannel, buf, sizeof(buf));
if (result < 0) {
fprintf(stderr, "Failed to read register with result = %d and error %s\n",
result, strerror(errno));
exit(EXIT_FAILURE);
}
//printf("DEBUG: read value: %d\n", (int)buf[2]);
return (buf[2] & 0xff);
}

@ -0,0 +1,23 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AX5043SPI_H_
#define AX5043SPI_H_
#include <stdint.h>
#include "ax5043spi_p.h"
#endif /* AX5043SPI_H_ */

@ -1,7 +1,23 @@
/*! \file ax5043spi_p.h
\brief Provides an abstraction layer for the SPI interface communicating to the digital transceiver
/*! \copyright
Copyright (c) 2018 Brandenburg Tech, LLC
All right reserved.
---
THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\file ax5043spi_p.h
\brief Provides an abstraction layer for the SPI interface communicating to the digital transceiver
*/
#ifndef AX5043SPI_P_H_
#define AX5043SPI_P_H_

@ -0,0 +1,29 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "dummyspi.h"
int wiringPiSPIDataRW(int spiChannel __attribute__((unused)),
unsigned char buf[] __attribute__((unused)), int len __attribute__((unused))) {
return 0;
}
void wiringPiSetup() {
}
int wiringPiSPISetup(int spiChannel __attribute__((unused)),
int spiSpeed __attribute__((unused))) {
return 0;
}

@ -0,0 +1,23 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef DUMMYSPI_H_
#define DUMMYSPI_H_
int wiringPiSPIDataRW(int spiChannel, unsigned char buf[], int len);
void wiringPiSetup();
int wiringPiSPISetup(int spiChannel, int spiSpeed);
#endif /* DUMMYSPI_H_ */

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1480814036" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.380580208" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
<builder buildPath="${workspace_loc:/chat}/Debug" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1852654770" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.1033616455" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1863271633" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.226482119" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.206601509" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.955349696" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.589604185" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1286642722" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1623899746" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1461515728" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1292247743" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/ax5043}&quot;"/>
</option>
<option id="gnu.c.compiler.option.warnings.extrawarn.379254428" name="Extra warnings (-Wextra)" superClass="gnu.c.compiler.option.warnings.extrawarn" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.pedantic.1835862821" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.wconversion.199973786" superClass="gnu.c.compiler.option.warnings.wconversion" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.429996340" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1288306245" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
<option id="gnu.c.link.option.libs.1152238254" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="ax5043"/>
<listOptionValue builtIn="false" value="pthreadGC2"/>
</option>
<option id="gnu.c.link.option.paths.2067644874" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/ax5043/Debug}&quot;"/>
<listOptionValue builtIn="false" value="&quot;C:\git\maker\PiHatAx5043\software\samples\libs\pthreads-w32-2-9-1-release&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.211365983" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.854771769" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1392337617">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1392337617" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1392337617" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1392337617." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.203170490" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1301716766" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
<builder buildPath="${workspace_loc:/chat}/Release" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1987454861" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.1893947315" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1535225529" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1714090193" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1286159677" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
<option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.2022027854" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.1129882161" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1536005390" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.1864242075" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.1722312478" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.266178403" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1544145095" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1974464815" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.1651534637" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="chat.cdt.managedbuild.target.gnu.mingw.exe.1959464389" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1392337617;cdt.managedbuild.config.gnu.mingw.exe.release.1392337617.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1536005390;cdt.managedbuild.tool.gnu.c.compiler.input.266178403">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500;cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1286642722;cdt.managedbuild.tool.gnu.c.compiler.input.429996340">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>

3
chat/.gitignore vendored

@ -1,2 +1 @@
radiochat
*.o
/Debug/

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>chat</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1896922210155201054" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="cdt.managedbuild.config.gnu.mingw.exe.release.1392337617" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1896922210155201054" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>

@ -0,0 +1,11 @@
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1377630500/appendContributed=true

@ -1,21 +0,0 @@
all: radiochat
rebuild: clean
rebuild: all
clean:
rm -f radiochat
rm -f *.o
rm -f */*.o
radiochat: chat/chat_main.o
gcc -Wall -Wextra -o radiochat -pthread -Llibs/. chat/chat_main.o -lwiringPi -lax5043
chat/chat_main.o: chat/chat_main.c
chat/chat_main.o: spi/ax5043spi_p.h
chat/chat_main.o: ax5043/ax5043mode_p.h
chat/chat_main.o: ax5043/ax5043rx_p.h
chat/chat_main.o: ax5043/ax5043tx_p.h
chat/chat_main.o: generated/configtx.h
cd chat; gcc -Wall -Wextra -c chat_main.c; cd ..

@ -1,35 +0,0 @@
/*! \file ax5043init_p.h
\brief Provides an interface to initialze the AX5043 transceiver.
*/
#ifndef AX5043INIT_P_H_
#define AX5043INIT_P_H_
#include <stdint.h>
#define AXRADIO_ERR_NOERROR 0x00 //!< Operation successful
#define AXRADIO_ERR_NOTSUPPORTED 0x01 //!< Operation not supported
#define AXRADIO_ERR_BUSY 0x02 //!< Transceiver busy
#define AXRADIO_ERR_TIMEOUT 0x03 //!< Operation timed out
#define AXRADIO_ERR_INVALID 0x04 //!< Invalid parameter
#define AXRADIO_ERR_NOCHIP 0x05 //!< Transceiver not found
#define AXRADIO_ERR_RANGING 0x06 //!< Frequency could not be ranged
#define AXRADIO_ERR_LOCKLOST 0x07 //!< Lost PLL lock
#define AXRADIO_ERR_RETRANSMISSION 0x08 //!< Retrasnmitted packet
#define AXRADIO_ERR_RESYNC 0x09 //!< Restarts synchronization
#define AXRADIO_ERR_RESYNCTIMEOUT 0x0a //!< Synchronization timed out
#define AXRADIO_ERR_RECEIVESTART 0x0b //!< Receiver restarted
//! Structure containing a four byte X.25 address
struct axradio_address {
uint8_t addr[4]; //!< Four byte X.25 address
};
/*! \fn uint8_t axradio_init(void)
\brief Initialize the AX5043 radio transceiver.
\return AXRADIO_ERR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t axradio_init(void);
#endif /* AX5043INIT_P_H_ */

@ -1,27 +0,0 @@
/*! \file ax5043mode_p.h
\brief Provides an interface to change the transceiver mode.
*/
#ifndef AX5043MODE_P_H_
#define AX5043MODE_P_H_
#include <stdint.h>
/*! \fn uint8_t mode_tx()
\brief Switch the tranceiver into transmit mode.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t mode_tx(void);
/*! \fn uint8_t mode_rx()
\brief Switch the tranceiver into receive mode.
The receive buffer may contain garbage and reading from the buffer
will obtain and discard that garbage.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t mode_rx(void);
#endif /* AX5043MODE_P_H_ */

@ -1,16 +0,0 @@
/*! \file ax5043rx_p.h
\brief Provides an interface to receive packets using the digital transceiver.
*/
#ifndef AX5043RX_P_H_
#define AX5043RX_P_H_
#include <stdint.h>
/*! \fn uint8_t receive_packet(void)
\brief Receive a packet from the digital transceiver receive buffer.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t receive_packet(void);
#endif /* AX5043RX_P_H_ */

@ -1,21 +0,0 @@
/*! \file ax5043tx_p.h
\brief Provides an interface to transmit packets using the digital transceiver.
*/
#ifndef AX5043TX_P_H_
#define AX5043TX_P_H_
#include <stdint.h>
#include "ax5043init_p.h"
/*! \fn uint8_t transmit_packet(const struct axradio_address *addr, const uint8_t *pkt, uint16_t pktlen)
\brief Transmit a packet using the digital transceiver
\param addr The address of the desired destiantion radio, if used.
\param pkt The byte data to be transmitted.
\param pktlen The number of bytes in pkt to be transmitted.
\return AXRADIO_ERROR_NOERROR on success, otherwise a value indicating an error.
\sa AXRADIO_ERR_NOERROR
*/
uint8_t transmit_packet(const struct axradio_address *addr, const uint8_t *pkt, uint16_t pktlen);
#endif /* AX5043TX_P_H_ */

@ -1,29 +1,40 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All rights reserved.
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <axradio/axradioinit_p.h>
#include <axradio/axradiomode_p.h>
#include <axradio/axradiorx_p.h>
#include <axradio/axradiotx_p.h>
#include <generated/configtx.h>
#include <pthread.h>
#include <semaphore.h>
#include <spi/ax5043spi_p.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include "../spi/ax5043spi_p.h"
#include "../ax5043/ax5043mode_p.h"
#include "../ax5043/ax5043rx_p.h"
#include "../ax5043/ax5043tx_p.h"
#include "../generated/configtx.h"
#define MAX_MESSAGE_LENGTH (197)
extern uint8_t axradio_rxbuffer[];
void *receive(void *arg);
void *transmit(void *arg);
int get_message(uint8_t *buffer, int avail);
size_t get_message(uint8_t *buffer, size_t avail);
enum RadioState {UnknownState, RxState, TxState};
enum RadioState currentState = UnknownState;
@ -138,7 +149,7 @@ void *receive(void *arg) {
currentReceiveState = WaitingForPacketCounter2;
break;
case WaitingForPacketCounter2:
packetNumber |= (int)axradio_rxbuffer[counter++] << 8;
packetNumber |= (uint16_t)(axradio_rxbuffer[counter++] << 8);
printf("Pkt Num: %d ", (int)packetNumber);
currentReceiveState = WaitingForMessageLength1;
break;
@ -147,7 +158,7 @@ void *receive(void *arg) {
currentReceiveState = WaitingForMessageLength2;
break;
case WaitingForMessageLength2:
messageLength |= (int)axradio_rxbuffer[counter++] << 8;
messageLength |= (uint16_t)(axradio_rxbuffer[counter++] << 8);
printf("Msg Len: %d ", (int)messageLength);
currentReceiveState = WaitingForMessage;
break;
@ -166,7 +177,7 @@ void *receive(void *arg) {
currentReceiveState = WaitingForChecksum2;
break;
case WaitingForChecksum2:
checksum |= (int)axradio_rxbuffer[counter++] << 8;
checksum |= (uint16_t)(axradio_rxbuffer[counter++] << 8);
printf("(Chksum: %d)\n", (int)checksum);
currentReceiveState = WaitingForNewPacket;
break;
@ -209,7 +220,7 @@ void *transmit(void *arg) {
++pkt_counter;
// Calculate the number of reserved bytes at the beginning of the packet
int reserved_space = 0;
size_t reserved_space = 0;
// if transmitting a packet counter, reserve two bytes
if (framing_insert_counter) {
@ -221,7 +232,7 @@ void *transmit(void *arg) {
reserved_space += 2;
// get a message to transmit.
int msg_length = get_message(&packet[reserved_space], (MAX_MESSAGE_LENGTH + 1) - reserved_space);
size_t msg_length = get_message(&packet[reserved_space], (MAX_MESSAGE_LENGTH + 1) - reserved_space);
// if message consists only of a newline, terminate
if (msg_length <= 1) {
@ -229,8 +240,8 @@ void *transmit(void *arg) {
}
if (framing_insert_counter) {
packet[framing_counter_pos] = pkt_counter & 0xFF ;
packet[framing_counter_pos+1] = (pkt_counter>>8) & 0xFF;
packet[framing_counter_pos] = (uint8_t)(pkt_counter & 0xFF);
packet[framing_counter_pos+1] = (uint8_t)((pkt_counter>>8) & 0xFF);
// include the message length
packet[framing_counter_pos+2] = msg_length & 0xFF ;
@ -260,7 +271,7 @@ void *transmit(void *arg) {
//printf("INFO: Sending another packet...\n");
//printf("DEBUG: msg_length = %d\n", msg_length);
//printf("DEBUG: reserved_space = %d\n", reserved_space);
retVal = transmit_packet(&remoteaddr_tx, packet, msg_length + reserved_space);
retVal = transmit_packet(&remoteaddr_tx, packet, (uint16_t)(msg_length + reserved_space));
if (retVal != AXRADIO_ERR_NOERROR) {
fprintf(stderr, "ERROR: Unable to transmit a packet\n");
exit(EXIT_FAILURE);
@ -278,17 +289,17 @@ void *transmit(void *arg) {
return NULL;
}
int get_message(uint8_t *buffer, int avail) {
size_t get_message(uint8_t *buffer, size_t avail) {
static int instructionsPrinted = 0;
// obtain a line of text. We state the message is limited to avail-2 to
// leave space for the newline and the null terminator
if (!instructionsPrinted) {
printf("Please enter your message, up to %d characters\n (empty message to terminate the program):\n", avail-2);
printf("Please enter your message, up to %d characters\n (empty message to terminate the program):\n", (int)(avail-2));
instructionsPrinted = 1;
}
fgets((char *)buffer, avail, stdin);
fgets((char *)buffer, (int)avail, stdin);
// check for end-of-file (for redirecting stdin)
if (feof(stdin)) {

@ -1,21 +0,0 @@
/* Warning: This file is automatically generated by AX-RadioLAB.
Manual changes are overwritten! */
#include "../ax5043/ax5043init_p.h"
//#define USE_LCD
//#define USE_DBGLINK
#define USE_COM0
//#define DEBUGMSG
//#define MCU_SLEEP
#define WTIMER0_CLKSRC CLKSRC_LPOSC
#define WTIMER0_PRESCALER 0x01
#define WTIMER0_PERIOD 0x0280
#define RADIO_MODE_TX AXRADIO_MODE_ASYNC_TRANSMIT
extern const struct axradio_address remoteaddr_tx;
extern const struct axradio_address_mask localaddr_tx;
extern const uint8_t demo_packet[6];
extern const uint8_t framing_insert_counter;
extern const uint8_t framing_counter_pos;
extern const uint16_t lpxosc_settlingtime;

Binary file not shown.

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.37615557">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.37615557" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.37615557" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.37615557." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1187644489" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1224900573" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
<builder buildPath="${workspace_loc:/init}/Debug" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1972952659" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.719457647" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2108219427" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1038871772" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.296737746" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1917686395" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1748810377" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1946520579" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1244319535" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1544637377" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.644153206" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/ax5043}&quot;"/>
</option>
<option id="gnu.c.compiler.option.warnings.extrawarn.537057540" name="Extra warnings (-Wextra)" superClass="gnu.c.compiler.option.warnings.extrawarn" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.pedantic.482160004" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.warnings.wconversion.727631077" superClass="gnu.c.compiler.option.warnings.wconversion" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1794187139" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.1204448902" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
<option id="gnu.c.link.option.libs.1199303341" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false" valueType="libs">
<listOptionValue builtIn="false" value="ax5043"/>
</option>
<option id="gnu.c.link.option.paths.1527706542" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/ax5043/Debug}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1168112220" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.836423271" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1807325075">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1807325075" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1807325075" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1807325075." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.820581127" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.867544041" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
<builder buildPath="${workspace_loc:/init}/Release" id="cdt.managedbuild.tool.gnu.builder.mingw.base.2124140547" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.1395550553" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1999708616" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1485281640" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1615983146" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
<option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.1999378452" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.289960585" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.749337375" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.703171899" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.2022477628" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1553090057" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.1560602491" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1849674853" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.761256833" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="init.cdt.managedbuild.target.gnu.mingw.exe.934045702" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.37615557;cdt.managedbuild.config.gnu.mingw.exe.debug.37615557.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.1946520579;cdt.managedbuild.tool.gnu.c.compiler.input.1794187139">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1807325075;cdt.managedbuild.config.gnu.mingw.exe.release.1807325075.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.749337375;cdt.managedbuild.tool.gnu.c.compiler.input.1553090057">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/init"/>
</configuration>
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/init"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>

1
init/.gitignore vendored

@ -0,0 +1 @@
/Debug/

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>init</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.config.gnu.mingw.exe.debug.37615557" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1896922210155201054" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
<configuration id="cdt.managedbuild.config.gnu.mingw.exe.release.1807325075" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1896922210155201054" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>

@ -0,0 +1,11 @@
eclipse.preferences.version=1
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/CPATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/CPATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/C_INCLUDE_PATH/delimiter=;
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.37615557/appendContributed=true

@ -0,0 +1,81 @@
// Copyright (c) 2018 Brandenburg Tech, LLC
// All right reserved.
//
// THIS SOFTWARE IS PROVIDED BY BRANDENBURG TECH, LLC AND CONTRIBUTORS
// ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRANDENBURT TECH, LLC
// AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2007,2008,2009,2010,2011,2012,2013, 2014 AXSEM AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1.Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2.Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3.Neither the name of AXSEM AG, Duebendorf nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
// 4.All advertising materials mentioning features or use of this software
// must display the following acknowledgement:
// This product includes software developed by AXSEM AG and its contributors.
// 5.The usage of this source code is only granted for operation with AX5043
// and AX8052F143. Porting to other radio or communication devices is
// strictly prohibited.
//
// THIS SOFTWARE IS PROVIDED BY AXSEM AG AND CONTRIBUTORS ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL AXSEM AG AND CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <axradio/axradioinit.h>
#include <axradio/axradioinit_p.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include "spi/ax5043spi.h"
int main(void)
{
uint8_t retVal;
setSpiChannel(SPI_CHANNEL);
setSpiSpeed(SPI_SPEED);
initializeSpi();
retVal = axradio_init();
if (retVal == AXRADIO_ERR_NOCHIP) {
fprintf(stderr, "ERROR: No AX5043 RF chip found\n");
exit(EXIT_FAILURE);
}
if (retVal != AXRADIO_ERR_NOERROR) {
fprintf(stderr, "ERROR: Unable to initialize AX5043\n");
exit(EXIT_FAILURE);
}
printf("INFO: Found and initialized AX5043\n");
return 0;
}

@ -0,0 +1,539 @@
TARGET_MODEL := --calling_convention=data_overlay --data_model=small --place_constants=code
TARGET_DEFINES := -D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=0
LIBSUFFIX :=
#TARGET_INSTDIR := C:/EDA/IAR\ Systems/Embedded\ Workbench\ 6.0\ Kickstart/8051
#TARGET_INSTDIR := C:/EDA/IAR\ Systems/Embedded\ Workbench\ 6.5/8051
#TARGET_INSTDIR := C:/Program\ Files\ \(x86\)/IAR\ Systems/Embedded\ Workbench\ 6.5/8051
TARGET_INSTDIR := C:/Program\ Files\ \(x86\)/IAR\ Systems/Embedded\ Workbench\ 7.3/8051
TARGET_ASM := $(TARGET_INSTDIR)/bin/a8051.exe
TARGET_LD := $(TARGET_INSTDIR)/bin/xlink.exe
TARGET_CC := $(TARGET_INSTDIR)/bin/icc8051.exe
TARGET_AR := $(TARGET_INSTDIR)/bin/xar.exe
TARGET_ASMFLAGS := -v0 -D__CORE__=1 -D__CODE_MODEL__=1 -D__NUMBER_OF_DPTRS__=1 $(TARGET_DEFINES) -s+ -M"<>" -r -w+ -I$(TARGET_INSTDIR)/src/lib
TARGET_LNKFLAGS := -D_NR_OF_BANKS=0 -D_CODEBANK_END=0 -D_CODEBANK_START=0 -I$(TARGET_INSTDIR)/config -e_small_write=_formatted_write -e_medium_read=_formatted_read -Faomf8051 -Y0 -I$(TARGET_INSTDIR)/lib -f $(TARGET_INSTDIR)/config/devices/_generic/lnk51ew_plain.xcl -D?DPMASK=0x01 -D_NR_OF_VIRTUAL_REGISTERS=8 -D?DPS=0x85 -D?PBANK=0xD9 -D?DPL1=0x84 -D?DPH1=0x85 -s __program_start $(TARGET_INSTDIR)/LIB/CLIB/cl-pli-nsdc-2e16inc.r51 -D_IDATA_STACK_SIZE=0x40 -D_EXTENDED_STACK_START=0x00 -D_EXTENDED_STACK_SIZE=0x00 -D_PDATA_STACK_SIZE=0x80 -D_XDATA_STACK_SIZE=0xEFF -D_XDATA_HEAP_SIZE=0xFF -D_FAR_HEAP_SIZE=0xFFF -D_HUGE_HEAP_SIZE=0xFFF -D_FAR22_HEAP_SIZE=0xFFF
TARGET_CFLAGS := -e --no_unroll --no_inline --no_tbaa --debug --core=plain --dptr=16,1,separate,xor $(TARGET_MODEL) --code_model=near --nr_virtual_regs 8 -Om --library_module --diag_suppress=Pa050 -I../source
LIBMFOBJ := lcdinit.r51 lcdsetpos.r51 lcdwrstr.r51 lcdclear.r51 lcdclrdisp.r51 lcdwru16.r51 lcdwru32.r51 \
lcdwrhexu16.r51 lcdwrhexu32.r51 lcduwrnum16.r51 lcduwrnum32.r51 lcduwrhex16.r51 lcduwrhex32.r51 \
dbglink.r51 dbglnktxbuf.r51 dbglnkrxbuf.r51 dbglnktx.r51 dbglnkrx.r51 dbglnkwrhexu16.r51 dbglnkwrhexu32.r51 dbglnkwrstr.r51 \
dbglnkwru16.r51 dbglnkwru32.r51 dbglnkwrnum16.r51 dbglnkwrnum32.r51 dbglnkwrhex16.r51 dbglnkwrhex32.r51 \
crc8ccitt.r51 crc8onewire.r51 crc8tccitt.r51 crc8tccittmsb.r51 crc8tonewire.r51 crc8tonewiremsb.r51 \
crc8ccittb.r51 crc8ccittmsbb.r51 crc8onewireb.r51 crc8onewiremsbb.r51 \
crc8ccitttable.r51 crc8onewiretable.r51 crc8ccittmsbtable.r51 crc8onewiremsbtable.r51 \
crcccitt.r51 crcccittmsb.r51 crc16ansi.r51 crc16ansimsb.r51 crc16dnp.r51 crc16dnpmsb.r51 crc32ansi.r51 crc32ansimsb.r51 \
crcccittb.r51 crcccittmsbb.r51 crc16ansib.r51 crc16ansimsbb.r51 crc16dnpb.r51 crc16dnpmsbb.r51 crc32ansib.r51 crc32ansimsbb.r51 \
crcccitttable.r51 crc16table.r51 crc16dnptable.r51 crcccittmsbtable.r51 crc16msbtable.r51 \
crc16dnpmsbtable.r51 crc32table.r51 crc32msbtable.r51 pn9.r51 pn9table.r51 pn9bit.r51 pn9bits.r51 pn9byte.r51 pn9buf.r51 \
pn15advtable.r51 pn15outtable.r51 pn15adv.r51 pn15out.r51 \
rev8.r51 hweight8.r51 hweight16.r51 hweight32.r51 signext12.r51 signext16.r51 signext20.r51 signext24.r51 \
chksgnlim16.r51 sgnlim16.r51 chksgnlim32.r51 sgnlim32.r51 grayenc8.r51 graydec8.r51 fmemsetiar.r51 fmemcpyiar.r51 \
delay.r51 random.r51 sleep.r51 sleepcont.r51 deepsleep.r51 standby.r51 resetcpu.r51 \
flashunlock.r51 flashlock.r51 flashwait.r51 flashpgerase.r51 flashwrite.r51 flashread.r51 flashcal.r51 flashcsec.r51 \
uarttimer0.r51 uarttimer1.r51 uarttimer2.r51 uart0init.r51 uart1init.r51 uart0stop.r51 uart1stop.r51 \
uart0txbuf.r51 uart1txbuf.r51 uart0rxbuf.r51 uart1rxbuf.r51 \
uart0tx.r51 uart1tx.r51 uart0rx.r51 uart1rx.r51 uart0wrhexu16.r51 uart1wrhexu16.r51 uart0wrhexu32.r51 uart1wrhexu32.r51 \
uart0wrstr.r51 uart1wrstr.r51 uart0wru16.r51 uart1wru16.r51 uart0wru32.r51 uart1wru32.r51 \
uart0wrnum16.r51 uart0wrnum32.r51 uart0wrhex16.r51 uart0wrhex32.r51 \
uart1wrnum16.r51 uart1wrnum32.r51 uart1wrhex16.r51 uart1wrhex32.r51 \
adctemp.r51 adccal.r51 adccalg.r51 adccalt.r51 adcuncal.r51 adcseoffs00.r51 adcseoffs01.r51 adcseoffs10.r51 \
bch3121dec.r51 bch3121decp.r51 bch3121enc.r51 bch3121encp.r51 bch3121stab.r51 bch3121syn.r51 \
wrnum16.r51 wrnum32.r51 offxosc.r51 offlpxosc.r51 setuplpxosc.r51 setupxosc.r51 setupcal.r51 \
wtimer.r51 wtrem.r51 wtcbadd.r51 wtcbrem.r51 wt0setcfg.r51 wt1setcfg.r51 wtstdby.r51 \
wt0adda.r51 wt1adda.r51 wt0addr.r51 wt1addr.r51 wt0curt.r51 wt1curt.r51 wt0rem.r51 wt1rem.r51 wt01rem.r51 \
radiord16.r51 radiord24.r51 radiord32.r51 radiowr16.r51 radiowr24.r51 radiowr32.r51 radiodswakecore.r51 \
ax5031comminit.r51 ax5031commslpexit.r51 ax5031reset.r51 ax5031deepsleep.r51 ax5031rclkena.r51 ax5031rclkdis.r51 \
ax5031rdfifo.r51 ax5031wrfifo.r51 \
ax5042comminit.r51 ax5042commslpexit.r51 ax5042reset.r51 ax5042deepsleep.r51 ax5042rclkena.r51 ax5042rclkdis.r51 \
ax5042rdfifo.r51 ax5042wrfifo.r51 \
ax5043comminit.r51 ax5043commslpexit.r51 ax5043reset.r51 ax5043deepsleep.r51 ax5043rclkena.r51 ax5043rclkdis.r51 \
ax5043rdfifo.r51 ax5043wrfifo.r51 \
ax5051comminit.r51 ax5051commslpexit.r51 ax5051reset.r51 ax5051deepsleep.r51 ax5051rclkena.r51 ax5051rclkdis.r51 \
ax5051rdfifo.r51 ax5051wrfifo.r51 \
ax8052regs.r51 radioregs.r51 CStartup.r51 getpspiar.r51 getxspiar.r51
BINARIES :=
LIBBINARIES := libmf.r51 libmflarge.r51 \
libmf-pli-nlpc-1e16x01.r51 libmf-pli-nlpd-1e16x01.r51 libmf-pli-nlxc-1e16x01.r51 libmf-pli-nlxd-1e16x01.r51 \
libmf-pli-nsdc-1e16x01.r51 libmf-pli-nsdd-1e16x01.r51 libmf-pli-nsic-1e16x01.r51 libmf-pli-nsid-1e16x01.r51 libmf-pli-nsoc-1e16x01.r51 libmf-pli-nsod-1e16x01.r51 \
libmf-pli-ntdc-1e16x01.r51 libmf-pli-ntdd-1e16x01.r51 libmf-pli-ntic-1e16x01.r51 libmf-pli-ntid-1e16x01.r51 libmf-pli-ntoc-1e16x01.r51 libmf-pli-ntod-1e16x01.r51
ifeq ($(LIBSUFFIX),)
all: $(LIBBINARIES) $(BINARIES) $(patsubst %.omf,%.cdb,$(BINARIES)) $(patsubst %.omf,%.ihx,$(BINARIES))
else
all: libmf$(LIBSUFFIX).r51
endif
clean:
rm -rf *.lnk radioregs.s51 $(LIBBINARIES) $(patsubst %.r51,%,$(LIBBINARIES)) mflibbiniar.tar.gz
tar: mflibbiniar.tar.gz
mflibbiniar.tar.gz: $(LIBBINARIES)
tar -c -v -z -f $@ $(LIBBINARIES)
ifeq ($(LIBSUFFIX),)
.PHONY: libmflarge.r51
.PHONY: libmf-pli-nlpc-1e16x01.r51
.PHONY: libmf-pli-nlpd-1e16x01.r51
.PHONY: libmf-pli-nlxc-1e16x01.r51
.PHONY: libmf-pli-nlxd-1e16x01.r51
.PHONY: libmf-pli-nsdc-1e16x01.r51
.PHONY: libmf-pli-nsdd-1e16x01.r51
.PHONY: libmf-pli-nsic-1e16x01.r51
.PHONY: libmf-pli-nsid-1e16x01.r51
.PHONY: libmf-pli-nsoc-1e16x01.r51
.PHONY: libmf-pli-nsod-1e16x01.r51
.PHONY: libmf-pli-ntdc-1e16x01.r51
.PHONY: libmf-pli-ntdd-1e16x01.r51
.PHONY: libmf-pli-ntic-1e16x01.r51
.PHONY: libmf-pli-ntid-1e16x01.r51
.PHONY: libmf-pli-ntoc-1e16x01.r51
.PHONY: libmf-pli-ntod-1e16x01.r51
libmflarge.r51:
make TARGET_MODEL="--calling_convention=pdata_reentrant --data_model=large --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=2 -D__CALLING_CONVENTION__=3" LIBSUFFIX=large
# name format: -pli-n(1)(2)(3)-1e16x01
# page 152
# (1): data model
# t - --data_model=tiny -D__DATA_MODEL__=0
# s - --data_model=small -D__DATA_MODEL__=1
# l - --data_model=large -D__DATA_MODEL__=2
# g - --data_model=generic -D__DATA_MODEL__=3
# j - --data_model=far_generic -D__DATA_MODEL__=5
# f - --data_model=far -D__DATA_MODEL__=4
# (2): calling convention
# d - --calling_convention=data_overlay -D__CALLING_CONVENTION__=0
# o - --calling_convention=idata_overlay -D__CALLING_CONVENTION__=1
# i - --calling_convention=idata_reentrant -D__CALLING_CONVENTION__=2
# p - --calling_convention=pdata_reentrant -D__CALLING_CONVENTION__=3
# x - --calling_convention=xdata_reentrant -D__CALLING_CONVENTION__=4
# e - --calling_convention=ext_stack_reentrant -D__CALLING_CONVENTION__=5
# (3): constant location
# c - --place_constants=code
# d - --place_constants=data
libmf-pli-nlpc-1e16x01.r51:
make TARGET_MODEL="--data_model=large --calling_convention=pdata_reentrant --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=2 -D__CALLING_CONVENTION__=3" LIBSUFFIX=-pli-nlpc-1e16x01
libmf-pli-nlpd-1e16x01.r51:
make TARGET_MODEL="--data_model=large --calling_convention=pdata_reentrant --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=2 -D__CALLING_CONVENTION__=3" LIBSUFFIX=-pli-nlpd-1e16x01
libmf-pli-nlxc-1e16x01.r51:
make TARGET_MODEL="--data_model=large --calling_convention=xdata_reentrant --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=2 -D__CALLING_CONVENTION__=4" LIBSUFFIX=-pli-nlxc-1e16x01
libmf-pli-nlxd-1e16x01.r51:
make TARGET_MODEL="--data_model=large --calling_convention=xdata_reentrant --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=2 -D__CALLING_CONVENTION__=4" LIBSUFFIX=-pli-nlxd-1e16x01
libmf-pli-nsdc-1e16x01.r51:
make TARGET_MODEL="--data_model=small --calling_convention=data_overlay --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=0" LIBSUFFIX=-pli-nsdc-1e16x01
libmf-pli-nsdd-1e16x01.r51:
make TARGET_MODEL="--data_model=small --calling_convention=data_overlay --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=0" LIBSUFFIX=-pli-nsdd-1e16x01
libmf-pli-nsic-1e16x01.r51:
make TARGET_MODEL="--data_model=small --calling_convention=idata_reentrant --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=2" LIBSUFFIX=-pli-nsic-1e16x01
libmf-pli-nsid-1e16x01.r51:
make TARGET_MODEL="--data_model=small --calling_convention=idata_reentrant --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=2" LIBSUFFIX=-pli-nsid-1e16x01
libmf-pli-nsoc-1e16x01.r51:
make TARGET_MODEL="--data_model=small --calling_convention=idata_overlay --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=1" LIBSUFFIX=-pli-nsoc-1e16x01
libmf-pli-nsod-1e16x01.r51:
make TARGET_MODEL="--data_model=small --calling_convention=idata_overlay --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=1 -D__CALLING_CONVENTION__=1" LIBSUFFIX=-pli-nsod-1e16x01
libmf-pli-ntdc-1e16x01.r51:
make TARGET_MODEL="--data_model=tiny --calling_convention=data_overlay --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=0 -D__CALLING_CONVENTION__=0" LIBSUFFIX=-pli-ntdc-1e16x01
libmf-pli-ntdd-1e16x01.r51:
make TARGET_MODEL="--data_model=tiny --calling_convention=data_overlay --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=0 -D__CALLING_CONVENTION__=0" LIBSUFFIX=-pli-ntdd-1e16x01
libmf-pli-ntic-1e16x01.r51:
make TARGET_MODEL="--data_model=tiny --calling_convention=idata_reentrant --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=0 -D__CALLING_CONVENTION__=2" LIBSUFFIX=-pli-ntic-1e16x01
libmf-pli-ntid-1e16x01.r51:
make TARGET_MODEL="--data_model=tiny --calling_convention=idata_reentrant --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=0 -D__CALLING_CONVENTION__=2" LIBSUFFIX=-pli-ntid-1e16x01
libmf-pli-ntoc-1e16x01.r51:
make TARGET_MODEL="--data_model=tiny --calling_convention=idata_overlay --place_constants=code" TARGET_DEFINES="-D__DATA_MODEL__=0 -D__CALLING_CONVENTION__=1" LIBSUFFIX=-pli-ntoc-1e16x01
libmf-pli-ntod-1e16x01.r51:
make TARGET_MODEL="--data_model=tiny --calling_convention=idata_overlay --place_constants=data" TARGET_DEFINES="-D__DATA_MODEL__=0 -D__CALLING_CONVENTION__=1" LIBSUFFIX=-pli-ntod-1e16x01
endif
.PRECIOUS: radioregs.s51
radioregs.s51: ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h
./genrregs.pl $^ > $@
libmf$(LIBSUFFIX):
[ ! -d $@ ] && mkdir -p $@
.PRECIOUS: %.r51 %.omf %.ihx %.cdb
%.r51: ../%.c
$(TARGET_CC) $(TARGET_CFLAGS) -o $@ -lC `basename $@ .r51`.lst $<
%.omf %.ihx %.cdb: %.r51 libmf$(LIBSUFFIX).r51
(libdir=`pwd`; dn=`dirname $<`/; fn=`basename $< .r51`; cd $${dn}; $(TARGET_LD) -V $(TARGET_LNKFLAGS) -L$${libdir} -llibmf$(LIBSUFFIX) $${fn}.r51; x=$$?; mv $${fn} $${fn}.omf; exit $${x})
libmf$(LIBSUFFIX)/%.r51: ../source/%.c | libmf$(LIBSUFFIX)
$(TARGET_CC) $(TARGET_CFLAGS) -o $@ -lC libmf$(LIBSUFFIX)/`basename $@ .r51`.lst $<
libmf$(LIBSUFFIX)/%.r51: libmf$(LIBSUFFIX)/%.c | libmf$(LIBSUFFIX)
$(TARGET_CC) $(TARGET_CFLAGS) -o $@ -lC libmf$(LIBSUFFIX)/`basename $@ .r51`.lst $<
libmf$(LIBSUFFIX)/%.r51: ../source/%.s51 | libmf$(LIBSUFFIX)
$(TARGET_ASM) $(TARGET_ASMFLAGS) -o $@ -l libmf$(LIBSUFFIX)/`basename $@ .r51`.lst -t8 $<
libmf$(LIBSUFFIX)/%.r51: %.s51 | libmf$(LIBSUFFIX)
$(TARGET_ASM) $(TARGET_ASMFLAGS) -o $@ -l libmf$(LIBSUFFIX)/`basename $@ .r51`.lst -t8 $<
libmf$(LIBSUFFIX)/%.s51: ../source/%.c | libmf$(LIBSUFFIX)
$(TARGET_CC) $(TARGET_CFLAGS) -o libmf$(LIBSUFFIX)/`basename $@ .s51`.r51 -lA $@ $<
libmf$(LIBSUFFIX)/%.s51: libmf$(LIBSUFFIX)/%.c | libmf$(LIBSUFFIX)
$(TARGET_CC) $(TARGET_CFLAGS) -o libmf$(LIBSUFFIX)/`basename $@ .s51`.r51 -lA $@ $<
libmf$(LIBSUFFIX).r51: $(patsubst %.r51,libmf$(LIBSUFFIX)/%.r51,$(LIBMFOBJ)) | libmf$(LIBSUFFIX)
$(TARGET_AR) -o $@ $(patsubst %.r51,libmf$(LIBSUFFIX)/%.r51,$(LIBMFOBJ))
libmf$(LIBSUFFIX)/uarttimer0.c: ../source/uarttimer.c
(unifdef -DTIMER=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer1.c: ../source/uarttimer.c
(unifdef -DTIMER=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer2.c: ../source/uarttimer.c
(unifdef -DTIMER=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0init.c: ../source/uartinit.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0stop.c: ../source/uartstop.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1init.c: ../source/uartinit.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1stop.c: ../source/uartstop.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0%.c: ../source/io%.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1%.c: ../source/io%.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/dbglnk%.c: ../source/io%.c
(unifdef -DUART=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdu%.c: ../source/io%.c
(unifdef -DUART=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5031%.c: ../source/radio%.c
(unifdef -DRADIO=5031 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5042%.c: ../source/radio%.c
(unifdef -DRADIO=5042 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5043%.c: ../source/radio%.c
(unifdef -DRADIO=5043 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5051%.c: ../source/radio%.c
(unifdef -DRADIO=5051 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccitt.c: ../source/crc8.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccittmsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewire.c: ../source/crc8.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewiremsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansi.c: ../source/crc16.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnp.c: ../source/crc16.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccitt.c: ../source/crc16.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansi.c: ../source/crc32.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsb.c: ../source/crc32msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittb.c: ../source/crc8b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittmsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewireb.c: ../source/crc8b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewiremsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansib.c: ../source/crc16b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpb.c: ../source/crc16b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittb.c: ../source/crc16b.c
(unifdef -DCRCMODE=4 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=5 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansib.c: ../source/crc32b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsbb.c: ../source/crc32b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdinit.r51: ../source/lcdinit.c ../source/libmflcd.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdsetpos.r51: ../source/lcdsetpos.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrstr.r51: ../source/lcdwrstr.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclear.r51: ../source/lcdclear.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclrdisp.r51: ../source/lcdclrdisp.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru16.r51: ../source/lcdwru16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru32.r51: ../source/lcdwru32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu16.r51: ../source/lcdwrhexu16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu32.r51: ../source/lcdwrhexu32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum16.r51: libmf$(LIBSUFFIX)/lcduwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum32.r51: libmf$(LIBSUFFIX)/lcduwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex16.r51: libmf$(LIBSUFFIX)/lcduwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex32.r51: libmf$(LIBSUFFIX)/lcduwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/delay.r51: ../source/delay.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/random.r51: ../source/random.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitt.r51: ../source/crc8ccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewire.r51: ../source/crc8onewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitttable.r51: ../source/crc8ccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiretable.r51: ../source/crc8onewiretable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbtable.r51: ../source/crc8ccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbtable.r51: ../source/crc8onewiremsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitttable.r51: ../source/crcccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16table.r51: ../source/crc16table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnptable.r51: ../source/crc16dnptable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbtable.r51: ../source/crcccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16msbtable.r51: ../source/crc16msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbtable.r51: ../source/crc16dnpmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32table.r51: ../source/crc32table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32msbtable.r51: ../source/crc32msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccitt.r51: libmf$(LIBSUFFIX)/crc8tccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccittmsb.r51: libmf$(LIBSUFFIX)/crc8tccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewire.r51: libmf$(LIBSUFFIX)/crc8tonewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewiremsb.r51: libmf$(LIBSUFFIX)/crc8tonewiremsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansi.r51: libmf$(LIBSUFFIX)/crc16ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsb.r51: libmf$(LIBSUFFIX)/crc16ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnp.r51: libmf$(LIBSUFFIX)/crc16dnp.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsb.r51: libmf$(LIBSUFFIX)/crc16dnpmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitt.r51: libmf$(LIBSUFFIX)/crcccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsb.r51: libmf$(LIBSUFFIX)/crcccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansi.r51: libmf$(LIBSUFFIX)/crc32ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsb.r51: libmf$(LIBSUFFIX)/crc32ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittb.r51: libmf$(LIBSUFFIX)/crc8ccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbb.r51: libmf$(LIBSUFFIX)/crc8ccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewireb.r51: libmf$(LIBSUFFIX)/crc8onewireb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbb.r51: libmf$(LIBSUFFIX)/crc8onewiremsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansib.r51: libmf$(LIBSUFFIX)/crc16ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsbb.r51: libmf$(LIBSUFFIX)/crc16ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpb.r51: libmf$(LIBSUFFIX)/crc16dnpb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbb.r51: libmf$(LIBSUFFIX)/crc16dnpmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittb.r51: libmf$(LIBSUFFIX)/crcccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbb.r51: libmf$(LIBSUFFIX)/crcccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansib.r51: libmf$(LIBSUFFIX)/crc32ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsbb.r51: libmf$(LIBSUFFIX)/crc32ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9.r51: ../source/pn9.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9table.r51: ../source/pn9table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bit.r51: ../source/pn9bit.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bits.r51: ../source/pn9bits.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9byte.r51: ../source/pn9byte.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9buf.r51: ../source/pn9buf.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15advtable.r51: ../source/pn15advtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15outtable.r51: ../source/pn15outtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15adv.r51: ../source/pn15adv.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15out.r51: ../source/pn15out.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/rev8.r51: ../source/rev8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight8.r51: ../source/hweight8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight16.r51: ../source/hweight16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight32.r51: ../source/hweight32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext12.r51: ../source/signext12.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext16.r51: ../source/signext16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext20.r51: ../source/signext20.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext24.r51: ../source/signext24.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim16.r51: ../source/chksgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim16.r51: ../source/sgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim32.r51: ../source/chksgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim32.r51: ../source/sgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/grayenc8.r51: ../source/grayenc8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/graydec8.r51: ../source/graydec8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemset.r51: ../source/fmemset.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemcpy.r51: ../source/fmemcpy.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemsetiar.r51: ../source/fmemsetiar.s51 | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemcpyiar.r51: ../source/fmemcpyiar.s51 | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/standby.r51: ../source/standby.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleep.r51: ../source/sleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleepcont.r51: ../source/sleepcont.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/deepsleep.r51: ../source/deepsleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/resetcpu.r51: ../source/resetcpu.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashunlock.r51: ../source/flashunlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashlock.r51: ../source/flashlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwait.r51: ../source/flashwait.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashpgerase.r51: ../source/flashpgerase.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwrite.r51: ../source/flashwrite.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashread.r51: ../source/flashread.c ../source/libmfflash.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcal.r51: ../source/flashcal.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcsec.r51: ../source/flashcsec.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0init.r51: libmf$(LIBSUFFIX)/uart0init.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1init.r51: libmf$(LIBSUFFIX)/uart1init.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0stop.r51: libmf$(LIBSUFFIX)/uart0stop.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1stop.r51: libmf$(LIBSUFFIX)/uart1stop.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0txbuf.r51: libmf$(LIBSUFFIX)/uart0txbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1txbuf.r51: libmf$(LIBSUFFIX)/uart1txbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rxbuf.r51: libmf$(LIBSUFFIX)/uart0rxbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rxbuf.r51: libmf$(LIBSUFFIX)/uart1rxbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0tx.r51: libmf$(LIBSUFFIX)/uart0tx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1tx.r51: libmf$(LIBSUFFIX)/uart1tx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rx.r51: libmf$(LIBSUFFIX)/uart0rx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rx.r51: libmf$(LIBSUFFIX)/uart1rx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu16.r51: libmf$(LIBSUFFIX)/uart0wrhexu16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu16.r51: libmf$(LIBSUFFIX)/uart1wrhexu16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu32.r51: libmf$(LIBSUFFIX)/uart0wrhexu32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu32.r51: libmf$(LIBSUFFIX)/uart1wrhexu32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrstr.r51: libmf$(LIBSUFFIX)/uart0wrstr.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrstr.r51: libmf$(LIBSUFFIX)/uart1wrstr.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru16.r51: libmf$(LIBSUFFIX)/uart0wru16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru16.r51: libmf$(LIBSUFFIX)/uart1wru16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru32.r51: libmf$(LIBSUFFIX)/uart0wru32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru32.r51: libmf$(LIBSUFFIX)/uart1wru32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum16.r51: libmf$(LIBSUFFIX)/uart0wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum16.r51: libmf$(LIBSUFFIX)/uart1wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum32.r51: libmf$(LIBSUFFIX)/uart0wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum32.r51: libmf$(LIBSUFFIX)/uart1wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex16.r51: libmf$(LIBSUFFIX)/uart0wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex16.r51: libmf$(LIBSUFFIX)/uart1wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex32.r51: libmf$(LIBSUFFIX)/uart0wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex32.r51: libmf$(LIBSUFFIX)/uart1wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglink.r51: ../source/dbglink.c ../source/libmfdbglink.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktxbuf.r51: libmf$(LIBSUFFIX)/dbglnktxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrxbuf.r51: libmf$(LIBSUFFIX)/dbglnkrxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktx.r51: libmf$(LIBSUFFIX)/dbglnktx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrx.r51: libmf$(LIBSUFFIX)/dbglnkrx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu16.r51: libmf$(LIBSUFFIX)/dbglnkwrhexu16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu32.r51: libmf$(LIBSUFFIX)/dbglnkwrhexu32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrstr.r51: libmf$(LIBSUFFIX)/dbglnkwrstr.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru16.r51: libmf$(LIBSUFFIX)/dbglnkwru16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru32.r51: libmf$(LIBSUFFIX)/dbglnkwru32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum16.r51: libmf$(LIBSUFFIX)/dbglnkwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum32.r51: libmf$(LIBSUFFIX)/dbglnkwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex16.r51: libmf$(LIBSUFFIX)/dbglnkwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex32.r51: libmf$(LIBSUFFIX)/dbglnkwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adctemp.r51: ../source/adctemp.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccal.r51: ../source/adccal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalg.r51: ../source/adccalg.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalt.r51: ../source/adccalt.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcuncal.r51: ../source/adcuncal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs00.r51: ../source/adcseoffs00.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs01.r51: ../source/adcseoffs01.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs10.r51: ../source/adcseoffs10.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121dec.r51: ../source/bch3121dec.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121decp.r51: ../source/bch3121decp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121enc.r51: ../source/bch3121enc.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121encp.r51: ../source/bch3121encp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121stab.r51: ../source/bch3121stab.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121syn.r51: ../source/bch3121syn.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum16.r51: ../source/wrnum16.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum32.r51: ../source/wrnum32.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offxosc.r51: ../source/offxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offlpxosc.r51: ../source/offlpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setuplpxosc.r51: ../source/setuplpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupxosc.r51: ../source/setupxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupcal.r51: ../source/setupcal.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtimer.r51: ../source/wtimer.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtrem.r51: ../source/wtrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbadd.r51: ../source/wtcbadd.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbrem.r51: ../source/wtcbrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0setcfg.r51: ../source/wt0setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1setcfg.r51: ../source/wt1setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtstdby.r51: ../source/wtstdby.c ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0adda.r51: ../source/wt0adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1adda.r51: ../source/wt1adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0addr.r51: ../source/wt0addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1addr.r51: ../source/wt1addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0curt.r51: ../source/wt0curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1curt.r51: ../source/wt1curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0rem.r51: ../source/wt0rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1rem.r51: ../source/wt1rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt01rem.r51: ../source/wt01rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord16.r51: ../source/radiord16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord24.r51: ../source/radiord24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord32.r51: ../source/radiord32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr16.r51: ../source/radiowr16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr24.r51: ../source/radiowr24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr32.r51: ../source/radiowr32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiodswakecore.r51: ../source/radiodswakecore.c ../source/radiodefs.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031comminit.r51: libmf$(LIBSUFFIX)/ax5031comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031commslpexit.r51: libmf$(LIBSUFFIX)/ax5031commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031reset.r51: libmf$(LIBSUFFIX)/ax5031reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031deepsleep.r51: libmf$(LIBSUFFIX)/ax5031deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkena.r51: ../source/ax5031rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkdis.r51: ../source/ax5031rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rdfifo.r51: libmf$(LIBSUFFIX)/ax5031rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031wrfifo.r51: libmf$(LIBSUFFIX)/ax5031wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031regs.r51: ../source/ax5031regs.c ../source/ax8052f131.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042comminit.r51: libmf$(LIBSUFFIX)/ax5042comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042commslpexit.r51: libmf$(LIBSUFFIX)/ax5042commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042reset.r51: libmf$(LIBSUFFIX)/ax5042reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042deepsleep.r51: libmf$(LIBSUFFIX)/ax5042deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkena.r51: ../source/ax5042rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkdis.r51: ../source/ax5042rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rdfifo.r51: libmf$(LIBSUFFIX)/ax5042rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042wrfifo.r51: libmf$(LIBSUFFIX)/ax5042wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042regs.r51: ../source/ax5042regs.c ../source/ax8052f142.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043comminit.r51: libmf$(LIBSUFFIX)/ax5043comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043commslpexit.r51: libmf$(LIBSUFFIX)/ax5043commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043reset.r51: libmf$(LIBSUFFIX)/ax5043reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043deepsleep.r51: libmf$(LIBSUFFIX)/ax5043deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkena.r51: ../source/ax5043rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkdis.r51: ../source/ax5043rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rdfifo.r51: libmf$(LIBSUFFIX)/ax5043rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043wrfifo.r51: libmf$(LIBSUFFIX)/ax5043wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043regs.r51: ../source/ax5043regs.c ../source/ax8052f143.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051comminit.r51: libmf$(LIBSUFFIX)/ax5051comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051commslpexit.r51: libmf$(LIBSUFFIX)/ax5051commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051reset.r51: libmf$(LIBSUFFIX)/ax5051reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051deepsleep.r51: libmf$(LIBSUFFIX)/ax5051deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkena.r51: ../source/ax5051rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkdis.r51: ../source/ax5051rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rdfifo.r51: libmf$(LIBSUFFIX)/ax5051rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051wrfifo.r51: libmf$(LIBSUFFIX)/ax5051wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051regs.r51: ../source/ax5051regs.c ../source/ax8052f151.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax8052regs.r51: ../source/ax8052regs.c ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radioregs.r51: radioregs.s51 | libmf$(LIBSUFFIX)

@ -0,0 +1,32 @@
#!/usr/bin/perl
my %regs;
while (<>) {
next unless /^\s*SFRX\(\s*([A-Za-z0-9_]+)\s*,\s*(0x(?:[0-9A-Fa-f])+)\s*\)/;
my $name = $1;
my $addr = hex($2);
next if $addr < 0x4000 || $addr > 0x5fff;
#printf "%s 0x%x\n", $name, $addr;
${$regs{$addr}}{$name} = 1;
}
# foreach $addr (sort keys(%regs)) {
# printf "0x%x:\n", $addr;
# foreach $name (sort keys(%{$regs{$addr}})) {
# printf "%s 0x%x\n", $name, $addr;
# }
# }
printf "\tMODULE radioregs\n\n", $addr;
foreach $addr (sort keys(%regs)) {
foreach $name (sort keys(%{$regs{$addr}})) {
printf "\tPUBWEAK %s\n", $name;
}
printf "\n\tASEGN XDATA_AN:XDATA:ROOT,%05XH\n", $addr;
foreach $name (sort keys(%{$regs{$addr}})) {
printf "%s:\n", $name;
}
printf "\tDATA8\n\tDS 1\n\n";
}
print "\tEND\n\n";

@ -0,0 +1,433 @@
TARGET_MODEL := SMALL
LIBSUFFIX :=
KEILPATH := C:/EDA/Keil
C51INC := $(KEILPATH)/C51/INC
C51LIB := $(KEILPATH)/C51/LIB
C51FLAGS := OBJECTEXTEND $(TARGET_MODEL) DEBUG INCDIR "($(shell cygpath -w ../source))"
A51OPT := "SET ($(TARGET_MODEL))" EP DEBUG
L51OPT := "RAMSIZE(256) XDATA(0x0-0x1FFF) CODE(0x0-0xFFFF)"
CPU_TYPE := 8052AH
CPU_VENDOR := Intel
CPU_XTAL := 0x01312D00
LIBMFOBJ := lcdinit.obj lcdsetpos.obj lcdwrstr.obj lcdclear.obj lcdclrdisp.obj lcdwru16.obj lcdwru32.obj \
lcdwrhexu16.obj lcdwrhexu32.obj lcduwrnum16.obj lcduwrnum32.obj lcduwrhex16.obj lcduwrhex32.obj \
dbglink.obj dbglnktxbuf.obj dbglnkrxbuf.obj dbglnktx.obj dbglnkrx.obj dbglnkwrhexu16.obj dbglnkwrhexu32.obj dbglnkwrstr.obj \
dbglnkwru16.obj dbglnkwru32.obj dbglnkwrnum16.obj dbglnkwrnum32.obj dbglnkwrhex16.obj dbglnkwrhex32.obj \
crc8ccitt.obj crc8onewire.obj crc8tccitt.obj crc8tccittmsb.obj crc8tonewire.obj crc8tonewiremsb.obj \
crc8ccittb.obj crc8ccittmsbb.obj crc8onewireb.obj crc8onewiremsbb.obj \
crc8ccitttable.obj crc8onewiretable.obj crc8ccittmsbtable.obj crc8onewiremsbtable.obj \
crcccitt.obj crcccittmsb.obj crc16ansi.obj crc16ansimsb.obj crc16dnp.obj crc16dnpmsb.obj crc32ansi.obj crc32ansimsb.obj \
crcccittb.obj crcccittmsbb.obj crc16ansib.obj crc16ansimsbb.obj crc16dnpb.obj crc16dnpmsbb.obj crc32ansib.obj crc32ansimsbb.obj \
crcccitttable.obj crc16table.obj crc16dnptable.obj crcccittmsbtable.obj crc16msbtable.obj \
crc16dnpmsbtable.obj crc32table.obj crc32msbtable.obj pn9.obj pn9table.obj pn9bit.obj pn9bits.obj pn9byte.obj pn9buf.obj \
pn15advtable.obj pn15outtable.obj pn15adv.obj pn15out.obj \
rev8.obj hweight8.obj hweight16.obj hweight32.obj signext12.obj signext16.obj signext20.obj signext24.obj \
chksgnlim16.obj sgnlim16.obj chksgnlim32.obj sgnlim32.obj grayenc8.obj graydec8.obj fmemset.obj fmemcpy.obj \
delay.obj random.obj sleep.obj sleepcont.obj deepsleep.obj standby.obj resetcpu.obj \
flashunlock.obj flashlock.obj flashwait.obj flashpgerase.obj flashwrite.obj flashread.obj flashcal.obj flashcsec.obj \
uarttimer0.obj uarttimer1.obj uarttimer2.obj uart0init.obj uart1init.obj uart0stop.obj uart1stop.obj \
uart0txbuf.obj uart1txbuf.obj uart0rxbuf.obj uart1rxbuf.obj \
uart0tx.obj uart1tx.obj uart0rx.obj uart1rx.obj uart0wrhexu16.obj uart1wrhexu16.obj uart0wrhexu32.obj uart1wrhexu32.obj \
uart0wrstr.obj uart1wrstr.obj uart0wru16.obj uart1wru16.obj uart0wru32.obj uart1wru32.obj \
uart0wrnum16.obj uart0wrnum32.obj uart0wrhex16.obj uart0wrhex32.obj \
uart1wrnum16.obj uart1wrnum32.obj uart1wrhex16.obj uart1wrhex32.obj \
adctemp.obj adccal.obj adccalg.obj adccalt.obj adcuncal.obj adcseoffs00.obj adcseoffs01.obj adcseoffs10.obj \
bch3121dec.obj bch3121decp.obj bch3121enc.obj bch3121encp.obj bch3121stab.obj bch3121syn.obj \
wrnum16.obj wrnum32.obj offxosc.obj offlpxosc.obj setuplpxosc.obj setupxosc.obj setupcal.obj \
wtimer.obj wtrem.obj wtcbadd.obj wtcbrem.obj wt0setcfg.obj wt1setcfg.obj wtstdby.obj \
wt0adda.obj wt1adda.obj wt0addr.obj wt1addr.obj wt0curt.obj wt1curt.obj wt0rem.obj wt1rem.obj wt01rem.obj \
radiord16.obj radiord24.obj radiord32.obj radiowr16.obj radiowr24.obj radiowr32.obj radiodswakecore.obj \
ax5031comminit.obj ax5031commslpexit.obj ax5031reset.obj ax5031deepsleep.obj ax5031rclkena.obj ax5031rclkdis.obj \
ax5031rdfifo.obj ax5031wrfifo.obj ax5031regs.obj \
ax5042comminit.obj ax5042commslpexit.obj ax5042reset.obj ax5042deepsleep.obj ax5042rclkena.obj ax5042rclkdis.obj \
ax5042rdfifo.obj ax5042wrfifo.obj ax5042regs.obj \
ax5043comminit.obj ax5043commslpexit.obj ax5043reset.obj ax5043deepsleep.obj ax5043rclkena.obj ax5043rclkdis.obj \
ax5043rdfifo.obj ax5043wrfifo.obj ax5043regs.obj \
ax5051comminit.obj ax5051commslpexit.obj ax5051reset.obj ax5051deepsleep.obj ax5051rclkena.obj ax5051rclkdis.obj \
ax5051rdfifo.obj ax5051wrfifo.obj ax5051regs.obj \
ax8052regs.obj
BINARIES :=
comma := ,
empty :=
space := $(empty) $(empty)
all: libmf.lib libmflarge.lib $(BINARIES) $(patsubst %.omf,%.hex,$(BINARIES))
clean:
rm -rf LIBMF.LIB libmf.lib libmf LIBMFLARGE.LIB libmflarge.lib libmflarge mflibbinkeil.tar.gz
tar: mflibbinkeil.tar.gz
mflibbinkeil.tar.gz:
[ -f LIBMF.LIB ] && mv LIBMF.LIB libmf.lib ; \
[ -f LIBMFLARGE.LIB ] && mv LIBMFLARGE.LIB libmflarge.lib ; \
tar -c -v -z -f $@ libmf.lib libmflarge.lib
ifeq ($(LIBSUFFIX),)
libmflarge.lib:
make TARGET_MODEL=LARGE LIBSUFFIX=large
endif
libmf$(LIBSUFFIX):
[ ! -d $@ ] && mkdir -p $@
.PRECIOUS: %.src %.obj %.omf
%.obj: %.src
$(KEILPATH)/C51/BIN/A51.EXE "$(shell cygpath -w $<)" "PR($(shell cygpath -w $(patsubst %.obj,%.ls1,$@)))" $(A51OPT)
%.src: %.src1
./fixmodname.pl $@ < $< > $@
%.omf: %.obj libmf$(LIBSUFFIX).lib $(shell cygpath -u $(C51LIB)/C51S.LIB)
($(KEILPATH)/C51/BIN/BL51.EXE "$(subst $(space),$(comma),$(foreach fn,$^,$(shell cygpath -w $(fn))))" TO "$(shell cygpath -w $@)" $(L51OPT); x=$$?; if [ $${x} -lt 2 ]; then x=0; fi; exit $${x})
%.hex: %.omf
$(KEILPATH)/C51/BIN/OH51.EXE "$(shell cygpath -w $<)" HEXFILE "($(shell cygpath -w $@))"
libmf$(LIBSUFFIX)/%.src: ../source/%.c | libmf$(LIBSUFFIX)
($(KEILPATH)/C51/BIN/C51.EXE "$(shell cygpath -w $<)" $(C51FLAGS) SRC "($(shell cygpath -w $@))" PR "($(shell cygpath -w $(patsubst %.src,%.lst,$@)))"; x=$$?; if [ $${x} -lt 2 ]; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/%.src: libmf$(LIBSUFFIX)/%.c | libmf$(LIBSUFFIX)
($(KEILPATH)/C51/BIN/C51.EXE "$(shell cygpath -w $<)" $(C51FLAGS) SRC "($(shell cygpath -w $@))" PR "($(shell cygpath -w $(patsubst %.src,%.lst,$@)))"; x=$$?; if [ $${x} -lt 2 ]; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX).lib: $(patsubst %.obj,libmf$(LIBSUFFIX)/%.obj,$(LIBMFOBJ)) | libmf$(LIBSUFFIX)
$(KEILPATH)/C51/BIN/LIB51.EXE TRANSFER "$(subst $(space),$(comma),$(foreach fn,$(patsubst %.obj,libmf$(LIBSUFFIX)/%.obj,$(LIBMFOBJ)),$(shell cygpath -w $(fn))))" TO $@
libmf$(LIBSUFFIX)/uarttimer0.c: ../source/uarttimer.c
(unifdef -DTIMER=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer1.c: ../source/uarttimer.c
(unifdef -DTIMER=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer2.c: ../source/uarttimer.c
(unifdef -DTIMER=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0init.c: ../source/uartinit.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0stop.c: ../source/uartstop.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1init.c: ../source/uartinit.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1stop.c: ../source/uartstop.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0%.c: ../source/io%.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1%.c: ../source/io%.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/dbglnk%.c: ../source/io%.c
(unifdef -DUART=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdu%.c: ../source/io%.c
(unifdef -DUART=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5031%.c: ../source/radio%.c
(unifdef -DRADIO=5031 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5042%.c: ../source/radio%.c
(unifdef -DRADIO=5042 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5043%.c: ../source/radio%.c
(unifdef -DRADIO=5043 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5051%.c: ../source/radio%.c
(unifdef -DRADIO=5051 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccitt.c: ../source/crc8.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccittmsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewire.c: ../source/crc8.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewiremsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansi.c: ../source/crc16.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnp.c: ../source/crc16.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccitt.c: ../source/crc16.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansi.c: ../source/crc32.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsb.c: ../source/crc32msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittb.c: ../source/crc8b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittmsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewireb.c: ../source/crc8b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewiremsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansib.c: ../source/crc16b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpb.c: ../source/crc16b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittb.c: ../source/crc16b.c
(unifdef -DCRCMODE=4 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=5 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansib.c: ../source/crc32b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsbb.c: ../source/crc32b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdinit.src: ../source/lcdinit.c ../source/libmflcd.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdsetpos.src: ../source/lcdsetpos.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrstr.src: ../source/lcdwrstr.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclear.src: ../source/lcdclear.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclrdisp.src: ../source/lcdclrdisp.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru16.src: ../source/lcdwru16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru32.src: ../source/lcdwru32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu16.src: ../source/lcdwrhexu16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu32.src: ../source/lcdwrhexu32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum16.src: libmf$(LIBSUFFIX)/lcduwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum32.src: libmf$(LIBSUFFIX)/lcduwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex16.src: libmf$(LIBSUFFIX)/lcduwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex32.src: libmf$(LIBSUFFIX)/lcduwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/delay.src: ../source/delay.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/random.src: ../source/random.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitt.src: ../source/crc8ccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewire.src: ../source/crc8onewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitttable.src: ../source/crc8ccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiretable.src: ../source/crc8onewiretable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbtable.src: ../source/crc8ccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbtable.src: ../source/crc8onewiremsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitttable.src: ../source/crcccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16table.src: ../source/crc16table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnptable.src: ../source/crc16dnptable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbtable.src: ../source/crcccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16msbtable.src: ../source/crc16msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbtable.src: ../source/crc16dnpmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32table.src: ../source/crc32table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32msbtable.src: ../source/crc32msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccitt.src: libmf$(LIBSUFFIX)/crc8tccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccittmsb.src: libmf$(LIBSUFFIX)/crc8tccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewire.src: libmf$(LIBSUFFIX)/crc8tonewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewiremsb.src: libmf$(LIBSUFFIX)/crc8tonewiremsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansi.src: libmf$(LIBSUFFIX)/crc16ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsb.src: libmf$(LIBSUFFIX)/crc16ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnp.src: libmf$(LIBSUFFIX)/crc16dnp.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsb.src: libmf$(LIBSUFFIX)/crc16dnpmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitt.src: libmf$(LIBSUFFIX)/crcccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsb.src: libmf$(LIBSUFFIX)/crcccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansi.src: libmf$(LIBSUFFIX)/crc32ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsb.src: libmf$(LIBSUFFIX)/crc32ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittb.src: libmf$(LIBSUFFIX)/crc8ccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbb.src: libmf$(LIBSUFFIX)/crc8ccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewireb.src: libmf$(LIBSUFFIX)/crc8onewireb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbb.src: libmf$(LIBSUFFIX)/crc8onewiremsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansib.src: libmf$(LIBSUFFIX)/crc16ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsbb.src: libmf$(LIBSUFFIX)/crc16ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpb.src: libmf$(LIBSUFFIX)/crc16dnpb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbb.src: libmf$(LIBSUFFIX)/crc16dnpmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittb.src: libmf$(LIBSUFFIX)/crcccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbb.src: libmf$(LIBSUFFIX)/crcccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansib.src: libmf$(LIBSUFFIX)/crc32ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsbb.src: libmf$(LIBSUFFIX)/crc32ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9.src: ../source/pn9.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9table.src: ../source/pn9table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bit.src: ../source/pn9bit.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bits.src: ../source/pn9bits.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9byte.src: ../source/pn9byte.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9buf.src: ../source/pn9buf.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15advtable.src: ../source/pn15advtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15outtable.src: ../source/pn15outtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15adv.src: ../source/pn15adv.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15out.src: ../source/pn15out.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/rev8.src: ../source/rev8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight8.src: ../source/hweight8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight16.src: ../source/hweight16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight32.src: ../source/hweight32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext12.src: ../source/signext12.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext16.src: ../source/signext16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext20.src: ../source/signext20.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext24.src: ../source/signext24.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim16.src: ../source/chksgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim16.src: ../source/sgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim32.src: ../source/chksgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim32.src: ../source/sgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/grayenc8.src: ../source/grayenc8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/graydec8.src: ../source/graydec8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemset.src: ../source/fmemset.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemcpy.src: ../source/fmemcpy.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/standby.src: ../source/standby.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleep.src: ../source/sleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleepcont.src: ../source/sleepcont.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/deepsleep.src: ../source/deepsleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/resetcpu.src: ../source/resetcpu.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashunlock.src: ../source/flashunlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashlock.src: ../source/flashlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwait.src: ../source/flashwait.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashpgerase.src: ../source/flashpgerase.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwrite.src: ../source/flashwrite.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashread.src: ../source/flashread.c ../source/libmfflash.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcal.src: ../source/flashcal.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcsec.src: ../source/flashcsec.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0init.src: libmf$(LIBSUFFIX)/uart0init.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1init.src: libmf$(LIBSUFFIX)/uart1init.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0stop.src: libmf$(LIBSUFFIX)/uart0stop.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1stop.src: libmf$(LIBSUFFIX)/uart1stop.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0txbuf.src: libmf$(LIBSUFFIX)/uart0txbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1txbuf.src: libmf$(LIBSUFFIX)/uart1txbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rxbuf.src: libmf$(LIBSUFFIX)/uart0rxbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rxbuf.src: libmf$(LIBSUFFIX)/uart1rxbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0tx.src: libmf$(LIBSUFFIX)/uart0tx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1tx.src: libmf$(LIBSUFFIX)/uart1tx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rx.src: libmf$(LIBSUFFIX)/uart0rx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rx.src: libmf$(LIBSUFFIX)/uart1rx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu16.src: libmf$(LIBSUFFIX)/uart0wrhexu16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu16.src: libmf$(LIBSUFFIX)/uart1wrhexu16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu32.src: libmf$(LIBSUFFIX)/uart0wrhexu32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu32.src: libmf$(LIBSUFFIX)/uart1wrhexu32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrstr.src: libmf$(LIBSUFFIX)/uart0wrstr.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrstr.src: libmf$(LIBSUFFIX)/uart1wrstr.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru16.src: libmf$(LIBSUFFIX)/uart0wru16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru16.src: libmf$(LIBSUFFIX)/uart1wru16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru32.src: libmf$(LIBSUFFIX)/uart0wru32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru32.src: libmf$(LIBSUFFIX)/uart1wru32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum16.src: libmf$(LIBSUFFIX)/uart0wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum16.src: libmf$(LIBSUFFIX)/uart1wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum32.src: libmf$(LIBSUFFIX)/uart0wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum32.src: libmf$(LIBSUFFIX)/uart1wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex16.src: libmf$(LIBSUFFIX)/uart0wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex16.src: libmf$(LIBSUFFIX)/uart1wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex32.src: libmf$(LIBSUFFIX)/uart0wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex32.src: libmf$(LIBSUFFIX)/uart1wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglink.src: ../source/dbglink.c ../source/libmfdbglink.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktxbuf.src: libmf$(LIBSUFFIX)/dbglnktxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrxbuf.src: libmf$(LIBSUFFIX)/dbglnkrxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktx.src: libmf$(LIBSUFFIX)/dbglnktx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrx.src: libmf$(LIBSUFFIX)/dbglnkrx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu16.src: libmf$(LIBSUFFIX)/dbglnkwrhexu16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu32.src: libmf$(LIBSUFFIX)/dbglnkwrhexu32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrstr.src: libmf$(LIBSUFFIX)/dbglnkwrstr.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru16.src: libmf$(LIBSUFFIX)/dbglnkwru16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru32.src: libmf$(LIBSUFFIX)/dbglnkwru32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum16.src: libmf$(LIBSUFFIX)/dbglnkwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum32.src: libmf$(LIBSUFFIX)/dbglnkwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex16.src: libmf$(LIBSUFFIX)/dbglnkwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex32.src: libmf$(LIBSUFFIX)/dbglnkwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adctemp.src: ../source/adctemp.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccal.src: ../source/adccal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalg.src: ../source/adccalg.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalt.src: ../source/adccalt.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcuncal.src: ../source/adcuncal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs00.src: ../source/adcseoffs00.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs01.src: ../source/adcseoffs01.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs10.src: ../source/adcseoffs10.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121dec.src: ../source/bch3121dec.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121decp.src: ../source/bch3121decp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121enc.src: ../source/bch3121enc.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121encp.src: ../source/bch3121encp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121stab.src: ../source/bch3121stab.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121syn.src: ../source/bch3121syn.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum16.src: ../source/wrnum16.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum32.src: ../source/wrnum32.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offxosc.src: ../source/offxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offlpxosc.src: ../source/offlpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setuplpxosc.src: ../source/setuplpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupxosc.src: ../source/setupxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupcal.src: ../source/setupcal.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtimer.src: ../source/wtimer.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtrem.src: ../source/wtrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbadd.src: ../source/wtcbadd.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbrem.src: ../source/wtcbrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0setcfg.src: ../source/wt0setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1setcfg.src: ../source/wt1setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtstdby.src: ../source/wtstdby.c ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0adda.src: ../source/wt0adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1adda.src: ../source/wt1adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0addr.src: ../source/wt0addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1addr.src: ../source/wt1addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0curt.src: ../source/wt0curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1curt.src: ../source/wt1curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0rem.src: ../source/wt0rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1rem.src: ../source/wt1rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt01rem.src: ../source/wt01rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord16.src: ../source/radiord16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord24.src: ../source/radiord24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord32.src: ../source/radiord32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr16.src: ../source/radiowr16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr24.src: ../source/radiowr24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr32.src: ../source/radiowr32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiodswakecore.src: ../source/radiodswakecore.c ../source/radiodefs.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031comminit.src: libmf$(LIBSUFFIX)/ax5031comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031commslpexit.src: libmf$(LIBSUFFIX)/ax5031commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031reset.src: libmf$(LIBSUFFIX)/ax5031reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031deepsleep.src: libmf$(LIBSUFFIX)/ax5031deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkena.src: ../source/ax5031rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkdis.src: ../source/ax5031rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rdfifo.src: libmf$(LIBSUFFIX)/ax5031rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031wrfifo.src: libmf$(LIBSUFFIX)/ax5031wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031regs.src: ../source/ax5031regs.c ../source/ax8052f131.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042comminit.src: libmf$(LIBSUFFIX)/ax5042comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042commslpexit.src: libmf$(LIBSUFFIX)/ax5042commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042reset.src: libmf$(LIBSUFFIX)/ax5042reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042deepsleep.src: libmf$(LIBSUFFIX)/ax5042deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkena.src: ../source/ax5042rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkdis.src: ../source/ax5042rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rdfifo.src: libmf$(LIBSUFFIX)/ax5042rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042wrfifo.src: libmf$(LIBSUFFIX)/ax5042wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042regs.src: ../source/ax5042regs.c ../source/ax8052f142.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043comminit.src: libmf$(LIBSUFFIX)/ax5043comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043commslpexit.src: libmf$(LIBSUFFIX)/ax5043commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043reset.src: libmf$(LIBSUFFIX)/ax5043reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043deepsleep.src: libmf$(LIBSUFFIX)/ax5043deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkena.src: ../source/ax5043rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkdis.src: ../source/ax5043rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rdfifo.src: libmf$(LIBSUFFIX)/ax5043rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043wrfifo.src: libmf$(LIBSUFFIX)/ax5043wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043regs.src: ../source/ax5043regs.c ../source/ax8052f143.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051comminit.src: libmf$(LIBSUFFIX)/ax5051comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051commslpexit.src: libmf$(LIBSUFFIX)/ax5051commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051reset.src: libmf$(LIBSUFFIX)/ax5051reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051deepsleep.src: libmf$(LIBSUFFIX)/ax5051deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkena.src: ../source/ax5051rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkdis.src: ../source/ax5051rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rdfifo.src: libmf$(LIBSUFFIX)/ax5051rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051wrfifo.src: libmf$(LIBSUFFIX)/ax5051wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051regs.src: ../source/ax5051regs.c ../source/ax8052f151.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax8052regs.src: ../source/ax8052regs.c ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)

@ -0,0 +1,432 @@
TARGET_MODEL := SMALL
LIBSUFFIX :=
KEILPATH := C:/EDA/Keil
C51INC := $(KEILPATH)/C51/INC
C51LIB := $(KEILPATH)/C51/LIB
C51FLAGS := OMF2 OBJECTADVANCED $(TARGET_MODEL) DEBUG INCDIR "($(shell cygpath -w ../source))"
A51OPT := "SET ($(TARGET_MODEL))" EP DEBUG
L51OPT := "CLASSES (XDATA (X:0x0-X:0x1FFF), HDATA (X:0x0-X:0x1FFF), CODE (C:0x0-C:0xFFFF), CONST (C:0x0-C:0xFFFF), ECODE (C:0x0-C:0xFFFF), HCONST (C:0x0-C:0xFFFF))"
CPU_TYPE := 8052AH
CPU_VENDOR := Intel
CPU_XTAL := 0x01312D00
LIBMFOBJ := lcdinit.obj lcdsetpos.obj lcdwrstr.obj lcdclear.obj lcdclrdisp.obj lcdwru16.obj lcdwru32.obj \
lcdwrhexu16.obj lcdwrhexu32.obj lcduwrnum16.obj lcduwrnum32.obj lcduwrhex16.obj lcduwrhex32.obj \
dbglink.obj dbglnktxbuf.obj dbglnkrxbuf.obj dbglnktx.obj dbglnkrx.obj dbglnkwrhexu16.obj dbglnkwrhexu32.obj dbglnkwrstr.obj \
dbglnkwru16.obj dbglnkwru32.obj dbglnkwrnum16.obj dbglnkwrnum32.obj dbglnkwrhex16.obj dbglnkwrhex32.obj \
crc8ccitt.obj crc8onewire.obj crc8tccitt.obj crc8tccittmsb.obj crc8tonewire.obj crc8tonewiremsb.obj \
crc8ccittb.obj crc8ccittmsbb.obj crc8onewireb.obj crc8onewiremsbb.obj \
crc8ccitttable.obj crc8onewiretable.obj crc8ccittmsbtable.obj crc8onewiremsbtable.obj \
crcccitt.obj crcccittmsb.obj crc16ansi.obj crc16ansimsb.obj crc16dnp.obj crc16dnpmsb.obj crc32ansi.obj crc32ansimsb.obj \
crcccittb.obj crcccittmsbb.obj crc16ansib.obj crc16ansimsbb.obj crc16dnpb.obj crc16dnpmsbb.obj crc32ansib.obj crc32ansimsbb.obj \
crcccitttable.obj crc16table.obj crc16dnptable.obj crcccittmsbtable.obj crc16msbtable.obj \
crc16dnpmsbtable.obj crc32table.obj crc32msbtable.obj pn9.obj pn9table.obj pn9bit.obj pn9bits.obj pn9byte.obj pn9buf.obj \
pn15advtable.obj pn15outtable.obj pn15adv.obj pn15out.obj \
rev8.obj hweight8.obj hweight16.obj hweight32.obj signext12.obj signext16.obj signext20.obj signext24.obj \
chksgnlim16.obj sgnlim16.obj chksgnlim32.obj sgnlim32.obj grayenc8.obj graydec8.obj fmemset.obj fmemcpy.obj \
delay.obj random.obj sleep.obj sleepcont.obj deepsleep.obj standby.obj resetcpu.obj \
flashunlock.obj flashlock.obj flashwait.obj flashpgerase.obj flashwrite.obj flashread.obj flashcal.obj flashcsec.obj \
uarttimer0.obj uarttimer1.obj uarttimer2.obj uart0init.obj uart1init.obj uart0txbuf.obj uart1txbuf.obj uart0rxbuf.obj uart1rxbuf.obj \
uart0tx.obj uart1tx.obj uart0rx.obj uart1rx.obj uart0wrhexu16.obj uart1wrhexu16.obj uart0wrhexu32.obj uart1wrhexu32.obj \
uart0wrstr.obj uart1wrstr.obj uart0wru16.obj uart1wru16.obj uart0wru32.obj uart1wru32.obj \
uart0wrnum16.obj uart0wrnum32.obj uart0wrhex16.obj uart0wrhex32.obj \
uart1wrnum16.obj uart1wrnum32.obj uart1wrhex16.obj uart1wrhex32.obj \
adctemp.obj adccal.obj adccalg.obj adccalt.obj adcuncal.obj adcseoffs00.obj adcseoffs01.obj adcseoffs10.obj \
bch3121dec.obj bch3121decp.obj bch3121enc.obj bch3121encp.obj bch3121stab.obj bch3121syn.obj \
wrnum16.obj wrnum32.obj offxosc.obj offlpxosc.obj setuplpxosc.obj setupxosc.obj setupcal.obj \
wtimer.obj wtrem.obj wtcbadd.obj wtcbrem.obj wt0setcfg.obj wt1setcfg.obj wtstdby.obj \
wt0adda.obj wt1adda.obj wt0addr.obj wt1addr.obj wt0curt.obj wt1curt.obj wt0rem.obj wt1rem.obj wt01rem.obj \
radiord16.obj radiord24.obj radiord32.obj radiowr16.obj radiowr24.obj radiowr32.obj radiodswakecore.obj \
ax5031comminit.obj ax5031commslpexit.obj ax5031reset.obj ax5031deepsleep.obj ax5031rclkena.obj ax5031rclkdis.obj \
ax5031rdfifo.obj ax5031wrfifo.obj ax5031regs.obj \
ax5042comminit.obj ax5042commslpexit.obj ax5042reset.obj ax5042deepsleep.obj ax5042rclkena.obj ax5042rclkdis.obj \
ax5042rdfifo.obj ax5042wrfifo.obj ax5042regs.obj \
ax5043comminit.obj ax5043commslpexit.obj ax5043reset.obj ax5043deepsleep.obj ax5043rclkena.obj ax5043rclkdis.obj \
ax5043rdfifo.obj ax5043wrfifo.obj ax5043regs.obj \
ax5051comminit.obj ax5051commslpexit.obj ax5051reset.obj ax5051deepsleep.obj ax5051rclkena.obj ax5051rclkdis.obj \
ax5051rdfifo.obj ax5051wrfifo.obj ax5051regs.obj \
ax8052regs.obj
BINARIES :=
comma := ,
empty :=
space := $(empty) $(empty)
all: libmf.lib libmflarge.lib $(BINARIES) $(patsubst %.omf,%.hex,$(BINARIES))
clean:
rm -rf LIBMF.LIB libmf.lib libmf LIBMFLARGE.LIB libmflarge.lib libmflarge mflibbinkeil2.tar.gz
tar: mflibbinkeil2.tar.gz
mflibbinkeil2.tar.gz:
[ -f LIBMF.LIB ] && mv LIBMF.LIB libmf.lib ; \
[ -f LIBMFLARGE.LIB ] && mv LIBMFLARGE.LIB libmflarge.lib ; \
tar -c -v -z -f $@ libmf.lib libmflarge.lib
ifeq ($(LIBSUFFIX),)
libmflarge.lib:
make TARGET_MODEL=LARGE LIBSUFFIX=large
endif
libmf$(LIBSUFFIX):
[ ! -d $@ ] && mkdir -p $@
.PRECIOUS: %.src %.obj %.omf
%.obj: %.src
$(KEILPATH)/C51/BIN/AX51.EXE "$(shell cygpath -w $<)" "PR($(shell cygpath -w $(patsubst %.obj,%.ls1,$@)))" $(A51OPT)
%.src: %.src1
./fixmodname.pl $@ < $< > $@
%.omf: %.obj libmf$(LIBSUFFIX).lib $(shell cygpath -u $(C51LIB)/C51S.LIB)
($(KEILPATH)/C51/BIN/LX51.EXE "$(subst $(space),$(comma),$(foreach fn,$^,$(shell cygpath -w $(fn))))" TO "$(shell cygpath -w $@)" CODE "($(shell cygpath -w $(patsubst %.omf,%.cod,$@)))" $(L51OPT); x=$$?; if [ $${x} -lt 2 ]; then x=0; fi; exit $${x})
%.hex: %.omf
$(KEILPATH)/C51/BIN/OHX51.EXE "$(shell cygpath -w $<)" HEXFILE "($(shell cygpath -w $@))"
libmf$(LIBSUFFIX)/%.src: ../source/%.c | libmf$(LIBSUFFIX)
($(KEILPATH)/C51/BIN/C51.EXE "$(shell cygpath -w $<)" $(C51FLAGS) DEFINE "(AX5043_DISABLE_XSFR,AX5043_DISABLE_NONBLOCKING)" SRC "($(shell cygpath -w $@))" PR "($(shell cygpath -w $(patsubst %.src,%.lst,$@)))"; x=$$?; if [ $${x} -lt 2 ]; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/%.src: libmf$(LIBSUFFIX)/%.c | libmf$(LIBSUFFIX)
($(KEILPATH)/C51/BIN/C51.EXE "$(shell cygpath -w $<)" $(C51FLAGS) DEFINE "(AX5043_DISABLE_XSFR,AX5043_DISABLE_NONBLOCKING)" SRC "($(shell cygpath -w $@))" PR "($(shell cygpath -w $(patsubst %.src,%.lst,$@)))"; x=$$?; if [ $${x} -lt 2 ]; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX).lib: $(patsubst %.obj,libmf$(LIBSUFFIX)/%.obj,$(LIBMFOBJ)) | libmf$(LIBSUFFIX)
$(KEILPATH)/C51/BIN/LIBX51.EXE TRANSFER "$(subst $(space),$(comma),$(foreach fn,$(patsubst %.obj,libmf$(LIBSUFFIX)/%.obj,$(LIBMFOBJ)),$(shell cygpath -w $(fn))))" TO $@
libmf$(LIBSUFFIX)/uarttimer0.c: ../source/uarttimer.c
(unifdef -DTIMER=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer1.c: ../source/uarttimer.c
(unifdef -DTIMER=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer2.c: ../source/uarttimer.c
(unifdef -DTIMER=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0init.c: ../source/uartinit.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0stop.c: ../source/uartstop.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1init.c: ../source/uartinit.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1stop.c: ../source/uartstop.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0%.c: ../source/io%.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1%.c: ../source/io%.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/dbglnk%.c: ../source/io%.c
(unifdef -DUART=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdu%.c: ../source/io%.c
(unifdef -DUART=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5031%.c: ../source/radio%.c
(unifdef -DRADIO=5031 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5042%.c: ../source/radio%.c
(unifdef -DRADIO=5042 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5043%.c: ../source/radio%.c
(unifdef -DRADIO=5043 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5051%.c: ../source/radio%.c
(unifdef -DRADIO=5051 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccitt.c: ../source/crc8.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccittmsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewire.c: ../source/crc8.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewiremsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansi.c: ../source/crc16.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnp.c: ../source/crc16.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccitt.c: ../source/crc16.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansi.c: ../source/crc32.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsb.c: ../source/crc32msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittb.c: ../source/crc8b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittmsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewireb.c: ../source/crc8b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewiremsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansib.c: ../source/crc16b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpb.c: ../source/crc16b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittb.c: ../source/crc16b.c
(unifdef -DCRCMODE=4 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=5 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansib.c: ../source/crc32b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsbb.c: ../source/crc32b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdinit.src: ../source/lcdinit.c ../source/libmflcd.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdsetpos.src: ../source/lcdsetpos.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrstr.src: ../source/lcdwrstr.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclear.src: ../source/lcdclear.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclrdisp.src: ../source/lcdclrdisp.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru16.src: ../source/lcdwru16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru32.src: ../source/lcdwru32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu16.src: ../source/lcdwrhexu16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu32.src: ../source/lcdwrhexu32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum16.src: libmf$(LIBSUFFIX)/lcduwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum32.src: libmf$(LIBSUFFIX)/lcduwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex16.src: libmf$(LIBSUFFIX)/lcduwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex32.src: libmf$(LIBSUFFIX)/lcduwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/delay.src: ../source/delay.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/random.src: ../source/random.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitt.src: ../source/crc8ccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewire.src: ../source/crc8onewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitttable.src: ../source/crc8ccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiretable.src: ../source/crc8onewiretable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbtable.src: ../source/crc8ccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbtable.src: ../source/crc8onewiremsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitttable.src: ../source/crcccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16table.src: ../source/crc16table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnptable.src: ../source/crc16dnptable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbtable.src: ../source/crcccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16msbtable.src: ../source/crc16msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbtable.src: ../source/crc16dnpmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32table.src: ../source/crc32table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32msbtable.src: ../source/crc32msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccitt.src: libmf$(LIBSUFFIX)/crc8tccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccittmsb.src: libmf$(LIBSUFFIX)/crc8tccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewire.src: libmf$(LIBSUFFIX)/crc8tonewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewiremsb.src: libmf$(LIBSUFFIX)/crc8tonewiremsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansi.src: libmf$(LIBSUFFIX)/crc16ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsb.src: libmf$(LIBSUFFIX)/crc16ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnp.src: libmf$(LIBSUFFIX)/crc16dnp.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsb.src: libmf$(LIBSUFFIX)/crc16dnpmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitt.src: libmf$(LIBSUFFIX)/crcccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsb.src: libmf$(LIBSUFFIX)/crcccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansi.src: libmf$(LIBSUFFIX)/crc32ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsb.src: libmf$(LIBSUFFIX)/crc32ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittb.src: libmf$(LIBSUFFIX)/crc8ccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbb.src: libmf$(LIBSUFFIX)/crc8ccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewireb.src: libmf$(LIBSUFFIX)/crc8onewireb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbb.src: libmf$(LIBSUFFIX)/crc8onewiremsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansib.src: libmf$(LIBSUFFIX)/crc16ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsbb.src: libmf$(LIBSUFFIX)/crc16ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpb.src: libmf$(LIBSUFFIX)/crc16dnpb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbb.src: libmf$(LIBSUFFIX)/crc16dnpmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittb.src: libmf$(LIBSUFFIX)/crcccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbb.src: libmf$(LIBSUFFIX)/crcccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansib.src: libmf$(LIBSUFFIX)/crc32ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsbb.src: libmf$(LIBSUFFIX)/crc32ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9.src: ../source/pn9.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9table.src: ../source/pn9table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bit.src: ../source/pn9bit.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bits.src: ../source/pn9bits.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9byte.src: ../source/pn9byte.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9buf.src: ../source/pn9buf.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15advtable.src: ../source/pn15advtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15outtable.src: ../source/pn15outtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15adv.src: ../source/pn15adv.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15out.src: ../source/pn15out.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/rev8.src: ../source/rev8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight8.src: ../source/hweight8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight16.src: ../source/hweight16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight32.src: ../source/hweight32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext12.src: ../source/signext12.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext16.src: ../source/signext16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext20.src: ../source/signext20.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext24.src: ../source/signext24.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim16.src: ../source/chksgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim16.src: ../source/sgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim32.src: ../source/chksgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim32.src: ../source/sgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/grayenc8.src: ../source/grayenc8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/graydec8.src: ../source/graydec8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemset.src: ../source/fmemset.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemcpy.src: ../source/fmemcpy.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/standby.src: ../source/standby.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleep.src: ../source/sleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleepcont.src: ../source/sleepcont.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/deepsleep.src: ../source/deepsleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/resetcpu.src: ../source/resetcpu.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashunlock.src: ../source/flashunlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashlock.src: ../source/flashlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwait.src: ../source/flashwait.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashpgerase.src: ../source/flashpgerase.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwrite.src: ../source/flashwrite.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashread.src: ../source/flashread.c ../source/libmfflash.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcal.src: ../source/flashcal.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcsec.src: ../source/flashcsec.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0init.src: libmf$(LIBSUFFIX)/uart0init.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1init.src: libmf$(LIBSUFFIX)/uart1init.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0stop.src: libmf$(LIBSUFFIX)/uart0stop.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1stop.src: libmf$(LIBSUFFIX)/uart1stop.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0txbuf.src: libmf$(LIBSUFFIX)/uart0txbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1txbuf.src: libmf$(LIBSUFFIX)/uart1txbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rxbuf.src: libmf$(LIBSUFFIX)/uart0rxbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rxbuf.src: libmf$(LIBSUFFIX)/uart1rxbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0tx.src: libmf$(LIBSUFFIX)/uart0tx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1tx.src: libmf$(LIBSUFFIX)/uart1tx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rx.src: libmf$(LIBSUFFIX)/uart0rx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rx.src: libmf$(LIBSUFFIX)/uart1rx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu16.src: libmf$(LIBSUFFIX)/uart0wrhexu16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu16.src: libmf$(LIBSUFFIX)/uart1wrhexu16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu32.src: libmf$(LIBSUFFIX)/uart0wrhexu32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu32.src: libmf$(LIBSUFFIX)/uart1wrhexu32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrstr.src: libmf$(LIBSUFFIX)/uart0wrstr.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrstr.src: libmf$(LIBSUFFIX)/uart1wrstr.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru16.src: libmf$(LIBSUFFIX)/uart0wru16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru16.src: libmf$(LIBSUFFIX)/uart1wru16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru32.src: libmf$(LIBSUFFIX)/uart0wru32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru32.src: libmf$(LIBSUFFIX)/uart1wru32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum16.src: libmf$(LIBSUFFIX)/uart0wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum16.src: libmf$(LIBSUFFIX)/uart1wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum32.src: libmf$(LIBSUFFIX)/uart0wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum32.src: libmf$(LIBSUFFIX)/uart1wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex16.src: libmf$(LIBSUFFIX)/uart0wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex16.src: libmf$(LIBSUFFIX)/uart1wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex32.src: libmf$(LIBSUFFIX)/uart0wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex32.src: libmf$(LIBSUFFIX)/uart1wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglink.src: ../source/dbglink.c ../source/libmfdbglink.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktxbuf.src: libmf$(LIBSUFFIX)/dbglnktxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrxbuf.src: libmf$(LIBSUFFIX)/dbglnkrxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktx.src: libmf$(LIBSUFFIX)/dbglnktx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrx.src: libmf$(LIBSUFFIX)/dbglnkrx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu16.src: libmf$(LIBSUFFIX)/dbglnkwrhexu16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu32.src: libmf$(LIBSUFFIX)/dbglnkwrhexu32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrstr.src: libmf$(LIBSUFFIX)/dbglnkwrstr.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru16.src: libmf$(LIBSUFFIX)/dbglnkwru16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru32.src: libmf$(LIBSUFFIX)/dbglnkwru32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum16.src: libmf$(LIBSUFFIX)/dbglnkwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum32.src: libmf$(LIBSUFFIX)/dbglnkwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex16.src: libmf$(LIBSUFFIX)/dbglnkwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex32.src: libmf$(LIBSUFFIX)/dbglnkwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adctemp.src: ../source/adctemp.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccal.src: ../source/adccal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalg.src: ../source/adccalg.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalt.src: ../source/adccalt.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcuncal.src: ../source/adcuncal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs00.src: ../source/adcseoffs00.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs01.src: ../source/adcseoffs01.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs10.src: ../source/adcseoffs10.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121dec.src: ../source/bch3121dec.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121decp.src: ../source/bch3121decp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121enc.src: ../source/bch3121enc.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121encp.src: ../source/bch3121encp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121stab.src: ../source/bch3121stab.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121syn.src: ../source/bch3121syn.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum16.src: ../source/wrnum16.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum32.src: ../source/wrnum32.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offxosc.src: ../source/offxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offlpxosc.src: ../source/offlpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setuplpxosc.src: ../source/setuplpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupxosc.src: ../source/setupxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupcal.src: ../source/setupcal.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtimer.src: ../source/wtimer.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtrem.src: ../source/wtrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbadd.src: ../source/wtcbadd.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbrem.src: ../source/wtcbrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0setcfg.src: ../source/wt0setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1setcfg.src: ../source/wt1setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtstdby.src: ../source/wtstdby.c ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0adda.src: ../source/wt0adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1adda.src: ../source/wt1adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0addr.src: ../source/wt0addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1addr.src: ../source/wt1addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0curt.src: ../source/wt0curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1curt.src: ../source/wt1curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0rem.src: ../source/wt0rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1rem.src: ../source/wt1rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt01rem.src: ../source/wt01rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord16.src: ../source/radiord16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord24.src: ../source/radiord24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord32.src: ../source/radiord32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr16.src: ../source/radiowr16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr24.src: ../source/radiowr24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr32.src: ../source/radiowr32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiodswakecore.src: ../source/radiodswakecore.c ../source/radiodefs.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031comminit.src: libmf$(LIBSUFFIX)/ax5031comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031commslpexit.src: libmf$(LIBSUFFIX)/ax5031commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031reset.src: libmf$(LIBSUFFIX)/ax5031reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031deepsleep.src: libmf$(LIBSUFFIX)/ax5031deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkena.src: ../source/ax5031rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkdis.src: ../source/ax5031rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rdfifo.src: libmf$(LIBSUFFIX)/ax5031rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031wrfifo.src: libmf$(LIBSUFFIX)/ax5031wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031regs.src: ../source/ax5031regs.c ../source/ax8052f131.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042comminit.src: libmf$(LIBSUFFIX)/ax5042comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042commslpexit.src: libmf$(LIBSUFFIX)/ax5042commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042reset.src: libmf$(LIBSUFFIX)/ax5042reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042deepsleep.src: libmf$(LIBSUFFIX)/ax5042deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkena.src: ../source/ax5042rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkdis.src: ../source/ax5042rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rdfifo.src: libmf$(LIBSUFFIX)/ax5042rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042wrfifo.src: libmf$(LIBSUFFIX)/ax5042wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042regs.src: ../source/ax5042regs.c ../source/ax8052f142.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043comminit.src: libmf$(LIBSUFFIX)/ax5043comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043commslpexit.src: libmf$(LIBSUFFIX)/ax5043commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043reset.src: libmf$(LIBSUFFIX)/ax5043reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043deepsleep.src: libmf$(LIBSUFFIX)/ax5043deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkena.src: ../source/ax5043rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkdis.src: ../source/ax5043rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rdfifo.src: libmf$(LIBSUFFIX)/ax5043rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043wrfifo.src: libmf$(LIBSUFFIX)/ax5043wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043regs.src: ../source/ax5043regs.c ../source/ax8052f143.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051comminit.src: libmf$(LIBSUFFIX)/ax5051comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051commslpexit.src: libmf$(LIBSUFFIX)/ax5051commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051reset.src: libmf$(LIBSUFFIX)/ax5051reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051deepsleep.src: libmf$(LIBSUFFIX)/ax5051deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkena.src: ../source/ax5051rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkdis.src: ../source/ax5051rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rdfifo.src: libmf$(LIBSUFFIX)/ax5051rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051wrfifo.src: libmf$(LIBSUFFIX)/ax5051wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051regs.src: ../source/ax5051regs.c ../source/ax8052f151.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax8052regs.src: ../source/ax8052regs.c ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)

@ -0,0 +1,423 @@
TARGET_ASM := sdcc-asx8051
TARGET_LD := sdcc-sdcc
TARGET_CC := sdcc-sdcc
TARGET_AR := sdcc-sdcclib
TARGET_MODEL := --model-small
TARGET_ASMFLAGS := -xlosg
TARGET_LNKFLAGS := -mmcs51 --debug --code-loc 0x0000 --code-size 0x2000 --xram-loc 0x0000 --xram-size 0x100 $(TARGET_MODEL) --data-loc 0x08
TARGET_CFLAGS := --debug -I../source $(TARGET_LNKFLAGS)
LIBSUFFIX :=
LIBMFOBJ := lcdinit.rel lcdsetpos.rel lcdwrstr.rel lcdclear.rel lcdclrdisp.rel lcdwru16.rel lcdwru32.rel \
lcdwrhexu16.rel lcdwrhexu32.rel lcduwrnum16.rel lcduwrnum32.rel lcduwrhex16.rel lcduwrhex32.rel \
dbglink.rel dbglnktxbuf.rel dbglnkrxbuf.rel dbglnktx.rel dbglnkrx.rel dbglnkwrhexu16.rel dbglnkwrhexu32.rel dbglnkwrstr.rel \
dbglnkwru16.rel dbglnkwru32.rel dbglnkwrnum16.rel dbglnkwrnum32.rel dbglnkwrhex16.rel dbglnkwrhex32.rel \
crc8ccitt.rel crc8onewire.rel crc8tccitt.rel crc8tccittmsb.rel crc8tonewire.rel crc8tonewiremsb.rel \
crc8ccittb.rel crc8ccittmsbb.rel crc8onewireb.rel crc8onewiremsbb.rel \
crc8ccitttable.rel crc8onewiretable.rel crc8ccittmsbtable.rel crc8onewiremsbtable.rel \
crcccitt.rel crcccittmsb.rel crc16ansi.rel crc16ansimsb.rel crc16dnp.rel crc16dnpmsb.rel crc32ansi.rel crc32ansimsb.rel \
crcccittb.rel crcccittmsbb.rel crc16ansib.rel crc16ansimsbb.rel crc16dnpb.rel crc16dnpmsbb.rel crc32ansib.rel crc32ansimsbb.rel \
crcccitttable.rel crc16table.rel crc16dnptable.rel crcccittmsbtable.rel crc16msbtable.rel \
crc16dnpmsbtable.rel crc32table.rel crc32msbtable.rel pn9.rel pn9table.rel pn9bit.rel pn9bits.rel pn9byte.rel pn9buf.rel \
pn15advtable.rel pn15outtable.rel pn15adv.rel pn15out.rel \
rev8.rel hweight8.rel hweight16.rel hweight32.rel signext12.rel signext16.rel signext20.rel signext24.rel \
chksgnlim16.rel sgnlim16.rel chksgnlim32.rel sgnlim32.rel grayenc8.rel graydec8.rel fmemset.rel fmemcpy.rel \
delay.rel random.rel sleep.rel deepsleep.rel sleepcont.rel standby.rel resetcpu.rel \
flashunlock.rel flashlock.rel flashwait.rel flashpgerase.rel flashwrite.rel flashread.rel flashcal.rel flashcsec.rel \
uarttimer0.rel uarttimer1.rel uarttimer2.rel uart0init.rel uart1init.rel uart0stop.rel uart1stop.rel \
uart0txbuf.rel uart1txbuf.rel uart0rxbuf.rel uart1rxbuf.rel \
uart0tx.rel uart1tx.rel uart0rx.rel uart1rx.rel uart0wrhexu16.rel uart1wrhexu16.rel uart0wrhexu32.rel uart1wrhexu32.rel \
uart0wrstr.rel uart1wrstr.rel uart0wru16.rel uart1wru16.rel uart0wru32.rel uart1wru32.rel \
uart0wrnum16.rel uart0wrnum32.rel uart0wrhex16.rel uart0wrhex32.rel \
uart1wrnum16.rel uart1wrnum32.rel uart1wrhex16.rel uart1wrhex32.rel \
adctemp.rel adccal.rel adccalg.rel adccalt.rel adcuncal.rel adcseoffs00.rel adcseoffs01.rel adcseoffs10.rel \
bch3121dec.rel bch3121decp.rel bch3121enc.rel bch3121encp.rel bch3121stab.rel bch3121syn.rel \
wrnum16.rel wrnum32.rel offxosc.rel offlpxosc.rel setuplpxosc.rel setupxosc.rel setupcal.rel \
wtimer.rel wtrem.rel wtcbadd.rel wtcbrem.rel wt0setcfg.rel wt1setcfg.rel wtstdby.rel \
wt0adda.rel wt1adda.rel wt0addr.rel wt1addr.rel wt0curt.rel wt1curt.rel wt0rem.rel wt1rem.rel wt01rem.rel \
radiord16.rel radiord24.rel radiord32.rel radiowr16.rel radiowr24.rel radiowr32.rel radiodswakecore.rel \
ax5031comminit.rel ax5031commslpexit.rel ax5031reset.rel ax5031deepsleep.rel ax5031rclkena.rel ax5031rclkdis.rel \
ax5031rdfifo.rel ax5031wrfifo.rel ax5031regs.rel \
ax5042comminit.rel ax5042commslpexit.rel ax5042reset.rel ax5042deepsleep.rel ax5042rclkena.rel ax5042rclkdis.rel \
ax5042rdfifo.rel ax5042wrfifo.rel ax5042regs.rel \
ax5043comminit.rel ax5043commslpexit.rel ax5043reset.rel ax5043deepsleep.rel ax5043rclkena.rel ax5043rclkdis.rel \
ax5043rdfifo.rel ax5043wrfifo.rel ax5043regs.rel \
ax5051comminit.rel ax5051commslpexit.rel ax5051reset.rel ax5051deepsleep.rel ax5051rclkena.rel ax5051rclkdis.rel \
ax5051rdfifo.rel ax5051wrfifo.rel ax5051regs.rel \
ax8052regs.rel
BINARIES :=
all: libmf.lib libmflarge.lib $(BINARIES) $(patsubst %.omf,%.cdb,$(BINARIES)) $(patsubst %.omf,%.ihx,$(BINARIES))
clean:
rm -rf *.lnk libmf.lib libmf libmflarge.lib libmflarge mflibbinsdcc.tar.gz mflibsrc.tar.gz
tar: mflibbinsdcc.tar.gz mflibsrc.tar.gz
mflibbinsdcc.tar.gz: libmf.lib libmflarge.lib
tar -c -v -z -f $@ libmf.lib libmflarge.lib
mflibsrc.tar.gz:
cd .. ; \
tar -c -v -z -f buildsdcc/$@ build*/Makefile source/*.c source/*.h source/*.s51 doc/LibMF.pdf buildiar/genrregs.pl
ifeq ($(LIBSUFFIX),)
libmflarge.lib:
make TARGET_MODEL=--model-large LIBSUFFIX=large
endif
libmf$(LIBSUFFIX):
[ ! -d $@ ] && mkdir -p $@
.PRECIOUS: %.rel %.omf %.ihx %.cdb
%.rel: ../%.c
($(TARGET_CC) -c $(TARGET_CFLAGS) -o $@ $<; x=$$?; dn=`dirname $<`/; fn=`basename $< .c`; rm -f $${dn}$${fn}.asm ; exit $${x})
%.omf %.ihx %.cdb: %.rel libmf$(LIBSUFFIX).lib
(libdir=`pwd`; dn=`dirname $<`/; fn=`basename $< .rel`; cd $${dn}; $(TARGET_LD) -V $(TARGET_LNKFLAGS) -L$${libdir} -llibmf$(LIBSUFFIX) $${fn}.rel; x=$$?; mv $${fn} $${fn}.omf; exit $${x})
libmf$(LIBSUFFIX)/%.rel: ../source/%.c | libmf$(LIBSUFFIX)
($(TARGET_CC) -c $(TARGET_CFLAGS) -o $@ $<; x=$$?; dn=`dirname $<`/; fn=`basename $< .c`; rm -f $${dn}$${fn}.asm ; exit $${x})
libmf$(LIBSUFFIX)/%.rel: libmf$(LIBSUFFIX)/%.c | libmf$(LIBSUFFIX)
($(TARGET_CC) -c $(TARGET_CFLAGS) -o $@ $<; x=$$?; dn=`dirname $<`/; fn=`basename $< .c`; rm -f $${dn}$${fn}.asm ; exit $${x})
libmf$(LIBSUFFIX).lib: $(patsubst %.rel,libmf$(LIBSUFFIX)/%.rel,$(LIBMFOBJ)) | libmf$(LIBSUFFIX)
$(TARGET_AR) -a $@ $(patsubst %.rel,libmf$(LIBSUFFIX)/%.rel,$(LIBMFOBJ))
libmf$(LIBSUFFIX)/uarttimer0.c: ../source/uarttimer.c
(unifdef -DTIMER=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer1.c: ../source/uarttimer.c
(unifdef -DTIMER=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uarttimer2.c: ../source/uarttimer.c
(unifdef -DTIMER=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0init.c: ../source/uartinit.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0stop.c: ../source/uartstop.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1init.c: ../source/uartinit.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1stop.c: ../source/uartstop.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart0%.c: ../source/io%.c
(unifdef -DUART=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/uart1%.c: ../source/io%.c
(unifdef -DUART=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/dbglnk%.c: ../source/io%.c
(unifdef -DUART=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdu%.c: ../source/io%.c
(unifdef -DUART=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5031%.c: ../source/radio%.c
(unifdef -DRADIO=5031 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5042%.c: ../source/radio%.c
(unifdef -DRADIO=5042 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5043%.c: ../source/radio%.c
(unifdef -DRADIO=5043 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/ax5051%.c: ../source/radio%.c
(unifdef -DRADIO=5051 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccitt.c: ../source/crc8.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tccittmsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewire.c: ../source/crc8.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8tonewiremsb.c: ../source/crc8msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansi.c: ../source/crc16.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnp.c: ../source/crc16.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccitt.c: ../source/crc16.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsb.c: ../source/crc16msb.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansi.c: ../source/crc32.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsb.c: ../source/crc32msb.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittb.c: ../source/crc8b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8ccittmsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewireb.c: ../source/crc8b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc8onewiremsbb.c: ../source/crc8b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansib.c: ../source/crc16b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16ansimsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpb.c: ../source/crc16b.c
(unifdef -DCRCMODE=2 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc16dnpmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=3 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittb.c: ../source/crc16b.c
(unifdef -DCRCMODE=4 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crcccittmsbb.c: ../source/crc16b.c
(unifdef -DCRCMODE=5 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansib.c: ../source/crc32b.c
(unifdef -DCRCMODE=0 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/crc32ansimsbb.c: ../source/crc32b.c
(unifdef -DCRCMODE=1 -o $@ $<; x=$$?; if [ $${x} -lt 2 ] ; then x=0; fi; exit $${x})
libmf$(LIBSUFFIX)/lcdinit.rel: ../source/lcdinit.c ../source/libmflcd.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdsetpos.rel: ../source/lcdsetpos.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrstr.rel: ../source/lcdwrstr.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclear.rel: ../source/lcdclear.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdclrdisp.rel: ../source/lcdclrdisp.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru16.rel: ../source/lcdwru16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwru32.rel: ../source/lcdwru32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu16.rel: ../source/lcdwrhexu16.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcdwrhexu32.rel: ../source/lcdwrhexu32.c ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum16.rel: libmf$(LIBSUFFIX)/lcduwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrnum32.rel: libmf$(LIBSUFFIX)/lcduwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex16.rel: libmf$(LIBSUFFIX)/lcduwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/lcduwrhex32.rel: libmf$(LIBSUFFIX)/lcduwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/delay.rel: ../source/delay.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/random.rel: ../source/random.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitt.rel: ../source/crc8ccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewire.rel: ../source/crc8onewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccitttable.rel: ../source/crc8ccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiretable.rel: ../source/crc8onewiretable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbtable.rel: ../source/crc8ccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbtable.rel: ../source/crc8onewiremsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitttable.rel: ../source/crcccitttable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16table.rel: ../source/crc16table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnptable.rel: ../source/crc16dnptable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbtable.rel: ../source/crcccittmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16msbtable.rel: ../source/crc16msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbtable.rel: ../source/crc16dnpmsbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32table.rel: ../source/crc32table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32msbtable.rel: ../source/crc32msbtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccitt.rel: libmf$(LIBSUFFIX)/crc8tccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tccittmsb.rel: libmf$(LIBSUFFIX)/crc8tccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewire.rel: libmf$(LIBSUFFIX)/crc8tonewire.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8tonewiremsb.rel: libmf$(LIBSUFFIX)/crc8tonewiremsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansi.rel: libmf$(LIBSUFFIX)/crc16ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsb.rel: libmf$(LIBSUFFIX)/crc16ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnp.rel: libmf$(LIBSUFFIX)/crc16dnp.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsb.rel: libmf$(LIBSUFFIX)/crc16dnpmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccitt.rel: libmf$(LIBSUFFIX)/crcccitt.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsb.rel: libmf$(LIBSUFFIX)/crcccittmsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansi.rel: libmf$(LIBSUFFIX)/crc32ansi.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsb.rel: libmf$(LIBSUFFIX)/crc32ansimsb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittb.rel: libmf$(LIBSUFFIX)/crc8ccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8ccittmsbb.rel: libmf$(LIBSUFFIX)/crc8ccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewireb.rel: libmf$(LIBSUFFIX)/crc8onewireb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc8onewiremsbb.rel: libmf$(LIBSUFFIX)/crc8onewiremsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansib.rel: libmf$(LIBSUFFIX)/crc16ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16ansimsbb.rel: libmf$(LIBSUFFIX)/crc16ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpb.rel: libmf$(LIBSUFFIX)/crc16dnpb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc16dnpmsbb.rel: libmf$(LIBSUFFIX)/crc16dnpmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittb.rel: libmf$(LIBSUFFIX)/crcccittb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crcccittmsbb.rel: libmf$(LIBSUFFIX)/crcccittmsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansib.rel: libmf$(LIBSUFFIX)/crc32ansib.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/crc32ansimsbb.rel: libmf$(LIBSUFFIX)/crc32ansimsbb.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9.rel: ../source/pn9.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9table.rel: ../source/pn9table.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bit.rel: ../source/pn9bit.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9bits.rel: ../source/pn9bits.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9byte.rel: ../source/pn9byte.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn9buf.rel: ../source/pn9buf.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15advtable.rel: ../source/pn15advtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15outtable.rel: ../source/pn15outtable.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15adv.rel: ../source/pn15adv.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/pn15out.rel: ../source/pn15out.c ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/rev8.rel: ../source/rev8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight8.rel: ../source/hweight8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight16.rel: ../source/hweight16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/hweight32.rel: ../source/hweight32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext12.rel: ../source/signext12.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext16.rel: ../source/signext16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext20.rel: ../source/signext20.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/signext24.rel: ../source/signext24.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim16.rel: ../source/chksgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim16.rel: ../source/sgnlim16.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/chksgnlim32.rel: ../source/chksgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sgnlim32.rel: ../source/sgnlim32.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/grayenc8.rel: ../source/grayenc8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/graydec8.rel: ../source/graydec8.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemset.rel: ../source/fmemset.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/fmemcpy.rel: ../source/fmemcpy.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/standby.rel: ../source/standby.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleep.rel: ../source/sleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/deepsleep.rel: ../source/deepsleep.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/sleepcont.rel: ../source/sleepcont.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/resetcpu.rel: ../source/resetcpu.c ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashunlock.rel: ../source/flashunlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashlock.rel: ../source/flashlock.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwait.rel: ../source/flashwait.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashpgerase.rel: ../source/flashpgerase.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashwrite.rel: ../source/flashwrite.c ../source/libmfflash.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashread.rel: ../source/flashread.c ../source/libmfflash.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcal.rel: ../source/flashcal.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/flashcsec.rel: ../source/flashcsec.c ../source/libmfcalsector.h ../source/libmfflash.h ../source/libmfcrc.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0init.rel: libmf$(LIBSUFFIX)/uart0init.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1init.rel: libmf$(LIBSUFFIX)/uart1init.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0stop.rel: libmf$(LIBSUFFIX)/uart0stop.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1stop.rel: libmf$(LIBSUFFIX)/uart1stop.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0txbuf.rel: libmf$(LIBSUFFIX)/uart0txbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1txbuf.rel: libmf$(LIBSUFFIX)/uart1txbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rxbuf.rel: libmf$(LIBSUFFIX)/uart0rxbuf.c ../source/libmfuart0.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rxbuf.rel: libmf$(LIBSUFFIX)/uart1rxbuf.c ../source/libmfuart1.h ../source/libmfuart.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0tx.rel: libmf$(LIBSUFFIX)/uart0tx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1tx.rel: libmf$(LIBSUFFIX)/uart1tx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0rx.rel: libmf$(LIBSUFFIX)/uart0rx.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1rx.rel: libmf$(LIBSUFFIX)/uart1rx.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu16.rel: libmf$(LIBSUFFIX)/uart0wrhexu16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu16.rel: libmf$(LIBSUFFIX)/uart1wrhexu16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhexu32.rel: libmf$(LIBSUFFIX)/uart0wrhexu32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhexu32.rel: libmf$(LIBSUFFIX)/uart1wrhexu32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrstr.rel: libmf$(LIBSUFFIX)/uart0wrstr.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrstr.rel: libmf$(LIBSUFFIX)/uart1wrstr.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru16.rel: libmf$(LIBSUFFIX)/uart0wru16.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru16.rel: libmf$(LIBSUFFIX)/uart1wru16.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wru32.rel: libmf$(LIBSUFFIX)/uart0wru32.c ../source/libmfuart0.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wru32.rel: libmf$(LIBSUFFIX)/uart1wru32.c ../source/libmfuart1.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum16.rel: libmf$(LIBSUFFIX)/uart0wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum16.rel: libmf$(LIBSUFFIX)/uart1wrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrnum32.rel: libmf$(LIBSUFFIX)/uart0wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrnum32.rel: libmf$(LIBSUFFIX)/uart1wrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex16.rel: libmf$(LIBSUFFIX)/uart0wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex16.rel: libmf$(LIBSUFFIX)/uart1wrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart0wrhex32.rel: libmf$(LIBSUFFIX)/uart0wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/uart1wrhex32.rel: libmf$(LIBSUFFIX)/uart1wrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglink.rel: ../source/dbglink.c ../source/libmfdbglink.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktxbuf.rel: libmf$(LIBSUFFIX)/dbglnktxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrxbuf.rel: libmf$(LIBSUFFIX)/dbglnkrxbuf.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnktx.rel: libmf$(LIBSUFFIX)/dbglnktx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkrx.rel: libmf$(LIBSUFFIX)/dbglnkrx.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu16.rel: libmf$(LIBSUFFIX)/dbglnkwrhexu16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhexu32.rel: libmf$(LIBSUFFIX)/dbglnkwrhexu32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrstr.rel: libmf$(LIBSUFFIX)/dbglnkwrstr.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru16.rel: libmf$(LIBSUFFIX)/dbglnkwru16.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwru32.rel: libmf$(LIBSUFFIX)/dbglnkwru32.c ../source/libmfdbglink.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum16.rel: libmf$(LIBSUFFIX)/dbglnkwrnum16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrnum32.rel: libmf$(LIBSUFFIX)/dbglnkwrnum32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex16.rel: libmf$(LIBSUFFIX)/dbglnkwrhex16.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/dbglnkwrhex32.rel: libmf$(LIBSUFFIX)/dbglnkwrhex32.c ../source/wrnum.h ../source/libmfuart0.h ../source/libmfuart1.h ../source/libmfdbglink.h ../source/libmflcd.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adctemp.rel: ../source/adctemp.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccal.rel: ../source/adccal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalg.rel: ../source/adccalg.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adccalt.rel: ../source/adccalt.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcuncal.rel: ../source/adcuncal.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs00.rel: ../source/adcseoffs00.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs01.rel: ../source/adcseoffs01.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/adcseoffs10.rel: ../source/adcseoffs10.c ../source/libmfadc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121dec.rel: ../source/bch3121dec.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121decp.rel: ../source/bch3121decp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121enc.rel: ../source/bch3121enc.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121encp.rel: ../source/bch3121encp.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121stab.rel: ../source/bch3121stab.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/bch3121syn.rel: ../source/bch3121syn.c ../source/libmfbch.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum16.rel: ../source/wrnum16.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wrnum32.rel: ../source/wrnum32.c ../source/wrnum.h ../source/libmftypes.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offxosc.rel: ../source/offxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/offlpxosc.rel: ../source/offlpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setuplpxosc.rel: ../source/setuplpxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupxosc.rel: ../source/setupxosc.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/setupcal.rel: ../source/setupcal.c ../source/libmfosc.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtimer.rel: ../source/wtimer.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtrem.rel: ../source/wtrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbadd.rel: ../source/wtcbadd.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtcbrem.rel: ../source/wtcbrem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0setcfg.rel: ../source/wt0setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1setcfg.rel: ../source/wt1setcfg.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wtstdby.rel: ../source/wtstdby.c ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0adda.rel: ../source/wt0adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1adda.rel: ../source/wt1adda.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0addr.rel: ../source/wt0addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1addr.rel: ../source/wt1addr.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0curt.rel: ../source/wt0curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1curt.rel: ../source/wt1curt.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt0rem.rel: ../source/wt0rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt1rem.rel: ../source/wt1rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/wt01rem.rel: ../source/wt01rem.c ../source/wtimer.h ../source/libmfwtimer.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord16.rel: ../source/radiord16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord24.rel: ../source/radiord24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiord32.rel: ../source/radiord32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr16.rel: ../source/radiowr16.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr24.rel: ../source/radiowr24.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiowr32.rel: ../source/radiowr32.c ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/radiodswakecore.rel: ../source/radiodswakecore.c ../source/radiodefs.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031comminit.rel: libmf$(LIBSUFFIX)/ax5031comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031commslpexit.rel: libmf$(LIBSUFFIX)/ax5031commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031reset.rel: libmf$(LIBSUFFIX)/ax5031reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031deepsleep.rel: libmf$(LIBSUFFIX)/ax5031deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkena.rel: ../source/ax5031rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rclkdis.rel: ../source/ax5031rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031rdfifo.rel: libmf$(LIBSUFFIX)/ax5031rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031wrfifo.rel: libmf$(LIBSUFFIX)/ax5031wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5031regs.rel: ../source/ax5031regs.c ../source/ax8052f131.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042comminit.rel: libmf$(LIBSUFFIX)/ax5042comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042commslpexit.rel: libmf$(LIBSUFFIX)/ax5042commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042reset.rel: libmf$(LIBSUFFIX)/ax5042reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042deepsleep.rel: libmf$(LIBSUFFIX)/ax5042deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkena.rel: ../source/ax5042rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rclkdis.rel: ../source/ax5042rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042rdfifo.rel: libmf$(LIBSUFFIX)/ax5042rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042wrfifo.rel: libmf$(LIBSUFFIX)/ax5042wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5042regs.rel: ../source/ax5042regs.c ../source/ax8052f142.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043comminit.rel: libmf$(LIBSUFFIX)/ax5043comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043commslpexit.rel: libmf$(LIBSUFFIX)/ax5043commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043reset.rel: libmf$(LIBSUFFIX)/ax5043reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043deepsleep.rel: libmf$(LIBSUFFIX)/ax5043deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkena.rel: ../source/ax5043rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rclkdis.rel: ../source/ax5043rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043rdfifo.rel: libmf$(LIBSUFFIX)/ax5043rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043wrfifo.rel: libmf$(LIBSUFFIX)/ax5043wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5043regs.rel: ../source/ax5043regs.c ../source/ax8052f143.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051comminit.rel: libmf$(LIBSUFFIX)/ax5051comminit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051commslpexit.rel: libmf$(LIBSUFFIX)/ax5051commslpexit.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051reset.rel: libmf$(LIBSUFFIX)/ax5051reset.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051deepsleep.rel: libmf$(LIBSUFFIX)/ax5051deepsleep.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkena.rel: ../source/ax5051rclkena.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rclkdis.rel: ../source/ax5051rclkdis.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051rdfifo.rel: libmf$(LIBSUFFIX)/ax5051rdfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051wrfifo.rel: libmf$(LIBSUFFIX)/ax5051wrfifo.c ../source/radiodefs.h ../source/libmfradio.h ../source/libmftypes.h ../source/ax8052.h ../source/ax8052f131.h ../source/ax8052f142.h ../source/ax8052f143.h ../source/ax8052f151.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax5051regs.rel: ../source/ax5051regs.c ../source/ax8052f151.h ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)
libmf$(LIBSUFFIX)/ax8052regs.rel: ../source/ax8052regs.c ../source/ax8052.h ../source/axcompiler.h | libmf$(LIBSUFFIX)

@ -0,0 +1,24 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5031
#include "radiodefs.h"
__reentrantb void radio_comminit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x47;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
}

@ -0,0 +1,25 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5031
#include "radiodefs.h"
__reentrantb void radio_commsleepexit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX |= 0x40;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
// restore IRQ setting and pullup
radio_probeirq();
}

@ -0,0 +1,49 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5031
#include "radiodefs.h"
#if DEEPSLEEP
__reentrantb void radio_enter_deepsleep(void) __reentrant
{
PORTR |= 0x09;
// ensure last bit read before entering deep sleep is a zero;
// this is held until after wakeup is complete; otherwise,
// the wakeup protocol will not work
RADIO_PWRMODE = PWRMODE_PWRDOWN;
RADIO_PWRMODE = PWRMODE_DEEPSLEEP;
RADIOMUX &= (uint8_t)~0x40;
// turn off pull-up if MISO is driven low
PORTR &= 0xF7 | PINR;
}
__reentrantb uint8_t radio_wakeup_deepsleep(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x07;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
{
uint8_t i = radio_wakeup_deepsleep_core();
if (i)
return i;
}
if (radio_probeirq())
return RADIO_ERR_IRQ;
return 0;
}
#endif

@ -0,0 +1,88 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5031
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
movx a,@dptr
mov @r0,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@dptr
movx @r0,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@r0
movx @dptr,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
movx a,@r0
;movc @dptr,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*ptr++ = *(const uint8_t __xdata *)(AX8052_RADIOBASE | FDATA);
} while (--len);
}
#endif

@ -0,0 +1,96 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5031
#include "radiodefs.h"
__reentrantb uint8_t radio_reset(void) __reentrant
{
uint8_t i;
// Initialize Interface
DIRR = 0x15;
PORTR = 0xEB;
#if DEEPSLEEP
RADIOMUX = 0x07;
#else
RADIOMUX = 0x47;
#endif
RADIOACC = RACC;
GPIOENABLE = 1;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
#if DEEPSLEEP
// Ensure Device is not in Deep Sleep
radio_wakeup_deepsleep_core();
#endif
// Reset Device
RADIO_PWRMODE = 0x80;
RADIO_PWRMODE = PWRMODE_PWRDOWN;
// Wait some time for regulator startup
#if defined(VREGDELAY) && VREGDELAY > 0
delay(VREGDELAY);
#endif
// Check Scratch
i = RADIO_SILICONREVISION;
i = RADIO_SILICONREVISION;
#ifdef SILICONREV2
if (i != SILICONREV1 && i != SILICONREV2)
return RADIO_ERR_REVISION;
#else
if (i != SILICONREV1)
return RADIO_ERR_REVISION;
#endif
RADIO_SCRATCH = 0x55;
if (RADIO_SCRATCH != 0x55)
return RADIO_ERR_COMM;
RADIO_SCRATCH = 0xAA;
if (RADIO_SCRATCH != 0xAA)
return RADIO_ERR_COMM;
// Initialize Radio Interface Registers
if (radio_probeirq())
return RADIO_ERR_IRQ;
return RADIO_OK;
}
__reentrantb uint8_t ax5031_probeirq(void) __reentrant
{
uint8_t p = 0x60;
uint8_t pc1 = AX5031_PINCFG1 & 0x0F;
uint8_t iesave = IE;
IE_4 = 0;
PORTR = 0xEB;
AX5031_PINCFG1 = pc1;
AX5031_PINCFG2 = 0x22; /* IRQ Line 1 */
p &= PINR;
AX5031_PINCFG2 = 0x20; /* IRQ Line 0 */
p &= (uint8_t)~PINR;
AX5031_PINCFG2 = 0x00;
switch (p) {
case 0x20: /* IRQ on PR5 */
RADIOMUX &= (uint8_t)~0x08;
break;
case 0x40: /* IRQ on PR6 */
RADIOMUX |= 0x08;
break;
default:
/* Error */
AX5031_PINCFG1 = 0x20 | pc1; /* Disable IRQ line */
IE = iesave;
return 1;
}
PORTR &= (uint8_t)~p; /* disable pullup */
IE = iesave;
return 0;
}

@ -0,0 +1,89 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5031
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
mov a,@r0
movx @dptr,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@r0
movx @dptr,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@dptr
movx @r0,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
clr a
movc a,@a+dptr
movx @r0,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*(uint8_t __xdata *)(AX8052_RADIOBASE | FDATA) = *ptr++;
} while (--len);
}
#endif

@ -0,0 +1,24 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5042
#include "radiodefs.h"
__reentrantb void radio_comminit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x47;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
}

@ -0,0 +1,25 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5042
#include "radiodefs.h"
__reentrantb void radio_commsleepexit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX |= 0x40;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
// restore IRQ setting and pullup
radio_probeirq();
}

@ -0,0 +1,49 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5042
#include "radiodefs.h"
#if DEEPSLEEP
__reentrantb void radio_enter_deepsleep(void) __reentrant
{
PORTR |= 0x09;
// ensure last bit read before entering deep sleep is a zero;
// this is held until after wakeup is complete; otherwise,
// the wakeup protocol will not work
RADIO_PWRMODE = PWRMODE_PWRDOWN;
RADIO_PWRMODE = PWRMODE_DEEPSLEEP;
RADIOMUX &= (uint8_t)~0x40;
// turn off pull-up if MISO is driven low
PORTR &= 0xF7 | PINR;
}
__reentrantb uint8_t radio_wakeup_deepsleep(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x07;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
{
uint8_t i = radio_wakeup_deepsleep_core();
if (i)
return i;
}
if (radio_probeirq())
return RADIO_ERR_IRQ;
return 0;
}
#endif

@ -0,0 +1,88 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5042
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
movx a,@dptr
mov @r0,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@dptr
movx @r0,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@r0
movx @dptr,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
movx a,@r0
;movc @dptr,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*ptr++ = *(const uint8_t __xdata *)(AX8052_RADIOBASE | FDATA);
} while (--len);
}
#endif

@ -0,0 +1,100 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5042
#include "radiodefs.h"
__reentrantb uint8_t radio_reset(void) __reentrant
{
uint8_t i;
// Initialize Interface
DIRR = 0x15;
PORTR = 0xEB;
#if DEEPSLEEP
RADIOMUX = 0x07;
#else
RADIOMUX = 0x47;
#endif
RADIOACC = RACC;
GPIOENABLE = 1;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
#if DEEPSLEEP
// Ensure Device is not in Deep Sleep
radio_wakeup_deepsleep_core();
#endif
// Reset Device
RADIO_PWRMODE = 0x80;
RADIO_PWRMODE = PWRMODE_PWRDOWN;
// Wait some time for regulator startup
#if defined(VREGDELAY) && VREGDELAY > 0
delay(VREGDELAY);
#endif
// Check Scratch
i = RADIO_SILICONREVISION;
i = RADIO_SILICONREVISION;
#ifdef SILICONREV2
if (i != SILICONREV1 && i != SILICONREV2)
return RADIO_ERR_REVISION;
#else
if (i != SILICONREV1)
return RADIO_ERR_REVISION;
#endif
RADIO_SCRATCH = 0x55;
if (RADIO_SCRATCH != 0x55)
return RADIO_ERR_COMM;
RADIO_SCRATCH = 0xAA;
if (RADIO_SCRATCH != 0xAA)
return RADIO_ERR_COMM;
// Initialize Radio Interface Registers
AX5042_IFMODE = 0x00;
AX5042_AGCTARGET = 0x0E;
AX5042_PLLRNGMISC = 0x01;
AX5042_RXMISC = 0x35;
if (radio_probeirq())
return RADIO_ERR_IRQ;
return RADIO_OK;
}
__reentrantb uint8_t ax5042_probeirq(void) __reentrant
{
uint8_t p = 0x60;
uint8_t pc1 = AX5042_PINCFG1 & 0x0F;
uint8_t iesave = IE;
IE_4 = 0;
PORTR = 0xEB;
AX5042_PINCFG1 = 0xD0 | pc1;
AX5042_PINCFG2 = 0xE2; /* IRQ Line 1 */
p &= PINR;
AX5042_PINCFG2 = 0xE0; /* IRQ Line 0 */
p &= (uint8_t)~PINR;
AX5042_PINCFG2 = 0xC0;
switch (p) {
case 0x20: /* IRQ on PR5 */
RADIOMUX &= (uint8_t)~0x08;
break;
case 0x40: /* IRQ on PR6 */
RADIOMUX |= 0x08;
break;
default:
/* Error */
AX5042_PINCFG1 = 0xF0 | pc1; /* Disable IRQ line */
IE = iesave;
return 1;
}
PORTR &= (uint8_t)~p; /* disable pullup */
IE = iesave;
return 0;
}

@ -0,0 +1,89 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5042
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
mov a,@r0
movx @dptr,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@r0
movx @dptr,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@dptr
movx @r0,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
clr a
movc a,@a+dptr
movx @r0,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*(uint8_t __xdata *)(AX8052_RADIOBASE | FDATA) = *ptr++;
} while (--len);
}
#endif

@ -0,0 +1,24 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5043
#include "radiodefs.h"
__reentrantb void radio_comminit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x47;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
}

@ -0,0 +1,25 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5043
#include "radiodefs.h"
__reentrantb void radio_commsleepexit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX |= 0x40;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
// restore IRQ setting and pullup
radio_probeirq();
}

@ -0,0 +1,50 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5043
#include "radiodefs.h"
#if DEEPSLEEP
__reentrantb void radio_enter_deepsleep(void) __reentrant
{
PORTR |= 0x0B;
AX5043_PINFUNCSYSCLK = 0x01;
// ensure last bit read before entering deep sleep is a zero;
// this is held until after wakeup is complete; otherwise,
// the wakeup protocol will not work
RADIO_PWRMODE = PWRMODE_PWRDOWN;
RADIO_PWRMODE = PWRMODE_DEEPSLEEP;
RADIOMUX &= (uint8_t)~0x40;
// turn off pull-up if MISO is driven low
PORTR &= 0xF7 | PINR;
}
__reentrantb uint8_t radio_wakeup_deepsleep(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x07;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
{
uint8_t i = radio_wakeup_deepsleep_core();
if (i)
return i;
}
if (radio_probeirq())
return RADIO_ERR_IRQ;
return 0;
}
#endif

@ -0,0 +1,88 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5043
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
movx a,@dptr
mov @r0,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@dptr
movx @r0,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@r0
movx @dptr,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
movx a,@r0
;movc @dptr,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*ptr++ = *(const uint8_t __xdata *)(AX8052_RADIOBASE | FDATA);
} while (--len);
}
#endif

@ -0,0 +1,97 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5043
#include "radiodefs.h"
__reentrantb uint8_t radio_reset(void) __reentrant
{
uint8_t i;
// Initialize Interface
DIRR = 0x15;
PORTR = 0xEB;
#if DEEPSLEEP
RADIOMUX = 0x07;
#else
RADIOMUX = 0x47;
#endif
RADIOACC = RACC;
GPIOENABLE = 1;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
#if DEEPSLEEP
// Ensure Device is not in Deep Sleep
radio_wakeup_deepsleep_core();
#endif
// Reset Device
RADIO_PWRMODE = 0x80;
RADIO_PWRMODE = PWRMODE_PWRDOWN;
// Wait some time for regulator startup
#if defined(VREGDELAY) && VREGDELAY > 0
delay(VREGDELAY);
#endif
// Check Scratch
i = RADIO_SILICONREVISION;
i = RADIO_SILICONREVISION;
#ifdef SILICONREV2
if (i != SILICONREV1 && i != SILICONREV2)
return RADIO_ERR_REVISION;
#else
if (i != SILICONREV1)
return RADIO_ERR_REVISION;
#endif
RADIO_SCRATCH = 0x55;
if (RADIO_SCRATCH != 0x55)
return RADIO_ERR_COMM;
RADIO_SCRATCH = 0xAA;
if (RADIO_SCRATCH != 0xAA)
return RADIO_ERR_COMM;
// Initialize Radio Interface Registers
if (radio_probeirq())
return RADIO_ERR_IRQ;
return RADIO_OK;
}
SFRX(RADIODRV, 0x7045)
__reentrantb uint8_t ax5043_probeirq(void) __reentrant
{
uint8_t p = 0x60;
uint8_t iesave = IE;
IE_4 = 0;
PORTR &= 0xEB;
PORTR |= 0x2B;
AX5043_PINFUNCIRQ = 0x01; /* IRQ Line 1 */
p &= PINR;
AX5043_PINFUNCIRQ = 0x00; /* IRQ Line 0 */
p &= (uint8_t)~PINR;
AX5043_PINFUNCIRQ = 0x03;
switch (p) {
case 0x20: /* IRQ on PR5 */
RADIOMUX &= (uint8_t)~0x08;
break;
case 0x40: /* IRQ on PR6 */
RADIOMUX |= 0x08;
break;
default:
/* Error */
AX5043_PINFUNCIRQ = 0x02; /* Disable IRQ line */
IE = iesave;
return 1;
}
PORTR &= (uint8_t)~p; /* disable pullup */
IE = iesave;
return 0;
}

@ -0,0 +1,89 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5043
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
mov a,@r0
movx @dptr,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@r0
movx @dptr,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@dptr
movx @r0,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
clr a
movc a,@a+dptr
movx @r0,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*(uint8_t __xdata *)(AX8052_RADIOBASE | FDATA) = *ptr++;
} while (--len);
}
#endif

@ -0,0 +1,24 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5051
#include "radiodefs.h"
__reentrantb void radio_comminit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x47;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
}

@ -0,0 +1,25 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5051
#include "radiodefs.h"
__reentrantb void radio_commsleepexit(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX |= 0x40;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
// restore IRQ setting and pullup
radio_probeirq();
}

@ -0,0 +1,49 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5051
#include "radiodefs.h"
#if DEEPSLEEP
__reentrantb void radio_enter_deepsleep(void) __reentrant
{
PORTR |= 0x09;
// ensure last bit read before entering deep sleep is a zero;
// this is held until after wakeup is complete; otherwise,
// the wakeup protocol will not work
RADIO_PWRMODE = PWRMODE_PWRDOWN;
RADIO_PWRMODE = PWRMODE_DEEPSLEEP;
RADIOMUX &= (uint8_t)~0x40;
// turn off pull-up if MISO is driven low
PORTR &= 0xF7 | PINR;
}
__reentrantb uint8_t radio_wakeup_deepsleep(void) __reentrant
{
DIRR = 0x15;
PORTR = 0xEB;
RADIOMUX = 0x07;
RADIOACC = RACC;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
GPIOENABLE = 1;
{
uint8_t i = radio_wakeup_deepsleep_core();
if (i)
return i;
}
if (radio_probeirq())
return RADIO_ERR_IRQ;
return 0;
}
#endif

@ -0,0 +1,88 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5051
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
movx a,@dptr
mov @r0,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@dptr
movx @r0,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@r0
movx @dptr,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
movx a,@r0
;movc @dptr,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_readfifo(uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*ptr++ = *(const uint8_t __xdata *)(AX8052_RADIOBASE | FDATA);
} while (--len);
}
#endif

@ -0,0 +1,119 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5051
#include "radiodefs.h"
__reentrantb uint8_t radio_reset(void) __reentrant
{
uint8_t i;
// Initialize Interface
DIRR = 0x15;
PORTR = 0xEB;
#if DEEPSLEEP
RADIOMUX = 0x07;
#else
RADIOMUX = 0x47;
#endif
RADIOACC = RACC;
GPIOENABLE = 1;
#if defined SDCC
RADIOFDATAADDR = FDATA;
RADIOFSTATADDR = FSTAT;
#else
RADIOFDATAADDR0 = (FDATA) & 0xFF;
RADIOFDATAADDR1 = (FDATA) >> 8;
RADIOFSTATADDR0 = (FSTAT) & 0xFF;
RADIOFSTATADDR1 = (FSTAT) >> 8;
#endif
#if DEEPSLEEP
// Ensure Device is not in Deep Sleep
radio_wakeup_deepsleep_core();
#endif
// Reset Device
RADIO_PWRMODE = 0x80;
RADIO_PWRMODE = PWRMODE_PWRDOWN;
// Wait some time for regulator startup
#if defined(VREGDELAY) && VREGDELAY > 0
delay(VREGDELAY);
#endif
// Check Scratch
i = RADIO_SILICONREVISION;
i = RADIO_SILICONREVISION;
#ifdef SILICONREV2
if (i != SILICONREV1 && i != SILICONREV2)
return RADIO_ERR_REVISION;
#else
if (i != SILICONREV1)
return RADIO_ERR_REVISION;
#endif
RADIO_SCRATCH = 0x55;
if (RADIO_SCRATCH != 0x55)
return RADIO_ERR_COMM;
RADIO_SCRATCH = 0xAA;
if (RADIO_SCRATCH != 0xAA)
return RADIO_ERR_COMM;
// Initialize Radio Interface Registers
AX5051_IFMODE = 0x00;
AX5051_PLLVCOI = 0x01;
AX5051_RXMISC = 0x35;
if (radio_probeirq())
return RADIO_ERR_IRQ;
return RADIO_OK;
}
__reentrantb uint8_t ax5051_probeirq(void) __reentrant
{
uint8_t p = 0x60;
uint8_t pc1 = AX5051_PINCFG1 & 0x0F;
uint8_t iesave = IE;
IE_4 = 0;
PORTR = 0xEB;
AX5051_PINCFG1 = 0xD0 | pc1;
AX5051_PINCFG2 = 0xF2; /* IRQ Line 1 */
p &= PINR;
AX5051_PINCFG2 = 0xF0; /* IRQ Line 0 */
p &= (uint8_t)~PINR;
AX5051_PINCFG2 = 0xD0;
switch (p) {
case 0x20: /* IRQ on PR5 */
RADIOMUX &= (uint8_t)~0x08;
break;
case 0x40: /* IRQ on PR6 */
RADIOMUX |= 0x08;
break;
default:
/* Error */
AX5051_PINCFG1 = 0xA0 | pc1; /* Disable IRQ line */
IE = iesave;
return 1;
}
PORTR &= (uint8_t)~p; /* disable pullup */
/*
* Check voltage on test mode pins and drive them
* to the correct level. This is somewhat dangerous - we
* may momentarily short circuit the output driver (4mA)
* no short circuit will happen if the board complies
* to AX5051/AX5151/AX8052F151 programming manual
*/
EA = 0;
/* check T2 */
AX5051_PINCFG1 = 0xC0 | pc1;
AX5051_PINCFG2 |= AX5051_PINCFG3 & 0x01;
/* check T1 */
AX5051_PINCFG1 = 0x80 | pc1;
AX5051_PINCFG2 |= AX5051_PINCFG3 & 0x04;
/* check TST3 */
AX5051_PINCFG1 = pc1;
AX5051_PINCFG2 |= AX5051_PINCFG3 & 0x08;
IE |= p;
/* check whether TST3 is connected to PR5 - if so disable pullup */
PORTR &= PINR | (uint8_t)~0x20;
IE = iesave;
return 0;
}

@ -0,0 +1,89 @@
#include "libmftypes.h"
#include "libmfradio.h"
#define RADIO 5051
#include "radiodefs.h"
#if defined(SDCC)
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant __naked
{
ptr;
len;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
jz nodata$
mov r7,a
jb _B_7,codeptr$ ; >0x80 code
jnb _B_6,xdataptr$ ; <0x40 far
mov r0,dpl
mov dptr,#(AX8052_RADIOBASE | FDATA)
jb _B_5,pdataptr$ ; >0x60 pdata
idataloop$:
mov a,@r0
movx @dptr,a
inc r0
djnz r7,idataloop$
nodata$:
ret
pdataptr$:
pdataloop$:
movx a,@r0
movx @dptr,a
inc r0
djnz r7,pdataloop$
ret
xdataptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
xdataloop$:
movx a,@dptr
movx @r0,a
inc dptr
djnz r7,xdataloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
codeptr$:
mov a,#0x80
anl a,_IE
mov r5,a
clr _EA
mov r6,_XPAGE
mov _XPAGE,#((AX8052_RADIOBASE | FDATA) >> 8)
mov r0,#(AX8052_RADIOBASE | FDATA)
codeloop$:
clr a
movc a,@a+dptr
movx @r0,a
inc dptr
djnz r7,codeloop$
mov _XPAGE,r6
mov a,r5
orl _IE,a
ret
__endasm;
}
#else
__reentrantb void radio_writefifo(const uint8_t __generic *ptr, uint8_t len) __reentrant
{
if (!len)
return;
do {
*(uint8_t __xdata *)(AX8052_RADIOBASE | FDATA) = *ptr++;
} while (--len);
}
#endif

@ -0,0 +1,51 @@
#include "libmfcrc.h"
#define crc_byte crc_crc16_byte
#define crc_table crc_crc16_table
#define crc_table_asm _crc_crc16_table
#if defined(SDCC)
__reentrantb uint16_t crc_byte(uint16_t crc, uint8_t c) __reentrant __naked
{
crc;
c;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
xrl a,dpl
clr c
rlc a
mov r2,a
clr a
rlc a
mov r3,a
mov a,#crc_table_asm
add a,r2
mov dpl,a
mov a,#(crc_table_asm >> 8)
addc a,r3
xch a,dph
mov r2,a
clr a
movc a,@a+dptr
xrl a,r2
mov r2,a
mov a,#1
movc a,@a+dptr
mov dph,a
mov dpl,r2
ret
__endasm;
}
#else
__reentrantb uint16_t crc_byte(uint16_t crc, uint8_t c) __reentrant
{
return (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff];
}
#endif

@ -0,0 +1,243 @@
#include "libmfcrc.h"
#define crc_buf crc_crc16
#define crc_byte crc_crc16_byte
#define crc_table_asm _crc_crc16_table
#define CRCMSB 0
#if defined(SDCC)
__reentrantb uint16_t crc_buf(const uint8_t __generic *buf, uint16_t buflen, uint16_t crc) __reentrant __naked
{
buf;
buflen;
crc;
__asm;
mov a,sp
add a,#-5
mov r0,a
mov a,@r0
mov r4,a
inc r0
mov a,@r0
mov r5,a
inc r0
mov a,@r0
mov r2,a
inc r0
mov a,@r0
mov r3,a
orl a,r2
jz 00001$
mov a,r2
jz 00000$
inc r3
00000$: jb _B_7,00010$ ; >0x80 code
jnb _B_6,00020$ ; <0x40 far
mov r0,dpl
jb _B_5,00030$ ; >0x60 pdata
;; idata
00040$: mov a,@r0
inc r0
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
djnz r2,00040$
djnz r3,00040$
sjmp 00001$
00030$: movx a,@r0
inc r0
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
djnz r2,00030$
djnz r3,00030$
00001$:
mov dpl,r4
mov dph,r5
ret
00020$: movx a,@dptr
inc dptr
mov r0,dpl
mov r1,dph
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
mov dph,r1
mov dpl,r0
djnz r2,00020$
djnz r3,00020$
sjmp 00001$
00010$: clr a
movc a,@a+dptr
inc dptr
mov r0,dpl
mov r1,dph
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
mov dph,r1
mov dpl,r0
djnz r2,00010$
djnz r3,00010$
sjmp 00001$
__endasm;
}
#else
__reentrantb uint16_t crc_buf(const uint8_t __generic *buf, uint16_t buflen, uint16_t crc) __reentrant
{
if (!buflen)
return crc;
do {
crc = crc_byte(crc, *buf++);
} while (--buflen);
return crc;
}
#endif

@ -0,0 +1,51 @@
#include "libmfcrc.h"
#define crc_msb_byte crc_crc16_msb_byte
#define crc_msbtable crc_crc16_msbtable
#define crc_msbtable_asm _crc_crc16_msbtable
#if defined(SDCC)
__reentrantb uint16_t crc_msb_byte(uint16_t crc, uint8_t c) __reentrant __naked
{
crc;
c;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
xrl a,dph
clr c
rlc a
mov r2,a
clr a
rlc a
mov r3,a
mov a,#crc_msbtable_asm
add a,r2
xch a,dpl
mov r2,a
mov a,#(crc_msbtable_asm >> 8)
addc a,r3
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r2
mov r2,a
clr a
movc a,@a+dptr
mov dpl,a
mov dph,r2
ret
__endasm;
}
#else
__reentrantb uint16_t crc_msb_byte(uint16_t crc, uint8_t c) __reentrant
{
return (crc << 8) ^ crc_msbtable[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff];
}
#endif

@ -0,0 +1,243 @@
#include "libmfcrc.h"
#define crc_buf crc_crc16_msb
#define crc_byte crc_crc16_msb_byte
#define crc_table_asm _crc_crc16_msbtable
#define CRCMSB 1
#if defined(SDCC)
__reentrantb uint16_t crc_buf(const uint8_t __generic *buf, uint16_t buflen, uint16_t crc) __reentrant __naked
{
buf;
buflen;
crc;
__asm;
mov a,sp
add a,#-5
mov r0,a
mov a,@r0
mov r4,a
inc r0
mov a,@r0
mov r5,a
inc r0
mov a,@r0
mov r2,a
inc r0
mov a,@r0
mov r3,a
orl a,r2
jz 00001$
mov a,r2
jz 00000$
inc r3
00000$: jb _B_7,00010$ ; >0x80 code
jnb _B_6,00020$ ; <0x40 far
mov r0,dpl
jb _B_5,00030$ ; >0x60 pdata
;; idata
00040$: mov a,@r0
inc r0
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
djnz r2,00040$
djnz r3,00040$
sjmp 00001$
00030$: movx a,@r0
inc r0
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
djnz r2,00030$
djnz r3,00030$
00001$:
mov dpl,r4
mov dph,r5
ret
00020$: movx a,@dptr
inc dptr
mov r0,dpl
mov r1,dph
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
mov dph,r1
mov dpl,r0
djnz r2,00020$
djnz r3,00020$
sjmp 00001$
00010$: clr a
movc a,@a+dptr
inc dptr
mov r0,dpl
mov r1,dph
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
mov dph,r1
mov dpl,r0
djnz r2,00010$
djnz r3,00010$
sjmp 00001$
__endasm;
}
#else
__reentrantb uint16_t crc_buf(const uint8_t __generic *buf, uint16_t buflen, uint16_t crc) __reentrant
{
if (!buflen)
return crc;
do {
crc = crc_byte(crc, *buf++);
} while (--buflen);
return crc;
}
#endif

@ -0,0 +1,51 @@
#include "libmfcrc.h"
#define crc_byte crc_crc16dnp_byte
#define crc_table crc_crc16dnp_table
#define crc_table_asm _crc_crc16dnp_table
#if defined(SDCC)
__reentrantb uint16_t crc_byte(uint16_t crc, uint8_t c) __reentrant __naked
{
crc;
c;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
xrl a,dpl
clr c
rlc a
mov r2,a
clr a
rlc a
mov r3,a
mov a,#crc_table_asm
add a,r2
mov dpl,a
mov a,#(crc_table_asm >> 8)
addc a,r3
xch a,dph
mov r2,a
clr a
movc a,@a+dptr
xrl a,r2
mov r2,a
mov a,#1
movc a,@a+dptr
mov dph,a
mov dpl,r2
ret
__endasm;
}
#else
__reentrantb uint16_t crc_byte(uint16_t crc, uint8_t c) __reentrant
{
return (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff];
}
#endif

@ -0,0 +1,243 @@
#include "libmfcrc.h"
#define crc_buf crc_crc16dnp
#define crc_byte crc_crc16dnp_byte
#define crc_table_asm _crc_crc16dnp_table
#define CRCMSB 0
#if defined(SDCC)
__reentrantb uint16_t crc_buf(const uint8_t __generic *buf, uint16_t buflen, uint16_t crc) __reentrant __naked
{
buf;
buflen;
crc;
__asm;
mov a,sp
add a,#-5
mov r0,a
mov a,@r0
mov r4,a
inc r0
mov a,@r0
mov r5,a
inc r0
mov a,@r0
mov r2,a
inc r0
mov a,@r0
mov r3,a
orl a,r2
jz 00001$
mov a,r2
jz 00000$
inc r3
00000$: jb _B_7,00010$ ; >0x80 code
jnb _B_6,00020$ ; <0x40 far
mov r0,dpl
jb _B_5,00030$ ; >0x60 pdata
;; idata
00040$: mov a,@r0
inc r0
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
djnz r2,00040$
djnz r3,00040$
sjmp 00001$
00030$: movx a,@r0
inc r0
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
djnz r2,00030$
djnz r3,00030$
00001$:
mov dpl,r4
mov dph,r5
ret
00020$: movx a,@dptr
inc dptr
mov r0,dpl
mov r1,dph
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
mov dph,r1
mov dpl,r0
djnz r2,00020$
djnz r3,00020$
sjmp 00001$
00010$: clr a
movc a,@a+dptr
inc dptr
mov r0,dpl
mov r1,dph
#if !CRCMSB
;; lsb: crc = (crc >> 8) ^ crc_table[((uint8_t)crc ^ c) & (uint8_t)0xff]
xrl a,r4
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
clr a
movc a,@a+dptr
xrl a,r5
mov r4,a
mov a,#1
movc a,@a+dptr
mov r5,a
#else
;; msb: crc = (crc << 8) ^ crc_table[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff]
xrl a,r5
rl a
mov dpl,a
anl a,#0xfe
add a,#crc_table_asm
xch a,dpl
anl a,#0x01
addc a,#(crc_table_asm >> 8)
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r4
mov r5,a
clr a
movc a,@a+dptr
mov r4,a
#endif
;; loop
mov dph,r1
mov dpl,r0
djnz r2,00010$
djnz r3,00010$
sjmp 00001$
__endasm;
}
#else
__reentrantb uint16_t crc_buf(const uint8_t __generic *buf, uint16_t buflen, uint16_t crc) __reentrant
{
if (!buflen)
return crc;
do {
crc = crc_byte(crc, *buf++);
} while (--buflen);
return crc;
}
#endif

@ -0,0 +1,51 @@
#include "libmfcrc.h"
#define crc_msb_byte crc_crc16dnp_msb_byte
#define crc_msbtable crc_crc16dnp_msbtable
#define crc_msbtable_asm _crc_crc16dnp_msbtable
#if defined(SDCC)
__reentrantb uint16_t crc_msb_byte(uint16_t crc, uint8_t c) __reentrant __naked
{
crc;
c;
__asm;
mov a,sp
add a,#-2
mov r0,a
mov a,@r0
xrl a,dph
clr c
rlc a
mov r2,a
clr a
rlc a
mov r3,a
mov a,#crc_msbtable_asm
add a,r2
xch a,dpl
mov r2,a
mov a,#(crc_msbtable_asm >> 8)
addc a,r3
mov dph,a
mov a,#1
movc a,@a+dptr
xrl a,r2
mov r2,a
clr a
movc a,@a+dptr
mov dpl,a
mov dph,r2
ret
__endasm;
}
#else
__reentrantb uint16_t crc_msb_byte(uint16_t crc, uint8_t c) __reentrant
{
return (crc << 8) ^ crc_msbtable[((uint8_t)(crc >> 8) ^ c) & (uint8_t)0xff];
}
#endif

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

Loading…
Cancel
Save

Powered by TurnKey Linux.