aroarfw-0.1beta5/0000755000175000017500000000000012227205762012063 5ustar phiphiaroarfw-0.1beta5/ChangeLog0000644000175000017500000000202712227205607013634 0ustar phiphiv. 0.1beta5 - Tue Oct 15 2013 11:31 CEST * Updated copyright. * Updated existing structs and enums. * Added rrpgmode_t. * Added i2c.h with some usefull stuff for I²C devices. v. 0.1beta4 - Sun Jan 19 2012 12:06 CET * Updated existing structs and enums * Corrected struct raudio_info -> raudio_info_t * Added caps.h which contains types and macros for standards * Corrected bug in rmsg0_getsid() * Fixed typos * added unoffical helper type riodir_t v. 0.1beta3 - Thu Sep 29 2011 03:13 CEST * Added new error codes * Added new command, stream parameter, ITST and codec IDs * Added file for meta data handling * Corrected IDs for Object Types (OT) v. 0.1beta2 - Tue Mar 15 2011 11:04 CET * Updated some enums * Added enum type for error codes v. 0.1beta1 - Wed Feb 02 2011 26:50 CET * Updated lots of enums * Added lots of enums for new stuff v. 0.1beta0 - Sat Jul 17 2010 14:34 CEST * Start of project * Added most consts and a lot data types * Added some macros used to build v0 messages * Working on getting into Debian aroarfw-0.1beta5/AUTHORS0000644000175000017500000000011511402765477013140 0ustar phiphi--- Main Developer: * Philipp 'ph3-der-loewe' Schafft aroarfw-0.1beta5/COPYING.gplv30000644000175000017500000010451311402765477014164 0ustar phiphi GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. 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. Copyright (C) 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 . 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: Copyright (C) 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 . 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 . aroarfw-0.1beta5/Doxyfile0000644000175000017500000002402111420233175013561 0ustar phiphi# Doxyfile 1.5.1 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- PROJECT_NAME = aroarfw PROJECT_NUMBER = #OUTPUT_DIRECTORY = /home/phi/cvs/aroarfw/doc/ OUTPUT_DIRECTORY = ./doc/ CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English #OLD#USE_WINDOWS_ENCODING = NO BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES #STRIP_FROM_PATH = /home/phi/cvs/aroarfw/ STRIP_FROM_PATH = ./ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO #OLD#DETAILS_AT_TOP = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO TAB_SIZE = 8 ALIASES = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO BUILTIN_STL_SUPPORT = NO DISTRIBUTE_GROUP_DOC = NO SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = YES EXTRACT_PRIVATE = NO EXTRACT_STATIC = NO EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO HIDE_UNDOC_MEMBERS = YES HIDE_UNDOC_CLASSES = YES HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO SORT_BY_SCOPE_NAME = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES SHOW_DIRECTORIES = NO FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- #INPUT = /home/phi/cvs/aroarfw/ INPUT = ./ FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py \ *.C \ *.CC \ *.C++ \ *.II \ *.I++ \ *.H \ *.HH \ *.H++ \ *.CS \ *.PHP \ *.PHP3 \ *.M \ *.MM \ *.PY RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = YES INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO REFERENCES_LINK_SOURCE = YES USE_HTAGS = NO VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO BINARY_TOC = NO TOC_EXPAND = NO DISABLE_INDEX = NO ENUM_VALUES_PER_LINE = 4 GENERATE_TREEVIEW = NO TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = YES LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO PAPER_TYPE = a4 EXTRA_PACKAGES = LATEX_HEADER = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf COMPACT_RTF = NO RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = YES MAN_OUTPUT = man MAN_EXTENSION = .3 MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml XML_SCHEMA = XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO PERLMOD_PRETTY = YES PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES CALL_GRAPH = NO CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png DOT_PATH = DOTFILE_DIRS = #OLD#MAX_DOT_GRAPH_WIDTH = 1024 #OLD#MAX_DOT_GRAPH_HEIGHT = 1024 MAX_DOT_GRAPH_DEPTH = 999 DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE = NO aroarfw-0.1beta5/README0000644000175000017500000000457711704531453012756 0ustar phiphi aroarfw ----------- --- What is aroarfw?: aroarfw is a framework for using RoarAudio on µControllers. It is not a complete library to speak the protocol but a set of consts, types and macros which are very useful while implementing the protocol. --- Features: * (nearly) all needed magic numbers for the protocol as consts * a lot useful types to store the data in. all types are portable across the platforms. * some nice macros helping you to work with messages and the like. --- Build: There is no binary code you need to compile before you can start. To compile the documentation just type 'doxygen'. -- Build requirements: As there is no binary code which needs to be compiled you do not have any build depends. However you of cause need the corresponding tool change for using it on your target platform. To build the the documentation you need to have 'doxygen' installed. Please also install all recommends the package may have on your system. Else the output may not be correct. -- What is needed on the target platform to be supported?: The target platform need to support data pointers and be able to store objects of some bytes in memory at once. The exact memory usage depends on your application. The target platform should have at minimum half a KiB of RAM. In addition the target platform need to provide a stdint.h with standard 16 and 32 bit integer types. Future versions may require 64 bit types to be present, too. --- Tested platforms: OPERATING SYSTEM ARCH COMPILER TESTED M/STATUS COMMENT AND VERSION VERSION --------------------------------------------------------------------------------------------------- Debian ix86 gcc 4.1.2 0.1b4 m/OK Debian Sid * * last M/OK - ATmega gcc 4.1.0 0.1b0 N/OK Tested Version: Current: Current as listed on Homepage last: Last released version (This system is on release checklist) *b*: Beta Status: Maintenance/testing Status: Maintenance: s = your are on your own, sources. m = package in work, beta package M = maintained S = maintained source package B = maintained binary package N = No package because no OS. Crosscompiler used. You can use the package on any other system to build binarys for this arch. aroarfw-0.1beta5/doc/0000755000175000017500000000000012227205762012630 5ustar phiphiaroarfw-0.1beta5/include/0000755000175000017500000000000012227205757013512 5ustar phiphiaroarfw-0.1beta5/include/aroarfw/0000755000175000017500000000000012227205757015153 5ustar phiphiaroarfw-0.1beta5/include/aroarfw/byteorder.h0000644000175000017500000000672312135077273017331 0ustar phiphi//byteorder.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_BYTEORDER_H_ #define _AROARFW_BYTEORDER_H_ /** \brief Convert a 16 bit integer into a 2 byte buffer in network byte order. This function converts a 16 bit integer in host byte order into network byte order and puts it into a 2 byte buffer. \param buf The buffer to put the integer in \param v The integer to put in the buffer \return The integer in host byte order */ #define RBO_H2NB16(buf, v) ( \ ((uint16_t)(((unsigned char*)(buf))[0] = ((uint16_t)(v) >> 8) & 0xFF) << 8) + \ (uint16_t)(((unsigned char*)(buf))[1] = (uint16_t)(v) & 0xFF) \ ) /** \brief Convert a 2 byte buffer into a 16 bit integer in host byte order. This function converts a 2 byte buffer in network byte order into a 16 bit integer in host byte order. \param buf The buffer to get the integer from \return The integer in host byte order */ #define RBO_NB2H16(buf) ( \ ((uint16_t)(((unsigned char*)(buf))[0]) << 8) + \ (uint16_t)(((unsigned char*)(buf))[1]) \ ) /** \brief Convert a 32 bit integer into a 4 byte buffer in network byte order. This function converts a 32 bit integer in host byte order into network byte order and puts it into a 4 byte buffer. \param buf The buffer to put the integer in \param v The integer to put in the buffer \return The integer in host byte order */ #define RBO_H2NB32(buf, v) ( \ ((uint32_t)(((unsigned char*)(buf))[0] = ((uint32_t)(v) >> 24) & 0xFF) << 24) + \ ((uint32_t)(((unsigned char*)(buf))[1] = ((uint32_t)(v) >> 16) & 0xFF) << 16) + \ ((uint32_t)(((unsigned char*)(buf))[2] = ((uint32_t)(v) >> 8) & 0xFF) << 8) + \ (uint32_t)(((unsigned char*)(buf))[3] = (uint32_t)(v) & 0xFF) \ ) /** \brief Convert a 4 byte buffer into a 32 bit integer in host byte order. This function converts a 4 byte buffer in network byte order into a 32 bit integer in host byte order. \param buf The buffer to get the integer from \return The integer in host byte order */ #define RBO_NB2H32(buf) ( \ ((uint32_t)(((unsigned char*)(buf))[0]) << 24) + \ ((uint32_t)(((unsigned char*)(buf))[1]) << 16) + \ ((uint32_t)(((unsigned char*)(buf))[2]) << 8) + \ (uint32_t)(((unsigned char*)(buf))[3]) \ ) #endif //ll aroarfw-0.1beta5/include/aroarfw/audio.h0000644000175000017500000001457712135077273016441 0ustar phiphi//audio.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_AUDIO_H_ #define _AROARFW_AUDIO_H_ //! Channel setups for RoarAudio typedef enum { //! No channels RCHANNELS_NONE = 0, //! Mono stream (one channel) RCHANNELS_MONO = 1, //! Stereo stream (two channels) RCHANNELS_STEREO = 2 } rchannels_t; //! Codec used by streams or other audio data typedef enum { //! Signed PCM data in little endian RCODEC_PCM_S_LE = 0x01, //! Signed PCM data in big endian RCODEC_PCM_S_BE = 0x02, //! Signed PCM data in PDP (middle) endian RCODEC_PCM_S_PDP = 0x03, //! Unsigned PCM data in little endian RCODEC_PCM_U_LE = 0x05, //! Unsigned PCM data in big endian RCODEC_PCM_U_BE = 0x06, //! Unsigned PCM data in PDP (middle) endian RCODEC_PCM_U_PDP = 0x07, //! Ogg Vorbis RCODEC_OGG_VORBIS = 0x10, //! Native FLAC (.flac) RCODEC_FLAC = 0x11, //! Ogg Speex (.spx) RCODEC_OGG_SPEEX = 0x12, //! Ogg FLAC RCODEC_OGG_FLAC = 0x14, //! Ogg CELT RCODEC_OGG_CELT = 0x16, //! General Ogg (mixed/unknown content) RCODEC_OGG_GENERAL = 0x15, //! Ogg container itself (to be used with virtual streams) RCODEC_OGG = 0x17, //! Opus in Ogg RCODEC_OGG_OPUS = 0x18, //! RoarOpus (.ro) RCODEC_ROAR_OPUS = 0x19, //! RoarCELT (.rc) RCODEC_ROAR_CELT = 0x1a, //! RoarSpeex (.rs) RCODEC_ROAR_SPEEX = 0x1b, //! RIFF WAVE container (.wav) (may be used with virtual streams) RCODEC_RIFF_WAVE = 0x20, //! Big endian RIFF WAVE file RCODEC_RIFX = 0x22, //! Sun Audio file format (.au) (may be used with virtual streams) RCODEC_AU = 0x24, //! Audio Interchange File Format (may be used with virtual streams) RCODEC_AIFF = 0x28, //! A-Law RCODEC_ALAW = 0x30, //! A-Law alike 16 bit codec in little endian (uncommon) RCODEC_AUTLAW_LE = 0x31, //! A-Law alike 16 bit codec in big endian RCODEC_AUTLAW_BE = 0x32, //! Alias for A-Law alike 16 bit codec RCODEC_AUTLAW = RCODEC_AUTLAW_BE, //! mu-Law RCODEC_MULAW = 0x34, //! mu-Law alike 16 bit codec in little endian (uncommon) RCODEC_MUUTLAW_LE = 0x35, //! mu-Law alike 16 bit codec in big endian RCODEC_MUUTLAW_BE = 0x35, //! Alias for mu-Law alike 16 bit codec RCODEC_MUUTLAW = RCODEC_MUUTLAW_BE, //! GSM Codec RCODEC_GSM = 0x38, //! GSM Codec for RIFF_WAVE files RCODEC_GSM49 = 0x39, //! SPC-700 Bit Rate Reduction of Super Nintendo Entertainment System (SNES) RCODEC_BRR = 0x3c, //! MIDI File RCODEC_MIDI_FILE = 0x08, //! MIDI (on-wire) protocol RCODEC_MIDI = 0x60, //! RoarMIDI protocol RCODEC_ROARMIDI = 0x64, //! DMX512 RCODEC_DMX512 = 0x70, //! RoarDMX RCODEC_ROARDMX = 0x71, //! RAUM Files RCODEC_RAUM = 0x1c, //! RAUM Files with Vorbis stream RCODEC_RAUM_VORBIS = 0x1d, //! RAUM Files with FLAC stream RCODEC_RAUM_FLAC = 0x1e, //! Vorbis Comment Like Text RCODEC_META_VCLT = 0x40, //! RoarAudio Like Text RCODEC_META_RALT = 0x44, //! RoarAudio Like Binary RCODEC_META_RALB = 0x4c, //! RoarAudio Like Binary (little endian) RCODEC_META_RALB_LE = 0x4d, //! RoarAudio Like Binary (big endian) RCODEC_META_RALB_BE = 0x4e, //! RoarAudio Like Binary (PDP (middle) endian) RCODEC_META_RALB_PDP= 0x4f, //! Null container RCODEC_CONT_NULL = 0x50, //! GnuZIP Container RCODEC_CONT_GZIP = 0x51, //! bzip2 container RCODEC_CONT_BZIP2 = 0x52, //! OpenPGP binary data container RCODEC_CONT_OPGPBIN = 0x53, //! OpenPGP ascii armored container RCODEC_CONT_OPGPASC = 0x54, //! TAR container RCODEC_CONT_TAR = 0x55, //! RDS (on-wire) protocol RCODEC_RDS = 0x80, //! User defined codec 0 RCODEC_USER0 = 0x90, //! User defined codec 1 RCODEC_USER1 = 0x91, //! User defined codec 2 RCODEC_USER2 = 0x92, //! User defined codec 3 RCODEC_USER3 = 0x93, //! User defined codec 4 RCODEC_USER4 = 0x94, //! User defined codec 5 RCODEC_USER5 = 0x95, //! User defined codec 6 RCODEC_USER6 = 0x96, //! User defined codec 7 RCODEC_USER7 = 0x97, //! User defined codec 8 RCODEC_USER8 = 0x98, //! User defined codec 9 RCODEC_USER9 = 0x99, //! User defined codec 10 RCODEC_USER10 = 0x9a, //! User defined codec 11 RCODEC_USER11 = 0x9b, //! User defined codec 12 RCODEC_USER12 = 0x9c, //! User defined codec 13 RCODEC_USER13 = 0x9d, //! User defined codec 14 RCODEC_USER14 = 0x9e, //! User defined codec 15 RCODEC_USER15 = 0x9f //! User defined codec 16 } rcodec_t; //! RoarSpeex mode typedef enum { //! Narrowband (8 kHz) RSPEEX_MODE_NB = 1, //! Wideband (16 kHz) RSPEEX_MODE_WB = 2, //! Ultra-wideband (32 kHz) RSPEEX_MODE_UWB = 3 } rspeex_mode_t; //! Default sample rate for audio streams #define RDEFAULT_AU_RATE 44100 //! Default number of bits per sample for audio streams #define RDEFAULT_AU_BITS 16 //! Default channel setup for audio streams #define RDEFAULT_AU_CHANNELS RCHANNELS_STEREO //! RoarSpeex file magic string #define RSPEEX_MAGIC "RoarSpeex" //! Length of RoarSpeex file magic string #define RSPEEX_MAGIC_LEN 9 //! RoarCELT file magic string #define RCELT_MAGIC "RoarCELT0" //! Length of RoarCELT file magic string #define RCELT_MAGIC_LEN 9 //! Struct to store Audio Signal information typedef struct raudio_info { //! Sample rate unsigned int rate; //! Number of bits per sample unsigned int bits; //! Number of channels per frame rchannels_t channels; //! Used codec rcodec_t codec; } raudio_info_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/basic.h0000644000175000017500000000367212135077273016413 0ustar phiphi//basic.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_BASIC_H_ #define _AROARFW_BASIC_H_ #include #include //! Generate a NOOP message #define rmsg0_msg_noop(msg) rmsg0_init((msg), RCMD_NOOP) //! Generate a dummy AUTH message #define rmsg0_msg_auth(msg) rmsg0_init((msg), RCMD_AUTH) //! Generate a QUIT message #define rmsg0_msg_quit(msg) rmsg0_init((msg), RCMD_QUIT) //! Test if returned message is OK #define rmsg0_is_ok(msg) (rmsg0_getcmd(msg) == RCMD_OK) //! Test if returned message is ERROR #define rmsg0_is_error(msg) (rmsg0_getcmd(msg) == RCMD_ERROR) // IDENTIFY helper macros: //! Length of IDENTIFY message body prefix #define RPROTO_IDENTIFY_PREFIX_LEN 5 //! Return pointer to possition behind IDENTIFY message body prefix #define rproto_identify_name(buf) (((char*)(buf)) + RPROTO_IDENTIFY_PREFIX_LEN) //! Support function to generate IDENTIFY prefix #define rproto_identify_prefix(buf, pid) ((void)((((unsigned char*)(buf))[0] = 1) + \ RBO_H2NB32(&(((unsigned char*)(buf))[1]), (pid)))) #endif //ll aroarfw-0.1beta5/include/aroarfw/crypto.h0000644000175000017500000001127112135077273016644 0ustar phiphi//crypto.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_CRYPTO_H_ #define _AROARFW_CRYPTO_H_ #include //! Hash types typedef enum { //! None RHT_NONE = 0, //! Old MD5, do not use RHT_MD5 = 1, //! SHA1, do avoid RHT_SHA1 = 2, //! 160 bit RIPEMD RHT_RIPEMD160 = 3, //! MD2, do not use RHT_MD2 = 5, //! 192 bit Tiger RHT_TIGER = 6, //! HAVAL RHT_HAVAL = 7, //! SHA256 (part of 'SHA2') RHT_SHA256 = 8, //! SHA384 (part of 'SHA2') RHT_SHA384 = 9, //! SHA512 (part of 'SHA2') RHT_SHA512 = 10, //! SHA224 (part of 'SHA2') RHT_SHA224 = 11, //! MD4, do not use RHT_MD4 = 301, //! Common CRC-32 RHT_CRC32 = 302, //! RFC 1510 CRC RHT_RFC1510 = 303, //! OpenPGP's 24 bit CRC as descriped in RFC2440 and RFC4880 RHT_RFC2440 = 304, //! WhirlPool RHT_WHIRLPOOL = 305, //! Universally Unique Identifier (UUID) RHT_UUID = 70000, //! 8 bit GTN. //! GTN is the Global Track Number as used by for example the RoarAudio PlayList Daemon (rpld). //! It is a creator-runtime-unique number to identify the object. RHT_GTN8 = 70001, //! 16 bit GTN. //! GTN is the Global Track Number as used by for example the RoarAudio PlayList Daemon (rpld). //! It is a creator-runtime-unique number to identify the object. RHT_GTN16 = 70002, //! 32 bit GTN ('short GTN'). //! GTN is the Global Track Number as used by for example the RoarAudio PlayList Daemon (rpld). //! It is a creator-runtime-unique number to identify the object. RHT_GTN32 = 70004, //! 64 bit GTN ('long GTN'). //! GTN is the Global Track Number as used by for example the RoarAudio PlayList Daemon (rpld). //! It is a creator-runtime-unique number to identify the object. RHT_GTN64 = 70008, //! Client ID RHT_CLIENTID = 71000 + ROT_CLIENT, //! Stream ID RHT_STREAMID = 71000 + ROT_STREAM, //! Source ID RHT_SOURCEID = 71000 + ROT_SOURCE, //! Sample ID RHT_SAMPLEID = 71000 + ROT_SAMPLE, //! Mixer ID RHT_MIXERID = 71000 + ROT_MIXER, //! Bridge ID RHT_BRIDGEID = 71000 + ROT_BRIDGE, //! Listen ID RHT_LISTENID = 71000 + ROT_LISTEN, //! Action ID RHT_ACTIONID = 71000 + ROT_ACTION, //! Message Queue ID RHT_MSGQUEUEID = 71000 + ROT_MSGQUEUE, //! Message Bus ID RHT_MSGBUSID = 71000 + ROT_MSGBUS, //! 8 digit Global Trade Item Number RHT_GTIN8 = 72001, //! 13 digit Global Trade Item Number RHT_GTIN13 = 72002, //! 10 digit International Standard Book Number RHT_ISBN10 = 72003, //! 13 digit International Standard Book Number. //! Is the same as 13 digit Global Trade Item Number. RHT_ISBN13 = RHT_GTIN13, //! Adler-32, RFC1950 as used by zlib. RHT_ADLER32 = 73001 } rht_t; //! Hash functions typedef enum { //! This entry does not have anything to do with the object. //! Should not be used. RHF_NONE = 0, //! This is an entry for exacltly this object RHF_OBJECT = 1, //! This is the parent object RHF_PARENT = 2, //! This is a logic group of this object RHF_LOGIC = 3, //! This can be used to acces exactly this object with a premanent address. //! This is useful for use with Tantalos or GTIN/ISBN. RHF_PERMANENT = 4, //! The device this is on or the device itself if this is a device RHF_DEVICE = 5, //! The disk this is on, if this is a disk the same as HF_DEVICE RHF_DISK = 6, //! This identifys the Song. This may for example be used with Tantalos or GTIN/ISBN RHF_SONG = 7, //! The application, device or other source generating this object RHF_APP = 8, //! The source file for this object RHF_FILE = 9, //! This identifies any kind of artist/composer/interpret, to be used with Tantalos or GTIN/ISBN RHF_ARTIST = 10, //! This identifies any kind of work/album/compilation, to be used with Tantalos or GTIN/ISBN RHF_WORK = 11 } rhf_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/caps.h0000644000175000017500000000640712165651217016256 0ustar phiphi//caps.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2012-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_CAPS_H_ #define _AROARFW_CAPS_H_ #include #include #include typedef union { //! 32 bit unsigned int representation in network byte order uint32_t u32; //! Structure of standard ID splitted in parts struct { //! Standard Vendor uint8_t vendor; //! Upper 8 bits of standard number uint8_t standardmsb; //! Lower 8 bit of standard number uint8_t standardlsb; //! Standard version uint8_t version; } __RPACKED__ subm; //! Standard ID as 4 byte array uint8_t u8array[4]; } rstandard_t; /** \brief Macro to initialize a constant array of standard IDs \param _vendor The Vendor ID (of type rstdvendor_t). \param _standard The standard number (in native byte order uint16_t) \param _version The standard version (as uint8_t) \return The Standard ID suitable for array initialization */ #define RSTANDARD_INIT(_vendor,_standard,_version) {.subm = { \ .vendor = (uint8_t)(rstdvendor_t)(_vendor), \ .standardmsb = (uint8_t)(uint16_t)(((_standard) & (uint16_t)0xFF00) >> (uint16_t)8), \ .standardlsb = (uint8_t)(uint16_t)(((_standard) & (uint16_t)0x00FF)), \ .version = (uint8_t)(_version) \ } \ } /** \brief Macro to access the Vendor ID from a standard ID \param x The Standard ID \return The Vendor ID */ #define rstandard_getvendor(x) (((rstandard_t)(x)).subm.vendor) /** \brief Macro to access the standard version from a standard ID \param x The sStandard ID \return The standard version */ #define rstandard_getversion(x) (((rstandard_t)(x)).subm.version) /** \brief Macro to access the standard number from a standard ID in host native format \param x The Standard ID \return The standard number */ #define rstandard_getstandard(x) (((uint16_t)(((rstandard_t)(x)).subm.standardmsb) << (uint16_t)8) | \ ((uint16_t)(((rstandard_t)(x)).subm.standardlsb))) /** \brief Macro to convert a standard ID into a host native 32 bit unsigned integer \param x The Standard ID \return The Standard ID in native format */ #define rstandard_getu32hbo(x) RBO_NB2H32(&(x)) #endif //ll aroarfw-0.1beta5/include/aroarfw/network.h0000644000175000017500000000466512135077273017026 0ustar phiphi//network.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_NETWORK_H_ #define _AROARFW_NETWORK_H_ //! Possible socket types typedef enum { //! None, not set, unknown, invalid RSOCKETTYPE_NONE = 0, //! TCP Socket RSOCKETTYPE_TCP = 1, //! UNIX Socket RSOCKETTYPE_UNIX = 2, //! Fork (internal use only) RSOCKETTYPE_FORK = 3, //! Normal file (may be specal device, too, everything open() works on) RSOCKETTYPE_FILE = 4, //! UDP RSOCKETTYPE_UDP = 5, //! Generic stream RSOCKETTYPE_GENSTR = 6, //! DECnet RSOCKETTYPE_DECNET = 7, //! TCP6 RSOCKETTYPE_TCP6 = 8, //! UDP6 RSOCKETTYPE_UDP6 = 9, //! IPX/SPX RSOCKETTYPE_IPXSPX = 10, //! Plain IPX RSOCKETTYPE_IPX = 11, //! LAT Service RSOCKETTYPE_LAT_SERVICE = 12, //! LAT reverse port RSOCKETTYPE_LAT_REVERSE_PORT = 13 } rsocktype_t; //! Possible socket modes typedef enum { // Listen Socket RSOCKMODE_LISTEN = 1, // Normal client socket RSOCKMODE_CONNECT = 2 } rsockmode_t; //! Default RoarAudio port for TCP/IP #define RDEFAULT_PORT 16002 //! Default RoarAudio Host #define RDEFAULT_HOST "localhost" //! Default RoarAudio global socket filename #define RDEFAULT_GSOCK "/tmp/roar" /** \brief Default RoarAudio user socket filename Tilde (~) at the begining of the string needs to be replaced by the user's home directory. This is normaly stored in $HOME. */ #define RDEFAULT_USOCK "~/.roar" //! Default RoarAudio DECnet object #define RDEFAULT_OBJECT "roar" #endif //ll aroarfw-0.1beta5/include/aroarfw/error.h0000644000175000017500000001516212135077526016461 0ustar phiphi//error.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2011-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_ERROR_H_ #define _AROARFW_ERROR_H_ //$ grep '^#define ROAR_ERROR_' error.h | sed 's/^#define ROAR_ERROR_//; s/ */ /g; s/ \/\* / /; s/ \*\/$//' | while read name id msg; do printf " //! %s\n RERROR_%-11s = %2i,\n" "$msg" $name $id; done //! Error codes for on-wire protocol typedef enum { //! Unknown (maybe no) error RERROR_UNKNOWN = -1, //! No error. Can be used to initialize error variables. RERROR_NONE = 0, //! Operation not permitted RERROR_PERM = 1, //! No such file or directory RERROR_NOENT = 2, //! Bad message RERROR_BADMSG = 3, //! Device or resource busy RERROR_BUSY = 4, //! Connection refused RERROR_CONNREFUSED = 5, //! Function not implemented RERROR_NOSYS = 6, //! Operation not supported RERROR_NOTSUP = 7, //! Broken pipe RERROR_PIPE = 8, //! Protocol error RERROR_PROTO = 9, //! Result too large/general out of range RERROR_RANGE = 10, //! Message too long RERROR_MSGSIZE = 11, //! Not enough space RERROR_NOMEM = 12, //! Invalid argument RERROR_INVAL = 13, //! Connection already in progress RERROR_ALREADY = 14, //! Invalid request code RERROR_BADRQC = 15, //! Mathematics argument out of domain of function RERROR_DOM = 16, //! File or object exists RERROR_EXIST = 17, //! Bad address RERROR_FAULT = 18, //! I/O-Error RERROR_IO = 19, //! Key has expired RERROR_KEYEXPIRED = 20, //! Key was rejected by service RERROR_KEYREJECTED = 21, //! Too many recursions RERROR_LOOP = 22, //! Too many open files or objects RERROR_MFILE = 23, //! File or object name too long RERROR_NAMETOOLONG = 24, //! No message is available on the read queue RERROR_NODATA = 25, //! No such device RERROR_NODEV = 26, //! No such driver RERROR_NODRV = 27, //! No space left on device RERROR_NOSPC = 38, //! Type missmatch. Object of diffrent type required RERROR_TYPEMM = 39, //! Feature not implemented by remote end RERROR_NORSYS = 40, //! Socket or object not connected RERROR_NOTCONN = 41, //! Protocol not supported RERROR_PROTONOSUP = 42, //! Remote I/O Error RERROR_RIO = 43, //! File or object is read only RERROR_RO = 45, //! Connection timed out RERROR_TIMEDOUT = 46, //! Resource temporarily unavailable RERROR_AGAIN = 47, //! Line too noisy RERROR_NOISE = 48, //! Physical or logical link down RERROR_LINKDOWN = 49, //! Operation was interruped RERROR_INTERRUPTED = 50, //! Causality error RERROR_CAUSALITY = 51, //! Quota exceeded RERROR_QUOTA = 52, //! Accessing a corrupted shared library RERROR_BADLIB = 53, //! No medium found RERROR_NOMEDIUM = 54, //! Name not unique RERROR_NOTUNIQ = 55, //! Illegal byte sequence RERROR_ILLSEQ = 56, //! Address in use RERROR_ADDRINUSE = 57, //! Hole in data RERROR_HOLE = 58, //! Bad version RERROR_BADVERSION = 59, //! Not supported version RERROR_NSVERSION = 60, //! Bad magic number RERROR_BADMAGIC = 61, //! Lost synchronization RERROR_LOSTSYNC = 62, //! Can not seek to destination position RERROR_BADSEEK = 63, //! Seeking not supported on resource RERROR_NOSEEK = 64, //! Data integrity error RERROR_BADCKSUM = 65, //! Mount failed RERROR_NOHORSE = 66, //! Fatal device error RERROR_CHERNOBYL = 67, //! Device needs love RERROR_NOHUG = 68, //! Text file busy RERROR_TEXTBUSY = 69, //! Directory not empty RERROR_NOTEMPTY = 70, //! Node is unreachable RERROR_NODEUNREACH = 71, //! Identifier removed RERROR_IDREMOVED = 72, //! Operation in progress RERROR_INPROGRESS = 73, //! No child processes/object RERROR_NOCHILD = 74, //! Network unreachable RERROR_NETUNREACH = 75, //! Operation canceled RERROR_CANCELED = 76, //! Is a directory RERROR_ISDIR = 77, //! Not a directory RERROR_NOTDIR = 78, //! Executable file format error RERROR_BADEXEC = 79, //! Socket/Object is connected RERROR_ISCONN = 80, //! Resource deadlock would occur RERROR_DEADLOCK = 81, //! Connection reset RERROR_CONNRST = 82, //! Bad file handle RERROR_BADFH = 83, //! Not a socket RERROR_NOTSOCK = 84, //! Argument list too long RERROR_TOOMANYARGS = 85, //! File/Object too large RERROR_TOOLARGE = 86, //! Destination address required RERROR_DESTADDRREQ = 87, //! Address family not supported RERROR_AFNOTSUP = 88, //! Operation can not be completed because we are low on power RERROR_NOPOWER = 89, //! Error in front of screen RERROR_USER = 90, //! Too many files/objects open in system RERROR_NFILE = 91, //! Stale file handle or object RERROR_STALE = 92, //! Cross-device link RERROR_XDEVLINK = 93, //! Too many links to file or object RERROR_MLINK = 94, //! Not connected to any network RERROR_NONET = 95, //! Connection reset by network RERROR_CONNRSTNET = 96, //! Connection aborted RERROR_CONNABORTED = 97, //! Bad host software or hardware RERROR_BADHOST = 98, //! Switch protocol RERROR_SWITCHPROTO = 99, //! Moved Permanently RERROR_MOVEDPERM = 100, //! Moved Temporary RERROR_MOVEDTEMP = 101, //! Use Proxy server RERROR_USEPROXY = 102, //! See other resource RERROR_SEEOTHER = 103, //! Resource gone RERROR_GONE = 104, //! Bad License RERROR_BADLICENSE = 105, //! Payment Required RERROR_NEEDPAYMENT = 106, //! Type or Format not supported RERROR_NSTYPE = 107, //! Access denied because of censorship RERROR_CENSORED = 108, //! Object is in bad/wrong state RERROR_BADSTATE = 109, //! This has been disabled by the administrator RERROR_DISABLED = 110 } rerror_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/i2c.h0000644000175000017500000003632312212111474015772 0ustar phiphi//i2c.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2012-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_I2C_H_ #define _AROARFW_I2C_H_ #include #include //! Offset of interface version #define I2C_OFFSET_IFVERSION 0x00 //! Offset of status byte 0 #define I2C_OFFSET_STATUS0 0x01 //! offset of bank select byte (command byte) #define I2C_OFFSET_BANKSELECT 0x02 //! Offset of device error code #define I2C_OFFSET_DEVERROR 0x03 //! Offset of bank data #define I2C_OFFSET_BANKDATA 0x04 //! Version of the current interface #define RI2C_INTERFACE_VERSION 0x00 //! Initial value for status byte 0 #define RI2C_STATUS0_NONE 0x00 //! Device ready (device has fully booted or reseted) #define RI2C_STATUS0_DEVICE_READY 0x01 //! Seflcheck passed #define RI2C_STATUS0_SELFCHECK_PASSED 0x02 //! Selfcheck returned error #define RI2C_STATUS0_SELFCHECK_ERROR 0x04 //! There are panding device status updates (e.g. any DAC or GPI level change) #define RI2C_STATUS0_UPDATES_PENDING 0x08 //! Initial value for status byte 1 #define RI2C_STATUS1_NONE 0x00 //! Initial value for status byte 2 #define RI2C_STATUS2_NONE 0x00 //! Caps Byte 0 for RI2C_DEV_BRIDGE: No caps set. #define RI2C_CAPS0_BRIDGE_NONE 0x00 //! Caps Byte 0 for RI2C_DEV_BRIDGE: Network present (any kind of network). #define RI2C_CAPS0_BRIDGE_NETWORK 0x01 //! Caps Byte 0 for RI2C_DEV_BRIDGE: Ethernet present. #define RI2C_CAPS0_BRIDGE_ETHERNET 0x02 //! Caps Byte 0 for RI2C_DEV_BRIDGE: I²C present. #define RI2C_CAPS0_BRIDGE_I2C 0x04 //! Caps Byte 0 for RI2C_DEV_BRIDGE: SPI present. #define RI2C_CAPS0_BRIDGE_SPI 0x08 //! Caps Byte 0 for RI2C_DEV_BRIDGE: DMX512 present. #define RI2C_CAPS0_BRIDGE_DMX512 0x10 //! Caps Byte 0 for RI2C_DEV_BRIDGE: MIDI present. #define RI2C_CAPS0_BRIDGE_MIDI 0x20 //! Caps Byte 0 for RI2C_DEV_BRIDGE: Wavefrom IO present. #define RI2C_CAPS0_BRIDGE_WAVEFORM 0x40 //! Caps Byte 0 for RI2C_DEV_BRIDGE: Reserved bit. #define RI2C_CAPS0_BRIDGE_RESERVED7 0x80 //! Type for storing I²C slave addresses typedef uint8_t ri2c_addr_t; //! Type for device types typedef enum { //! Most generic device. Supports bank 0 RI2C_DEV_GENERIC = 0x00, // 1-63: RAF Defined types //! This is a bridge device. It converts between at least two diffrent communication channels. Subtypes are defined in ri2c_subtype_bridge_t. RI2C_DEV_BRIDGE = 0x01, //$ for i in `seq 64 127`; do v=`expr $i - 64`; printf " //! Vendor specific device type %i\n RI2C_DEV_VENDOR%.2i = %#0.2x,\n" $v $v $i; done //! Vendor specific device type 0 RI2C_DEV_VENDOR00 = 0x40, //! Vendor specific device type 1 RI2C_DEV_VENDOR01 = 0x41, //! Vendor specific device type 2 RI2C_DEV_VENDOR02 = 0x42, //! Vendor specific device type 3 RI2C_DEV_VENDOR03 = 0x43, //! Vendor specific device type 4 RI2C_DEV_VENDOR04 = 0x44, //! Vendor specific device type 5 RI2C_DEV_VENDOR05 = 0x45, //! Vendor specific device type 6 RI2C_DEV_VENDOR06 = 0x46, //! Vendor specific device type 7 RI2C_DEV_VENDOR07 = 0x47, //! Vendor specific device type 8 RI2C_DEV_VENDOR08 = 0x48, //! Vendor specific device type 9 RI2C_DEV_VENDOR09 = 0x49, //! Vendor specific device type 10 RI2C_DEV_VENDOR10 = 0x4a, //! Vendor specific device type 11 RI2C_DEV_VENDOR11 = 0x4b, //! Vendor specific device type 12 RI2C_DEV_VENDOR12 = 0x4c, //! Vendor specific device type 13 RI2C_DEV_VENDOR13 = 0x4d, //! Vendor specific device type 14 RI2C_DEV_VENDOR14 = 0x4e, //! Vendor specific device type 15 RI2C_DEV_VENDOR15 = 0x4f, //! Vendor specific device type 16 RI2C_DEV_VENDOR16 = 0x50, //! Vendor specific device type 17 RI2C_DEV_VENDOR17 = 0x51, //! Vendor specific device type 18 RI2C_DEV_VENDOR18 = 0x52, //! Vendor specific device type 19 RI2C_DEV_VENDOR19 = 0x53, //! Vendor specific device type 20 RI2C_DEV_VENDOR20 = 0x54, //! Vendor specific device type 21 RI2C_DEV_VENDOR21 = 0x55, //! Vendor specific device type 22 RI2C_DEV_VENDOR22 = 0x56, //! Vendor specific device type 23 RI2C_DEV_VENDOR23 = 0x57, //! Vendor specific device type 24 RI2C_DEV_VENDOR24 = 0x58, //! Vendor specific device type 25 RI2C_DEV_VENDOR25 = 0x59, //! Vendor specific device type 26 RI2C_DEV_VENDOR26 = 0x5a, //! Vendor specific device type 27 RI2C_DEV_VENDOR27 = 0x5b, //! Vendor specific device type 28 RI2C_DEV_VENDOR28 = 0x5c, //! Vendor specific device type 29 RI2C_DEV_VENDOR29 = 0x5d, //! Vendor specific device type 30 RI2C_DEV_VENDOR30 = 0x5e, //! Vendor specific device type 31 RI2C_DEV_VENDOR31 = 0x5f, //! Vendor specific device type 32 RI2C_DEV_VENDOR32 = 0x60, //! Vendor specific device type 33 RI2C_DEV_VENDOR33 = 0x61, //! Vendor specific device type 34 RI2C_DEV_VENDOR34 = 0x62, //! Vendor specific device type 35 RI2C_DEV_VENDOR35 = 0x63, //! Vendor specific device type 36 RI2C_DEV_VENDOR36 = 0x64, //! Vendor specific device type 37 RI2C_DEV_VENDOR37 = 0x65, //! Vendor specific device type 38 RI2C_DEV_VENDOR38 = 0x66, //! Vendor specific device type 39 RI2C_DEV_VENDOR39 = 0x67, //! Vendor specific device type 40 RI2C_DEV_VENDOR40 = 0x68, //! Vendor specific device type 41 RI2C_DEV_VENDOR41 = 0x69, //! Vendor specific device type 42 RI2C_DEV_VENDOR42 = 0x6a, //! Vendor specific device type 43 RI2C_DEV_VENDOR43 = 0x6b, //! Vendor specific device type 44 RI2C_DEV_VENDOR44 = 0x6c, //! Vendor specific device type 45 RI2C_DEV_VENDOR45 = 0x6d, //! Vendor specific device type 46 RI2C_DEV_VENDOR46 = 0x6e, //! Vendor specific device type 47 RI2C_DEV_VENDOR47 = 0x6f, //! Vendor specific device type 48 RI2C_DEV_VENDOR48 = 0x70, //! Vendor specific device type 49 RI2C_DEV_VENDOR49 = 0x71, //! Vendor specific device type 50 RI2C_DEV_VENDOR50 = 0x72, //! Vendor specific device type 51 RI2C_DEV_VENDOR51 = 0x73, //! Vendor specific device type 52 RI2C_DEV_VENDOR52 = 0x74, //! Vendor specific device type 53 RI2C_DEV_VENDOR53 = 0x75, //! Vendor specific device type 54 RI2C_DEV_VENDOR54 = 0x76, //! Vendor specific device type 55 RI2C_DEV_VENDOR55 = 0x77, //! Vendor specific device type 56 RI2C_DEV_VENDOR56 = 0x78, //! Vendor specific device type 57 RI2C_DEV_VENDOR57 = 0x79, //! Vendor specific device type 58 RI2C_DEV_VENDOR58 = 0x7a, //! Vendor specific device type 59 RI2C_DEV_VENDOR59 = 0x7b, //! Vendor specific device type 60 RI2C_DEV_VENDOR60 = 0x7c, //! Vendor specific device type 61 RI2C_DEV_VENDOR61 = 0x7d, //! Vendor specific device type 62 RI2C_DEV_VENDOR62 = 0x7e, //! Vendor specific device type 63 RI2C_DEV_VENDOR63 = 0x7f } ri2c_dev_t; //! Subtype for devices of type RI2C_DEV_BRIDGE typedef enum { //! Generic bridge device. Can be used as prent for vendor specific bridges. RI2C_SUBTYPE_BRIDGE_GENERIC = 0x00, //! This is a media converter. It converts between two (or more) low level protocols and physical layers. RI2C_SUBTYPE_BRIDGE_CONVERTER = 0x01 } ri2c_subtype_bridge_t; //! Type for memory banks (commands) typedef enum { // 0-31: Generic //! Generic device information RI2C_BANK_DEVINFO = 0x00, //! Generic control of the device RI2C_BANK_SYSCTL = 0x01, //! General Purpose Digital Input/Output RI2C_BANK_GPDIO = 0x02, //! General Purpose Analog Input/Output RI2C_BANK_GPAIO = 0x03, // 32-63: RAF Defined // DISPLAY interface? //! DMX512 data RI2C_BANK_DMX512 = 0x3f, // 64-95: RAF Defined Type/Sub-Type specific //$ for i in `seq 64 95`; do v=`expr $i - 64`; printf " //! Assigned Type and Subtype specific bank %i\n RI2C_BANK_TYPEST%.2i = %#0.2x,\n" $v $v $i; done //! Assigned Type and Subtype specific bank 0 RI2C_BANK_TYPEST00 = 0x40, //! Assigned Type and Subtype specific bank 1 RI2C_BANK_TYPEST01 = 0x41, //! Assigned Type and Subtype specific bank 2 RI2C_BANK_TYPEST02 = 0x42, //! Assigned Type and Subtype specific bank 3 RI2C_BANK_TYPEST03 = 0x43, //! Assigned Type and Subtype specific bank 4 RI2C_BANK_TYPEST04 = 0x44, //! Assigned Type and Subtype specific bank 5 RI2C_BANK_TYPEST05 = 0x45, //! Assigned Type and Subtype specific bank 6 RI2C_BANK_TYPEST06 = 0x46, //! Assigned Type and Subtype specific bank 7 RI2C_BANK_TYPEST07 = 0x47, //! Assigned Type and Subtype specific bank 8 RI2C_BANK_TYPEST08 = 0x48, //! Assigned Type and Subtype specific bank 9 RI2C_BANK_TYPEST09 = 0x49, //! Assigned Type and Subtype specific bank 10 RI2C_BANK_TYPEST10 = 0x4a, //! Assigned Type and Subtype specific bank 11 RI2C_BANK_TYPEST11 = 0x4b, //! Assigned Type and Subtype specific bank 12 RI2C_BANK_TYPEST12 = 0x4c, //! Assigned Type and Subtype specific bank 13 RI2C_BANK_TYPEST13 = 0x4d, //! Assigned Type and Subtype specific bank 14 RI2C_BANK_TYPEST14 = 0x4e, //! Assigned Type and Subtype specific bank 15 RI2C_BANK_TYPEST15 = 0x4f, //! Assigned Type and Subtype specific bank 16 RI2C_BANK_TYPEST16 = 0x50, //! Assigned Type and Subtype specific bank 17 RI2C_BANK_TYPEST17 = 0x51, //! Assigned Type and Subtype specific bank 18 RI2C_BANK_TYPEST18 = 0x52, //! Assigned Type and Subtype specific bank 19 RI2C_BANK_TYPEST19 = 0x53, //! Assigned Type and Subtype specific bank 20 RI2C_BANK_TYPEST20 = 0x54, //! Assigned Type and Subtype specific bank 21 RI2C_BANK_TYPEST21 = 0x55, //! Assigned Type and Subtype specific bank 22 RI2C_BANK_TYPEST22 = 0x56, //! Assigned Type and Subtype specific bank 23 RI2C_BANK_TYPEST23 = 0x57, //! Assigned Type and Subtype specific bank 24 RI2C_BANK_TYPEST24 = 0x58, //! Assigned Type and Subtype specific bank 25 RI2C_BANK_TYPEST25 = 0x59, //! Assigned Type and Subtype specific bank 26 RI2C_BANK_TYPEST26 = 0x5a, //! Assigned Type and Subtype specific bank 27 RI2C_BANK_TYPEST27 = 0x5b, //! Assigned Type and Subtype specific bank 28 RI2C_BANK_TYPEST28 = 0x5c, //! Assigned Type and Subtype specific bank 29 RI2C_BANK_TYPEST29 = 0x5d, //! Assigned Type and Subtype specific bank 30 RI2C_BANK_TYPEST30 = 0x5e, //! Assigned Type and Subtype specific bank 31 RI2C_BANK_TYPEST31 = 0x5f, // 96-127: Vendor + Type/Sub-Type specific //$ for i in `seq 96 127`; do v=`expr $i - 96`; printf " //! Vendor, Type and Subtype specific bank %i\n RI2C_BANK_VENDOR%.2i = %#0.2x,\n" $v $v $i; done //! Vendor, Type and Subtype specific bank 0 RI2C_BANK_VENDOR00 = 0x60, //! Vendor, Type and Subtype specific bank 1 RI2C_BANK_VENDOR01 = 0x61, //! Vendor, Type and Subtype specific bank 2 RI2C_BANK_VENDOR02 = 0x62, //! Vendor, Type and Subtype specific bank 3 RI2C_BANK_VENDOR03 = 0x63, //! Vendor, Type and Subtype specific bank 4 RI2C_BANK_VENDOR04 = 0x64, //! Vendor, Type and Subtype specific bank 5 RI2C_BANK_VENDOR05 = 0x65, //! Vendor, Type and Subtype specific bank 6 RI2C_BANK_VENDOR06 = 0x66, //! Vendor, Type and Subtype specific bank 7 RI2C_BANK_VENDOR07 = 0x67, //! Vendor, Type and Subtype specific bank 8 RI2C_BANK_VENDOR08 = 0x68, //! Vendor, Type and Subtype specific bank 9 RI2C_BANK_VENDOR09 = 0x69, //! Vendor, Type and Subtype specific bank 10 RI2C_BANK_VENDOR10 = 0x6a, //! Vendor, Type and Subtype specific bank 11 RI2C_BANK_VENDOR11 = 0x6b, //! Vendor, Type and Subtype specific bank 12 RI2C_BANK_VENDOR12 = 0x6c, //! Vendor, Type and Subtype specific bank 13 RI2C_BANK_VENDOR13 = 0x6d, //! Vendor, Type and Subtype specific bank 14 RI2C_BANK_VENDOR14 = 0x6e, //! Vendor, Type and Subtype specific bank 15 RI2C_BANK_VENDOR15 = 0x6f, //! Vendor, Type and Subtype specific bank 16 RI2C_BANK_VENDOR16 = 0x70, //! Vendor, Type and Subtype specific bank 17 RI2C_BANK_VENDOR17 = 0x71, //! Vendor, Type and Subtype specific bank 18 RI2C_BANK_VENDOR18 = 0x72, //! Vendor, Type and Subtype specific bank 19 RI2C_BANK_VENDOR19 = 0x73, //! Vendor, Type and Subtype specific bank 20 RI2C_BANK_VENDOR20 = 0x74, //! Vendor, Type and Subtype specific bank 21 RI2C_BANK_VENDOR21 = 0x75, //! Vendor, Type and Subtype specific bank 22 RI2C_BANK_VENDOR22 = 0x76, //! Vendor, Type and Subtype specific bank 23 RI2C_BANK_VENDOR23 = 0x77, //! Vendor, Type and Subtype specific bank 24 RI2C_BANK_VENDOR24 = 0x78, //! Vendor, Type and Subtype specific bank 25 RI2C_BANK_VENDOR25 = 0x79, //! Vendor, Type and Subtype specific bank 26 RI2C_BANK_VENDOR26 = 0x7a, //! Vendor, Type and Subtype specific bank 27 RI2C_BANK_VENDOR27 = 0x7b, //! Vendor, Type and Subtype specific bank 28 RI2C_BANK_VENDOR28 = 0x7c, //! Vendor, Type and Subtype specific bank 29 RI2C_BANK_VENDOR29 = 0x7d, //! Vendor, Type and Subtype specific bank 30 RI2C_BANK_VENDOR30 = 0x7e, //! Vendor, Type and Subtype specific bank 31 RI2C_BANK_VENDOR31 = 0x7f } ri2c_bank_t; //! Type to store (in packed format) static information for the device info bank (bank 0). This is prefixed with status byte 1 and status byte 2 typedef struct { //! Vendor of this device. This is a assigned device vendor ID uint8_t vendor; //! Vendor specific type of device uint8_t type; //! Vendor specific subtype of device uint8_t subtype; //! Vendor specific revision of the device uint8_t revision; //! Parent device's vendor ID uint8_t parentvendor; //! Parent device's type ID uint8_t parenttype; //! Parent device's subtype ID uint8_t parentsubtype; //! Capabilities of the device (type and subtype depended) uint8_t caps[3]; //! Sieral of the device ruuid_t serial; } __RPACKED__ ri2c_devinfo_data_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/meta.h0000644000175000017500000002050112135077273016246 0ustar phiphi//meta.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2011-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_META_H_ #define _AROARFW_META_H_ //! Meta data types typedef enum { //! This is used for empty meta data elements RMETA_NONE = 0, //! Title of work RMETA_TITLE = 1, //! Album work is part of RMETA_ALBUM = 2, //! Author of work RMETA_AUTHOR = 3, //! Alias for RMETA_AUTHOR. //! Should not be used in code but in functions to convert meta data types from strings to IDs. RMETA_ARTIST = RMETA_AUTHOR, //! Version of work RMETA_VERSION = 4, //! Date of creation. Format: "YYYY-MM-DD" or "YYYY-MM-DD HH:MM:SS UTC". //! Time in later form is start time of recording. RMETA_DATE = 5, //! License of work RMETA_LICENSE = 6, //! Track number of work within the album (or other compilation). (printf: %.2d) RMETA_TRACKNUMBER = 7, //! Organization of creation RMETA_ORGANIZATION = 8, //! General description RMETA_DESCRIPTION = 9, //! Genre. //! Freeform string but should match one of the genres defined for the RoarAudio protocol or in form of //! %s(0x%x) with readable name and genre ID. RMETA_GENRE = 10, //! Location of work creation RMETA_LOCATION = 11, //! Contact information for work. //! Should be in form: first ["']nick["'] last (comment) /OpenPGPkey/Phone/Room) RMETA_CONTACT = 12, //! URL of this stream. //! Used for examples in stream dumps as source refrence. //! Also used in VCLT Playlists. //! See also RMETA_FILEURL. RMETA_STREAMURL = 13, //! Homepage of this album, compilation or work RMETA_HOMEPAGE = 14, //! URL to thumbnail of this work. //! Can be used for display within the media player. //! Should point to PNG or JPEG image. RMETA_THUMBNAIL = 15, //! Playback length of the work. //! (printf: %.2d:%.2d:%.2d, last element may be float with dot as decimal delimeter) //! Main use for this is meta data stored outside the data stream. Examples //! include VCLT Playlist files. RMETA_LENGTH = 16, //! Free form comment about this work RMETA_COMMENT = 17, //! The OTHER meta data type can be used to use non-standardized meta data which //! have no ID assigned. //! Usage of this should be avoided. RMETA_OTHER = 18, //! Filename of the given work. Mainly used in VCLT Playlists. RMETA_FILENAME = 19, //! URL of the work. Mainly used in VCLT Playlists. //! The diffrence between RMETA_STREAMURL and RMETA_FILEURL is that //! RMETA_STREAMURL is for (radio) streams and RMETA_FILEURL for files of finit size //! (often refrered to as seekable and unseekable data). RMETA_FILEURL = 20, //! Server software name and version RMETA_SERVER = 21, //! This is used to store the duration of some work. //! It's format and usage is undefined. //! This should not be used. //! See also: RMETA_LENGTH. RMETA_DURATION = 22, //! Alias for RMETA_HOMEPAGE. //! Should not be used in code but in functions to convert meta data types from strings to IDs. RMETA_WWW = RMETA_HOMEPAGE, //! ID3: Official audio file webpage. //! Should not be used when creating new files. RMETA_WOAF = 23, //! Encoder software name and version RMETA_ENCODER = 24, //! Alias to RMETA_ENCODER. //! Should not be used when creating new files. RMETA_ENCODEDBY = RMETA_ENCODER, //! Year of recording in form YYYY RMETA_YEAR = 25, //! CDDB DiskID, (printf: %.8x) RMETA_DISCID = 26, //! RePlayGain of track: Peak amplitude. RMETA_RPG_TRACK_PEAK = 27, //! RePlayGain of track: correction gain. RMETA_RPG_TRACK_GAIN = 28, //! RePlayGain of album: Peak amplitude. RMETA_RPG_ALBUM_PEAK = 29, //! RePlayGain of album: correction gain. RMETA_RPG_ALBUM_GAIN = 30, //! Used to store hashes for HashTable or Tantalos IDs. //! Format: {TYPE}value[,{TYPE}value[,{TYPE}value[,...]]] //! For possible types see rht_t from crypto.h. //! See also RMETA_GTIN. RMETA_HASH = 31, //! Information about the signal. //! Used in VCLT Playlist files. //! See https://bts.keep-cool.org/wiki/Specs/SignalInfoFormat for format specification. RMETA_SIGNALINFO = 32, //! Alias for RMETA_SIGNALINFO. Only valid for Audio only streams. //! See https://bts.keep-cool.org/wiki/Specs/SignalInfoFormat for details. RMETA_AUDIOINFO = RMETA_SIGNALINFO, //! Offset of the work within the refrenced file or data stream. //! This is used by VCLT Playlist files. //! The exact format is not yet defined. RMETA_OFFSET = 33, //! The performer of the work RMETA_PERFORMER = 34, //! Copyright information of the work RMETA_COPYRIGHT = 35, //! Likeness of the given work by the user. //! Used in VCLT Playlist files. //! (printf: %f with dot as decimal delimeter). //! Range: 0.0: user dislikes this very much (is never played by player), //! 1.0: normal likeness. //! Inf: The user likes this very much (is played by player endlessly). RMETA_LIKENESS = 36, //! The composer of the work RMETA_COMPOSER = 37, //! XXX RMETA_RIGHTS = 38, //! The ISRC code for the work. See Vorbis comments specification. RMETA_ISRC = 39, //! The language of this work in POSIX notation or short POSIX notation (two letter code). //! Possible values include 'en' for English, 'de' for German. //! 'de_DE' for Germany German, 'de_CH' for Switzerland German. RMETA_LANGUAGE = 40, //! GTIN of work. //! Possible formats are 14 digits GTIN-14, 13 digits GTIN-13 (most common), //! 8 digit GTIN-8 (also common) or ISBN-13 without dashes (which is the same as the corresponding //! GTIN-13). EAN-8 and EAN-13 are synonyms for GTIN-8 and GTIN-13. //! The data is a string of digits without dashes or spaces. //! Any dashes or spaces should be ignored by the reading application. RMETA_GTIN = 41, //! This is an alias for RMETA_GTIN. //! Should not be used in code but in functions to convert meta data types from strings to IDs. //! If used in files as string like VCLT Playlist files only ISBN-13 values are valid within the meta date. RMETA_ISBN = RMETA_GTIN, //! This is an alias for RMETA_GTIN. //! Should not be used in code but in functions to convert meta data types from strings to IDs. //! If used in files as string like VCLT Playlist files only EAN-8 or EAN-13 values are valid within the meta date. RMETA_EAN = RMETA_GTIN, //! The person or company who published this work RMETA_PUBLISHER = 42, //! The number of the disc within the compilation or album RMETA_DISCNUMBER = 43, //! The source media this was converted from RMETA_SOURCEMEDIA = 44, //! The label which published this work (if any) RMETA_LABEL = 45, //! The catalog number of this work, album or compilation as used by the label. //! Needs RMETA_LABEL to be present, too. RMETA_LABELNO = 46 } rmeta_type_t; //! Modes for meta data updates typedef enum { //! Set (or update) a meta date, overwriting old values RMETAMODE_SET = 0, //! Add a meta date, not overwriting old values RMETAMODE_ADD = 1, //! Delete a meta data for a given type RMETAMODE_DELETE = 2, //! Delete all meta data from a stream RMETAMODE_CLEAR = 3, //! Mark end of update sequence RMETAMODE_FINALIZE = 4 } rmeta_mode_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/msg.h0000644000175000017500000001171712135077273016117 0ustar phiphi//msg.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_MSG_H_ #define _AROARFW_MSG_H_ #include #include #include //! Maximum length of version 0 message header #define RMSG_V0_MAX_HEADER_LEN 10 //! Maximum length of version 1 message header #define RMSG_V1_MAX_HEADER_LEN 11 //! Maximum length of version 2 message header #define RMSG_V2_MAX_HEADER_LEN 20 //! RoarAudio Message version 0 type typedef unsigned char rmsg_v0_t[RMSG_V0_MAX_HEADER_LEN]; //! RoarAudio Message version 1 type typedef unsigned char rmsg_v1_t[RMSG_V1_MAX_HEADER_LEN]; //! RoarAudio Message version 2 type typedef unsigned char rmsg_v2_t[RMSG_V2_MAX_HEADER_LEN]; //! RoarAudio Message type, version independed. typedef union { //! Version of message unsigned char version; //! Version 0 message rmsg_v0_t v0; //! Version 1 message rmsg_v1_t v1; //! Version 2 message rmsg_v2_t v2; } rmsg_t; /** \brief Create a RoarAudio version 0 message \param msg The Message object to create \param cmd The command for the new message */ //void rmsg0_init (rmsg_v0_t msg, rcmd_t cmd); #define rmsg0_init(msg,cmd) ((msg)[1]= \ ((msg)[0]= \ (msg)[2]=(msg)[3]= \ (msg)[4]=(msg)[5]= \ (msg)[6]=(msg)[7]= \ (msg)[8]=(msg)[9]= 0) + \ (cmd)) /** \brief Get the command of a version 0 RoarAudio message \param msg The Message object to be used \return The command */ #define rmsg0_getcmd(msg) (((unsigned char*)(msg))[1]) /** \brief Set the data length of a version 0 RoarAudio message \param msg The Message object to be used \param len The data length */ //void rmsg0_setlen(rmsg_v0_t msg, size_t len); #define rmsg0_setlen(msg, len) ((void)RBO_H2NB16(&(((unsigned char*)(msg))[8]), (len))) /** \brief Get the data length of a version 0 RoarAudio message \param msg The Message object to be used \return The data length */ //size_t rmsg0_getlen(rmsg_v0_t msg); #define rmsg0_getlen(msg) RBO_NB2H16(&(((unsigned char*)(msg))[8])) /** \brief Set the stream ID of a version 0 RoarAudio message \param msg The Message object to be used \param sid The stream ID */ //void rmsg0_setsid(rmsg_v0_t msg, rsid_t sid); #define rmsg0_setsid(msg, sid) ((void)RBO_H2NB16(&(((unsigned char*)(msg))[2]), (sid))) /** \brief Get the stream ID of a version 0 RoarAudio message \param msg The Message object to be used \return The stream ID */ //rsid_t rmsg0_getsid(rmsg_v0_t msg); #define rmsg0_getsid(msg) RBO_NB2H16(&(((unsigned char*)(msg))[2])) /** \brief Set the stream possition of a version 0 RoarAudio message \param msg The Message object to be used \param pos The stream possition */ //void rmsg0_setpos(rmsg_v0_t msg, rpos_t pos); #define rmsg0_setpos(msg, pos) ((void)RBO_H2NB32(&(((unsigned char*)(msg))[4]), (pos))) /** \brief Get the stream possition of a version 0 RoarAudio message \param msg The Message object to be used \return The stream possition */ //rpos_t rmsg0_getpos(rmsg_v0_t msg); #define rmsg0_getpos(msg) RBO_NB2H16(&(((unsigned char*)(msg))[4])) /** \brief Get the header length of a version 0 RoarAudio message This function is used to get the length of the message header. Use This function togeter with rmsg0_header(). \param msg The Message object to be used \return The header length */ //size_t rmsg0_len (rmsg_v0_t msg); #define rmsg0_len(msg) RMSG_V0_MAX_HEADER_LEN /** \brief Get the header data of a version 0 RoarAudio message This function is used to get a pointer to a ready-to-send version of the message header. Use This function togeter with rmsg0_header(). \param msg The Message object to be used \return The pointer to the header */ #define rmsg0_header(msg) (msg) // Message version independed: /** \brief Get the version of a RoarAudio message This function returns the version number of the message buffer provided. \param msg The Message object to be used \return The version number */ #define rmsg_version(msg) (((unsigned char*)msg)[0]) #endif //ll aroarfw-0.1beta5/include/aroarfw/vendor.h0000644000175000017500000000274412135077273016626 0ustar phiphi//vendor.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2011-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_VENDOR_H_ #define _AROARFW_VENDOR_H_ //! Device Vendor IDs typedef enum { //! Vendor ID for RoarAudio foundation RDEVVENDOR_ROARAUDIO = 0, //! Vendor ID for common basic standards RDEVVENDOR_BASICDEV = 1 } rdevvendor_t; //! Standard Vendor IDs typedef enum { //! Vendor ID for RoarAudio foundation RSTDVENDOR_ROARAUDIO = 0, //! Vendor ID for protocol standards written by non-vendors RSTDVENDOR_PROTO = 1, //! Vendor ID for RFCs. //! RFC number is standard number. //! Standard version is always set to zero. RSTDVENDOR_RFC = 2 } rstdvendor_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/proto.h0000644000175000017500000004166012152623403016463 0ustar phiphi//proto.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_PROTO_H_ #define _AROARFW_PROTO_H_ //! Command values used for rmsg*_t typedef enum { // grep ^'#define MUROAR_CMD_' muroar.h | sed 's/ */ /g; s/^#define MUROAR_/R/;' | while read c i d; do printf " //! XXX\n %-24s = %3i,\n" $c $i; done //! No Operation Commands RCMD_NOOP = 0, //! Identify our client to the server RCMD_IDENTIFY = 1, //! Auth our client on the server RCMD_AUTH = 2, //! Create a new stream RCMD_NEW_STREAM = 3, //! Set meta data on a stream RCMD_SET_META = 4, //! Exec a stream RCMD_EXEC_STREAM = 5, //! Terminate the client connection RCMD_QUIT = 6, //! Get standby state from from server RCMD_GET_STANDBY = 7, //! Ask the server to change it's standby state RCMD_SET_STANDBY = 8, //! Asks server for general information RCMD_SERVER_INFO = 9, //! Asks the server for some stats RCMD_SERVER_STATS = 10, //! Asks the server for information on outputs RCMD_SERVER_OINFO = 11, //! Add data to the stream's input buffer RCMD_ADD_DATA = 12, //! Terminate the server RCMD_EXIT = 13, //! List streams RCMD_LIST_STREAMS = 14, //! List clients RCMD_LIST_CLIENTS = 15, //! Get a client object RCMD_GET_CLIENT = 16, //! Get a stream object RCMD_GET_STREAM = 17, //! Kick (terminate) a object from the server RCMD_KICK = 18, //! Change the volume of a stream RCMD_SET_VOL = 19, //! Get volume information of a stream RCMD_GET_VOL = 20, //! Connect a stream to IO resource (to a socket) RCMD_CON_STREAM = 21, //! Get meta data of a stream RCMD_GET_META = 22, //! List meta data of a stream RCMD_LIST_META = 23, //! Asks the server to generate a notify sound (beep) RCMD_BEEP = 24, //! Get Access Control List informations (deprecated, do not use!) RCMD_GET_ACL = 25, //! Set Access Control List informations (deprecated, do not use!) RCMD_SET_ACL = 26, //! Control parameters for AUTH command RCMD_AUTHCTL = 25, //! Control Access Control List informations RCMD_ACLCTL = 26, //! Get stream parameters RCMD_GET_STREAM_PARA = 27, //! Set stream parameters RCMD_SET_STREAM_PARA = 28, //! Attach a stream to some resource (client, driver, ...) RCMD_ATTACH = 29, //! Pass an open file handle to the server RCMD_PASSFH = 30, //! Get current system clock time of server RCMD_GETTIMEOFDAY = 31, //! Asks the server for our client ID RCMD_WHOAMI = 32, //! Device Control RCMD_DEVCTL = 33, //! Query or Tell capabilitys RCMD_CAPS = 34, //! Wait for events RCMD_WAIT = 35, //! Get Notified about events RCMD_NOTIFY = 36, //! Seek within a stream RCMD_SEEK = 37, //! Control Client Parameters RCMD_CLIENTCTL = 38, //! Look up objects RCMD_LOOKUP = 39, //! Control Connection parameters RCMD_CONCTL = 40, //! Read some stream data from the server RCMD_SHIFT_DATA = 41, //! Positive return value for request RCMD_OK = 254, //! Negative (error) return value for request RCMD_ERROR = 255 } rcmd_t; //! Parameter for server termination (RCMD_EXIT) typedef enum { //! Request the server to exit without waiting for clients to exit RTERM_EXIT = 0, //! Request the server to exit but wait for clients to exit RTERM_TERM = 1 } rterm_t; //! Parameter for type of volume change typedef enum { //! Set all channels at once RVOL_SET_ALL = 1, //! Set only one channel RVOL_SET_ONE = 2, //! Set volume in a Mid/Side way (Volume/Balance) RVOL_SET_MS = 3, //! Set volume unmapped to current stream RVOL_SET_UNMAPED = 4 } rvolch_t; //! Parameter for stream flag operation typedef enum { //! Set flag RFLAGCH_SET = 0, //! Reset flag RFLAGCH_RESET = 1, //! Toggle a given flag RFLAGCH_TOGGLE = 2, //! Noop RFLAGCH_NOOP = 3, //! Protect a flag from being changed RFLAGCH_PROTECT = 0x8000 } rflagch_t; //! States a stream can have typedef enum { //! The state of stream is unknown RSTREAMSTATE_UNKNOWN = -1, //! The stream does not exist RSTREAMSTATE_NULL = 0, //! The stream object is unused RSTREAMSTATE_UNUSED = RSTREAMSTATE_NULL, //! The stream is initing (is creating) RSTREAMSTATE_INITING = 1, //! The stream is new. This means the stream have not been used yet RSTREAMSTATE_NEW = 2, //! The stream is old, This means it was arrady used for data RSTREAMSTATE_OLD = 3, //! The stream is currently closing. This state should only be rarly seen from outsite //! the server. RSTREAMSTATE_CLOSING = 4, //! Stream is in error condition RSTREAMSTATE_ERROR = 5, //! like RSTREAMSTATE_ERROR but can be reset using SEEK command RSTREAMSTATE_NEEDSEEK = 6 } rstreamstat_t; //! Type for stream directions typedef enum { //! Waveform Playback stream RDIR_PLAY = 1, //! Waveform recoard stream RDIR_RECORD = 2, //! Waveform monitoring stream RDIR_MONITOR = 3, //! Waveform filter stream RDIR_FILTER = 4, //! Waveform (and maybe other) stream attached to a driver RDIR_OUTPUT = 5, //! Mixer core RDIR_MIXING = 6, // RDIR_INTERNAL = 7, // unused, undefined. //! Meta data stream, obsolete RDIR_META = 8, //! Waveform bidirectional stream (this is PLAY and MONITOR in one stream) RDIR_BIDIR = 9, //! Thru stream, this stream type sends raw copys of data passing thru a stream RDIR_THRU = 10, //! Bridge between subsystems or two objects in the same subsystem RDIR_BRIDGE = 11, //! MIDI input stream RDIR_MIDI_IN = 12, //! MIDI output stream RDIR_MIDI_OUT = 13, //! Light Control input stream RDIR_LIGHT_IN = 14, //! Light Control output stream RDIR_LIGHT_OUT = 15, //! Raw data input stream RDIR_RAW_IN = 16, //! Raw data output stream RDIR_RAW_OUT = 17, //! Complex data input stream RDIR_COMPLEX_IN = 18, //! Complex data output stream RDIR_COMPLEX_OUT = 19, //! Radio Data and Transmitter Control System input stream RDIR_RDTCS_IN = 20, //! Radio Data and Transmitter Control System output stream RDIR_RDTCS_OUT = 21, //! Record and Play at the same time RDIR_RECPLAY = 22, //! One more than the maximum direction ID RDIR_DIRIDS = 23 } rdir_t; //! Roles a stream can have typedef enum { //! Unknown role RROLE_UNKNOWN = -1, //! No role assigned RROLE_NONE = 0, //! Normal music RROLE_MUSIC = 1, //! Sound from a video RROLE_VIDEO = 2, //! Sound generted by a game (see also RROLE_BACKGROUND_MUSIC) RROLE_GAME = 3, //! Event sounds? RROLE_EVENT = 4, //! Notify beep sounds RROLE_BEEP = 5, //! Voice connections (RoN, VoIP, ISDN,...) RROLE_PHONE = 6, //! Background music RROLE_BACKGROUND_MUSIC = 7, //! Voice stream (singer, speaker, ....) RROLE_VOICE = 8, //! General instrument RROLE_INSTRUMENT = 9, //! Rhythem instrument RROLE_RHYTHM = 10, //! Click track RROLE_CLICK = 11, //! Already mixed data (for example outout of another sound daemon) RROLE_MIXED = 12, } rrole_t; //! Possible standby modes typedef enum { //! Standby is inactive RSTANDBY_INACTIVE = 0, //! Standby is active RSTANDBY_ACTIVE = 1 } rstandby_t; //! RoarAudio object types typedef enum { //! Clients ROT_CLIENT = 1, //! Streams ROT_STREAM = 2, //! Sources ROT_SOURCE = 3, //! Samples ROT_SAMPLE = 4, //! Outputs of some kind, normally using some kind of (audio) driver ROT_OUTPUT = 5, //! Mixer streams. May be hardware mixer devices or software mixers. ROT_MIXER = 6, //! Bridges between diffrent subsystems within a server ROT_BRIDGE = 7, //! Listen sockets ROT_LISTEN = 8, //! Actions ROT_ACTION = 9, //! Message queues ROT_MSGQUEUE = 10, //! Message busses ROT_MSGBUS = 11 } rot_t; //! Types of attaches for the RCMD_ATTACH command typedef enum { //! Simple Attach: Attach stream to a diffrent client RATTACH_SIMPLE = 1, //! Source Attach: Attach stream to a source driver RATTACH_SOURCE = 2, //! Output Attach: Attach stream to a output driver RATTACH_OUTPUT = 3, //! Mixer Attach: Attaches a mixer device RATTACH_MIXER = 4, //! Bridge Attach: Attches a bridge between diffrent subsystems RATTACH_BRIDGE = 5 } rattach_t; //! Sub-Commands for the RCMD_?ET_STREAM_PARA commands typedef enum { //! Ask for info structure RSTREAMPARA_INFO = 1, //! Operate on stream flags RSTREAMPARA_FLAGS = 2, //! Get or set stream name RSTREAMPARA_NAME = 3, //! Get or set channel mapping RSTREAMPARA_CHANMAP = 4, //! Get or set stream role RSTREAMPARA_ROLE = 5, //! Get or set stream's HashTable RSTREAMPARA_HASHTABLE = 6, //! Get or set stream's hints for windowing systems RSTREAMPARA_WININFO = 7, //! Get or set stream's PropTable RSTREAMPARA_PROPTABLE = 8, //! Get or set stream's Long Term Monitoring (LTM) parameters RSTREAMPARA_LTM = 9, //! Get or set radio transmitter or receiver parameters RSTREAMPARA_RADIO = 11, //! Get or set RePlay Gain settings of the stream RSTREAMPARA_RPG = 12 } rstreampata_t; //! Modes as used with RSTREAMPARA_RPG typedef enum { //! Use default RPG Mode. In this case the mode is selected by the server RRPGMODE_DEFAULT = -1, //! Do not use RPG information RRPGMODE_NONE = 0, //! Use RPG information as provided by the client (set via RSTREAMPARA_RPG) RRPGMODE_USER = 1, //! Use Album RPG information RRPGMODE_ALBUM = 2, //! Use Track RPG information RRPGMODE_TRACK = 3, //! Use Album RPG information, if not available use Track RPG information RRPGMODE_ALBUMTRACK = 4, //! Use Track RPG information, if not available use Album RPG information RRPGMODE_TRACKALBUM = 5 } rrpgmode_t; //! Auth methodes for the RCMD_AUTH command typedef enum { //! Ask the library to automaticly search for a working auth method. //! This MUST NOT be send to the wire. RAUTH_AUTO = -1, //! Send a dummy auth request. The server may grand access. //! This is a bit like anonymous FTP. //! (The server is free to do some magicly checking like TRUST does) RAUTH_NONE = 0, //! Send a binary-save cookie. This is normaly stored in a cookie file. RAUTH_COOKIE = 1, //! Ask the server to grand access based on information provided by the operating system. //! This is usefull for UNIX sockets. With UNIX sockets the server may for example //! match the uid of the client with an internal list. RAUTH_TRUST = 2, //! Send a user supplyed password. The user should get asked for the password. RAUTH_PASSWORD = 3, //! Send Username/Password for the current system user. //! The user should be matched using local, NIS, PAM, LDAP,... databases. RAUTH_SYSUSER = 4, //! Use a OpenPGP based method using a signing key. (not recommented!) RAUTH_OPENPGP_SIGN = 5, //! Use a OpenPGP based method using a encryption key. RAUTH_OPENPGP_ENCRYPT = 6, //! Use a OpenPGP based method using a auth key. (recommented) RAUTH_OPENPGP_AUTH = 7, //! Use Kerveros RAUTH_KERBEROS = 8, //! Auth based on client's host or node name or address. RAUTH_RHOST = 9, //! Use xauth cookie. RAUTH_XAUTH = 10, //! Use Ident service. RAUTH_IDENT = 11 } rauth_t; //! Protocol IDs typedef enum { //! No protocol given, unused entry, use default RPROTO_NONE = 0, //! The RoarAudio protocol RPROTO_ROARAUDIO = 1, //! Old EsounD protocol RPROTO_ESOUND = 2, //! Auto select protocol RPROTO_AUTO = 3, //! HTTP RPROTO_HTTP = 4, //! Gopher RPROTO_GOPHER = 5, //! Nullsoft ICY protocol RPROTO_ICY = 7, //! PulseAudio Simple protocol RPROTO_SIMPLE = 8, //! RSound protocol RPROTO_RSOUND = 9, //! RPlay protocol RPROTO_RPLAY = 10, //! Internet Relay Chat (IRC) RPROTO_IRC = 11, //! Direct Client-to-Client (DCC) RPROTO_DCC = 12, //! Echo RPROTO_ECHO = 13, //! Discard RPROTO_DISCARD = 14, //! Whois protocol RPROTO_WHOIS = 15, //! Finger protocol RPROTO_FINGER = 16, //! Quote RPROTO_QUOTE = 17, //! Daytime protocol RPROTO_DAYTIME = 18, //! Protocol ID used by games RPROTO_GAME = 19, //! Telnet RPROTO_TELNET = 20, //! Dynamic Host Configuration Protocol RPROTO_DHCP = 21, //! SSH RPROTO_SSH = 22, //! Time RPROTO_TIME = 23, //! RLogin RPROTO_RLOGIN = 24, //! RoarAudio Playlist Daemon Protocol RPROTO_RPLD = 25, //! Music Player Daemon Protocol RPROTO_MPD = 26 } rproto_t; //! Subtypes for CAPS command typedef enum { //! ??? RCT_CAPS = 0, //! List of Standards RCT_STANDARDS = 1 } rcaps_t; //! Hint Quality values for SEEK command typedef enum { //! Bad hint. RHQ_BAD = 0, //! Bad hint, requested position is not before this point. RHQ_BAD_NB = 1, //! Requested position is near this point. RHQ_NEAR = 2, //! Requested position is near this point but not before this point. RHQ_NEAR_NB = 3, //! Hint is of good quality (very close to position). //! This is normally used if no additional seek is required like in case the //! the hint points directly to the keyframe just before the possition. RHQ_GOOD = 4, //! Hint is of good quality (very close to position) and requested position is not before this point RHQ_GOOD_NB = 5, //! This is exackt possition. //! The possition is the exact offset. This can not be used with codecs //! not using samples directly like Vorbis but may be used with all kinds of PCM. RHQ_EXACT_NB = 7, //! This is exackt possition (alias). RHQ_EXACT = RHQ_EXACT_NB } rhq_t; //! Whence for SEEK command typedef enum { //! Point is relative to begin of stream. //! This is normally used for absolute seeks. RWHENCE_BEGIN = 0, //! Point is relative to current possition of stream. //! This is normally used for relative seeks like +/-10sec. RWHENCE_CUR = 1, //! Point is relative to end of stream. RWHENCE_END = 2 } rwhence_t; //! Information types for SERVER_INFO command typedef enum { //! General information about the server like implementation name and version. RIT_SERVER = 1, //! Counters RIT_COUNTERS = 2, //! Information about listen sockets (this may be removed again in later versions of protocol specs) RIT_LISTEN = 3 } rit_t; //! Information types for Server Type (ITST) for SERVER_INFO command typedef enum { //! Implementation Name and version number. //! Format: Format: Product/Version (comments) RITST_VERSION = 0, //! Freeform Location of server RITST_LOCATION = 1, //! Freform description of server RITST_DESCRIPTION = 2, //! Contact information. //! Format: first ["']nick["'] last (comment) /OpenPGPkey/Phone/Room RITST_CONTACT = 3, //! Opering System name, like uname -s RITST_UN_SYSNAME = 4, //! Opering System node name, like uname -n RITST_UN_NODENAME = 5, //! Opering System release, like uname -r RITST_UN_RELEASE = 6, //! Opering System host type, like uname -m RITST_UN_MACHINE = 7, //! Freeform serial of device. RITST_SERIAL = 8, //! Address information of device. //! Format not yet defined. RITST_ADDRESS = 9, //! URL of some kind of user interface. //! Can be of any type like http, telnet, ssh or gopher. RITST_UIURL = 10, //! UNIX hostid in hex format (%.8x), with leading zeros (8 or 16 hex-digits). //! This is returned by gethostid() on POSIX conforming systems. RITST_HOSTID = 11, //! License the server software is under. //! Format is: LicenseName-Version (options). //! Examples include: GPL-3.0, LGPL-2.1, LGPL-3.0 (or later). RITST_LICENSE = 12, //! Build date and time of this software or hardware. //! Format is YYYY-MM-DD HH:MM:SS (worker). RITST_BUILD = 13 } ritst_t; #endif //ll aroarfw-0.1beta5/include/aroarfw/types.h0000644000175000017500000000345412165757752016506 0ustar phiphi//types.h: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013 * * This file is part of aroarfw, a RoarAudio framework for * embedded systems (µControlers). * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * or (at your option) any later version as published by * the Free Software Foundation. * * aroarfw 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 software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef _AROARFW_TYPES_H_ #define _AROARFW_TYPES_H_ #include #ifdef __GNUC__ #define __RPACKED__ __attribute__((packed)) #else #define __RPACKED__ #warn "Don't know how to pack a struct with your compiler correctly" #endif //! This is the base type for storing of standard IDs. //! Type for client IDs typedef uint16_t rcid_t; //! Type for Stream IDs typedef uint16_t rsid_t; //! Type for stream positions typedef uint32_t rpos_t; //! Type for process IDs typedef uint32_t rpid_t; //! Type to store packed UUID typedef uint8_t ruuid_t[16]; //! Type of IO direction typedef enum { // Invalid value RIODIR_INVALID = 0xFF, //! This stream has no defined IO direction RIODIR_NONE = 0x00, //! This stream is a input stream RIODIR_IN = 0x01, //! This stream is an output stream RIODIR_OUT = 0x02, //! This stream is bidirectional RIODIR_INOUT = RIODIR_IN|RIODIR_OUT } riodir_t; #endif //ll