-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cypress USB Device Middleware Library v2.0
- Loading branch information
Valeriy Klymenko
authored and
Valeriy Klymenko
committed
Sep 17, 2019
1 parent
9780eed
commit 494b8bc
Showing
254 changed files
with
27,892 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
CYPRESS END USER LICENSE AGREEMENT | ||
|
||
PLEASE READ THIS END USER LICENSE AGREEMENT ("Agreement") CAREFULLY BEFORE | ||
DOWNLOADING, INSTALLING, COPYING, OR USING THIS SOFTWARE AND ACCOMPANYING | ||
DOCUMENTATION. BY DOWNLOADING, INSTALLING, COPYING OR USING THE SOFTWARE, | ||
YOU ARE AGREEING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL | ||
OF THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN AND DO NOT USE THE SOFTWARE. | ||
IF YOU HAVE PURCHASED THIS LICENSE TO THE SOFTWARE, YOUR RIGHT TO RETURN THE | ||
SOFTWARE EXPIRES 30 DAYS AFTER YOUR PURCHASE AND APPLIES ONLY TO THE ORIGINAL | ||
PURCHASER. | ||
|
||
1. Definitions. | ||
|
||
"Software" means this software and any accompanying documentation, | ||
including any upgrades, updates, bug fixes or modified versions provided | ||
to you by Cypress. | ||
|
||
"Source Code" means software in human-readable form. | ||
|
||
"Binary Code" means the software in binary code form such as object code or | ||
an executable. | ||
|
||
"Development Tools" means software that is intended to be installed on a | ||
personal computer and used to create programming code for Firmware, | ||
Drivers, or Host Applications. Examples of Development Tools are | ||
Cypress's PSoC Creator software, Cypress's WICED SDKs, and Cypress's | ||
ModusToolbox software. | ||
|
||
"Firmware" means software that executes on a Cypress hardware product. | ||
|
||
"Driver" means software that enables the use of a Cypress hardware product | ||
on a particular host operating system such as GNU/Linux, Windows, MacOS, | ||
Android, and iOS. | ||
|
||
"Host Application" means software that executes on a device other than a | ||
Cypress hardware product in order to program, control, or communicate | ||
with a Cypress hardware product. | ||
|
||
"inf File" means a hardware setup information file (.inf file) created by | ||
the Software to allow a Microsoft Windows operating system to install | ||
the driver for a Cypress hardware product. | ||
|
||
2. License. Subject to the terms and conditions of this Agreement, Cypress | ||
Semiconductor Corporation ("Cypress") and its suppliers grant to you a | ||
non-exclusive, non-transferable license under their copyright rights: | ||
|
||
a. to use the Development Tools in object code form solely for the purpose | ||
of creating Firmware, Drivers, Host Applications, and inf Files for | ||
Cypress hardware products; and | ||
|
||
b. (i) if provided in Source Code form, to copy, modify, and compile the | ||
Firmware Source Code to create Firmware for execution on a Cypress | ||
hardware product, and | ||
(ii) to distribute Firmware in binary code form only, only when | ||
installed onto a Cypress hardware product; and | ||
|
||
c. (i) if provided in Source Code form, to copy, modify, and compile the | ||
Driver Source Code to create one or more Drivers to enable the use | ||
of a Cypress hardware product on a particular host operating | ||
system, and | ||
(ii) to distribute the Driver, in binary code form only, only when | ||
installed on a device that includes the Cypress hardware product | ||
that the Driver is intended to enable; and | ||
|
||
d. (i) if provided in Source Code form, to copy, modify, and compile the | ||
Host Application Source Code to create one or more Host | ||
Applications to program, control, or communicate with a Cypress | ||
hardware product, and | ||
(ii) to distribute Host Applications, in binary code form only, only | ||
when installed on a device that includes a Cypress hardware product | ||
that the Host Application is intended to program, control, or | ||
communicate with; and | ||
|
||
e. to freely distribute any inf File. | ||
|
||
Any distribution of Software permitted under this Agreement must be made | ||
pursuant to your standard end user license agreement used for your proprietary | ||
(closed source) software products, such end user license agreement to include, | ||
at a minimum, provisions limiting your licensors' liability and prohibiting | ||
reverse engineering of the Software, consistent with such provisions in this | ||
Agreement. | ||
|
||
3. Free and Open Source Software. Portions of the Software may be licensed | ||
under free and/or open source licenses such as the GNU General Public License | ||
or other licenses from third parties ("Third Party Software"). Third Party | ||
Software is subject to the applicable license agreement and not this | ||
Agreement. If you are entitled to receive the source code from Cypress for | ||
any Third Party Software included with the Software, either the source code | ||
will be included with the Software or you may obtain the source code at no | ||
charge from <http://www.cypress.com/go/opensource>. The applicable license | ||
terms will accompany each source code package. To review the license terms | ||
applicable to any Third Party Software for which Cypress is not required to | ||
provide you with source code, please see the Software's installation directory | ||
on your computer. | ||
|
||
4. Proprietary Rights; Ownership. The Software, including all intellectual | ||
property rights therein, is and will remain the sole and exclusive property of | ||
Cypress or its suppliers. Cypress retains ownership of the Source Code and | ||
any compiled version thereof. Subject to Cypress' ownership of the underlying | ||
Software (including Source Code), you retain ownership of any modifications | ||
you make to the Source Code. You agree not to remove any Cypress copyright or | ||
other notices from the Source Code and any modifications thereof. You agree | ||
to keep the Source Code confidential. Any reproduction, modification, | ||
translation, compilation, or representation of the Source Code except as | ||
permitted in Section 2 ("License") is prohibited without the express written | ||
permission of Cypress. Except as otherwise expressly provided in this | ||
Agreement, you may not: | ||
(i) modify, adapt, or create derivative works based upon the Software; | ||
(ii) copy the Software; | ||
(iii) except and only to the extent explicitly permitted by applicable | ||
law despite this limitation, decompile, translate, reverse engineer, | ||
disassemble or otherwise reduce the Software to human-readable form; | ||
or | ||
(iv) use the Software or any sample code other than for the Purpose. | ||
You hereby covenant that you will not assert any claim that the Software, or | ||
derivative works thereof created by or for Cypress, infringe any intellectual | ||
property right owned or controlled by you | ||
|
||
5. No Support. Cypress may, but is not required to, provide technical support | ||
for the Software. | ||
|
||
6. Term and Termination. This Agreement is effective until terminated, and | ||
either party may terminate this Agreement at any time with or without cause. | ||
This Agreement and your license rights under this Agreement will terminate | ||
immediately without notice from Cypress if you fail to comply with any | ||
provision of this Agreement. Upon termination, you must destroy all copies of | ||
Software in your possession or control. The following paragraphs shall | ||
survive any termination of this Agreement: "Free and Open Source Software," | ||
"Proprietary Rights; Ownership," "Compliance With Law," "Disclaimer," | ||
"Limitation of Liability," and "General." | ||
|
||
7. Compliance With Law. Each party agrees to comply with all applicable laws, | ||
rules and regulations in connection with its activities under this Agreement. | ||
Without limiting the foregoing, the Software may be subject to export control | ||
laws and regulations of the United States and other countries. You agree to | ||
comply strictly with all such laws and regulations and acknowledge that you | ||
have the responsibility to obtain licenses to export, re-export, or import the | ||
Software. | ||
|
||
8. Disclaimer. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS | ||
MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THE | ||
SOFTWARE, INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress | ||
reserves the right to make changes to the Software without notice. Cypress | ||
does not assume any liability arising out of the application or use of | ||
Software or any product or circuit described in the Software. It is the | ||
responsibility of the user of the Software to properly design, program, and | ||
test the functionality and safety of any application made of the Software and | ||
any resulting product. Cypress does not authorize its Software or products | ||
for use in any products where a malfunction or failure of the Software or | ||
Cypress product may reasonably be expected to result in significant property | ||
damage, injury or death ("High Risk Product"). If you include any Software or | ||
Cypress product in a High Risk Product, you assume all risk of such use and | ||
agree to indemnify Cypress and its suppliers against all liability. No | ||
computing device can be absolutely secure. Therefore, despite security | ||
measures implemented in Cypress hardware or software products, Cypress does | ||
not assume any liability arising out of any security breach, such as | ||
unauthorized access to or use of a Cypress product. | ||
|
||
9. Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE | ||
LAW, IN NO EVENT WILL CYPRESS OR ITS SUPPLIERS, RESELLERS, OR DISTRIBUTORS BE | ||
LIABLE FOR ANY LOST REVENUE, PROFIT, OR DATA, OR FOR SPECIAL, INDIRECT, | ||
CONSEQUENTIAL, INCIDENTAL, OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS | ||
OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR | ||
INABILITY TO USE THE SOFTWARE EVEN IF CYPRESS OR ITS SUPPLIERS, RESELLERS, OR | ||
DISTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO | ||
EVENT SHALL CYPRESS' OR ITS SUPPLIERS', RESELLERS', OR DISTRIBUTORS' TOTAL | ||
LIABILITY TO YOU, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE), OR | ||
OTHERWISE, EXCEED THE GREATER OF US$500 OR THE PRICE PAID BY YOU FOR THE | ||
SOFTWARE. THE FOREGOING LIMITATIONS SHALL APPLY EVEN IF THE ABOVE-STATED | ||
WARRANTY FAILS OF ITS ESSENTIAL PURPOSE. BECAUSE SOME STATES OR JURISDICTIONS | ||
DO NOT ALLOW LIMITATION OR EXCLUSION OF CONSEQUENTIAL OR INCIDENTAL DAMAGES, | ||
ALL OR PORTIONS OF THE ABOVE LIMITATION MAY NOT APPLY TO YOU. | ||
|
||
10. Restricted Rights. The Software is commercial computer software as that | ||
term is described in 48 C.F.R. 252.227-7014(a)(1). If the Software is being | ||
acquired by or on behalf of the U.S. Government or by a U.S. Government prime | ||
contractor or subcontractor (at any tier), then the Government's rights in | ||
Software shall be only those set forth in this Agreement. | ||
|
||
11. Personal Information. You agree that information you provide through your | ||
registration on Cypress IoT Community Forum or other Cypress websites, | ||
including contact information or other personal information, may be collected | ||
and used by Cypress consistent with its Data Privacy Policy | ||
(www.cypress.com/privacy-policy), as updated or revised from time to time, and | ||
may be provided to its third party sales representatives, distributors and | ||
other entities conducting sales activities for Cypress for sales-related and | ||
other business purposes. | ||
|
||
12. General. This Agreement will bind and inure to the benefit of each | ||
party's successors and assigns, provided that you may not assign or transfer | ||
this Agreement, in whole or in part, without Cypress' written consent. This | ||
Agreement shall be governed by and construed in accordance with the laws of | ||
the State of California, United States of America, as if performed wholly | ||
within the state and without giving effect to the principles of conflict of | ||
law. The parties consent to personal and exclusive jurisdiction of and venue | ||
in, the state and federal courts within Santa Clara County, California; | ||
provided however, that nothing in this Agreement will limit Cypress' right to | ||
bring legal action in any venue in order to protect or enforce its | ||
intellectual property rights. No failure of either party to exercise or | ||
enforce any of its rights under this Agreement will act as a waiver of such | ||
rights. If any portion of this Agreement is found to be void or | ||
unenforceable, the remaining provisions of this Agreement shall remain in full | ||
force and effect. This Agreement is the complete and exclusive agreement | ||
between the parties with respect to the subject matter hereof, superseding and | ||
replacing any and all prior agreements, communications, and understandings | ||
(both written and oral) regarding such subject matter. Any notice to Cypress | ||
will be deemed effective when actually received and must be sent to Cypress | ||
Semiconductor Corporation, ATTN: Chief Legal Officer, 198 Champion Court, San | ||
Jose, CA 95134 USA. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,60 @@ | ||
# usbdev | ||
PSoC 6 USB Device Middleware library | ||
# Cypress USB Device Middleware Library | ||
|
||
### Overview | ||
|
||
The USB Device middleware provides a full-speed [USB 2.0 Chapter 9 specification](https://usb.org/document-library/usb-20-specification) compliant device framework. | ||
It uses the USBFS driver from PSoC 6 Peripheral Driver Library to interface with the hardware. The middleware provides support for Audio, CDC, and HID classes. | ||
It also enables implementing support for other classes. The USB Configurator tool makes it easy to construct a USB Device descriptor. | ||
|
||
### Features | ||
|
||
* USB Full-Speed Device Framework | ||
* USB Device Configurator | ||
* The following USB Classes are supported: | ||
* Audio Class | ||
* CDC: Communication Device Class | ||
* HID: Human Interface Device | ||
* Adding Custom Class Support | ||
* Vendor-Specific Requests Support | ||
* Power Status Reporting for Self-Powered Devices | ||
* Blocking API Timeout Function Redefinition | ||
* Compliance with [MISRA-C:2004 coding standard](https://www.misra.org.uk/) | ||
|
||
### USB Device Specific Instructions | ||
|
||
The user must ensure that the parameters selected in the USB Device personality | ||
are aligned with the descriptor configuration in the USB Configurator, because | ||
there is no connection between the USB Device personality in the Device | ||
Configurator and USB Configurator. | ||
|
||
Specifically, parameter "Endpoints Mask" in the USB personality must be aligned | ||
with the endpoints selected in the USB Configurator. If DMA Automatic mode is | ||
selected, parameter "Endpoint Buffer Size" must be aligned with the total size | ||
of the endpoint buffers allocated in the USB Configurator. | ||
|
||
### Quick Start | ||
|
||
Configure the USB Device using the ModusToolbox USB Device personality and | ||
USB Device Configurator. Refer to the | ||
[API Reference Quick Start Guide](https://cypresssemiconductorco.github.io/usbdev/usbfs_dev_api_reference_manual/html/index.html#section_usb_dev_quick_start) | ||
|
||
### More information | ||
|
||
The following links provide more information: | ||
|
||
* [Cypress USB Device Middleware Library Release Notes](./RELEASE.md) | ||
* [Cypress USB Device Middleware Library API Reference](https://cypresssemiconductorco.github.io/usbdev/usbfs_dev_api_reference_manual/html/index.html) | ||
* [PSoC 6 Peripheral Driver Library API Reference](https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/index.html) | ||
* [ModusToolbox Software Environment, Quick Start Guide, Documentation, and Videos](https://www.cypress.com/products/modustoolbox-software-environment) | ||
* [PSoC 6 SDK Examples](https://github.com/cypresssemiconductorco/Code-Examples-for-the-ModusToolbox-PSoC-6-SDK) | ||
* [ModusToolbox USB Configurator Tool Guide](https://www.cypress.com/ModusToolboxUSBConfig) | ||
* [ModusToolbox Device Configurator Tool Guide](https://www.cypress.com/ModusToolboxDeviceConfig) | ||
* [PSoC 6 WiFi-BT Pioneer Kit](http://www.cypress.com/CY8CKIT-062-WiFi-BT) | ||
* [PSoC 6 Wi-Fi BT Prototyping Kit](http://www.cypress.com/cy8cproto-062-4343w) | ||
* [PSoC 6 MCU Datasheets](http://www.cypress.com/psoc6ds) | ||
* [PSoC 6 MCU Application Notes](http://www.cypress.com/psoc6an) | ||
* [PSoC 6 MCU Technical Reference Manuals](http://www.cypress.com/psoc6trm) | ||
* [Cypress Semiconductor](http://www.cypress.com) | ||
|
||
--- | ||
© Cypress Semiconductor Corporation, 2019. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Cypress USB Device Middleware Library 2.0 | ||
|
||
### What's Included? | ||
|
||
For a complete description of the USB Device Middleware, refer to README.md and the [USB Device API Reference](https://cypresssemiconductorco.github.io/usbdev/usbfs_dev_api_reference_manual/html/index.html). | ||
The revision history of the USB Device Middleware is also available in the [API Reference Changelog](https://cypresssemiconductorco.github.io/usbdev/usbfs_dev_api_reference_manual/html/index.html#group_usb_dev_changelog). | ||
New in this release: | ||
|
||
* Updated the internal processing to support USBFS driver updates. | ||
* Significantly reduced the abort function wait time. | ||
|
||
### Defect Fixes | ||
|
||
* Fixed a compilation error for devices without USB hardware. | ||
|
||
### USB Device Specific Instructions | ||
|
||
The user must ensure that the parameters selected in the USB Device personality | ||
are aligned with the descriptor configuration in the USB Configurator, because | ||
there is no connection between the USB Device personality in the Device | ||
Configurator and USB Configurator. | ||
|
||
Specifically, parameter "Endpoints Mask" in the USB personality must be aligned | ||
with the endpoints selected in the USB Configurator. If DMA Automatic mode is | ||
selected, parameter "Endpoint Buffer Size" must be aligned with the total size | ||
of the endpoint buffers allocated in the USB Configurator. | ||
|
||
### Known Issues | ||
|
||
| Problem | Workaround | | ||
| ------- | ---------- | | ||
| The USB Device ignores LPM requests after wake up from Deep Sleep. | Call USBFS driver Cy_USBFS_Dev_Drv_Lpm_SetResponse() after calling Cy_USBFS_Dev_Drv_Resume() to restore response to the LPM packets. | | ||
| The USB Device modes with DMA do not work after wake up from Deep Sleep, due to incorrect restore of the ARB_CFG register. | Save ARB_CFG values before entering Deep Sleep and restore it after calling of Cy_USBFS_Dev_Drv_Resume. | | ||
|
||
### Supported Software and Tools | ||
|
||
This version of the USB Device Middleware was validated for compatibility with the following Software and Tools: | ||
|
||
| Software and Tools | Version | | ||
| :--- | :----: | | ||
| ModusToolbox Software Environment | 2.0 | | ||
| - ModusToolbox Device Configurator | 2.0 | | ||
| - ModusToolbox USB Device Personality in Device Configurator | 1.1 | | ||
| - ModusToolbox USB Device Configurator | 2.0 | | ||
| PSoC6 Peripheral Driver Library (PDL) | 1.3.0 | | ||
| GCC Compiler | 7.2.1 | | ||
| IAR Compiler | 8.32 | | ||
| ARM Compiler 6 | 6.11 | | ||
|
||
### More information | ||
|
||
The following links provide more information: | ||
|
||
* [Cypress USB Device Middleware Library Release Notes](./RELEASE.md) | ||
* [Cypress USB Device Middleware Library API Reference](https://cypresssemiconductorco.github.io/usbdev/usbfs_dev_api_reference_manual/html/index.html) | ||
* [PSoC 6 Peripheral Driver Library API Reference](https://cypresssemiconductorco.github.io/psoc6pdl/pdl_api_reference_manual/html/index.html) | ||
* [ModusToolbox Software Environment, Quick Start Guide, Documentation, and Videos](https://www.cypress.com/products/modustoolbox-software-environment) | ||
* [PSoC 6 SDK Examples](https://github.com/cypresssemiconductorco/Code-Examples-for-the-ModusToolbox-PSoC-6-SDK) | ||
* [ModusToolbox USB Configurator Tool Guide](https://www.cypress.com/ModusToolboxUSBConfig) | ||
* [ModusToolbox Device Configurator Tool Guide](https://www.cypress.com/ModusToolboxDeviceConfig) | ||
* [PSoC 6 WiFi-BT Pioneer Kit](http://www.cypress.com/CY8CKIT-062-WiFi-BT) | ||
* [PSoC 6 Wi-Fi BT Prototyping Kit](http://www.cypress.com/cy8cproto-062-4343w) | ||
* [PSoC 6 MCU Datasheets](http://www.cypress.com/psoc6ds) | ||
* [PSoC 6 MCU Application Notes](http://www.cypress.com/psoc6an) | ||
* [PSoC 6 MCU Technical Reference Manuals](http://www.cypress.com/psoc6trm) | ||
* [Cypress Semiconductor](http://www.cypress.com) | ||
|
||
--- | ||
© Cypress Semiconductor Corporation, 2019. |
Oops, something went wrong.