diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..b1bc858 Binary files /dev/null and b/.DS_Store differ diff --git a/.mbedignore b/.mbedignore new file mode 100644 index 0000000..ab1cfb4 --- /dev/null +++ b/.mbedignore @@ -0,0 +1 @@ +test/* diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..91c81ad --- /dev/null +++ b/LICENSE.txt @@ -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 . 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. diff --git a/README.md b/README.md index c618f2e..1b17e6f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..4e8d81d --- /dev/null +++ b/RELEASE.md @@ -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. diff --git a/cy_usb_dev.c b/cy_usb_dev.c new file mode 100644 index 0000000..1d72cc7 --- /dev/null +++ b/cy_usb_dev.c @@ -0,0 +1,2826 @@ +/***************************************************************************//** +* \file cy_usb_dev.c +* \version 2.0 +* +* Provides API implementation of the USBFS device middleware. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +#include "cy_usb_dev.h" + +#if defined(CY_IP_MXUSBFS) + + +/******************************************************************************* +* Internal Macro +*******************************************************************************/ + +#define GET_CFG_WORD(addr) CY_USB_DEV_GET_CFG_WORD(addr) +#define VAL2IDX(val) ( (uint32_t) (val) - 1U) +#define GET_UINT16(lsb, msb) ((lsb) | (uint16_t) (((uint16_t) (msb)) << 8UL)) + +/* Decode setup request bmRequestType */ +#define SETUP_RQST_RCPT_Pos (0) +#define SETUP_RQST_RCPT_Msk (0x1FU) +#define SETUP_RQST_TYPE_Pos (5) +#define SETUP_RQST_TYPE_Msk (0x60u) +#define SETUP_RQST_DIR_Pos (7) +#define SETUP_RQST_DIR_Msk (0x80U) + +/* Setup request layout in the buffer */ +#define SETUP_RQST_POS (0) +#define SETUP_RQST_TYPE_POS (1) +#define SETUP_VALUE_LSB_POS (2) +#define SETUP_VALUE_MSB_POS (3) +#define SETUP_INDEX_LSB_POS (4) +#define SETUP_INDEX_MSB_POS (5) +#define SETUP_LENGTH_LSB_POS (6) +#define SETUP_LENGTH_MSB_POS (7) + +/* Field position in the descriptors */ +#define CONFIG_DESCR_LENGTH_LSB_POS (2) /* Configuration descriptor length (LSB) byte position */ +#define CONFIG_DESCR_LENGTH_MSB_POS (3) /* Configuration descriptor length (MSB) byte position */ +#define BOS_DESCR_LENGTH_LSB_POS (2) /* BOS descriptor length (LSB) byte position */ +#define BOS_DESCR_LENGTH_MSB_POS (3) /* BOS descriptor length (MSB) byte position */ +#define CONFIG_DESCR_ATTRIB_POS (7) /* Configuration descriptor attribute byte position */ +#define DEVICE_DESCR_ISN_STRING_POS (16) /* Position of Serial Number in Device Descriptor */ +#define STRING_DESCR_LENGTH_POS (0) /* Position inside string descriptor where length is stored */ +#define STRING_DESCR_TYPE_POS (1) /* Position inside string descriptor where type is stored */ + +/* bmAttributes in configuration descriptor */ +#define CONFIG_ATTR_SELF_POWERED_MASK (0x40U) /* Configuration attribute Self-Powered mask */ +#define CONFIG_ATTR_REMOTE_WAKEUP_MASK (0x20U) /* Configuration attribute Remote Wakeup mask */ + +/* Fixed string descriptor indexes */ +#define STRING_LANGID_INDEX (0U) +#define STRING_IMSOS_INDEX (0xEEU) +#define EXT_OS_DESC_LENGTH_BYTE0_POS (0x0U) +#define EXT_OS_DESC_LENGTH_BYTE1_POS (0x1U) +#define EXT_OS_DESC_LENGTH_BYTE2_POS (0x2U) +#define EXT_OS_DESC_LENGTH_BYTE3_POS (0x3U) + + +/******************************************************************************* +* Static Functions Prototypes +*******************************************************************************/ + +static int32_t HandleTimeout(int32_t milliseconds); +static void InitSerialNumberString(cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t ConvertEndpointStateToStatus(cy_en_usb_dev_ep_state_t epState); + +static void BusResetCallback(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext); +static void Ep0SetupCallback(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext); +static void Ep0InCallback (USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext); +static void Ep0OutCallback (USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext); + +static cy_en_usb_dev_status_t HandleSetup(cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t HandleIn (cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t HandleOut (cy_stc_usb_dev_context_t *context); + +static void DecodeSetupPacket (uint8_t const *data, cy_stc_usb_dev_setup_packet_t *packet); + +static cy_en_usb_dev_status_t HandleStandardRequests (cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t GetDescriptorRequest (cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t GetConfigurationRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t GetInterfaceRequest (cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t GetStatusRequest (cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t const *context); +static cy_en_usb_dev_status_t ClearFeatureRequest (cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t SetAddressRequest (cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t SetConfigurationRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t SetInterfaceRequest (cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t SetFeatureRequest (cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context); + +static cy_en_usb_dev_status_t HandleClassRequests(cy_stc_usb_dev_class_ll_item_t *curItem, + cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t HandleClassRequestsCompleted(cy_stc_usb_dev_class_ll_item_t *curItem, + cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); + +static cy_en_usb_dev_status_t GetExtOsStringDescriptors(cy_stc_usb_dev_ms_os_string_t const *msOsString, + cy_stc_usb_dev_control_transfer_t *transfer); +static cy_en_usb_dev_status_t HandleVendorRequests(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); +static cy_en_usb_dev_status_t HandleVendorRequestsCompleted(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context); + +static cy_en_usb_dev_status_t CallSetInterfaceCallbacks(uint32_t interface, + uint32_t alternate, + cy_stc_usb_dev_class_ll_item_t *curItem, + cy_stc_usb_dev_context_t *context); + +static cy_en_usb_dev_status_t ConfigureDataEndpoints(uint32_t config, cy_stc_usb_dev_context_t *context); + +static cy_en_usb_dev_status_t InterfaceRemoveDataEndpoints(uint32_t numEndpoints, + cy_stc_usb_dev_endpoint_t const * const *epsPool, + cy_stc_usb_dev_context_t *context); + +static cy_en_usb_dev_status_t InterfaceAddDataEndpoints(uint32_t numEndpoints, + cy_stc_usb_dev_endpoint_t const * const *epsPool, + cy_stc_usb_dev_context_t *context); + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_Init +****************************************************************************//** +* +* Initialize the USB Device stack and underneath USBFS hardware driver. +* +* \param base +* The pointer to the USBFS instance. +* +* \param drvConfig +* The pointer to the USBFS driver configuration structure. +* +* \param drvContext +* The pointer to the USBFS driver context structure allocated by the user. +* The structure is used during the USBFS driver operation for internal +* configuration and data retention. The user must not modify anything in +* this structure. +* +* \param device +* The pointer to the device structure \ref cy_stc_usb_dev_device_t. +* +* \param config +* The pointer to the driver configuration structure \ref cy_stc_usb_dev_config_t. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +* \note +* The configuration of USB clocks, pins, and interrupts is not handled by this +* function and must be done on the application level. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_Init(USBFS_Type *base, + struct cy_stc_usbfs_dev_drv_config const *drvConfig, + struct cy_stc_usbfs_dev_drv_context *drvContext, + cy_stc_usb_dev_device_t const *device, + cy_stc_usb_dev_config_t const *config, + cy_stc_usb_dev_context_t *context) +{ + /* Input parameters verification */ + if ((NULL == device) || (NULL == config) || (NULL == context) || + (NULL == base) || (NULL == drvConfig) || (NULL == drvContext)) + { + return CY_USB_DEV_BAD_PARAM; + } + + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_DRV_HW_ERROR; + + /* Store driver information in device */ + context->drvBase = base; + context->drvContext = drvContext; + + /* Set default state */ + context->state = CY_USB_DEV_DISABLED; + context->configuration = 0U; + context->classRoot = NULL; + + /* Configure endpoint 0 buffer */ + context->ControlTransfer.buffer = config->ep0Buffer; + context->ControlTransfer.bufferSize = config->ep0BufferSize; + + /* Store link to descriptors */ + context->devDescriptors = device; + + /* Initialize delay function */ + context->handleTimeout = &HandleTimeout; + + /* Initialize event callback */ + context->eventsCallback = NULL; + + /* Initialize serial string descriptor and set pointer */ + InitSerialNumberString(context); + context->getSerialNumString = NULL; + + /* Initialize vendor-specific callbacks */ + context->vndRequestReceived = NULL; + context->vndRequestCompleted = NULL; + + /* Link driver and device context */ + Cy_USBFS_Dev_Drv_SetDevContext(base, context, drvContext); + + /* Configure driver */ + retStatus = (cy_en_usb_dev_status_t) Cy_USBFS_Dev_Drv_Init(base, drvConfig, drvContext); + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Hook device handlers to be called by driver */ + Cy_USBFS_Dev_Drv_RegisterServiceCallback(base, CY_USB_DEV_BUS_RESET, &BusResetCallback, drvContext); + Cy_USBFS_Dev_Drv_RegisterServiceCallback(base, CY_USB_DEV_EP0_SETUP, &Ep0SetupCallback, drvContext); + Cy_USBFS_Dev_Drv_RegisterServiceCallback(base, CY_USB_DEV_EP0_IN, &Ep0InCallback, drvContext); + Cy_USBFS_Dev_Drv_RegisterServiceCallback(base, CY_USB_DEV_EP0_OUT, &Ep0OutCallback, drvContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_DeInit +****************************************************************************//** +* +* De-initialize the USB Device stack and underneath hardware driver. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +void Cy_USB_Dev_DeInit(cy_stc_usb_dev_context_t *context) +{ + Cy_USBFS_Dev_Drv_DeInit(context->drvBase, context->drvContext); + + /* IDe-initialize all callbacks */ + context->classRoot = NULL; + context->eventsCallback = NULL; + context->getSerialNumString = NULL; + context->vndRequestReceived = NULL; + context->vndRequestCompleted = NULL; +} + + +/******************************************************************************* +* Function Name: HandleTimeout +****************************************************************************//** +* +* Waits for 1 millisecond and returns updated number of milliseconds that remain +* to wait before timeout expires. +* +* \param milliseconds +* Number of milliseconds that remain to wait before timeout expires. +* +* \return +* Updated number of milliseconds remain to wait. +* +*******************************************************************************/ +static int32_t HandleTimeout(int32_t milliseconds) +{ + Cy_SysLib_Delay(1U); /* Wait for 1 millisecond */ + + return (milliseconds - 1); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_Connect +****************************************************************************//** +* +* Enables pull-up on D+ (hardware supports only full-speed device) line to +* signal USB Device connection on USB Bus. +* +* \param blocking +* Wait until device is configured. +* +* \param timeout +* Defines in milliseconds the time for which this function can block. +* If that time expires, the USB Device is disconnected and the function returns. +* To wait forever, pass \ref CY_USB_DEV_WAIT_FOREVER. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_Connect(bool blocking, int32_t timeout, cy_stc_usb_dev_context_t *context) +{ + /* Returns SUCCESS except timeout when timeout is used */ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_SUCCESS; + + context->state = CY_USB_DEV_POWERED; + Cy_USBFS_Dev_Drv_Enable(context->drvBase, context->drvContext); + + if (blocking) + { + if (CY_USB_DEV_WAIT_FOREVER == timeout) + { + /* Wait until device is configured */ + while (CY_USB_DEV_CONFIGURED != context->state) + { + (void) context->handleTimeout(timeout); + } + } + else + { + /* Wait until device is configured or timeout */ + while ((CY_USB_DEV_CONFIGURED != context->state) && (timeout > 0)) + { + timeout = context->handleTimeout(timeout); + } + + /* Timeout expired disconnect USB Device */ + if (0 == timeout) + { + Cy_USB_Dev_Disconnect(context); + retStatus = CY_USB_DEV_TIMEOUT; + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_Disconnect +****************************************************************************//** +* +* Disables pull-up on D+ (hardware supports only full-speed device) line to +* signal USB Device disconnection on USB Bus. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +void Cy_USB_Dev_Disconnect(cy_stc_usb_dev_context_t *context) +{ + Cy_USBFS_Dev_Drv_Disable(context->drvBase, context->drvContext); + + /* Set device in the default state */ + context->state = CY_USB_DEV_DISABLED; + context->configuration = 0U; +} + + +/******************************************************************************* +* Function Name: ConvertEndpointStateToStatus +****************************************************************************//** +* +* Converts endpoint state to the USB Device status code. +* +* \param epState +* Endpoint state \ref cy_en_usb_dev_ep_state_t. +* The state \ref CY_USB_DEV_EP_IDLE converted to \ref CY_USB_DEV_DRV_HW_DISABLED +* to indicate that current endpoint configuration was changed. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t ConvertEndpointStateToStatus(cy_en_usb_dev_ep_state_t epState) +{ + cy_en_usb_dev_status_t retStatus; + + switch(epState) + { + case CY_USB_DEV_EP_COMPLETED: + retStatus = CY_USB_DEV_SUCCESS; + break; + + case CY_USB_DEV_EP_PENDING: + retStatus = CY_USB_DEV_DRV_HW_BUSY; + break; + + case CY_USB_DEV_EP_IDLE: /* Endpoint configuration is changed */ + case CY_USB_DEV_EP_STALLED: + retStatus = CY_USB_DEV_DRV_HW_DISABLED; + break; + + case CY_USB_DEV_EP_INVALID: + case CY_USB_DEV_EP_DISABLED: + retStatus = CY_USB_DEV_BAD_PARAM; + break; + + default: + retStatus = CY_USB_DEV_BAD_PARAM; + break; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_AbortEpTransfer +****************************************************************************//** +* +* Aborts pending read or write endpoint operation. +* If there is any bus activity after abort operation requested the function +* waits for its completion or timeout. The timeout is time to transfer +* bulk or interrupt packet of maximum playload size. If this bus activity is +* a transfer to the aborting endpoint the received data is lost and endpoint +* transfer completion callbacks is not invoked. +* After function returns new read or write endpoint operation can be submitted. +* +* \param endpoint +* The data endpoint number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +* \note +* The abort operation is not supported for ISOC endpoints because +* these endpoints do not have handshake and are always accessible by the +* USB Host. Therefore, abort can cause unexpected behavior. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_AbortEpTransfer(uint32_t endpoint, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus; + + /* Request abort operation, on exit abort complete */ + retStatus = (cy_en_usb_dev_status_t) Cy_USBFS_Dev_Drv_Abort(context->drvBase, endpoint, context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = CY_USB_DEV_DRV_HW_ERROR; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_StartReadEp +****************************************************************************//** +* +* Start a reading on a certain endpoint. +* +* \param endpoint +* The OUT data endpoint number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +* \note +* The read is not allowed for OUT endpoints after SET_CONFIGURATION or +* SET_INTERFACE request therefore this function must be called before reading data +* from OUT endpoints. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_StartReadEp(uint32_t endpoint, cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus; + cy_en_usb_dev_ep_state_t epState; + + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + /* Check that endpoint is ready for read operation */ + if ((CY_USB_DEV_EP_IDLE == epState) || (CY_USB_DEV_EP_COMPLETED == epState)) + { + /* Enable endpoint to be written by host */ + Cy_USBFS_Dev_Drv_EnableOutEndpoint(context->drvBase, endpoint, context->drvContext); + + retStatus = CY_USB_DEV_SUCCESS; + } + else + { + /* Use endpoint state to get status */ + retStatus = ConvertEndpointStateToStatus(epState); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_ReadEpBlocking +****************************************************************************//** +* +* Read data received from USB Host from a certain endpoint. Before calling +* this function, \ref Cy_USB_Dev_StartReadEp must be called. +* This function is blocking and returns after successful USB Host transfer, +* or an error or timeout occurred. +* +* \param endpoint +* The OUT data endpoint number. +* +* \param buffer +* The pointer to buffer that stores data that was read. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param size +* The number of bytes to read. +* This value must be less or equal to endpoint maximum packet size. +* +* \param actSize +* The number of bytes that were actually read. +* +* \param timeout +* Defines in milliseconds the time for which this function can block. +* If that time expires the function returns. +* To wait forever pass \ref CY_USB_DEV_WAIT_FOREVER. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpBlocking(uint32_t endpoint, uint8_t *buffer, + uint32_t size, uint32_t *actSize, int32_t timeout, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_SUCCESS; + cy_en_usb_dev_ep_state_t epState; + + /* Get endpoint state before check it */ + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + if (CY_USB_DEV_WAIT_FOREVER == timeout) + { + /* Wait until transfer is completed */ + while (CY_USB_DEV_EP_PENDING == epState) + { + (void) context->handleTimeout(timeout); + + /* Update endpoint state */ + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + } + } + else + { + /* Wait until transfer is completed or for timeout */ + while ((CY_USB_DEV_EP_PENDING == epState) && (timeout > 0)) + { + timeout = context->handleTimeout(timeout); + + /* Update endpoint state */ + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + } + + /* Timeout expired */ + if (0 == timeout) + { + /* Abort write operation */ + (void) Cy_USB_Dev_AbortEpTransfer(endpoint, context); + retStatus = CY_USB_DEV_TIMEOUT; + } + } + + /* Clear actual number of read bytes */ + *actSize = 0U; + + /* Read data from endpoint buffer after completion */ + if (CY_USB_DEV_EP_COMPLETED == epState) + { + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_ReadOutEndpoint(context->drvBase, + endpoint, buffer, size, actSize, context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = CY_USB_DEV_DRV_HW_ERROR; + } + } + + if ((CY_USB_DEV_TIMEOUT != retStatus) && (CY_USB_DEV_DRV_HW_ERROR != retStatus)) + { + /* Use endpoint state to get status */ + retStatus = ConvertEndpointStateToStatus(epState); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_ReadEpNonBlocking +****************************************************************************//** +* +* Read data received from USB Host from a certain endpoint. Before calling +* this function, \ref Cy_USB_Dev_StartReadEp must be called. +* +* \param endpoint +* The OUT data endpoint number. +* +* \param buffer +* The pointer to buffer that stores data that was read. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param size +* The number of bytes to read. +* This value must be less than or equal to endpoint maximum packet size. +* +* \param actSize +* The number of bytes that were actually read. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpNonBlocking(uint32_t endpoint, uint8_t *buffer, + uint32_t size, uint32_t *actSize, cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus; + cy_en_usb_dev_ep_state_t epState; + + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + /* Read data from endpoint buffer after completion */ + if (CY_USB_DEV_EP_COMPLETED == epState) + { + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_ReadOutEndpoint(context->drvBase, + endpoint, buffer, size, actSize, context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = CY_USB_DEV_DRV_HW_ERROR; + } + } + else + { + /* Clear actual number of read bytes */ + *actSize = 0U; + + /* Use endpoint state to get status */ + retStatus = ConvertEndpointStateToStatus(epState); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_WriteEpBlocking +****************************************************************************//** +* +* Write data to be transferred to USB Host from a certain endpoint. +* This function is blocking and returns after successful USB Host transfer, +* or an error or timeout occurred. +* +* \param endpoint +* The IN data endpoint number. +* +* \param buffer +* The pointer to the buffer containing data bytes to write. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param size +* The number of bytes to write. +* This value must be less than or equal to endpoint maximum packet size. +* +* \param timeout +* Defines in milliseconds the time for which this function can block. +* If that time expires, the function returns. +* To wait forever, pass \ref CY_USB_DEV_WAIT_FOREVER. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpBlocking(uint32_t endpoint, uint8_t const *buffer, + uint32_t size, int32_t timeout, cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_BAD_PARAM; + cy_en_usb_dev_ep_state_t epState; + + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + /* Check that endpoint is ready for write operation */ + if ((CY_USB_DEV_EP_IDLE == epState) || (CY_USB_DEV_EP_COMPLETED == epState)) + { + retStatus = (cy_en_usb_dev_status_t) Cy_USBFS_Dev_Drv_LoadInEndpoint(context->drvBase, + endpoint, buffer, size, context->drvContext); + + /* Check endpoint load status */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Update endpoint state after load operation */ + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + if (CY_USB_DEV_WAIT_FOREVER == timeout) + { + /* Wait until transfer is completed */ + while (CY_USB_DEV_EP_PENDING == epState) + { + (void) context->handleTimeout(timeout); + + /* Update endpoint state */ + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + } + } + else + { + /* Wait until transfer is completed or for timeout */ + while ((CY_USB_DEV_EP_PENDING == epState) && (timeout > 0)) + { + timeout = context->handleTimeout(timeout); + + /* Update endpoint state */ + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + } + + /* Timeout expired */ + if (0 == timeout) + { + /* Abort write operation */ + (void) Cy_USB_Dev_AbortEpTransfer(endpoint, context); + retStatus = CY_USB_DEV_TIMEOUT; + } + } + } + else + { + retStatus = CY_USB_DEV_DRV_HW_ERROR; + } + } + + if ((CY_USB_DEV_TIMEOUT != retStatus) && (CY_USB_DEV_DRV_HW_ERROR != retStatus)) + { + /* Use endpoint state to get status */ + retStatus = ConvertEndpointStateToStatus(epState); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_WriteEpNonBlocking +****************************************************************************//** +* +* Write data to be transferred to USB Host from a certain endpoint. +* +* \param endpoint +* The IN data endpoint number. +* +* \param buffer +* The pointer to the buffer containing data bytes to write. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param size +* The number of bytes to write. +* This value must be less than or equal to endpoint maximum packet size. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpNonBlocking(uint32_t endpoint, uint8_t const *buffer, + uint32_t size, cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus; + cy_en_usb_dev_ep_state_t epState; + + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + /* Check that endpoint is ready for operation */ + if ((CY_USB_DEV_EP_IDLE == epState) || (CY_USB_DEV_EP_COMPLETED == epState)) + { + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_LoadInEndpoint(context->drvBase, + endpoint, buffer, size, context->drvContext); + + /* Write data into the endpoint buffer */ + if (CY_USB_DEV_SUCCESS != retStatus) + + { + retStatus = CY_USB_DEV_DRV_HW_ERROR; + } + } + else + { + retStatus = ConvertEndpointStateToStatus(epState); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: BusResetCallback +****************************************************************************//** +* +* Handles Bus Reset interrupt. +* +* \param base +* The pointer to the USBFS instance. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +static void BusResetCallback(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext) +{ + /* Get device context from the driver context */ + cy_stc_usb_dev_context_t *context = (cy_stc_usb_dev_context_t *) Cy_USBFS_Dev_Drv_GetDevContext(base, drvContext); + + /* Get linked list of classes */ + cy_stc_usb_dev_class_ll_item_t *curItem = context->classRoot; + + /* Set device in the DEFAULT state */ + context->state = CY_USB_DEV_DEFAULT; + context->status = 0U; /* Reset remote wakeup and power state */ + context->configuration = 0U; + + /* Notify Bus Reset event for device instance */ + if (NULL != context->eventsCallback) + { + /* Input parameters are zeros. Ignore return for Bus Reset event. */ + (void) context->eventsCallback(CY_USB_DEV_EVENT_BUS_RESET, 0UL, 0UL, context); + } + + /* Notify Bus Reset event for all class instances */ + while (NULL != curItem) + { + if (NULL != curItem->classObj->busReset) + { + /* Execute callback */ + curItem->classObj->busReset(curItem->classData, context); + } + + /* Move to next element */ + curItem = curItem->next; + } +} + + +/******************************************************************************* +* Function Name: DecodeSetupPacket +****************************************************************************//** +* +* Decodes setup packet (populates \ref cy_stc_usb_dev_setup_packet_t). +* +* \param data +* The pointer to buffer with setup packet (raw data). +* +* \param packet +* The pointer to structure that holds setup packet. +* +*******************************************************************************/ +static void DecodeSetupPacket(uint8_t const *data, cy_stc_usb_dev_setup_packet_t *packet) +{ + /* Fill elements of setup packet structure from raw data */ + packet->bmRequestType.direction = (uint8_t) _FLD2VAL(SETUP_RQST_DIR, data[SETUP_RQST_POS]); + packet->bmRequestType.type = (uint8_t) _FLD2VAL(SETUP_RQST_TYPE, data[SETUP_RQST_POS]); + packet->bmRequestType.recipient = (uint8_t) _FLD2VAL(SETUP_RQST_RCPT, data[SETUP_RQST_POS]); + packet->bRequest = (uint8_t) data[SETUP_RQST_TYPE_POS]; + packet->wValue = GET_UINT16(data[SETUP_VALUE_LSB_POS], data[SETUP_VALUE_MSB_POS]); + packet->wIndex = GET_UINT16(data[SETUP_INDEX_LSB_POS], data[SETUP_INDEX_MSB_POS]); + packet->wLength = GET_UINT16(data[SETUP_LENGTH_LSB_POS], data[SETUP_LENGTH_MSB_POS]); +} + + +/******************************************************************************* +* Function Name: HandleSetup +****************************************************************************//** +* +* Handles setup packet received event (generated from Endpoint 0 Interrupt). +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleSetup(cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + cy_stc_usb_dev_control_transfer_t *transfer = &context->ControlTransfer; + + /* Get setup packet from hardware */ + Cy_USBFS_Dev_Drv_Ep0GetSetup(context->drvBase, transfer->buffer, context->drvContext); + + /* Decode setup packet */ + DecodeSetupPacket(transfer->buffer, &transfer->setup); + + /* Prepare for new transfer */ + transfer->ptr = NULL; + transfer->remaining = 0U; + transfer->size = 0U; + transfer->direction = transfer->setup.bmRequestType.direction; + transfer->zlp = false; + transfer->notify = false; + + /* Handle Setup request depends on type */ + switch (transfer->setup.bmRequestType.type) + { + case CY_USB_DEV_STANDARD_TYPE: + case CY_USB_DEV_CLASS_TYPE: + { + if (CY_USB_DEV_STANDARD_TYPE == transfer->setup.bmRequestType.type) + { + /* Handle Standard requests */ + retStatus = HandleStandardRequests(transfer, context); + } + + /* Try handle by Class requests handler */ + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = HandleClassRequests(context->classRoot, transfer, context); + } + } + break; + + case CY_USB_DEV_VENDOR_TYPE: + retStatus = HandleVendorRequests(transfer, context); + break; + + default: + /* Unknown request type: CY_USB_DEV_REQUEST_NOT_HANDLED */ + break; + } + + /* Process standard requests */ + + /* Continue processing if request was handled */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Check transfer setup before continue transfer */ + if (transfer->setup.bmRequestType.direction == transfer->direction) + { + /* Check transfer length */ + if (transfer->setup.wLength > 0U) + { + if (CY_USB_DEV_DIR_DEVICE_TO_HOST == transfer->direction) + { + /* IN data stage is required */ + + /* Transfer must be less than or equal to the size requested by the host */ + if (transfer->remaining > transfer->setup.wLength) + { + transfer->remaining = transfer->setup.wLength; + } + + retStatus = CY_USB_DEV_SUCCESS; + } + else + { + /* OUT data stage is required */ + + /* Transfer must be equal to the size requested by the Host and + * buffer for data must be large enough + */ + if ((transfer->remaining == transfer->setup.wLength) && + (transfer->remaining <= transfer->bufferSize)) + { + retStatus = CY_USB_DEV_SUCCESS; + } + } + } + else + { + /* No data stage: transfer size must be zero */ + if (0U == transfer->remaining) + { + retStatus = CY_USB_DEV_SUCCESS; + } + } + } + + /* Execute transfer if transfer setup correctly */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + if (transfer->setup.wLength > 0U) + { + /* Data or retStatus stage if applicable */ + if (CY_USB_DEV_DIR_DEVICE_TO_HOST == transfer->direction) + { + /* Define whether send zero length packet at the end of transfer */ + if (transfer->setup.wLength > transfer->remaining) + { + /* Transfer is a multiple of EP0 max packet size */ + transfer->zlp = (0U == (transfer->remaining % Cy_USBFS_Dev_Drv_GetEp0MaxPacket(context->drvBase))); + } + + /* Handle data stage (IN direction) */ + (void) HandleIn(context); + } + else + { + /* Set buffer to accept Host data */ + transfer->ptr = transfer->buffer; + + /* Start data stage (OUT direction) */ + (void) Cy_USBFS_Dev_Drv_Ep0Read(context->drvBase, transfer->ptr, (uint32_t) transfer->remaining, context->drvContext); + } + } + else + { + /* No data state: move to status stage (IN direction) */ + (void) Cy_USBFS_Dev_Drv_Ep0Write(context->drvBase, NULL, 0U, context->drvContext); + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleIn +****************************************************************************//** +* +* Handles IN packet received event (generated from Endpoint 0 Interrupt). +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleIn(cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + cy_stc_usb_dev_control_transfer_t *transfer = &context->ControlTransfer; + + if (CY_USB_DEV_DIR_DEVICE_TO_HOST == transfer->direction) + { + /* Data stage (direction IN) */ + + /* Send data packet or zero length packet. Skip processing after zero length is sent */ + if (false == ((0U == transfer->remaining) && (!transfer->zlp))) + { + if ((transfer->remaining == 0U) && (transfer->zlp)) + { + /* Zero length packet is send by code below */ + transfer->zlp = false; + } + + /* Write to endpoint 0 */ + uint16_t packetSize = (uint16_t) Cy_USBFS_Dev_Drv_Ep0Write(context->drvBase, + transfer->ptr, + (uint32_t) transfer->remaining, + context->drvContext); + + /* Update transfer */ + transfer->ptr += packetSize; + transfer->remaining -= packetSize; + + /* After last packet has been written move to move to status stage. + * Do not wait for the next IN event because it can be dropped if + * ACK from host is corrupted. + * For more info on this see section 8.5.3.3 of the USB2.0 specification. + * */ + if ((0U == transfer->remaining) && (transfer->zlp == false)) + { + /* Data stage completed: move to status stage (direction OUT) */ + (void) Cy_USBFS_Dev_Drv_Ep0Read(context->drvBase, NULL, 0UL, context->drvContext); + } + } + + retStatus = CY_USB_DEV_SUCCESS; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleOut +****************************************************************************//** +* +* Handles OUT packet received event (generated from Endpoint 0 Interrupt). +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleOut(cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + cy_stc_usb_dev_control_transfer_t *transfer = &context->ControlTransfer; + + if (CY_USB_DEV_DIR_HOST_TO_DEVICE == transfer->direction) + { + /* Control transfer: DATA stage (direction OUT) */ + + /* Read from endpoint 0 */ + uint16_t packetSize = (uint16_t) Cy_USBFS_Dev_Drv_Ep0ReadResult(context->drvBase, context->drvContext); + + /* Check whether transfer size is valid */ + if (packetSize <= transfer->remaining) + { + /* Update transfer counters */ + transfer->ptr += packetSize; + transfer->size += packetSize; + transfer->remaining -= packetSize; + + /* Check whether all bytes received */ + if (transfer->remaining > 0U) + { + /* Continue: there are more bytes to receive */ + Cy_USBFS_Dev_Drv_Ep0Read(context->drvBase, + transfer->ptr, + (uint32_t) transfer->remaining, + context->drvContext); + + retStatus = CY_USB_DEV_SUCCESS; + } + else + { + /* Notify class layer DATA stage completed */ + if (transfer->notify) + { + /* Clear notify and reset buffer pointer */ + transfer->notify = false; + transfer->ptr = transfer->buffer; + + /* Handle Setup request depends on type */ + switch(transfer->setup.bmRequestType.type) + { + case CY_USB_DEV_STANDARD_TYPE: + /* Return CY_USB_DEV_REQUEST_NOT_HANDLED because + * Standard request handler does not use notification. + */ + break; + + case CY_USB_DEV_CLASS_TYPE: + retStatus = HandleClassRequestsCompleted(context->classRoot, transfer, context); + break; + + case CY_USB_DEV_VENDOR_TYPE: + retStatus = HandleVendorRequestsCompleted(transfer, context); + break; + + default: + /* Unknown request type: return CY_USB_DEV_REQUEST_NOT_HANDLED */ + break; + } + } + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Move to STATUS stage (direction IN) */ + (void) Cy_USBFS_Dev_Drv_Ep0Write(context->drvBase, NULL, 0U, context->drvContext); + } + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Ep0SetupCallback +****************************************************************************//** +* +* Implements callback for setup received event (generated from Endpoint 0 +* Interrupt). The Endpoint 0 is STALLED if processing was successful. +* +* \param base +* The pointer to the USBFS instance. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +static void Ep0SetupCallback(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext) +{ + /* Get device context from the driver context */ + cy_stc_usb_dev_context_t *context = (cy_stc_usb_dev_context_t *) Cy_USBFS_Dev_Drv_GetDevContext(base, drvContext); + + /* Endpoint 0 setup event */ + if (CY_USB_DEV_SUCCESS != HandleSetup(context)) + { + /* Protocol stall */ + Cy_USBFS_Dev_Drv_Ep0Stall(base); + } +} + + +/******************************************************************************* +* Function Name: Ep0InCallback +****************************************************************************//** +* +* Implements callback for IN packet received event (generated from Endpoint 0 +* Interrupt). The Endpoint 0 is STALLED if processing was successful. +* +* \param base +* The pointer to the USBFS instance. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +static void Ep0InCallback(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext) +{ + /* Get device context from the driver context */ + cy_stc_usb_dev_context_t *context = (cy_stc_usb_dev_context_t *) Cy_USBFS_Dev_Drv_GetDevContext(base, drvContext); + + /* Endpoint 0 IN packet received event */ + if (CY_USB_DEV_SUCCESS != HandleIn(context)) + { + /* Protocol stall */ + Cy_USBFS_Dev_Drv_Ep0Stall(base); + } +} + + +/******************************************************************************* +* Function Name: Ep0OutCallback +****************************************************************************//** +* +* Implements callback for OUT packet received event (generated from Endpoint 0 +* Interrupt). The Endpoint 0 is STALLED if processing was successful. +* +* \param base +* The pointer to the USBFS instance. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +static void Ep0OutCallback(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_context *drvContext) +{ + /* Get device context from the driver context */ + cy_stc_usb_dev_context_t *context = (cy_stc_usb_dev_context_t *) Cy_USBFS_Dev_Drv_GetDevContext(base, drvContext); + + /* Endpoint 0 OUT packet received */ + if (CY_USB_DEV_SUCCESS != HandleOut(context)) + { + /* Protocol stall */ + Cy_USBFS_Dev_Drv_Ep0Stall(base); + } +} + + +/******************************************************************************* +* Function Name: InitSerialNumberString +****************************************************************************//** +* +* Initializes serial number string using silicon ID. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +static void InitSerialNumberString(cy_stc_usb_dev_context_t *context) +{ + const uint8_t hex[] = "0123456789ABCDEF"; + uint8_t *strDescr = context->serialNumDescr; + uint8_t *id; + uint32_t i = 0U; + uint32_t j = 0U; + uint64_t tmp; + + /* Place header: length and type */ + strDescr[STRING_DESCR_LENGTH_POS] = CY_USB_DEV_SN_STRING_DESR_LENGTH; + strDescr[STRING_DESCR_TYPE_POS] = CY_USB_DEV_STRING_DESCR; + + /* Get unique ID - 8 bytes */ + tmp = Cy_SysLib_GetUniqueId(); + + /* Get start address of uint64_t */ + id = (uint8_t *) &tmp; + + /* Fill descriptor using unique silicon ID */ + for (i = 2U; i < CY_USB_DEV_SN_STRING_DESR_LENGTH; i += 4U) + { + strDescr[i + 0U] = hex[(id[j] & 0x0FU)]; + strDescr[i + 1U] = 0U; + strDescr[i + 2U] = hex[(id[j] >> 4U)]; + strDescr[i + 3U] = 0U; + ++j; + } +} + + +/******************************************************************************* +* Function Name: GetDescriptorRequest +****************************************************************************//** +* +* Handles GET_DESCRIPTOR standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetDescriptorRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + switch (CY_USB_DEV_GET_DESCR_TYPE(transfer->setup.wValue)) + { + case CY_USB_DEV_DEVICE_DESCR: + { + /* Return device descriptor */ + transfer->ptr = (uint8_t *) context->devDescriptors->deviceDescriptor; + transfer->remaining = CY_USB_DEV_DEVICE_DESCR_LENGTH; + + retStatus = CY_USB_DEV_SUCCESS; + } + break; + + case CY_USB_DEV_CONFIG_DESCR: + { + /* Get configuration index */ + uint32_t idx = CY_USB_DEV_GET_DESCR_IDX(transfer->setup.wValue); + + /* Check whether requested configuration descriptor exists */ + if (idx < context->devDescriptors->numConfigurations) + { + uint8 *configDescr = (uint8_t *) context->devDescriptors->configurations[idx]->configDescriptor; + + /* Return configuration descriptor */ + transfer->ptr = configDescr; + transfer->remaining = GET_UINT16(configDescr[CONFIG_DESCR_LENGTH_LSB_POS], + configDescr[CONFIG_DESCR_LENGTH_MSB_POS]); + + retStatus = CY_USB_DEV_SUCCESS; + } + } + break; + + case CY_USB_DEV_BOS_DESCR: + { + uint8_t *bosDescr = (uint8_t *) context->devDescriptors->bosDescriptor; + + /* Check if BOS descriptor exists */ + if (NULL != bosDescr) + { + /* Return BOS descriptor */ + transfer->ptr = bosDescr; + transfer->remaining = GET_UINT16(bosDescr[BOS_DESCR_LENGTH_LSB_POS], + bosDescr[BOS_DESCR_LENGTH_MSB_POS]); + + retStatus = CY_USB_DEV_SUCCESS; + } + } + break; + + case CY_USB_DEV_STRING_DESCR: + { + uint8_t *strDescr = NULL; + + /* Get string index */ + uint32_t idx = CY_USB_DEV_GET_DESCR_IDX(transfer->setup.wValue); + + /* Get pool of strings */ + cy_stc_usb_dev_string_t const *descr = context->devDescriptors->strings; + + /* Special case: Microsoft OS Descriptors String descriptor */ + if (idx == STRING_IMSOS_INDEX) + { + if (NULL != descr->osStringDescriptors) + { + /* Get string */ + strDescr = (uint8_t *) descr->osStringDescriptors->msOsDescriptor; + + retStatus = CY_USB_DEV_SUCCESS; + } + } + /* Other string descriptors (included serial number string) */ + else + { + /* Check that string exists */ + if ((NULL != descr->stringDescriptors) && (descr->numStrings > 0U) && (idx < descr->numStrings)) + { + /* Get string from descriptors */ + strDescr = (uint8_t *) descr->stringDescriptors[idx]; + + /* Check whether requested string is serial number */ + if ((idx != STRING_LANGID_INDEX) && + (idx == context->devDescriptors->deviceDescriptor[DEVICE_DESCR_ISN_STRING_POS])) + { + /* Check options for serial string */ + if (strDescr != NULL) + { + /* Serial number is part of device descriptor */ + retStatus = CY_USB_DEV_SUCCESS; + } + else + { + if (context->getSerialNumString != NULL) + { + /* Get serial number using callback */ + strDescr = context->getSerialNumString(); + if (strDescr != NULL) + { + retStatus = CY_USB_DEV_SUCCESS; + } + } + else + { + /* Get serial number using silicon ID */ + strDescr = &context->serialNumDescr[0]; + retStatus = CY_USB_DEV_SUCCESS; + } + } + } + else + { + retStatus = CY_USB_DEV_SUCCESS; + } + } + } + + /* Return string if it was found */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* User defined descriptor */ + transfer->ptr = strDescr; + transfer->remaining = strDescr[STRING_DESCR_LENGTH_POS]; + } + } + break; + + case CY_USB_DEV_INTERFACE_DESCR: + case CY_USB_DEV_ENDPOINT_DESCR: + /* These descriptor types are not supported */ + break; + + default: + /* The descriptor type was not recognized */ + break; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetConfigurationRequest +****************************************************************************//** +* +* Handles SET_CONFIGURATION standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetConfigurationRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + /* Send the device configuration */ + transfer->ptr = (uint8_t *) &context->configuration; + transfer->remaining = sizeof(context->configuration); + + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: GetInterfaceRequest +****************************************************************************//** +* +* Handles GET_INTERFACE standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetInterfaceRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint32_t interface = transfer->setup.wIndex; + + if (CY_USB_DEV_CONFIGURED != context->state) + { + return CY_USB_DEV_REQUEST_NOT_HANDLED; + } + + /* Check whether interface exists in current configuration */ + if (interface < context->devDescriptors->configurations[VAL2IDX(context->configuration)]->numInterfaces) + { + /* Return current alternate setting for an interface */ + transfer->ptr = (uint8_t *) &context->alternate[interface]; + transfer->remaining = sizeof(context->alternate[interface]); + + retStatus = CY_USB_DEV_SUCCESS; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetStatusRequest +****************************************************************************//** +* +* Handles GET_STATUS standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetStatusRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t const *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint16_t response; + + /* Endpoint or interface must be zero if device is not configured */ + if (context->state != CY_USB_DEV_CONFIGURED) + { + if (0U != transfer->setup.wIndex) + { + return CY_USB_DEV_REQUEST_NOT_HANDLED; + } + } + + /* Find request recipient */ + switch (transfer->setup.bmRequestType.recipient) + { + case CY_USB_DEV_RECIPIENT_DEVICE: + { + /* Return device status: powered or remote wakeup */ + response = (uint16_t) context->status; + retStatus = CY_USB_DEV_SUCCESS; + } + break; + + case CY_USB_DEV_RECIPIENT_INTERFACE: + { + /* All status bits are Reserved (Reset to zero) */ + response = 0U; + retStatus = CY_USB_DEV_SUCCESS; + } + break; + + case CY_USB_DEV_RECIPIENT_ENDPOINT: + { + uint32_t endpoint = CY_USB_DEV_EPADDR2EP(transfer->setup.wIndex); + + cy_en_usb_dev_ep_state_t epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, endpoint, context->drvContext); + + /* Check that valid endpoint is requested */ + if ((CY_USB_DEV_EP_INVALID != epState) && (CY_USB_DEV_EP_DISABLED != epState)) + { + /* Get endpoint state */ + response = (CY_USB_DEV_EP_STALLED == epState) ? CY_USB_DEV_ENDPOINT_STATUS_HALT : 0U; + retStatus = CY_USB_DEV_SUCCESS; + } + } + break; + + default: + break; + } + + /* Put response into the buffer */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Send the status to host */ + transfer->buffer[0U] = CY_LO8(response); + transfer->buffer[1U] = CY_HI8(response); + + transfer->ptr = transfer->buffer; + transfer->remaining = sizeof(response); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: ClearFeatureRequest +****************************************************************************//** +* +* Handles CLEAR_FEATURE standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t ClearFeatureRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Endpoint or interface must be zero if device is not configured */ + if (context->state != CY_USB_DEV_CONFIGURED) + { + if (transfer->setup.wIndex != 0U) + { + return CY_USB_DEV_REQUEST_NOT_HANDLED; + } + } + + /* Find request recipient */ + switch (transfer->setup.bmRequestType.recipient) + { + case CY_USB_DEV_RECIPIENT_DEVICE: + { + /* Check feature selector: TEST_MODE is not supported */ + if (transfer->setup.wValue == CY_USB_DEV_DEVICE_REMOTE_WAKEUP) + { + context->status &= (uint8_t) ~CY_USB_DEV_STATUS_REMOTE_WAKEUP_MASK; + + retStatus = CY_USB_DEV_SUCCESS; + } + } + break; + + case CY_USB_DEV_RECIPIENT_INTERFACE: + /* There is no feature selector this recipient */ + break; + + case CY_USB_DEV_RECIPIENT_ENDPOINT: + { + /* Check that feature selector is ENDPOINT_HALT */ + if (transfer->setup.wValue == CY_USB_DEV_ENDPOINT_HALT) + { + uint32_t endpoint = CY_USB_DEV_EPADDR2EP(transfer->setup.wIndex); + + /* Only enabled and data endpoints can be STALLED */ + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_UnStallEndpoint(context->drvBase, + endpoint, context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + } + } + } + break; + + default: + /* Unknown recipient */ + break; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetAddressRequest +****************************************************************************//** +* +* Handles SET_ADDRESS standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetAddressRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context) +{ + uint8_t devAddress = CY_LO8(transfer->setup.wValue); + + /* Request to change address after status status */ + Cy_USBFS_Dev_Drv_SetAddress(context->drvBase, devAddress, context->drvContext); + + /* Set device state depends on address value */ + context->state = (0U != devAddress) ? CY_USB_DEV_ADDRESSED : CY_USB_DEV_DEFAULT; + + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: ConfigureDataEndpoints +****************************************************************************//** +* +* Configures data endpoints that belong to a certain configuration. +* +* \param config +* Configuration index (configuration value - 1). +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of executed operation \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t ConfigureDataEndpoints(uint32_t config, cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_DRV_HW_ERROR; + + uint32_t intf, alt, ep; + + uint32_t numIntr = context->devDescriptors->configurations[config]->numInterfaces; + cy_stc_usb_dev_interface_t const **descr = context->devDescriptors->configurations[config]->interfaces; + + /* Go through all interfaces that belong to configuration */ + for (intf = 0U; intf < numIntr; ++intf) + { + uint32_t mask = context->devDescriptors->configurations[config]->interfaces[intf]->endpointsMask; + uint32_t endpoint = 1UL; + + /* Use mask to find only endpoints that belong to interface */ + while (0U != mask) + { + /* Configure enabled endpoint */ + if (0U != (mask & 0x01U)) + { + bool configured = false; + + cy_stc_usb_dev_ep_config_t epConfig; + epConfig.enableEndpoint = false; + epConfig.allocBuffer = true; + + /* Go through all alternate */ + for (alt = 0U; alt < descr[intf]->numAlternates; ++alt) + { + /* Go thorough all endpoints that belong to alternate */ + for (ep = 0U; ep < descr[intf]->alternates[alt]->numEndpoints; ++ep) + { + cy_stc_usbdev_endpoint_descr_t const *epDescr = (cy_stc_usbdev_endpoint_descr_t const *) descr[intf]->alternates[alt]->endpoints[ep]->endpointDescriptor; + + /* Find endpoint that needs to be configured */ + if (CY_USB_DEV_EPADDR2EP(epDescr->bEndpointAddress) == endpoint) + { + if (false == configured) + { + /* Enable endpoint that belongs to alternate 0 */ + if (0U == alt) + { + epConfig.enableEndpoint = true; + } + + /* Initialize endpoint configuration structure */ + epConfig.endpointAddr = epDescr->bEndpointAddress; + epConfig.attributes = epDescr->bmAttributes; + epConfig.maxPacketSize = GET_CFG_WORD(&epDescr->wMaxPacketSize); + epConfig.bufferSize = GET_CFG_WORD(&epDescr->wMaxPacketSize); + + /* Set configuration of the 1st endpoint instance */ + configured = true; + } + else + { + /* Find maximum packet size for this endpoint in all alternates */ + if (epConfig.bufferSize < GET_CFG_WORD(&epDescr->wMaxPacketSize)) + { + epConfig.bufferSize = GET_CFG_WORD(&epDescr->wMaxPacketSize); + } + } + + break; + } + } + } + + /* Add endpoint */ + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_AddEndpoint(context->drvBase, + &epConfig, context->drvContext); + + /* Check operation result */ + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = CY_USB_DEV_DRV_HW_ERROR; + break; + } + } + + mask >>= 1U; + ++endpoint; + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetConfigurationRequest +****************************************************************************//** +* +* Handles SET_CONFIGURATION standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetConfigurationRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint32_t config = (uint32_t) transfer->setup.wValue; + + if (0U == config) + { + /* Disable all data endpoints */ + Cy_USBFS_Dev_Drv_UnConfigureDevice(context->drvBase, context->drvContext); + + /* Store configuration and move to configured state */ + context->configChanged = true; + context->configuration = (uint8_t) config; + context->state = CY_USB_DEV_ADDRESSED; + + retStatus = CY_USB_DEV_SUCCESS; + } + else + { + /* Check whether configuration is valid */ + if (config <= context->devDescriptors->numConfigurations) + { + uint32_t configIdx = VAL2IDX(config); + + /* Clear context fields that keep configuration related data */ + (void) memset((void *) context->alternate, 0, CY_USB_DEV_NUM_INTERFACES_MAX); + + /* Set device endpoints into the default state before configure them */ + Cy_USBFS_Dev_Drv_UnConfigureDevice(context->drvBase, context->drvContext); + + /* Configure endpoints */ + retStatus = ConfigureDataEndpoints(configIdx, context); + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Notify Bus Reset event for device instance */ + if (NULL != context->eventsCallback) + { + /* Input parameters are zeros. Ignore return for Bus Reset event. */ + retStatus = context->eventsCallback(CY_USB_DEV_EVENT_SET_CONFIG, config, 0UL, context); + } + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Get linked list of classes */ + cy_stc_usb_dev_class_ll_item_t *curItem = context->classRoot; + + /* Call Set Configuration callback for all class instances */ + while (NULL != curItem) + { + if (NULL != curItem->classObj->setConfiguration) + { + /* Execute callback */ + retStatus = curItem->classObj->setConfiguration(config, curItem->classData, context); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + /* Operation failed break the loop */ + break; + } + } + + /* Move to next element */ + curItem = curItem->next; + } + } + } + + if (CY_USB_DEV_SUCCESS == retStatus) + { + const uint32_t attribute = context->devDescriptors->configurations[configIdx]->configDescriptor[CONFIG_DESCR_ATTRIB_POS]; + + /* Complete device configuration (endpoints were configured) */ + Cy_USBFS_Dev_Drv_ConfigDevice(context->drvBase, context->drvContext); + + /* Set power status (remote wakeup status was cleared on bus reset) */ + if (0U != (attribute & CONFIG_ATTR_SELF_POWERED_MASK)) + { + context->status |= (uint8_t) CY_USB_DEV_STATUS_SELF_POWERED_MASK; + } + else + { + context->status &= (uint8_t) ~CY_USB_DEV_STATUS_SELF_POWERED_MASK; + } + + /* Store configuration and move to configured state */ + context->configChanged = true; + context->configuration = (uint8_t) config; + context->state = CY_USB_DEV_CONFIGURED; + } + else + { + /* Set configuration failed, remain in current state */ + Cy_USBFS_Dev_Drv_UnConfigureDevice(context->drvBase, context->drvContext); + + retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: InterfaceRemoveDataEndpoints +****************************************************************************//** +* +* Disables data endpoints that belong to a certain interface. +* +* \param numEndpoints +* The number of data endpoints. +* +* \param epsPool +* The pointer to pointer to the array of the endpoints. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of executed operation \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t InterfaceRemoveDataEndpoints(uint32_t numEndpoints, + cy_stc_usb_dev_endpoint_t const * const *epsPool, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + uint32_t endpoint; + + if (0U == numEndpoints) + { + /* Interface with zero endpoints return success */ + return CY_USB_DEV_SUCCESS; + } + + /* Remove endpoints that are available in pool */ + for (endpoint = 0UL; endpoint < numEndpoints; ++endpoint) + { + /* Get endpoint parsed endpoint descriptor */ + cy_stc_usbdev_endpoint_descr_t const *epDescr = (cy_stc_usbdev_endpoint_descr_t const *) epsPool[endpoint]->endpointDescriptor; + + /* Remove endpoint */ + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_RemoveEndpoint(context->drvBase, (uint32_t) epDescr->bEndpointAddress, + context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + /* Remove operation failed */ + retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + break; + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: InterfaceAddDataEndpoints +****************************************************************************//** +* +* Configures data endpoints that belong to a certain interface to operate. +* +* \param numEndpoints +* The number of data endpoints. +* +* \param epsPool +* The pointer to pointer to the array of the endpoints. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t InterfaceAddDataEndpoints(uint32_t numEndpoints, + cy_stc_usb_dev_endpoint_t const *const *epsPool, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + uint32_t endpoint; + + if (0U == numEndpoints) + { + /* Interface with zero endpoints return success */ + return CY_USB_DEV_SUCCESS; + } + + /* Add endpoints that are available the pool */ + for (endpoint = 0UL; endpoint < numEndpoints; ++endpoint) + { + cy_stc_usbdev_endpoint_descr_t const *epDescr = (cy_stc_usbdev_endpoint_descr_t const *) epsPool[endpoint]->endpointDescriptor; + cy_stc_usb_dev_ep_config_t epConfig; + + /* Setup configuration structure */ + epConfig.allocBuffer = false; + epConfig.enableEndpoint = true; + epConfig.endpointAddr = epDescr->bEndpointAddress; + epConfig.attributes = epDescr->bmAttributes; + epConfig.maxPacketSize = GET_CFG_WORD(&epDescr->wMaxPacketSize); + + /* Add endpoint */ + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_AddEndpoint(context->drvBase, &epConfig, + context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + /* Add operation failed */ + retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + break; + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: CallSetInterfaceCallbacks +****************************************************************************//** +* +* Calls Class callbacks for SET_INTERFACE standard request. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t CallSetInterfaceCallbacks(uint32_t interface, + uint32_t alternate, + cy_stc_usb_dev_class_ll_item_t *curItem, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_SUCCESS; + + /* Call registered Set Interface callbacks for all class instances */ + while (NULL != curItem) + { + /* Execute callback */ + if (NULL != curItem->classObj->setInterface) + { + retStatus = curItem->classObj->setInterface(interface, alternate, + curItem->classData, context); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + break; + } + } + + /* Move to next element */ + curItem = curItem->next; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetInterfaceRequest +****************************************************************************//** +* +* Handles SET_INTERFACE standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetInterfaceRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint32_t cfg = (uint32_t) VAL2IDX(context->configuration); + uint32_t intf = (uint32_t) transfer->setup.wIndex; + uint32_t alt = (uint32_t) transfer->setup.wValue; + + /* Not supported when configuration is set */ + if (CY_USB_DEV_CONFIGURED != context->state) + { + return CY_USB_DEV_REQUEST_NOT_HANDLED; + } + + /* Check whether interface exists */ + if (intf < context->devDescriptors->configurations[cfg]->numInterfaces) + { + /* Check whether alternate for this interface exists */ + if (alt < context->devDescriptors->configurations[cfg]->interfaces[intf]->numAlternates) + { + /* Get pointer to interface descriptor structure */ + const cy_stc_usb_dev_interface_t *descr = context->devDescriptors->configurations[cfg]->interfaces[intf]; + + /* If alternate settings are not changed, do nothing with current alternate */ + if (alt != context->alternate[intf]) + { + /* Remove endpoints used by current alternate (old) */ + uint32_t altOld = context->alternate[intf]; + + retStatus = InterfaceRemoveDataEndpoints((uint32_t) descr->alternates[altOld]->numEndpoints, + (cy_stc_usb_dev_endpoint_t const * const *) descr->alternates[altOld]->endpoints, + context); + + /* Add endpoints used by new alternate (received) */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Add endpoints used by new alternate (received) */ + retStatus = InterfaceAddDataEndpoints((uint32_t) descr->alternates[alt]->numEndpoints, + (cy_stc_usb_dev_endpoint_t const * const *) descr->alternates[alt]->endpoints, + context); + } + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Notify Bus Reset event for device instance */ + if (NULL != context->eventsCallback) + { + /* Input parameters are zeros. Ignore return for Bus Reset event. */ + retStatus = context->eventsCallback(CY_USB_DEV_EVENT_SET_INTERFACE, alt, intf, context); + } + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Call Set Interface callbacks for a Class */ + retStatus = CallSetInterfaceCallbacks(intf, alt, context->classRoot, context); + } + } + + /* Check request complete status */ + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Store current alternate settings */ + context->configChanged = true; + context->alternate[intf] = (uint8_t) alt; + } + } + else + { + /* Do nothing: current alternate is already set */ + retStatus = CY_USB_DEV_SUCCESS; + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetFeatureRequest +****************************************************************************//** +* +* Handles SET_FEATURE standard request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetFeatureRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Endpoint or interface must be zero if device is not configured */ + if (CY_USB_DEV_CONFIGURED != context->state) + { + if (0U != transfer->setup.wIndex) + { + return CY_USB_DEV_REQUEST_NOT_HANDLED; + } + } + + /* Find request recipient */ + switch (transfer->setup.bmRequestType.recipient) + { + case CY_USB_DEV_RECIPIENT_DEVICE: + { + /* Check feature selector: TEST_MODE is not supported */ + if (CY_USB_DEV_DEVICE_REMOTE_WAKEUP == transfer->setup.wValue) + { + context->status |= CY_USB_DEV_STATUS_REMOTE_WAKEUP_MASK; + retStatus = CY_USB_DEV_SUCCESS; + } + } + break; + + case CY_USB_DEV_RECIPIENT_INTERFACE: + /* There is no feature selector this recipient */ + break; + + case CY_USB_DEV_RECIPIENT_ENDPOINT: + { + /* Check that feature selector is ENDPOINT_HALT */ + if (CY_USB_DEV_ENDPOINT_HALT == transfer->setup.wValue) + { + uint32_t endpoint = CY_USB_DEV_EPADDR2EP(transfer->setup.wIndex); + + /* Only enabled and data endpoints can be STALLED */ + retStatus = (cy_en_usb_dev_status_t) + Cy_USBFS_Dev_Drv_StallEndpoint(context->drvBase, + endpoint, context->drvContext); + + if (CY_USB_DEV_SUCCESS != retStatus) + { + retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + } + } + } + break; + + default: + /* Unknown recipient */ + break; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleStandardRequests +****************************************************************************//** +* +* Handles supported standard requests. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleStandardRequests(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Direction is Device to Host: DATA stage direction is IN */ + if (CY_USB_DEV_DIR_DEVICE_TO_HOST == transfer->direction) + { + switch (transfer->setup.bRequest) + { + case CY_USB_DEV_RQST_GET_DESCRIPTOR: + retStatus = GetDescriptorRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_GET_CONFIGURATION: + retStatus = GetConfigurationRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_GET_INTERFACE: + retStatus = GetInterfaceRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_GET_STATUS: + retStatus = GetStatusRequest(transfer, context); + break; + + default: + break; + } + } + /* Direction is Host to Device: DATA stage direction is OUT or no DATA stage */ + else + { + switch (transfer->setup.bRequest) + { + case CY_USB_DEV_RQST_SET_ADDRESS: + retStatus = SetAddressRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_SET_DESCRIPTOR: + /* This request is optional and not supported */ + break; + + case CY_USB_DEV_RQST_SET_CONFIGURATION: + retStatus = SetConfigurationRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_SET_INTERFACE: + retStatus = SetInterfaceRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_CLEAR_FEATURE: + retStatus = ClearFeatureRequest(transfer, context); + break; + + case CY_USB_DEV_RQST_SET_FEATURE: + retStatus = SetFeatureRequest(transfer, context); + break; + + default: + break; + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleClassRequests +****************************************************************************//** +* +* Handles supported class requests. +* +* \param curItem +* The pointer to class linked list element. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleClassRequests(cy_stc_usb_dev_class_ll_item_t *curItem, + cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Call Request Received callback for all class instances */ + while (NULL != curItem) + { + /* Execute callback */ + if (NULL != curItem->classObj->requestReceived) + { + retStatus = curItem->classObj->requestReceived(transfer, curItem->classData, context); + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Request is handled, exit loop */ + break; + } + } + + /* Move to next element */ + curItem = curItem->next; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleClassRequestsComplete +****************************************************************************//** +* +* Handles supported class requests completion stage (data was +* received from the USB Host). +* +* \param curItem +* The pointer to class linked list element. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleClassRequestsCompleted(cy_stc_usb_dev_class_ll_item_t *curItem, + cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Call Request Complete callback for all class instances */ + while (NULL != curItem) + { + /* Execute callback */ + if (NULL != curItem->classObj->requestCompleted) + { + retStatus = curItem->classObj->requestCompleted(transfer, curItem->classData, context); + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* Request is handled, exit loop */ + break; + } + } + + /* Move to next element */ + curItem = curItem->next; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetExtOsStringDescriptors +****************************************************************************//** +* +* Handles supported vendor-specific requests. +* +* \param msOsString +* The pointer to the MS OS String structure \ref cy_stc_usb_dev_ms_os_string_t. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetExtOsStringDescriptors(cy_stc_usb_dev_ms_os_string_t const *msOsString, + cy_stc_usb_dev_control_transfer_t *transfer) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Direction is Device to Host: DATA stage direction is IN */ + if (CY_USB_DEV_DIR_DEVICE_TO_HOST == transfer->direction) + { + if (transfer->setup.bRequest == msOsString->msVendorCode) + { + switch(transfer->setup.wIndex) + { + case CY_USB_DEV_MS_OS_STRING_EXT_COMPAT_ID: + case CY_USB_DEV_MS_OS_STRING_EXT_PROPERTEIS: + { + /* Get Extended Compat ID / Properties OS Descriptor (ignores wValue) */ + uint8_t *strDescr = (uint8_t *) ((CY_USB_DEV_MS_OS_STRING_EXT_COMPAT_ID == transfer->setup.wIndex) ? + msOsString->extCompatIdDescriptor : msOsString->extPropertiesDescriptor); + + if (NULL != strDescr) + { + transfer->ptr = strDescr; + transfer->remaining = GET_UINT16(strDescr[EXT_OS_DESC_LENGTH_BYTE0_POS], + strDescr[EXT_OS_DESC_LENGTH_BYTE1_POS]); + + retStatus = CY_USB_DEV_SUCCESS; + } + } + break; + + default: + break; + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleVendorRequests +****************************************************************************//** +* +* Handles supported vendor-specific requests. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleVendorRequests(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Get pointer to MS OS String descriptor structure */ + const cy_stc_usb_dev_ms_os_string_t *msOsString = context->devDescriptors->strings->osStringDescriptors; + + if (NULL != msOsString) + { + retStatus = GetExtOsStringDescriptors(msOsString, transfer); + } + + if ((CY_USB_DEV_SUCCESS != retStatus) && (NULL != context->vndRequestReceived)) + { + /* There is no classContext for vendor-specific callbacks */ + context->vndRequestReceived(transfer, NULL, context); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleVendorRequestsComplete +****************************************************************************//** +* +* Handles supported vendor-specific requests completion stage (data was +* received from the USB Host). +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleVendorRequestsCompleted(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + if (NULL != context->vndRequestCompleted) + { + /* There is no classContext for vendor-specific callbacks */ + context->vndRequestCompleted(transfer, NULL, context); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterClass +****************************************************************************//** +* +* Registers device class that will be supported by USB Device. +* The USB Device provides a hooks to implement required class support. +* +* \param classItem +* The pointer to class linked list element. +* +* \param classObj +* The pointer to the class structure. +* +* \param classContext +* The pointer to the context class structure allocated by the user. +* The structure is used during the custom class operation for internal +* configuration and data retention. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_RegisterClass(cy_stc_usb_dev_class_ll_item_t *classItem, + cy_stc_usb_dev_class_t *classObj, + void *classContext, + cy_stc_usb_dev_context_t *context) +{ + if ((NULL == classItem) || (NULL == classObj)) + { + return CY_USB_DEV_BAD_PARAM; + } + + /* Get linked list of classes */ + cy_stc_usb_dev_class_ll_item_t *curItem = context->classRoot; + + /* Store data members */ + classItem->classObj = classObj; + classItem->classData = classContext; + classItem->next = NULL; + + if (NULL == curItem) + { + /* Add 1st element */ + context->classRoot = classItem; + } + else + { + /* Find last element */ + while (NULL != curItem->next) + { + curItem = curItem->next; + } + + /* Add current item to the end of the list */ + curItem->next = classItem; + } + + return CY_USB_DEV_SUCCESS; +} + +#endif /* CY_IP_MXUSBFS) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev.h b/cy_usb_dev.h new file mode 100644 index 0000000..6a6d265 --- /dev/null +++ b/cy_usb_dev.h @@ -0,0 +1,2065 @@ +/***************************************************************************//** +* \file cy_usb_dev.h +* \version 2.0 +* +* Provides API declarations of the USBFS device middleware. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + + +/** + * \mainpage Cypress USB Device Middleware Library 2.0 +* +* The USB Device middleware provides a full-speed USB 2.0 Chapter 9 specification +* -compliant device framework. It uses the USBFS driver from PDL to interface +* with the hardware. The middleware provides support for Audio, CDC, and HID +* classes. Also, it allows implementing other class support. +* The USB Configurator tool makes it easy to construct the USB +* Device descriptor. +* +* Features: +* * USB Full-Speed Device Framework +* * \ref group_usb_dev_cfg_tool +* * The following USB Classes are supported: +* * \ref group_usb_dev_audio_class_info +* * \ref group_usb_dev_cdc_class_info +* * \ref group_usb_dev_hid_class_info +* +******************************************************************************** +* \section section_usb_dev_general General Description +******************************************************************************** +* +* The USB Device structure is divided into layers. The implementation +* is event-driven: the USBFS driver receives interrupts from the hardware and +* provides callbacks to the USB Device layer which implements them and provides +* events to the Class layer. A simplified image is shown below. \n \n +* \image html usb_dev_solution_struct.png +* +* Include cy_usb_dev.h along with the header for the USB class to be used +* (cy_usb_dev_hid.h, cy_usb_dev_cdc.h, cy_usb_dev_audio.h) to get access to +* all the functions and other declarations in this library. +* If you use ModusToolbox USB Device Configurator, also include cycfg_usbdev.h. +* +******************************************************************************** +* \section section_usb_dev_quick_start Quick Start Guide +******************************************************************************** +* +* Cypress USB Device middleware can be used in various software environments. +* Refer to the \ref section_usb_dev_toolchain. +* The quickest way to get started is using the Code Examples. +* Cypress Semiconductor continuously extends its portfolio of code examples +* at Cypress Semiconductor website +* and at +* Cypress Semiconductor GitHub. +* +* This quick start guide is for an environment configured to use for development +* PSoC 6 Peripheral Driver Library(psoc6pdl) included in the project. +* +* To easily run a USB, use the ModusToolbox USBCommDevice or USBM project. +* The steps below show how to set up a USB Device based on a basic +* ModusToolbox project (like Hello_World). +* +* The following steps set up a USB device recognized as an standard HID device - +* USB mouse and moves it from right to the left, and vice-versa. +* \note Some steps contain a corresponding to the figure below number in +* brackets. +* +* \subsection subsection_qsg_step1 STEP 1: Enable the USB Device middleware. +* +* Launch ModusToolbox Library Manager and enable the USB Device middleware. +* This step is required only if the ModusToolbox IDE is used. Otherwise, ensure +* the USB Device Middleware is included in your project. +* +* \subsection subsection_qsg_step2 STEP 2: Generate initialization code. +* +* 1. Launch the ModusToolbox Device Configurator Tool and switch to the +* Peripherals tab (#1.1). +* 2. Enable the USB personality under Communication and enter Alias (#1.2). +* We use USBHID in \ref section_usb_dev_quick_start +* 3. Go to the Parameters pane and configure the USB personality: assign +* the peripheral clock divider (#1.3) for Clock (Bus Reset). +* Any available free divider can be used. +* 4. Set Endpoint Mask to 1 to enable data endpoint 1 (#1.4) Enabled data +* endpoints must match the descriptor tree in the USB Configurator. +* \image html usb_dev_device_cfg.png +* 5. Switch to the System tab (#2.1). +* 6. Check the IMO clock is enabled (#2.2). Select Trim with USB (#2.3) +* 7. Select one of the PLLs, if your device supports more than one. +* Enable the PLL and set a frequency of 48 MHz (#2.4). +* 8. Select the CLK_HF3 USB clock (#2.5). Assign the source clock to +* the CLK_PATH connected to the configured previously PLL (#2.6). +* 9. Check the FLL clock is enabled (#2.7). +* 10. Select File->Save to generate initialization code. +* \image html usb_dev_system_cfg.png +* +* \subsection subsection_qsg_step3 STEP 3: Generate USB descriptors. +* +* 1. Run the USB Configurator. +* 2. In the Device Descriptor node, set bDeviceClass - 0x02(#3.1), +* iProduct - the device name to identify among connected devices. We use +* "USB Device Quick Start guide"(#3.2). +* 3. Remove default Alternate Settings. +* 4. Add HID Alternate Settings. +* 5. Add HID Descriptor and select 3-Button Mouse in HID Report (#3.3). +* 6. Add Endpoint Descriptor and set: direction - IN, +* Transfer Type - Interrupt, wMaxPacketSize - 3, bInterval - 10(#3.4). +* 7. Perform File->Save to generate initialization code. If configuration is +* saved for the first time, choose a name (like design.cyusbdev) and save it +* to the project root. +* \image html usb_dev_configurator.png +* +* \subsection subsection_qsg_step4 STEP 4: Update main.c +* +* 1. Include the USB headers to get access to the generated descriptor +* structures, USB driver, device, and class layers APIs. +* \snippet usb_dev/snippet/main.c snipped_cy_usb_dev_headers +* 2. Declare the USB context global variables: +* \snippet usb_dev/snippet/main.c snipped_cy_usb_dev_hid_globals +* 3. Configure the USB interrupt structures and declare interrupt handlers +* (refer to the Configure Interrupts section of the USBFS +* driver in the PDL API Reference). +* \snippet usb_dev/snippet/main.c snipped_cy_usb_dev_interrupt_configuration +* 4. Implement the interrupt handlers: +* \snippet usb_dev/snippet/main.c snipped_cy_usb_dev_interrupt_handlers +* 5. Update the main() function with the USB and interrupt initialization +* routines: +* \snippet usb_dev/snippet/main.c snipped_USB_Dev_InitEnableHID +* 6. Example of the routine to move mouse from right to the left, +* and vice-versa. +* \snippet usb_dev/snippet/main.c snipped_USB_Dev_MouseMove +* +* \subsection subsection_qsg_step5 STEP 5: Build and program the device. +* +* Connect the device to the Host PC. On the PC, verify a new USB device was +* enumerated as a mouse device. The mouse’s cursor shall move left to +* right and vice-versa. +* +******************************************************************************** +* \section group_usb_dev_configuration Configuration Considerations +******************************************************************************** +* +* This section explains how to configure the USB Device for operation. +* +******************************************************************************** +* \subsection group_usb_dev_config_drv Configure USBFS driver +******************************************************************************** +* +* The driver and system resources configuration details are provided in the +* USBFS driver section Configuration Considerations in the PDL API Reference +* Manual. The provided code snippets expect that driver and system resources +* configuration is done. +* +******************************************************************************** +* \subsection group_usb_dev_config_descr Construct USB Device Descriptors +******************************************************************************** +* +* Run standalone USB Configurator tool to construct the USB Device descriptors. +* After USB Device descriptors are +* constructed, save generated source and header files. Add these files to your +* project. Open header files to get external definitions for: +* * USB Device configuration structure \ref cy_stc_usb_dev_config_t instance. +* * Array of USB Devices structures \ref cy_stc_usb_dev_device_t. +* * CDC and/or HID class configuration structure instances. +* +* These definitions will be required in the configuration steps provided below. +* +******************************************************************************** +* \subsection group_usb_dev_config Configure USB Device +******************************************************************************** +* +* To initialize the USB Device middleware, call \ref Cy_USB_Dev_Init function +* providing: +* * The pointer to the USBFS instance. +* * The pointer to the filled USBFS driver configuration structure cy_stc_usbfs_dev_drv_config_t. +* * The pointer to the allocated USBFS driver context structure cy_stc_usbfs_dev_drv_context_t. +* * The pointer to the generated middleware USB Device structure \ref cy_stc_usb_dev_device_t. +* * The pointer to the generated middleware USB Device configuration structure \ref cy_stc_usb_dev_config_t. +* * The pointer to the allocated middleware USB Device context structure \ref cy_stc_usb_dev_context_t. +* +******************************************************************************** +* \subsection group_usb_dev_config_class Configure USB Classes +******************************************************************************** +* +* The USB Device middleware provides support of Audio, HID, and CDC classes. +* Each class has own initialization function. This function must be called +* after \ref Cy_USB_Dev_Init to initialize class data and register it. The +* class-specific request will be passed to the class handler after registration. +* Note that the USB Configurator tool generates HID and CDC Class configuration +* structures that are required class initialization. Find these structure +* external declaration in the generated header file. +* +* To initialize the Audio Class, call \ref Cy_USB_Dev_Audio_Init function +* providing: +* * The NULL pointer (reserved for possible future use). +* * The pointer to the allocated Audio Class context structure \ref cy_stc_usb_dev_audio_context_t. +* * The pointer to the allocated USB Device context structure \ref cy_stc_usb_dev_context_t. +* +* To initialize the CDC Class, call \ref Cy_USB_Dev_CDC_Init function +* providing: +* * The pointer to the populated CDC Class configuration structure \ref cy_stc_usb_dev_cdc_config_t. +* * The pointer to the allocated CDC Class context structure \ref cy_stc_usb_dev_cdc_context_t. +* * The pointer to the allocated USB Device context structure \ref cy_stc_usb_dev_context_t. +* +* To initialize the HID Class, call \ref Cy_USB_Dev_HID_Init function +* providing: +* * The pointer to the populated HID Class configuration structure \ref cy_stc_usb_dev_hid_config_t. +* * The pointer to the allocated HID Class context structure \ref cy_stc_usb_dev_hid_context_t. +* * The pointer to the allocated USB Device context structure \ref cy_stc_usb_dev_context_t. +* +******************************************************************************** +* \subsection group_usb_dev_config_enable Enable USB Device +******************************************************************************** +* +* Finally, enable the USB Device operation calling \ref Cy_USB_Dev_Connect. +* This function call enables pull-up on D+ to signal USB Device connection on +* USB Bus. The USB Host detects device connection and starts device enumeration. +* It requests the device descriptors to define device capabilities and finally +* sets device configuration for the following operation. +* The \ref Cy_USB_Dev_Connect provides an argument to block until enumeration +* completes or exits after the USB Device is enabled. +* +* \snippet usb_dev/snippet/main.c snipped_Cy_USB_Dev_InitEnable +* +* \note +* The interrupts are mandatory for the USB Device operation. Therefore, USBFS +* interrupts must be enabled in the NVIC and global interrupts must be +* enabled as well. +* +******************************************************************************** +* \section section_usb_dev_design Design Considerations +******************************************************************************** +* +* The typical use case is that application calls the middleware API interface +* provided by the USB Device or Class layer to implement application logic. +* However, some features are provided only by the USBFS driver layer. Therefore, if +* the application needs them, the driver API interface must be used. The list of +* these features is provided in the section \ref group_usb_dev_drv_features. +* +******************************************************************************** +* \subsection group_usb_dev_cfg_tool USB Configurator +******************************************************************************** +* +* The standalone USB Configurator tool helps construct USB Device descriptors. +* The USB device descriptors +* provide to the USB Host complete information about the connected device. The tool +* output are generated source and header files that contain information about the +* USB Device: device descriptors plus structures that help access device +* descriptors. Generated files are mandatory for the middleware operation and must be +* added to your project. The header file provides access to +* instances of the USB Device configuration structure \ref cy_stc_usb_dev_config_t +* and array of the USB Device structures \ref cy_stc_usb_dev_device_t. Both these +* definitions are required for USB Device configuration. The tool also generates +* instances of configuration structures required for CDC and HID Class +* configuration. +* +* A detailed information about USB Descriptors is provided by the +* [USB Specification](http://www.usb.org/developers/docs/usb20_docs/) +* +* The USB Configurator tool provides the User Guide, which can be found in the +* documentation. +* +******************************************************************************** +* \subsection group_usb_dev_std_requests Standard Request Support +******************************************************************************** +* +* The USB Device supports standard requests listed in the table below. +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
Standard RequestRequest Processing DescriptionUSB Spec Reference
CLEAR_FEATUREClears or disables a specific feature. Support recipients: Device, +* Interface and Endpoint. The TEST_MODE feature selector is not supported.9.4.1
GET_CONFIGURATIONReturns the current device configuration value.9.4.2
GET_DESCRIPTORReturns the specified descriptor if the descriptor exists.9.4.3
GET_INTERFACEReturns the selected alternate interface setting for the specified +* interface.9.4.4
GET_STATUSReturns status for the specified recipient. Support recipients: +* Device, Interface, and Endpoint.9.4.5
SET_ADDRESSSets the device address for all future device accesses.9.4.6
SET_CONFIGURATIONSets the device configuration. After this request, the device is ready for +* communication.9.4.7
SET_DESCRIPTORNot supported (optional request).9.4.8
SET_FEATUREEnables a specific feature. Support recipients: Device, Interface, and Endpoint. +* The TEST_MODE feature selector is not supported.9.4.9
SET_INTERFACEAllows the USB Host to select an alternate setting for the specified +* interface.9.4.10
SYNCH_FRAMENot supported.9.4.11
+* +******************************************************************************** +* \subsection group_usb_dev_audio_class_info Audio Class +******************************************************************************** +* +* The USB Audio class can be used in a large amount of applications, +* either Made for iPod (MFI) or general USB Audio based. These applications +* consist of, but are not limited to, speakers, microphones, headsets, music +* creation tools (DJ equipment, guitar jacks, etc), and mixers. +* An additional application for the Audio class is in Musical Instrument +* Digital Interface (MIDI) applications. This interface uses a digital UART-like +* interface and allows the information to be sent across to the Host to +* be used with software applications, such as Apple Garage Band. Various +* instruments, such as electronic pianos, interface with MIDI. +* +* A detailed description about Audio Class is provided by the +* [USB Implementers Forum (USB-IF) Class Documentation] +* (http://www.usb.org/developers/docs/devclass_docs/) +* +* The Audio Class does not provide support any of Audio v1.0 or v2.0 requests +* processing and provides only the API interface to register Audio request handlers +* implemented on the application level. However, \ref group_usb_dev_cfg_tool +* supports Audio v1.0 or v2.0 descriptors. +* +* \note +* The MIDI Class support is not available in this version. +* +******************************************************************************** +* \subsection group_usb_dev_cdc_class_info CDC: Communication Device Class +******************************************************************************** +* +* Common use case for this class in a PSoC design is to replace a legacy serial +* (RS232) COM port with a USB connection. This allows customers to use +* legacy serial software while updating the communication interface to +* something more readily available on today's computers. The type of data +* that might be streamed across USB can vary depending on the end application. +* This could be as simple as streaming raw ADC counts to an entire command +* protocol. Additionally, CDC is extremely useful for debug purposes. +* Users can easily develop a USB interface that can send and receive +* information across CDC. On the Host side, GUI applications are widely +* available to view the data being transmitted, such as TeraTerm, Terminal, +* or Hyper-Terminal (depending on version of Microsoft Windows). +* +* A detailed description about CDC class is provided by the +* [USB Implementers Forum (USB-IF) Class Documentation] +* (http://www.usb.org/developers/docs/devclass_docs/) +* +* The CDC Class supports requests listed in the table below. +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
Class RequestRequest Processing DescriptionCommunications Class Subclass Specification for PSTN Devices
SET_LINE_CODINGAllows the host to specify typical asynchronous line-character +* formatting properties such as: data terminal rate, number of stop bits, +* parity type and number of data bits. It applies to data transfers both +* from the Host to the Device and from the Device to the Host.6.3.10
GET_LINE_CODINGAllows the host to discover the currently configured line coding.6.3.11
SET_CONTROL_LINE_STATEGenerates RS-232/V.24 style control signals - RTS and DTR.6.3.12
+* +* The CDC Class supports notifications listed in the table below. +* +* +* +* +* +* +* +*
Class NotificationNotification Processing DescriptionCommunications Class Subclass Specification for PSTN Devices
SERIAL_STATEAllows the Host to read the current state of the carrier detect (CD), +* DSR, break, and ring signal (RI).6.3.4
+* +******************************************************************************** +* \subsection group_usb_dev_hid_class_info HID: Human Interface Device +******************************************************************************** +* +* There are many possible use cases for HID depending on the end application. +* A keyboard/keypad is a common HID application that has been implemented +* previously with PSoC. Additionally, customers can use PSoC to implement a +* PC mouse or game controller device. A more generic use case seen is with +* regards to customers using USB as general-purpose interface between PSoC and +* the Host, without conforming to specific USAGE such as a Keyboard, Mouse, etc. +* Instead the user configures the HID descriptor to be a generic device, which +* allows them to transfer Vendor-Specific information, such as ADC data, +* button presses, etc., across the HID protocol. This allows customers to +* perform custom/generic data transfers over USB, without needing to provide +* an INF or SYS file during enumeration or worry about WHQL certification. +* All this is accomplished using the HID drivers that are built into all +* modern operation systems today. This includes Windows, Mac, and Linux. +* +* A detailed description about HID is provided by the +* [USB Implementers Forum (USB-IF) Class Documentation] +* (http://www.usb.org/developers/docs/devclass_docs/) +* +* The HID Class supports requests listed in the table below. +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
Class RequestRequest Processing DescriptionHID Spec Reference
GET_REPORTAllows the USB Host to receive a report via the control pipe.7.2.1
SET_REPORTAllows the USB Host to send a report via the control pipe (set a +* state of input, output, or feature report controls).7.2.2
GET_IDLEReads the current idle rate for a particular Input report. \n +* The recommended default idle rate (rate when the device is initialized) +* is 500 milliseconds for keyboards (delay before first repeat rate) and +* infinity for joysticks and mice.7.2.3
SET_IDLESets idle rate for a particular report. This request is used to limit +* the reporting frequency of an interrupt in endpoint.\n +* When the idle rate byte is 0 (zero), the duration is indefinite. +* The endpoint reports only when a change is detected in the report data. +* When the idle rate byte is non-zero, then a fixed duration is +* used (defined by idle rate).7.2.4
GET_PROTOCOLReads which protocol is currently active (either the boot or the +* report protocol).7.2.5
SET_PROTOCOLSwitches between the boot protocol and the report protocol (or vice versa).7.2.6
+* +******************************************************************************** +* \subsection group_usb_dev_class_x Adding Custom Class +******************************************************************************** +* +* The USB Device middleware provides API interface that allows the user to +* implement custom class support. The middleware notifies registered class about +* following events: +* * Bus Reset detected ( \ref cy_cb_usb_dev_bus_reset_t ). +* * Set Configuration request received ( \ref cy_cb_usb_dev_set_config_t ). +* * Set Interface request received ( \ref cy_cb_usb_dev_set_interface_t ). +* * Setup packet received ( \ref cy_cb_usb_dev_request_received_t ). +* * Data is received in response for current setup packet ( \ref cy_cb_usb_dev_request_cmplt_t ). +* +* To create a new custom Class, follow the steps below: +* 1. Implement functions to service events (from the list above) required +* for class operation. Typically, class should implement service of class-specific +* requests therefore needs to implement functions defined by \ref cy_cb_usb_dev_request_received_t +* and \ref cy_cb_usb_dev_request_cmplt_t. +* 2. Initialize instance of \ref cy_stc_usb_dev_class_t structure using implemented +* service functions. Provide NULL pointer as function pointer if class does not +* use this event. +* 3. Allocate instance of \ref cy_stc_usb_dev_class_ll_item_t structure to +* provide storage for a linked list item of the class. +* 4. The class might need a context to store class-specific data. If needed, +* define context type specific for this class and allocate it. +* 5. To enable class operation, this needs to be registered using +* \ref Cy_USB_Dev_RegisterClass function after USB Device middleware is +* initialized. +* +* Any of supported classes can be taken as an example to implement a custom class. +* +******************************************************************************** +* \subsection group_usb_dev_vendor Vendor-Specific Requests Support +******************************************************************************** +* +* The vendor-specific requests are STALLed by USB Device middleware by default. +* The exception is MS OS String vendor-specific request to retrieve an OS Feature +* Descriptor (Note that USB device must contain MS OS String descriptor to handle +* this vendor-specific by middleware). +* The middleware provides the \ref Cy_USB_Dev_RegisterVendorCallbacks function +* to register callbacks to handle vendor-specific requests. +* +******************************************************************************** +* \subsection group_usb_dev_ep_buf_alloc Allocate Data Endpoint Buffer +******************************************************************************** +* +* The application allocates buffers for data endpoints to operate. The buffer +* allocation depends on USBFS driver endpoint buffer access type configuration. +* It specifies which hardware register set 8-bit or 16-bit is used to access +* hardware endpoints buffer. The 16-bit access requires that the specific rules for +* the endpoints buffer allocation must be met (See Hardware Buffer Access +* section of the USBFS driver for more information). \n +* To make endpoint buffer allocation configuration independent, use +* the \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro. +* +******************************************************************************** +* \subsection group_usb_dev_self_powered_dev Self-Powered Devices +******************************************************************************** +* +* The USB Device responds to GET_STATUS requests based on the status set with +* the \ref Cy_USB_Dev_SetPowerStatus function. To set the correct status, +* \ref Cy_USB_Dev_SetPowerStatus must be called during initialization if USB +* Device is configured as self-powered. The \ref Cy_USB_Dev_SetPowerStatus must +* be called any time the device changes status. A self-powered device also requires +* monitoring VBUS to control pull-up resistors. The pull-up resistor does +* not supply power to the data line until you call \ref Cy_USB_Dev_Connect. +* \ref Cy_USB_Dev_Disconnect disconnects the pull-up resistor from the data line. +* Find information about how to add VBUS monitoring in your application in the USBFS driver +* section VBUS Detection in the PDL API Reference Manual. +* +******************************************************************************** +* \subsection group_usb_dev_std_timeout Timeout Function Redefinition +******************************************************************************** +* +* The USB Device middleware provides following blocking functions: \ref Cy_USB_Dev_ReadEpBlocking, +* \ref Cy_USB_Dev_WriteEpBlocking, and \ref Cy_USB_Dev_Connect (the behavior +* defined by the blocking parameter of the connect function). The blocking functions +* parameter timeout defines how many milliseconds to wait before timeout. +* The SysLib driver function Cy_SysLib_Delay is used to implement a 1 millisecond +* wait cycle. The middleware provides function \ref Cy_USB_Dev_OverwriteHandleTimeout +* that allows overriding the wait function implementation. This might be +* useful when an operation system is used in your application. +* +* \note +* The blocking function must be used carefully to not cause application lock-up. +* The preferred solution is using non-blocking functions. +* +******************************************************************************** +* \subsection group_usb_dev_drv_features Driver Features +******************************************************************************** +* +* There are driver features that do not have corresponding an API +* interface provided in the middleware. However, the application might need +* these features for USB Device implementation. If there is such a need, the +* driver functions must be used. These features are listed below: +* * Data Endpoint 1 - 8 Completion, SOF received and LPM transfer ACKed events +* notification. +* * Low power support: Suspend / Resume, Remote wakeup signaling. +* * Link Power Management (LPM) support. +* +* Find more information in the appropriate section of the USBFS driver documentation +* provided in the PDL API Reference Manual. +* +******************************************************************************** +* \section section_usb_dev_toolchain Supported Software and Tools +******************************************************************************** +* +* This version of the USB Device Middleware was validated for the compatibility +* with the following Software and Tools: +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
Software and ToolsVersion
ModusToolbox Software Environment2.0
- ModusToolbox Device Configurator2.0
- ModusToolbox USB Device Personality in Device Configurator1.1
- ModusToolbox USB Device Configurator2.0
PSoC6 Peripheral Driver Library (PDL)1.3.0
GCC Compiler7.2.1
IAR Compiler8.32
ARM Compiler 66.11
+* +******************************************************************************** +* \section group_usb_dev_MISRA MISRA-C Compliance +******************************************************************************** +* +* The MISRA-C Compliant verification is not performed for Beta release. +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
MISRA RuleRule Class (Required/Advisory)Rule DescriptionDescription of Deviation(s)
11.4AA cast should not be performed between a pointer to object type and +* a different pointer to object type.A cast involving pointers is conducted with caution that the pointers +* are correctly aligned for the type of object being pointed to. +*
11.5RA cast shall not be performed that removes any const or volatile +* qualification from the type addressed by a pointer. +* +* 1. All device descriptors are stored in flash. On the USB Host get descriptor +* request, the pointer to descriptor is assigned to a pointer that manages data +* transfer losing const qualification. Despite the qualification being lost, the +* middleware does not perform any write access using this pointer. +* +* 2. Some device characteristics are stored in volatile variables. +* On the USB Host request, the pointer to a characteristic variable is assigned to +* a pointer that manages data transfer losing volatile qualification. +* Despite the qualification being lost, this does not cause any +* negative impact because the data transfer is managed by the interrupt handler. +* The same happens when these variables are passed as parameters to memcpy or +* memset function. +*
14.7RA function shall have a single point of exit at the end of the +* function.The functions can return from several points. This is typically +* done to improve code clarity when returning error status code if +* input parameters validation fails.
16.7AA pointer parameter in a function prototype should be declared as a +* pointer to const if the pointer is not used to modify the addressed +* object.The usbfs driver and middleware defines general function +* prototypes and pointers to functions types but the function's +* implementation depends on configuration. Therefore, +* some functions' implementation require parameters to be pointers to +* const. This is not met because of the generalized implementation +* approach.
+* +******************************************************************************** +* \section section_usb_dev_errata Errata +******************************************************************************** +* +* This section lists the known problems with the USB Device middleware. +* +* +* +* +* +* +* +* +* +* +* +* +* +*
Cypress IDKnown IssueWorkaround
DRIVERS-1401 +* 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. +*
DRIVERS-1427 +* 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. +* \snippet usb_dev/snippet/main.c snippet_WorkaroundDmaResume +*
+* +******************************************************************************** +* \section group_usb_dev_changelog Changelog +******************************************************************************** +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +* +*
VersionChangesReason for Change
2.0Updated the internal processing to support USBFS driver updates.The USBFS driver is updated to v2.0.
Moved the timeout from Cy_USB_Dev_AbortEpTransfer() to the driver layer. +* The maximum function's wait time is significantly reduced.Align with the changes of the USBFS driver.
Changed the functions parameter name and the structure member name class to classObj.Fixed the ambiguity related to the usage of the C++ keyword class as a name.
Enclosed middleware sources within a conditional compilation to +* exclude the USB Device middleware for devices without USB hardware.Fixed a compilation error for devices without USB hardware.
Updated the major and minor version defines to follow the naming convention.
1.0The initial version.
+* +******************************************************************************** +* \section group_usb_dev_more_information More Information +******************************************************************************** +* +* For more detail, refer to the following documents: +* +* * +* PSoC 6 Peripheral Driver Library API Reference +* +* * +* ModusToolbox Software Environment, Quick Start Guide, Documentation, and +* Videos +* +* * +* PSoC 6 SDK Examples +* +* * ModusToolbox USB +* Configurator Tool Guide +* +* * ModusToolbox +* Device Configurator Tool Guide +* +* * PSoC 6 WiFi-BT +* Pioneer Kit +* +* * PSoC 6 Wi-Fi BT +* Prototyping Kit +* +* * PSoC 6 MCU Datasheets +* +* * PSoC 6 MCU Application Notes +* +* * PSoC 6 MCU Technical Reference +* Manuals +* +* * Cypress Semiconductor +* +* \note +* The links to the other software component’s documentation (middleware and PDL) +* point to GitHub to the software latest available version. +* To get documentation of the specified version, download from GitHub and unzip +* the component archive. The documentation is available in the docs folder. +* +******************************************************************************** +* \defgroup group_usb_device Device +* This section provides an API description for the core functionality of the +* USB Device: initialization, status information, data transfers, and class +* support. +* \{ +* \defgroup group_usb_dev_macros Macros +* \{ +* \defgroup group_usb_dev_macros_device_descr Descriptors +* \} +* +* \defgroup group_usb_dev_functions Functions +* \{ +* \defgroup group_usb_dev_functions_common Initialization Functions +* \defgroup group_usb_dev_functions_service Service Functions +* \defgroup group_usb_dev_functions_data_transfer Data Transfer Functions +* \defgroup group_usb_dev_functions_vendor_support Vendor Request Support Functions +* \defgroup group_usb_dev_functions_class_support Class Support Functions +* \} +* +* \defgroup group_usb_dev_data_structures Data Structures +* \{ +* \defgroup group_usb_dev_structures_device Device Information +* \defgroup group_usb_dev_structures_device_descr Device Descriptors +* \defgroup group_usb_dev_structures_control Control Transfer +* \defgroup group_usb_dev_structures_class Class Support +* \defgroup group_usb_dev_structures_func_ptr Function Pointers +* \} +* +* \defgroup group_usb_dev_enums Enumerated Types +* \} +* +* \defgroup group_usb_dev_audio Audio Class +* \defgroup group_usb_dev_cdc CDC Class +* \defgroup group_usb_dev_hid HID Class +* +*/ + + +#if !defined(CY_USB_DEV_H) +#define CY_USB_DEV_H + +#include +#include +#include +#include + +#include "cy_usbfs_dev_drv.h" +#include "cy_usb_dev_descr.h" + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + +/** +* \addtogroup group_usb_dev_macros +* \{ +*/ + +/******************************************************************************* +* Middleware Version +*******************************************************************************/ + +/** USB Device Middleware major version */ +#define CY_USB_DEV_MW_VERSION_MAJOR (2) + +/** USB Device Middleware minor version */ +#define CY_USB_DEV_MW_VERSION_MINOR (0) + +/** USB Device Middleware identifier */ +#define CY_USB_DEV_ID CY_PDL_DRV_ID(0x08U) + +/** Maximum number of interfaces (this equals to the maximum number of hardware +* endpoints where each interface has at least one endpoint). +*/ +#define CY_USB_DEV_NUM_INTERFACES_MAX CY_USBFS_DEV_DRV_NUM_EPS_MAX + +/** USBFS Device endpoint 0 packet size */ +#define CY_USB_DEV_EP0_PACKET_SIZE CY_USBFS_DEV_DRV_EP0_BUFFER_SIZE + +/** Length of serial string number generated from silicon ID */ +#define CY_USB_DEV_SN_STRING_LENGTH (32U) + +/** Length of serial string number */ +#define CY_USB_DEV_SN_STRING_DESR_LENGTH (CY_USB_DEV_SN_STRING_LENGTH + 2U) +/** \} group_usb_dev_macros */ + + +/******************************************************************************* +* Enumerated Types +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_enums +* \{ +*/ + +/** USBFS Device return codes */ +typedef enum +{ + /** Operation completed successfully */ + CY_USB_DEV_SUCCESS = 0U, + + /** One or more input parameters are invalid */ + CY_USB_DEV_BAD_PARAM = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 1U), + + /** The request is not handled */ + CY_USB_DEV_REQUEST_NOT_HANDLED = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 2U), + + /** Timeout occurred for the operation */ + CY_USB_DEV_TIMEOUT = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 3U), + + /** The hardware is busy executing previous operation */ + CY_USB_DEV_DRV_HW_BUSY = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 4U), + + /** The hardware is disabled */ + CY_USB_DEV_DRV_HW_DISABLED = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 5U), + + /** The hardware error occurred during operation */ + CY_USB_DEV_DRV_HW_ERROR = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 6U), + +} cy_en_usb_dev_status_t; + +/** Device states */ +typedef enum +{ + CY_USB_DEV_DISABLED, /**< Device is disabled */ + CY_USB_DEV_ATTACHED, /**< Device is attached */ + CY_USB_DEV_POWERED, /**< Device is powered */ + CY_USB_DEV_DEFAULT, /**< Device is in default state (after bus reset) */ + CY_USB_DEV_ADDRESSED, /**< Device set address (device is ready to communicate using this address) */ + CY_USB_DEV_CONFIGURED /**< Device is configured (device is ready to communicate using data endpoints) */ +} cy_en_usb_dev_state_t; + +/** Power Status */ +typedef enum +{ + CY_USB_DEV_STATUS_BUS_POWERED, /**< Device is bus powered */ + CY_USB_DEV_STATUS_SELF_POWERED /**< Device is self powered */ +} cy_en_usb_dev_power_status_t; + +/** Callback events */ +typedef enum +{ + CY_USB_DEV_EVENT_BUS_RESET, /**< Bus Reset detected */ + CY_USB_DEV_EVENT_SET_CONFIG, /**< SET_CONFIGURATION request received */ + CY_USB_DEV_EVENT_SET_INTERFACE /**< SET_INTERFACE request received */ +} cy_en_usb_dev_callback_events_t; +/** \} group_usb_dev_enums */ + + +/******************************************************************************* +* Type Definitions +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_structures_control +* \{ +*/ + +/** Parsed bmRequest */ +typedef struct +{ + uint8_t direction; /**< Transfer direction */ + uint8_t type; /**< Transfer type */ + uint8_t recipient; /**< Transfer recipient */ +} cy_stc_usb_dev_bm_request; + +/** Store request */ +typedef struct +{ + cy_stc_usb_dev_bm_request bmRequestType; /**< Request type */ + uint8_t bRequest; /**< Request value */ + uint16_t wValue; /**< Request value (2 bytes) */ + uint16_t wIndex; /**< Request index (2 bytes) */ + uint16_t wLength; /**< Request length (2 bytes) */ +} cy_stc_usb_dev_setup_packet_t; + +/** Execute transfer use this structure */ +typedef struct +{ + cy_stc_usb_dev_setup_packet_t setup; /**< Request packet */ + uint8_t *ptr; /**< Pointer to data to transfer or space to store data */ + uint8_t *buffer; /**< Pointer to buffer to store data send from host to device during control transfer */ + uint16_t remaining; /**< Number of bytes remaining to complete send or receive */ + uint16_t size; /**< Number of bytes to send or receive */ + uint16_t bufferSize; /**< Size of the buffer to store data */ + uint8_t direction; /**< Transfer direction */ + bool zlp; /**< Defines whether zero length packet is needed to complete data stage */ + bool notify; /**< Defines whether trigger callback that notifies end of data stage (device received data) */ +} cy_stc_usb_dev_control_transfer_t; + +/** \} group_usb_dev_structures_control */ + + +/** \cond INTERNAL */ +/** Get compiler know what is cy_stc_usb_dev_context. +* The cy_stc_usb_dev_context_t is defined below. +*/ +struct cy_stc_usb_dev_context; +/** \endcond */ + + +/** +* \addtogroup group_usb_dev_structures_func_ptr +* \{ +*/ + +/** +* Pointer to a function that implements a callback for the following events: +* Bus Reset detected, SET_CONFIGURATION request received and SET_INTERFACE request +* received. The notified events are defined by event argument +* (see \ref cy_en_usb_dev_callback_events_t). +* Only one event is notified when callback invoked. +* This callback invoked in the USB interrupt handler context and must be short +* as possible. \n +* Input arguments: +* * Bus Reset detected event: ignore wValue and wIndex arguments. +* * SET_CONFIGURATION request received event: the wValue is new configuration +* value and wIndex can be ignored. +* * SET_CONFIGURATION request received event: the wValue is new alternative +* setting value and wIndex interface value to which alternate belongs. \n +* +* The returned status defines following operation: +* * Bus Reset detected event: status is ignored and event processing is passed to +* class event handlers. +* * SET_CONFIGURATION or SET_INTERFACE received event: the returned status defines +* following request processing. If returned status fail the request is +* STALLed and event notification stops. +* If returned status is success the event is notified to the appropriate class +* event handlers which status defines request response STALL or ACK. +*/ +typedef cy_en_usb_dev_status_t (* cy_cb_usb_dev_events_callback_t)(cy_en_usb_dev_callback_events_t event, + uint32_t wValue, uint32_t wIndex, + struct cy_stc_usb_dev_context *devContext); + +/** +* Pointer to a function that implements a timeout handler. The function accepts the +* number of milliseconds that remain to wait before timeout expires. +* This returns the number of milliseconds remaining to wait minus the milliseconds +* that have elapsed inside the function. +*/ +typedef int32_t (* cy_fn_usb_dev_handle_timeout_ptr_t)(int32_t milliseconds); + +/** +* Pointer to function that returns pointer to uint8_t array, which contains a serial number string +* and accepts the device context \ref cy_stc_usb_dev_context_t. +* This type is used to define a callback that returns serial number string. +*/ +typedef uint8_t * (* cy_fn_usb_dev_sn_string_ptr_t)(void); + +/** +* Pointer to function that returns nothing and accepts a pointer to void and a pointer to \ref cy_stc_usb_dev_context_t. +* This type is used to define a callback that notifies the class about a bus reset event. +*/ +typedef void (* cy_cb_usb_dev_bus_reset_t)(void *classData, struct cy_stc_usb_dev_context *devContext); + +/** +* Pointer to function that returns the status of operation and accepts received configuration number, +* pointer to class context, and pointer to device context \ref cy_stc_usb_dev_context_t. +* This type is used to define a callback that notifies the class about a set configuration request event. +*/ +typedef cy_en_usb_dev_status_t (* cy_cb_usb_dev_set_config_t)(uint32_t configuration, void *classData, + struct cy_stc_usb_dev_context *devContext); + +/** +* Pointer to function that returns the status of operation and accepts received interface +* alternate settings number, pointer to class context, and pointer to device context \ref cy_stc_usb_dev_context_t. +* This type is used to define a callback that notifies the class about a set interface request event. +*/ +typedef cy_en_usb_dev_status_t (* cy_cb_usb_dev_set_interface_t)(uint32_t interface, uint32_t alternate, + void *classContext, + struct cy_stc_usb_dev_context *devContext); + +/** +* Pointer to function that returns the status of operation and accepts pointer to received control transfer +* number, pointer to class context, and pointer to device context \ref cy_stc_usb_dev_context_t. +* This type is used to define a callback that notifies the class about a request received event. +*/ +typedef cy_en_usb_dev_status_t (* cy_cb_usb_dev_request_received_t)(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + struct cy_stc_usb_dev_context *devContext); + +/** +* Pointer to function that returns status of operation and accepts pointer to received control transfer +* number, pointer to class context, and pointer to device context \ref cy_stc_usb_dev_context_t. +* This type is used to define a callback that notifies the class that a request completed (data is received in +* response for current request) event. +*/ +typedef cy_en_usb_dev_status_t (* cy_cb_usb_dev_request_cmplt_t)(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + struct cy_stc_usb_dev_context *devContext); + +/** \} group_usb_dev_structures_func_ptr */ + +/** +* \addtogroup group_usb_dev_structures_class +* \{ +*/ + +/** Class support definition - each class must provide this structure */ +typedef struct +{ + /** Called after bus reset is serviced. Initialize Class here */ + cy_cb_usb_dev_bus_reset_t busReset; + + /** + * Called after Set Configuration request is received. + * The endpoint available for this configuration must be configured here. + * Returns status of the event processing. + */ + cy_cb_usb_dev_set_config_t setConfiguration; + + /** + * Called after Set Interface request is received. + * Probably the endpoint configuration requires correction here. + * Returns status of the event processing. + */ + cy_cb_usb_dev_set_interface_t setInterface; + + /** + * This function is called when a setup packet was received from the USB Host but + * was not recognized. Therefore, it might require the user to do the class processing. + */ + cy_cb_usb_dev_request_received_t requestReceived; + + /** + * This function is called when the USB Device received data from the USB Host + * as part of current request processing. The requestReceivedHandle function + * must enable notification to trigger this event. This makes sense only when CDC + * request processing requires a data stage. + */ + cy_cb_usb_dev_request_cmplt_t requestCompleted; + +} cy_stc_usb_dev_class_t; + + +/** Class linked list element. It includes class and class data pointers +* and pointer to the next class linked list element. +*/ +typedef struct cy_stc_usb_dev_class_ll_item +{ + /** Next item in the class driver linked list */ + struct cy_stc_usb_dev_class_ll_item *next; + + /** Pointer to the class structure */ + cy_stc_usb_dev_class_t *classObj; + + /** Pointer to the class data (context) */ + void *classData; + +} cy_stc_usb_dev_class_ll_item_t; +/** \} group_usb_dev_structures_class */ + + +/** +* \addtogroup group_usb_dev_data_structures +* \{ +*/ +/** USB Device configuration structure */ +typedef struct +{ + /** Pointer to the buffer to store data received from the USB Host through + * Endpoint 0. The buffer size must be large enough to store received data + * for all supported requests. + */ + uint8_t *ep0Buffer; + + /** Buffer size for Endpoint 0 */ + uint16_t ep0BufferSize; + +} cy_stc_usb_dev_config_t; + + +/** USB Device context structure. +* All fields for the USB Device context structure are internal. Firmware never +* reads or writes these values. Firmware allocates the structure and provides +* the address of the structure to the middleware in function calls. Firmware +* must ensure that the defined instance of this structure remains in scope while +* the middleware is in use. +*/ +typedef struct cy_stc_usb_dev_context +{ + /** \cond INTERNAL*/ + + /** Device state */ + volatile cy_en_usb_dev_state_t state; + + /** Configuration changed status */ + volatile bool configChanged; + + /** Device status */ + volatile uint8_t status; + + /** Device configuration */ + volatile uint8_t configuration; + + /** Device interface alternate settings */ + volatile uint8_t alternate[CY_USB_DEV_NUM_INTERFACES_MAX]; + + /** Storage for serial number string descriptor (constructed from silicon ID) */ + uint8_t serialNumDescr[CY_USB_DEV_SN_STRING_DESR_LENGTH]; + + /** Pointer to function that implements timeout in milliseconds */ + cy_fn_usb_dev_handle_timeout_ptr_t handleTimeout; + + /** Control transfer data */ + cy_stc_usb_dev_control_transfer_t ControlTransfer; + + /** Pointers to structure that describes device */ + const cy_stc_usb_dev_device_t *devDescriptors; + + /** Pointer to function that returns serial string */ + cy_fn_usb_dev_sn_string_ptr_t getSerialNumString; + + /** Callback for events: bus reset, set configuration and set interface */ + cy_cb_usb_dev_events_callback_t eventsCallback; + + /** Vendor-Specific callback to handle Setup packet received event */ + cy_cb_usb_dev_request_received_t vndRequestReceived; + + /** Vendor-Specific callback to handle notification that OUT stage is completed */ + cy_cb_usb_dev_request_cmplt_t vndRequestCompleted; + + /** Pointer to linked list of class structures */ + cy_stc_usb_dev_class_ll_item_t *classRoot; + + /** Pointer to driver base address */ + USBFS_Type *drvBase; + + /** Pointer to driver context */ + struct cy_stc_usbfs_dev_drv_context *drvContext; + + /** \endcond */ +} cy_stc_usb_dev_context_t; +/** \} group_usb_dev_data_structures */ + + +/******************************************************************************* +* Function Prototypes +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_functions_common +* \{ +*/ +cy_en_usb_dev_status_t Cy_USB_Dev_Init(USBFS_Type *base, + struct cy_stc_usbfs_dev_drv_config const *drvConfig, + struct cy_stc_usbfs_dev_drv_context *drvContext, + cy_stc_usb_dev_device_t const *device, + cy_stc_usb_dev_config_t const *config, + cy_stc_usb_dev_context_t *context); + +void Cy_USB_Dev_DeInit(cy_stc_usb_dev_context_t *context); +cy_en_usb_dev_status_t Cy_USB_Dev_Connect(bool blocking, int32_t timeout, + cy_stc_usb_dev_context_t *context); +void Cy_USB_Dev_Disconnect(cy_stc_usb_dev_context_t *context); +/** \} group_usb_dev_functions_common */ + + +/** +* \addtogroup group_usb_dev_functions_service +* \{ +*/ +__STATIC_INLINE void Cy_USB_Dev_RegisterEventsCallback(cy_cb_usb_dev_events_callback_t callback, + cy_stc_usb_dev_context_t *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_GetConfiguration (cy_stc_usb_dev_context_t const *context); +__STATIC_INLINE uint32_t Cy_USB_Dev_GetAlternateSettings (uint32_t interface, + cy_stc_usb_dev_context_t const *context); +__STATIC_INLINE bool Cy_USB_Dev_IsConfigurationChanged(cy_stc_usb_dev_context_t *context); + +__STATIC_INLINE bool Cy_USB_Dev_IsRemoteWakeupEnabled(cy_stc_usb_dev_context_t const *context); +__STATIC_INLINE void Cy_USB_Dev_SetPowerStatus (cy_en_usb_dev_power_status_t status, + cy_stc_usb_dev_context_t *context); + +__STATIC_INLINE uint8_t* Cy_USB_Dev_GetSerialNumberString(cy_stc_usb_dev_context_t *context); +__STATIC_INLINE void Cy_USB_Dev_RegisterSerialNumStringCallback(cy_fn_usb_dev_sn_string_ptr_t callback, + cy_stc_usb_dev_context_t *context); +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlRead(cy_stc_usb_dev_control_transfer_t *transfer, + uint8_t *ptr, + uint32_t size); + +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWrite(cy_stc_usb_dev_control_transfer_t *transfer, + uint32_t size); + +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWriteResult(cy_stc_usb_dev_control_transfer_t const *transfer, + uint8_t *ptr); +/** \cond INTERNAL */ +__STATIC_INLINE uint32_t Cy_USB_Dev_GetConfigurationIdx(cy_stc_usb_dev_context_t const *context); +/** \endcond */ + +/** \} group_usb_dev_functions_service */ + + +/** +* \addtogroup group_usb_dev_functions_data_transfer +* \{ +*/ +cy_en_usb_dev_status_t Cy_USB_Dev_StartReadEp(uint32_t endpoint, + cy_stc_usb_dev_context_t *context); + +cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpBlocking(uint32_t endpoint, + uint8_t *buffer, + uint32_t size, + uint32_t *actSize, + int32_t timeout, + cy_stc_usb_dev_context_t *context); + +cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpNonBlocking(uint32_t endpoint, + uint8_t *buffer, + uint32_t size, + uint32_t *actSize, + cy_stc_usb_dev_context_t *context); + +cy_en_usb_dev_status_t Cy_USB_Dev_AbortEpTransfer(uint32_t endpoint, + cy_stc_usb_dev_context_t *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_GetEpNumToRead(uint32_t endpoint, + cy_stc_usb_dev_context_t const *context); + + +cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpBlocking(uint32_t endpoint, + uint8_t const *buffer, + uint32_t size, + int32_t timeout, + cy_stc_usb_dev_context_t *context); + +cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpNonBlocking(uint32_t endpoint, + uint8_t const *buffer, + uint32_t size, + cy_stc_usb_dev_context_t *context); + +__STATIC_INLINE void Cy_USB_Dev_OverwriteHandleTimeout(cy_fn_usb_dev_handle_timeout_ptr_t handleTimeout, + cy_stc_usb_dev_context_t *context); +/** \} group_usb_dev_functions_data_transfer */ + + +/** +* \addtogroup group_usb_dev_functions_class_support +* \{ +*/ +cy_en_usb_dev_status_t Cy_USB_Dev_RegisterClass(cy_stc_usb_dev_class_ll_item_t *classItem, + cy_stc_usb_dev_class_t *classObj, + void *classContext, + cy_stc_usb_dev_context_t *context); + +__STATIC_INLINE void Cy_USB_Dev_RegisterClassBusResetCallback(cy_cb_usb_dev_bus_reset_t callback, + cy_stc_usb_dev_class_t *classObj); + +__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetConfigCallback(cy_cb_usb_dev_set_config_t callback, + cy_stc_usb_dev_class_t *classObj); + +__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetInterfaceCallback(cy_cb_usb_dev_set_interface_t callback, + cy_stc_usb_dev_class_t *classObj); + +__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestRcvdCallback(cy_cb_usb_dev_request_received_t callback, + cy_stc_usb_dev_class_t *classObj); + +__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestCmpltCallback(cy_cb_usb_dev_request_cmplt_t callback, + cy_stc_usb_dev_class_t *classObj); +/** \} group_usb_dev_functions_class_support */ + +/** +* \addtogroup group_usb_dev_functions_vendor_support +* \{ +*/ +__STATIC_INLINE void Cy_USB_Dev_RegisterVendorCallbacks(cy_cb_usb_dev_request_received_t requestReceivedHandle, + cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, + cy_stc_usb_dev_context_t *context); +/** \} group_usb_dev_functions_vendor_support */ + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_macros +* \{ +*/ + +/** Timeout value that defines wait forever */ +#define CY_USB_DEV_WAIT_FOREVER (0) + +/** Allocates static buffer for data endpoint. The size parameter must be a constant. +* The allocated buffer is aligned on a 2 byte boundary. An odd buffer size is +* converted to even consuming 1 extra byte. The application must discard this +* extra byte. This manipulation is needed to support different 8-bit and 16-bit +* hardware buffer access types in the driver (See Hardware Buffer Access +* section of the USBFS driver for more information). +*/ +#define CY_USB_DEV_ALLOC_ENDPOINT_BUFFER(buf, size) CY_USBFS_DEV_DRV_ALLOC_ENDPOINT_BUFFER(buf,size) + +/* bmRequestType.Type: transfer direction */ +#define CY_USB_DEV_DIR_HOST_TO_DEVICE (0U) /**< Transfer direction from Host to Device (setup packet) */ +#define CY_USB_DEV_DIR_DEVICE_TO_HOST (1U) /**< Transfer direction from Device to Host (setup packet) */ + +/* bmRequestType.Type */ +#define CY_USB_DEV_STANDARD_TYPE (0U) /**< Standard request type (setup packet) */ +#define CY_USB_DEV_CLASS_TYPE (1U) /**< Class-specific request type (setup packet) */ +#define CY_USB_DEV_VENDOR_TYPE (2U) /**< Vendor-specific request type (setup packet) */ +#define CY_USB_DEV_RESERVED_TYPE (3U) /**< Reserved request type (setup packet) */ + +/* bmRequestType.Recipient */ +#define CY_USB_DEV_RECIPIENT_DEVICE (0U) /**< Request recipient device (setup packet) */ +#define CY_USB_DEV_RECIPIENT_INTERFACE (1U) /**< Request recipient interface (setup packet) */ +#define CY_USB_DEV_RECIPIENT_ENDPOINT (2U) /**< Request recipient endpoint (setup packet) */ +#define CY_USB_DEV_RECIPIENT_OTHER (3U) /**< Request recipient other (setup packet) */ + +/* USB v2.0 spec: Table 9-4. Standard Request Codes */ +#define CY_USB_DEV_RQST_GET_STATUS (0U) /**< GET_STATUS standard request */ +#define CY_USB_DEV_RQST_CLEAR_FEATURE (1U) /**< CLEAR_FEATURE standard request */ +#define CY_USB_DEV_RQST_SET_FEATURE (3U) /**< SET_FEATURE standard request */ +#define CY_USB_DEV_RQST_SET_ADDRESS (5U) /**< SET_ADDRESS standard request */ +#define CY_USB_DEV_RQST_GET_DESCRIPTOR (6U) /**< GET_DESCRIPTOR standard request */ +#define CY_USB_DEV_RQST_SET_DESCRIPTOR (7U) /**< SET_DESCRIPTOR standard request */ +#define CY_USB_DEV_RQST_GET_CONFIGURATION (8U) /**< GET_CONFIGURATION standard request */ +#define CY_USB_DEV_RQST_SET_CONFIGURATION (9U) /**< SET_CONFIGURATION standard request */ +#define CY_USB_DEV_RQST_GET_INTERFACE (10U) /**< GET_INTERFACE standard request */ +#define CY_USB_DEV_RQST_SET_INTERFACE (11U) /**< SET_INTERFACE standard request */ +#define CY_USB_DEV_RQST_SYNCH_FRAME (12U) /**< SYNCH_FRAME standard request */ + +/* USB v2.0 spec: Table 9-6. Standard Feature Selectors */ +#define CY_USB_DEV_DEVICE_REMOTE_WAKEUP (1U) /**< REMOTE_WAKEUP feature selector */ +#define CY_USB_DEV_ENDPOINT_HALT (0U) /**< ENDPOINT_HALT feature selector */ +#define CY_USB_DEV_ENDPOINT_STATUS_HALT (1U) /**< ENDPOINT_STATUS_HALT feature selector */ +#define CY_USB_DEV_TEST_MODE (2U) /**< TEST_MODE feature selector */ + +/** \cond INTERNAL */ +/* Vendor Specific Request: Microsoft OS String Descriptor */ +#define CY_USB_DEV_RQST_GET_EXTENDED_CONFIG_DESCR (0x01U) + +/* Start position of SN string in SN string descriptor */ +#define CY_USB_DEV_STRING_DESCR_SN_STR_POS (2U) + +/* USB v2.0 spec: Table 9-5. Descriptor Types */ +#define CY_USB_DEV_GET_DESCR_TYPE(wValue) (CY_HI8(wValue)) +#define CY_USB_DEV_GET_DESCR_IDX(wValue) (CY_LO8(wValue)) + +/* Device status */ +#define CY_USB_DEV_STATUS_BUS_POWERED_MASK (0x0U) +#define CY_USB_DEV_STATUS_SELF_POWERED_MASK (0x1U) +#define CY_USB_DEV_STATUS_REMOTE_WAKEUP_MASK (0x2U) + +/* Endpoint direction bit */ +#define CY_USB_DEV_EP_IN_DIRECTION (0x80U) +#define CY_USB_DEV_EP_NUM_MASK (0x0FU) + +#define CY_USB_DEV_EPADDR2EP(endpointAddr) ((uint32_t) (endpointAddr) & CY_USB_DEV_EP_NUM_MASK) +#define CY_USB_DEV_IS_EP_DIR_IN(endpointAddr) (0U != ((endpointAddr) & CY_USB_DEV_EP_IN_DIRECTION)) +#define CY_USB_DEV_IS_EP_DIR_OUT(endpointAddr) (0U == ((endpointAddr) & CY_USB_DEV_EP_IN_DIRECTION)) + +#if (CY_CPU_CORTEX_M0P) + #define CY_USB_DEV_GET_CFG_WORD(addr) ( (uint16_t) (((uint16_t) (* (((uint8_t const *) (addr)) + 1U))) << 8U) | \ + (* (( uint8_t const *) (addr))) ) +#else + #define CY_USB_DEV_GET_CFG_WORD(addr) (* ((uint16_t const *) (addr)) ) +#endif + +/* +* These defines are obsolete and kept for backward compatibility only. +* They will be removed in the future versions. +*/ +#define CY_USB_DEV_VERSION_MAJOR (CY_USB_DEV_MW_VERSION_MAJOR) +#define CY_USB_DEV_VERSION_MINOR (CY_USB_DEV_MW_VERSION_MINOR) + +/** \endcond */ + +/** \} group_usb_dev_macros */ + + +/******************************************************************************* +* In-line Function Implementation +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_functions_service +* \{ +*/ +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterEventsCallback +****************************************************************************//** +* +* Registers a callback function to notify number of events: Bus Reset detected, +* SET_CONFIGURATION request received and SET_INTERFACE request received. +* To remove the callback function, pass NULL as the function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterEventsCallback(cy_cb_usb_dev_events_callback_t callback, + cy_stc_usb_dev_context_t *context) +{ + context->eventsCallback = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_GetConfiguration +****************************************************************************//** +* +* Returns USB Device configuration. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Configuration value. The configuration value is 0 until USB Device +* was not enumerated by the USB Host. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_GetConfiguration(cy_stc_usb_dev_context_t const *context) +{ + return (uint32_t) context->configuration; +} + + +/** \cond INTERNAL */ +/******************************************************************************* +* Function Name: Cy_USB_Dev_GetConfigurationIdx +****************************************************************************//** +* +* This function returns current USB Device configuration index. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Configuration index. If device is not configured, returns 0. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_GetConfigurationIdx(cy_stc_usb_dev_context_t const *context) +{ + uint32_t configIdx = 0UL; + + if (CY_USB_DEV_CONFIGURED == context->state) + { + configIdx = (uint32_t) context->configuration - 1UL; + } + + return configIdx; +} +/** \endcond */ + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_GetAlternateSettings +****************************************************************************//** +* +* Returns alternate setting for a certain interface. +* This function is useful to determine which alternate settings are active for +* a certain interface. +* +* \param interface +* Interface number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Alternate settings value. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_GetAlternateSettings(uint32_t interface, + cy_stc_usb_dev_context_t const *context) +{ + CY_ASSERT_L1(interface <= CY_USB_DEV_NUM_INTERFACES_MAX); + + return (uint32_t) context->alternate[interface]; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_IsConfigurationChanged +****************************************************************************//** +* +* Returns configuration state that is cleared after read. +* This function is useful to determine which configuration or alternate settings +* of the interface were changed. After configuration state has been changed, +* \ref group_usb_dev_functions_data_transfer functions should be used to start +* communication with the USB Host. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* True - if configuration has been changed since last call. False - otherwise. +* +* \note +* This function is not interrupt-protected and to prevent a race condition, +* it should be protected from the USBFS interruption in the place where it +* is called. +* +*******************************************************************************/ +__STATIC_INLINE bool Cy_USB_Dev_IsConfigurationChanged(cy_stc_usb_dev_context_t *context) +{ + bool isChanged = context->configChanged; + + if (isChanged) + { + context->configChanged = false; + } + + return isChanged; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_SetPowerStatus +****************************************************************************//** +* +* Sets Power status to report it when USB Host issues GET_STATUS standard +* requests. Call this function any time when power source is changed from +* Self-Powered to Bus-Powered or vice versa. +* +* \param status +* Power status \ref cy_en_usb_dev_power_status_t +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_SetPowerStatus(cy_en_usb_dev_power_status_t status, + cy_stc_usb_dev_context_t *context) +{ + if (status == CY_USB_DEV_STATUS_SELF_POWERED) + { + context->status |= (uint8_t) CY_USB_DEV_STATUS_SELF_POWERED_MASK; + } + else + { + context->status &= (uint8_t) ~CY_USB_DEV_STATUS_SELF_POWERED_MASK; + } +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_IsRemoteWakeupEnabled +****************************************************************************//** +* +* Returns Remote Wakeup status. +* This function is useful to determine whether Remote Wakeup was enabled by the USB +* Host when USB Device supports this option. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* True - if Remote Wakeup was enabled by the USB Host. False - otherwise. +* +*******************************************************************************/ +__STATIC_INLINE bool Cy_USB_Dev_IsRemoteWakeupEnabled(cy_stc_usb_dev_context_t const *context) +{ + return (0U != (context->status & CY_USB_DEV_STATUS_REMOTE_WAKEUP_MASK)); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_GetSerialNumberString +****************************************************************************//** +* +* Returns pointer to the serial number string generated from silicon ID. +* The string length is \ref CY_USB_DEV_SN_STRING_LENGTH. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* The pointer to the serial number string. +* +*******************************************************************************/ +__STATIC_INLINE uint8_t* Cy_USB_Dev_GetSerialNumberString(cy_stc_usb_dev_context_t *context) +{ + return &context->serialNumDescr[CY_USB_DEV_STRING_DESCR_SN_STR_POS]; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterSerialNumStringCallback +****************************************************************************//** +* +* Registers a callback function that returns the serial string descriptor when +* it is requested by the USB Host. +* +* \param callback +* The pointer to a callback function. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterSerialNumStringCallback(cy_fn_usb_dev_sn_string_ptr_t callback, + cy_stc_usb_dev_context_t *context) +{ + context->getSerialNumString = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_SetupControlRead +****************************************************************************//** +* +* Setup control read (Host reads) transfer. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param ptr +* The pointer to the data which will be read by the Host. +* +* \param size +* Number of bytes to read. +* +* \return +* Returns \ref CY_USB_DEV_SUCCESS (there is input parameters verification). +* +*******************************************************************************/ +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlRead(cy_stc_usb_dev_control_transfer_t *transfer, + uint8_t *ptr, + uint32_t size) +{ + /* Setup control transfer (Host reads) */ + transfer->ptr = ptr; + transfer->remaining = (uint16_t) size; + + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_SetupControlWrite +****************************************************************************//** +* +* Setup control write transfer (Host writes) and sets \ref CY_USB_DEV_SUCCESS status +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param size +* Number of bytes which Host is allowed to write. +* +* \return +* Returns \ref CY_USB_DEV_SUCCESS (there is input parameters verification). +* +*******************************************************************************/ +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWrite(cy_stc_usb_dev_control_transfer_t *transfer, + uint32_t size) +{ + /* Setup control transfer (Host writes) */ + transfer->remaining = (uint16_t) size; + transfer->notify = true; + + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_SetupControlWriteResult +****************************************************************************//** +* +* Copies data received from the Host into the specified memory location. There +* must provide enough place to store number of bytes provided in +* \ref Cy_USB_Dev_SetupControlWrite. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param ptr +* The pointer to the memory location to copy to. +* +* \return +* Returns \ref CY_USB_DEV_SUCCESS (there is input parameters verification). +* +*******************************************************************************/ +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWriteResult(cy_stc_usb_dev_control_transfer_t const *transfer, + uint8_t *ptr) +{ + /* Copy data from internal buffer to the user provided location */ + (void) memcpy(ptr, transfer->buffer, (uint32_t) transfer->size); + + return CY_USB_DEV_SUCCESS; +} +/** \} group_usb_dev_functions_service */ + + +/** +* \addtogroup group_usb_dev_functions_data_transfer +* \{ +*/ +/******************************************************************************* +* Function Name: Cy_USB_Dev_GetEpNumToRead +****************************************************************************//** +* +* Returns the number of bytes that available to be read from a certain +* endpoint buffer. Before calling this function ensure that the Host wrote data +* into the endpoint. The returned value is updated after the Host access to the +* endpoint but remains unchanged after data has been read from the endpoint +* buffer. +* +* \param endpoint +* The OUT data endpoint number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \return +* Number of bytes in OUT endpoint buffer. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_GetEpNumToRead(uint32_t endpoint, + cy_stc_usb_dev_context_t const *context) +{ + return Cy_USBFS_Dev_Drv_GetEndpointCount(context->drvBase, endpoint); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_OverwriteHandleTimeout +****************************************************************************//** +* +* Overwrite the handle timeout function that is implemented internally. +* The internal implementation converts one timeout unit to milliseconds. +* +* \param handleTimeout +* The pointer to function to be executed to handle timeout for blocking +* operations. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_OverwriteHandleTimeout(cy_fn_usb_dev_handle_timeout_ptr_t handleTimeout, + cy_stc_usb_dev_context_t *context) +{ + context->handleTimeout = handleTimeout; +} +/** \} group_usb_dev_functions_data_transfer */ + +/** +* \addtogroup group_usb_dev_functions_class_support +* \{ +*/ +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterClassBusResetCallback +****************************************************************************//** +* +* Registers a callback function to notify a certain class about a Bus Reset event. +* To remove the callback function, pass NULL as the function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param classObj +* The pointer to the class structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterClassBusResetCallback(cy_cb_usb_dev_bus_reset_t callback, + cy_stc_usb_dev_class_t *classObj) +{ + classObj->busReset = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterClassSetConfigCallback +****************************************************************************//** +* +* Registers a callback function to notify a certain class that SET_CONFIGURATION +* request was received from USB Host. +* To remove the callback function, pass a NULL as the function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param classObj +* The pointer to the class structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetConfigCallback(cy_cb_usb_dev_set_config_t callback, + cy_stc_usb_dev_class_t *classObj) + +{ + classObj->setConfiguration = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterClassSetInterfaceCallback +****************************************************************************//** +* +* Registers a callback function to notify a certain class that SET_INTERFACE +* request was received from the USB Host. +* To remove the callback function, pass a NULL as the function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param classObj +* The pointer to the class structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetInterfaceCallback(cy_cb_usb_dev_set_interface_t callback, + cy_stc_usb_dev_class_t *classObj) +{ + classObj->setInterface = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterClassRequestRcvdCallback +****************************************************************************//** +* +* Registers a callback function to notify a certain class that setup packet was +* received from USB Host but was not recognized. Therefore, this might require +* manual class processing. +* To remove the callback function, pass a NULL as the function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param classObj +* The pointer to the class structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestRcvdCallback(cy_cb_usb_dev_request_received_t callback, + cy_stc_usb_dev_class_t *classObj) +{ + classObj->requestReceived = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterClassRequestCmpltCallback +****************************************************************************//** +* +* Registers a callback function to notify a certain class that the USB Device +* received data from the USB Host as part of current request processing. +* The class setup packet callback function must enable notification to trigger +* this event. This makes sense only when class request processing requires a data +* stage. +* To remove callback function pass NULL as function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param classObj +* The pointer to the class structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestCmpltCallback(cy_cb_usb_dev_request_cmplt_t callback, + cy_stc_usb_dev_class_t *classObj) +{ + classObj->requestCompleted = callback; +} +/** \} group_usb_dev_functions_class_support */ + +/** +* \addtogroup group_usb_dev_functions_vendor_support +* \{ +*/ +/******************************************************************************* +* Function Name: Cy_USB_Dev_RegisterVendorCallbacks +****************************************************************************//** +* +* Registering user callback to handle Vendor-Specific requests. +* +* \param requestReceivedHandle +* The pointer to a callback function. +* This function is called when setup packet was received from USB Host but was +* not recognized. Therefore this might require manual class processing. +* To remove the callback function, pass a NULL as the function pointer. +* +* \param requestCompletedHandle +* The pointer to a callback function. +* This function is called when the USB Device received data from the USB Host +* as part of current request processing. The requestReceivedHandle function +* must enable notification to trigger this event. This makes sense only when CDC +* request processing requires a data stage. +* To remove callback function pass NULL as function pointer. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for internal +* configuration and data retention. The user must not modify anything in this +* structure. +* +* \note +* The callbacks registered by this function does not overrides processing of +* MS OS String vendor-specific request to retrieve an OS Feature Descriptor. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_RegisterVendorCallbacks(cy_cb_usb_dev_request_received_t requestReceivedHandle, + cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, + cy_stc_usb_dev_context_t *context) +{ + context->vndRequestReceived = requestReceivedHandle; + context->vndRequestCompleted = requestCompletedHandle; +} +/** \} group_usb_dev_functions_vendor_support */ + +/** \} group_usb_dev */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_audio.c b/cy_usb_dev_audio.c new file mode 100644 index 0000000..7d82909 --- /dev/null +++ b/cy_usb_dev_audio.c @@ -0,0 +1,64 @@ +/***************************************************************************//** +* \file cy_usb_dev_audio.c +* \version 2.0 +* +* Provides Audio class-specific API implementation. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +#include "cy_usb_dev_audio.h" + +#if defined(CY_IP_MXUSBFS) + +/******************************************************************************* +* Function Name: Cy_USB_Dev_Audio_Init +****************************************************************************//** +* +* Initializes the Audio class. +* This function must be called to enable USB Device Audio functionality. +* +* \param config +* Pass NULL as an argument (left for future purposes). +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_audio_context_t +* allocated by the user. The structure is used during the Audio Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the USB Device context structure \ref cy_stc_usb_dev_context_t. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_Audio_Init(void const *config, + cy_stc_usb_dev_audio_context_t *context, + cy_stc_usb_dev_context_t *devContext) +{ + /* Suppress a compiler warning about unused variables */ + (void) config; + + if ((NULL == context) || (NULL == devContext)) + { + return CY_USB_DEV_BAD_PARAM; + } + + /* Store device context */ + context->devContext = devContext; + + return Cy_USB_Dev_RegisterClass(&context->classItem, &context->classObj, context, devContext); +} + +#endif /* CY_IP_MXUSBFS) */ + + +/* [] END OF FILE */ + diff --git a/cy_usb_dev_audio.h b/cy_usb_dev_audio.h new file mode 100644 index 0000000..1a2b221 --- /dev/null +++ b/cy_usb_dev_audio.h @@ -0,0 +1,216 @@ +/***************************************************************************//** +* \file cy_usb_dev_audio.h +* \version 2.0 +* +* Provides Audio class-specific API declarations. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_audio +* This section provides API description for the Audio class. +* \{ +* \defgroup group_usb_dev_audio_macros Macros +* \defgroup group_usb_dev_audio_functions Functions +* \defgroup group_usb_dev_audio_data_structures Data Structures +* \} +*/ + +#if !defined(CY_USB_DEV_AUDIO_H) +#define CY_USB_DEV_AUDIO_H + +#include "cy_usb_dev.h" + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* Enumerated Types +*******************************************************************************/ + + +/******************************************************************************* +* Type Definitions +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_audio_data_structures +* \{ +*/ + +/** Audio class context structure. +* All fields for the Audio context structure are internal. Firmware never reads or +* writes these values. Firmware allocates the structure and provides the +* address of the structure to the middleware in Audio function calls. Firmware +* must ensure that the defined instance of this structure remains in scope while +* the middleware is in use. +*/ +typedef struct +{ + /** \cond INTERNAL*/ + + /** Pointer to device context */ + cy_stc_usb_dev_context_t *devContext; + + /** Audio class functions pointers */ + cy_stc_usb_dev_class_t classObj; + + /** Audio class linked list item */ + cy_stc_usb_dev_class_ll_item_t classItem; + + /** \endcond */ + +} cy_stc_usb_dev_audio_context_t; + +/** \} group_usb_dev_audio_data_structures */ + + +/******************************************************************************* +* Function Prototypes +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_audio_functions +* \{ +*/ +cy_en_usb_dev_status_t Cy_USB_Dev_Audio_Init(void const *config, + cy_stc_usb_dev_audio_context_t *context, + cy_stc_usb_dev_context_t *devContext); + +__STATIC_INLINE void Cy_USB_Dev_Audio_RegisterUserCallback(cy_cb_usb_dev_request_received_t requestReceivedHandle, + cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, + cy_stc_usb_dev_audio_context_t *context); + +__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_Audio_GetClass(cy_stc_usb_dev_audio_context_t *context); +/** \} group_usb_dev_audio_functions */ + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_audio_macros +* \{ +*/ +#define CY_USB_DEV_AUDIO_RQST_GET_CUR (0x81u) /**< GET_CUR Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_GET_MIN (0x82u) /**< GET_MIN Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_GET_MAX (0x83u) /**< GET_MAX Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_GET_RES (0x84u) /**< GET_RES Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_GET_MEM (0x85u) /**< GET_MEM Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_GET_STAT (0xFFu) /**< GET_STAT Audio v1.0 request */ + +#define CY_USB_DEV_AUDIO_RQST_SET_CUR (0x01u) /**< SET_CUR Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_SET_MIN (0x02u) /**< SET_MIN Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_SET_MAX (0x03u) /**< SET_MAX Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_SET_RES (0x04u) /**< SET_RES Audio v1.0 request */ +#define CY_USB_DEV_AUDIO_RQST_SET_MEM (0x05u) /**< SET_STAT Audio v1.0 request */ + +#define CY_USB_DEV_AUDIO2_RQST_CUR (0x01u) /**< CUR Audio v2.0 request */ +#define CY_USB_DEV_AUDIO2_RQST_RANGE (0x02u) /**< RANGE Audio v2.0 request */ +#define CY_USB_DEV_AUDIO2_RQST_MEM (0x03u) /**< MEM Audio v2.0 request */ + +#define CY_USB_DEV_AUDIO_MASTER_CHANNEL (0U) /**< Master channel */ +#define CY_USB_DEV_AUDIO_VOLUME_MIN (0x8001U) /**< Volume minimum value */ +#define CY_USB_DEV_AUDIO_VOLUME_MAX (0x7FFFU) /**< Volume maximum value */ +#define CY_USB_DEV_AUDIO_VOLUME_SILENCE (0x8000U) /**< Volume value that represent silence (CUR attribute only) */ +#define CY_USB_DEV_AUDIO_VOLUME_MIN_MSB (0x80U) /**< Volume minimum value MSB */ +#define CY_USB_DEV_AUDIO_VOLUME_MIN_LSB (0x01U) /**< Volume minimum value LSB */ +#define CY_USB_DEV_AUDIO_VOLUME_MAX_MSB (0x7FU) /**< Volume maximum value MSB */ +#define CY_USB_DEV_AUDIO_VOLUME_MAX_LSB (0xFFU) /**< Volume maximum value LSB */ +/** \} group_usb_dev_audio_macros */ + + +/******************************************************************************* +* Internal Constants +*******************************************************************************/ + + +/******************************************************************************* +* In-line Function Implementation +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_audio_functions +* \{ +*/ + +/******************************************************************************* +* Function Name: Cy_USB_Dev_Audio_RegisterUserCallback +****************************************************************************//** +* +* Registers the user callbacks to handle Audio class requests. +* +* \param requestReceivedHandle +* The pointer to a callback function. +* This function is called when setup packet was received from the USB Host but was +* not recognized. Therefore this might require Audio class processing. +* To remove the callback function, pass a NULL as the function pointer. +* +* \param requestCompletedHandle +* The pointer to a callback function. +* This function is called when the USB Device received data from the USB Host +* as part of current request processing. The requestReceivedHandle function +* must enable notification to trigger this event. This makes sense only when class +* request processing requires a data stage. +* To remove the callback function, pass a NULL as the function pointer. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the Audio Class operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_Audio_RegisterUserCallback(cy_cb_usb_dev_request_received_t requestReceivedHandle, + cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, + cy_stc_usb_dev_audio_context_t *context) +{ + Cy_USB_Dev_RegisterClassRequestRcvdCallback(requestReceivedHandle, Cy_USB_Dev_Audio_GetClass(context)); + Cy_USB_Dev_RegisterClassRequestCmpltCallback(requestCompletedHandle, Cy_USB_Dev_Audio_GetClass(context)); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_Audio_GetClass +****************************************************************************//** +* +* Returns pointer to the class structure for Audio class. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the Audio Class operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +* \return +* Status pointer to the class \ref cy_stc_usb_dev_class_t. +* +*******************************************************************************/ +__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_Audio_GetClass(cy_stc_usb_dev_audio_context_t *context) +{ + return &(context->classObj); +} + +/** \} group_usb_dev_audio_functions */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_AUDIO_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_audio_descr.h b/cy_usb_dev_audio_descr.h new file mode 100644 index 0000000..0326184 --- /dev/null +++ b/cy_usb_dev_audio_descr.h @@ -0,0 +1,272 @@ +/***************************************************************************//** +* \file cy_usb_dev_audio_descr.h +* \version 2.0 +* +* Provides Audio class-specific descriptor defines. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +#if !defined(CY_USB_DEV_AUDIO_DESCR_H) +#define CY_USB_DEV_AUDIO_DESCR_H + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* USB AUDIO +*******************************************************************************/ + +/** \cond INTERNAL */ +/** +* Audio Interface Class, Subclass and Protocol Codes +*/ +#define CY_USB_DEV_AUDIO_CLASS (0x01U) +#define CY_USB_DEV_AUDIO_SUBCLASS_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_SUBCLASS_AUDIO_CONTROL (0x01U) +#define CY_USB_DEV_AUDIO_SUBCLASS_AUDIO_STREAMING (0x02U) +#define CY_USB_DEV_AUDIO_SUBCLASS_MIDI_STREAMING (0x03U) +#define CY_USB_DEV_AUDIO_PROTOCOL_UNDEFINED (0x00U) + +/** +* Audio Class-Specific Descriptor Types +*/ +#define CY_USB_DEV_AUDIO_CS_UNDEFINED (0x20U) +#define CY_USB_DEV_AUDIO_CS_DEVICE (0x21U) +#define CY_USB_DEV_AUDIO_CS_CONFIGURATION (0x22U) +#define CY_USB_DEV_AUDIO_CS_STRING (0x23U) +#define CY_USB_DEV_AUDIO_CS_INTERFACE (0x24U) +#define CY_USB_DEV_AUDIO_CS_ENDPOINT (0x25U) + + +/******************************************************************************* +* USB AUDIO version 1.0 +*******************************************************************************/ + +/** +* Audio Class-Specific AC Interface Descriptor Subtypes +*/ +#define CY_USB_DEV_AUDIO_AC_DESCRIPTOR_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_HEADER (0x01U) +#define CY_USB_DEV_AUDIO_INPUT_TERMINAL (0x02U) +#define CY_USB_DEV_AUDIO_OUTPUT_TERMINAL (0x03U) +#define CY_USB_DEV_AUDIO_MIXER_UNIT (0x04U) +#define CY_USB_DEV_AUDIO_SELECTOR_UNIT (0x05U) +#define CY_USB_DEV_AUDIO_FEATURE_UNIT (0x06U) +#define CY_USB_DEV_AUDIO_PROCESSING_UNIT (0x07U) +#define CY_USB_DEV_AUDIO_EXTENSION_UNIT (0x08U) + +/** +* Audio Class-Specific AS Interface Descriptor Subtypes +*/ +#define CY_USB_DEV_AUDIO_AS_DESCRIPTOR_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_AS_GENERAL (0x01U) +#define CY_USB_DEV_AUDIO_FORMAT_TYPE (0x02U) +#define CY_USB_DEV_AUDIO_FORMAT_SPECIFIC (0x03U) + +/** +* Processing Unit Process Types +*/ +#define CY_USB_DEV_AUDIO_PROCESS_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_UP_DOWNMIX_PROCESS (0x01U) +#define CY_USB_DEV_AUDIO_DOLBY_PROLOGIC_PROCESS (0x02U) +#define CY_USB_DEV_AUDIO_3D_STEREO_EXTENDER_PROCESS (0x03U) +#define CY_USB_DEV_AUDIO_REVERBERATION_PROCESS (0x04U) +#define CY_USB_DEV_AUDIO_CHORUS_PROCESS (0x05U) +#define CY_USB_DEV_AUDIO_DYN_RANGE_COMP_PROCESS (0x06U) + +/** +* Audio Class-Specific Endpoint Descriptor Subtypes +*/ +#define CY_USB_DEV_AUDIO_DESCRIPTOR_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_EP_GENERAL (0x01U) + +/** +* Terminal Control Selectors +*/ +#define USB_AUDIO_TE_CONTROL_UNDEFINED (0x00U) +#define USB_AUDIO_COPY_PROTECT_CONTROL (0x01U) + +/** +* Feature Unit Control Selectors +*/ +#define CY_USB_DEV_AUDIO_FU_CONTROL_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_MUTE_CONTROL (0x01U) +#define CY_USB_DEV_AUDIO_VOLUME_CONTROL (0x02U) +#define CY_USB_DEV_AUDIO_BASS_CONTROL (0x03U) +#define CY_USB_DEV_AUDIO_MID_CONTROL (0x04U) +#define CY_USB_DEV_AUDIO_TREBLE_CONTROL (0x05U) +#define CY_USB_DEV_AUDIO_GRAPHIC_EQUALIZER_CONTROL (0x06U) +#define CY_USB_DEV_AUDIO_AUTOMATIC_GAIN_CONTROL (0x07U) +#define CY_USB_DEV_AUDIO_DELAY_CONTROL (0x08U) +#define CY_USB_DEV_AUDIO_BASS_BOOST_CONTROL (0x09U) +#define CY_USB_DEV_AUDIO_LOUDNESS_CONTROL (0x0AU) + +/** +* Endpoint Control Selectors +*/ +#define CY_USB_DEV_AUDIO_EP_CONTROL_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO_SAMPLING_FREQ_CONTROL (0x01U) +#define CY_USB_DEV_AUDIO_PITCH_CONTROL (0x02U) + +/** +* Descriptor Sizes +*/ +#define CY_USB_DEV_AUDIO_AC_HEADER_SIZE(a) (8U + (a)) +#define CY_USB_DEV_AUDIO_AC_IN_TERM_LENGTH (0x0CU) +#define CY_USB_DEV_AUDIO_AC_FE_UNIT_LENGTH (0x09U) +#define CY_USB_DEV_AUDIO_AC_OUT_TERM_LENGTH (0x09U) +#define CY_USB_DEV_AUDIO_AS_GEN_IF_LENGTH (0x07U) +#define CY_USB_DEV_AUDIO_AS_FORMAT_I_LENGTH (0x0BU) + +/** +* Endpoint Control Selectors (AUDIO Table A-19) +*/ +#define CY_USB_DEV_AUDIO_CS_SAMPLING_FREQ_CTRL (0x01U) /**< Audio v1.0: sample frequency control selector */ +#define CY_USB_DEV_AUDIO_CS_PITCH_CTRL (0x02U) /**< Audio v1.0: pitch control selector */ + +/** +* Feature Unit Control Selectors (AUDIO Table A-11) +*/ +#define CY_USB_DEV_AUDIO_CS_MUTE_CONTROL (0x01U) /**< Audio v1.0: mute control selector */ +#define CY_USB_DEV_AUDIO_CS_VOLUME_CONTROL (0x02U) /**< Audio v1.0: volume control selector */ +#define CY_USB_DEV_AUDIO_CS_BASS_CONTROL (0x03U) /**< Audio v1.0: bass control selector */ +#define CY_USB_DEV_AUDIO_CS_MID_CONTROL (0x04U) /**< Audio v1.0: mid control selector */ +#define CY_USB_DEV_AUDIO_CS_TREBLE_CONTROL (0x05U) /**< Audio v1.0: treble control selector */ +#define CY_USB_DEV_AUDIO_CS_GRAPHIC_EQUALIZER_CONTROL (0x06U) /**< Audio v1.0: graphic equalizer control selector */ +#define CY_USB_DEV_AUDIO_CS_AUTOMATIC_GAIN_CONTROL (0x07U) /**< Audio v1.0: automatic gain control selector */ +#define CY_USB_DEV_AUDIO_CS_DELAY_CONTROL (0x08U) /**< Audio v1.0: delay control selector */ +#define CY_USB_DEV_AUDIO_CS_BASS_BOOST_CONTROL (0x09U) /**< Audio v1.0: bass control selector */ +#define CY_USB_DEV_AUDIO_CS_LOUDNESS_CONTROL (0x0AU) /**< Audio v1.0: loudness control selector */ + + +/******************************************************************************* +* USB AUDIO version 1.0 +*******************************************************************************/ + +/** +* Audio Interface Protocol Codes +*/ +#define CY_USB_DEV_AUDIO2_INTERFACE_PROTOCOL_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_IP_VERSION_02_00 (0x20U) + +/** +* A.7 Audio Function Category Codes +*/ +#define CY_USB_DEV_AUDIO2_FUNCTION_SUBCLASS_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_FUNCTION_DESKTOP_SPEAKER (0x01U) +#define CY_USB_DEV_AUDIO2_FUNCTION_HOME_THEATER (0x02U) +#define CY_USB_DEV_AUDIO2_FUNCTION_MICROPHONE (0x03U) +#define CY_USB_DEV_AUDIO2_FUNCTION_HEADSET (0x04U) +#define CY_USB_DEV_AUDIO2_FUNCTION_TELEPHONE (0x05U) +#define CY_USB_DEV_AUDIO2_FUNCTION_CONVERTER (0x06U) +#define CY_USB_DEV_AUDIO2_FUNCTION_SOUND_RECORDER (0x07U) +#define CY_USB_DEV_AUDIO2_FUNCTION_IO_BOX (0x08U) +#define CY_USB_DEV_AUDIO2_FUNCTION_MUSICAL_INSTRUMENT (0x09U) +#define CY_USB_DEV_AUDIO2_FUNCTION_PRO_AUDIO (0x0AU) +#define CY_USB_DEV_AUDIO2_FUNCTION_AUDIO_VIDEO (0x0BU) +#define CY_USB_DEV_AUDIO2_FUNCTION_CONTROL_PANEL (0x0CU) +#define CY_USB_DEV_AUDIO2_FUNCTION_OTHER (0xFFU) + +/** +* A.9 Audio Class-Specific AC Interface Descriptor Subtypes +*/ +#define CY_USB_DEV_AUDIO2_AC_DESCRIPTOR_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_HEADER (0x01U) +#define CY_USB_DEV_AUDIO2_INPUT_TERMINAL (0x02U) +#define CY_USB_DEV_AUDIO2_OUTPUT_TERMINAL (0x03U) +#define CY_USB_DEV_AUDIO2_MIXER_UNIT (0x04U) +#define CY_USB_DEV_AUDIO2_SELECTOR_UNIT (0x05U) +#define CY_USB_DEV_AUDIO2_FEATURE_UNIT (0x06U) +#define CY_USB_DEV_AUDIO2_EFFECT_UNIT (0x07U) +#define CY_USB_DEV_AUDIO2_PROCESSING_UNIT_V2 (0x08U) +#define CY_USB_DEV_AUDIO2_EXTENSION_UNIT_V2 (0x09U) +#define CY_USB_DEV_AUDIO2_CLOCK_SOURCE (0x0AU) +#define CY_USB_DEV_AUDIO2_CLOCK_SELECTOR (0x0BU) +#define CY_USB_DEV_AUDIO2_CLOCK_MULTIPLIER (0x0CU) +#define CY_USB_DEV_AUDIO2_SAMPLE_RATE_CONVERTER (0x0DU) + +/** +* Audio Class-Specific AS Interface Descriptor Subtypes +*/ +#define CY_USB_DEV_AUDIO2_AS_DESCRIPTOR_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_AS_GENERAL (0x01U) +#define CY_USB_DEV_AUDIO2_FORMAT_TYPE (0x02U) +#define CY_USB_DEV_AUDIO2_ENCODER (0x03U) +#define CY_USB_DEV_AUDIO2_DECODER (0x04U) + +/** +* Audio Class-Specific Endpoint Descriptor Subtypes +*/ +#define CY_USB_DEV_AUDIO2_DESCRIPTOR_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_EP_GENERAL (0x01U) + +/** +* Clock Source Control Selectors +*/ +#define CY_USB_DEV_AUDIO2_CS_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_CS_CONTROL_SAM_FREQ (0x01U) +#define CY_USB_DEV_AUDIO2_CS_CONTROL_CLOCK_VALID (0x02U) + +/** +* Clock Selector Control Selectors +*/ +#define CY_USB_DEV_AUDIO2_CX_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_CX_CLOCK_SELECTOR (0x01U) + +/** +* Clock Multiplier Control Selectors +*/ +#define CY_USB_DEV_AUDIO2_CM_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_CM_NUMERATOR (0x01U) +#define CY_USB_DEV_AUDIO2_CM_DENOMINTATOR (0x02U) + +/** +* Terminal Control Selectors +*/ +#define CY_USB_DEV_AUDIO2_TE_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_TE_COPY_PROTECT (0x01U) +#define CY_USB_DEV_AUDIO2_TE_CONNECTOR (0x02U) +#define CY_USB_DEV_AUDIO2_TE_OVERLOAD (0x03U) +#define CY_USB_DEV_AUDIO2_TE_CLUSTER (0x04U) +#define CY_USB_DEV_AUDIO2_TE_UNDERFLOW (0x05U) +#define CY_USB_DEV_AUDIO2_TE_OVERFLOW (0x06U) +#define CY_USB_DEV_AUDIO2_TE_LATENCY (0x07U) + +/** +* AudioStreaming Interface Control Selectors +*/ +#define CY_USB_DEV_AUDIO2_AS_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_AS_ACT_ALT_SETTING (0x01U) +#define CY_USB_DEV_AUDIO2_AS_VAL_ALT_SETTINGS (0x02U) +#define CY_USB_DEV_AUDIO2_AS_AUDIO_DATA_FORMAT (0x03U) + +/** +* Endpoint Control Selectors +*/ +#define CY_USB_DEV_AUDIO2_EP_CS_UNDEFINED (0x00U) +#define CY_USB_DEV_AUDIO2_EP_CS_PITCH (0x01U) +#define CY_USB_DEV_AUDIO2_EP_CS_DATA_OVERRUN (0x02U) +#define CY_USB_DEV_AUDIO2_EP_CS_DATA_UNDERRUN (0x03U) + +/** \endcond */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_AUDIO_DESCR_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_cdc.c b/cy_usb_dev_cdc.c new file mode 100644 index 0000000..d601f60 --- /dev/null +++ b/cy_usb_dev_cdc.c @@ -0,0 +1,1152 @@ + +/***************************************************************************//** +* \file cy_usb_dev_cdc.c +* \version 2.0 +* +* Provides Class Specific API implementation. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +#include "cy_usb_dev_cdc.h" +#include "cy_usb_dev_cdc_descr.h" + +#if defined(CY_IP_MXUSBFS) + + +/******************************************************************************* +* Internal Constants +*******************************************************************************/ + +#define COM1 (0U) +#define COM2 (1U) +#define INVALID_COM (0xFFU) +#define IS_COM_VALID(com) CY_USB_DEV_CDC_IS_COM_VALID(com) + +#define SET_LINE_CODING_LENGTH (7U) +#define LINE_CODING_RATE_OFFSET (0U) + +#define SERIAL_STATE_REQUEST_TYPE (0xA1U) +#define SERIAL_STATE (0x20U) +#define SERIAL_STATE_LENGTH (0x2U) + +#define SERIAL_STATE_WINDEX_OFFSET (4U) +#define SERIAL_STATE_WSERIALSTATE_LSB_OFFSET (8U) +#define SERIAL_STATE_WSERIALSTATE_MSB_OFFSET (9U) + +#define SINGLE_COM_PORT_EP_NUM (3U) +#define DUAL_COM_PORT_EP_NUM (6U) + +#define INTERFACE_CLASS_POS (5U) + +#define INIT_LINES_CODING \ +{ \ + /* dwDTERate: Data terminal rate, in bits per second */ \ + 0x00U, 0xC2U, 0x01U, 0x00U, \ + /* bCharFormat (Stop bits): 0 - 1bit, 1 - 1.5bits, 2 - 2bits */ \ + 0x00U, \ + /* bParityType: Parity 0 - None, 1 - Odd, 2 - Even, 3 - Mark, 4 - Space */ \ + 0x00U, \ + /* Data bits (5, 6, 7, 8 or 16) */ \ + 0x08U \ +} + +#define INIT_SERIAL_STATE \ +{ \ + SERIAL_STATE_REQUEST_TYPE,/* bRequestType */ \ + SERIAL_STATE, /* bNotification */ \ + 0U, /* wValue */ \ + 0U, /* wValueMSB */ \ + 0U, /* wIndex */ \ + 0U, /* wIndexMSB */ \ + SERIAL_STATE_LENGTH, /* wLength */ \ + 0u, /* wLengthMSB */ \ + 0U, /* wSerialState */ \ + 0U, /* wSerialStateMSB */ \ +} + + +/******************************************************************************* +* Internal Functions +*******************************************************************************/ + +static cy_en_usb_dev_status_t HandleRequest(cy_stc_usb_dev_control_transfer_t *transfer, void *classContext, + cy_stc_usb_dev_context_t *devContext); + +static cy_en_usb_dev_status_t HandleRequestComplete(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext); + +static cy_en_usb_dev_status_t HandleSetConfig(uint32_t configuration, + void *classContext, + cy_stc_usb_dev_context_t *devContext); + +static uint32_t GetInterfaceComPort(uint32_t interface, cy_stc_usb_dev_cdc_context_t const *context); + +static uint32_t ReadInternalBuffer(cy_stc_usb_dev_cdc_comport_t* port, uint8_t *buffer, + uint32_t size); + +static bool IsEndpointReady(uint32_t endpoint, cy_stc_usb_dev_context_t const *context); + +static cy_stc_usb_dev_cdc_comport_t* GetCom(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_Init +****************************************************************************//** +* +* Initializes the CDC class. +* This function must be called to enable USB Device CDC functionality. +* +* \param config +* The pointer to the CDC configuration +* structure \ref cy_stc_usb_dev_cdc_config_t. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the USB Device context structure \ref cy_stc_usb_dev_context_t. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_Init(cy_stc_usb_dev_cdc_config_t const *config, + cy_stc_usb_dev_cdc_context_t *context, + cy_stc_usb_dev_context_t *devContext) +{ + if ((NULL == context) || (NULL == devContext)) + { + return CY_USB_DEV_BAD_PARAM; + } + + uint32_t portIndex; + + for (portIndex = 0UL; (portIndex < CY_USB_DEV_CDC_COMPORT_NUMBER); portIndex++) + { + /* Default value for Lines Coding and Serial State notification */ + const uint8_t initLinesCoding[CY_USB_DEV_CDC_LINE_CODING_SIZE] = INIT_LINES_CODING; + const uint8_t initSerialState[CY_USB_DEV_CDC_SERIAL_STATE_SIZE] = INIT_SERIAL_STATE; + + /* Get COM port */ + cy_stc_usb_dev_cdc_comport_t* com = &context->port[portIndex]; + + /* Initialize default values: lines coding and serial state */ + (void) memcpy((void *) com->linesCoding, initLinesCoding, CY_USB_DEV_CDC_LINE_CODING_SIZE); + (void) memcpy((void *) com->serialStateNotification, initSerialState, CY_USB_DEV_CDC_SERIAL_STATE_SIZE); + + /* Set COM port disable */ + com->valid = false; + com->writeBufIdx = 0U; + com->readBufIdx = 0U; + com->linesChanged = CY_USB_DEV_CDC_LINE_NOT_CHANGED; + + /* Copy data from configuration */ + com->buffer = (NULL != config) ? config->buffer[portIndex] : NULL; + com->bufferSize = (NULL != config) ? config->bufferSize[portIndex] : 0U; + } + + /* Remove custom handlers */ + context->requestCompleted = NULL; + context->requestReceived = NULL; + + /* Store device context */ + context->devContext = devContext; + + /* Register CDC handlers */ + Cy_USB_Dev_RegisterClassSetConfigCallback(&HandleSetConfig, Cy_USB_Dev_CDC_GetClass(context)); + Cy_USB_Dev_RegisterClassRequestRcvdCallback(&HandleRequest, Cy_USB_Dev_CDC_GetClass(context)); + Cy_USB_Dev_RegisterClassRequestCmpltCallback(&HandleRequestComplete, Cy_USB_Dev_CDC_GetClass(context)); + + return Cy_USB_Dev_RegisterClass(&context->classItem, &context->classObj, context, devContext); +} + + +/******************************************************************************* +* Function Name: HandleSetConfig +****************************************************************************//** +* +* Handles SET_CONFIGURATION request event. This function finds COM ports +* information for a certain configuration: CDC interfaces and CDC endpoints. +* This information is used to call any CDC function. +* +* \param transfer +* Pointer to the structure that contains SETUP packet. +* +* \param classContext +* The pointer to the context structure of the Class +* \ref cy_stc_usb_dev_cdc_context_t allocated by the user. +* +* \param devContext +* The pointer to the context structure of the Device +* \ref cy_stc_usb_dev_context_t allocated by the user. +* +* \return +* Returns \ref CY_USB_DEV_SUCCESS. +* The configuration is still valid if COM port is not found. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleSetConfig(uint32_t configuration, + void *classContext, + cy_stc_usb_dev_context_t *devContext) +{ + /* Get CDC context */ + cy_stc_usb_dev_cdc_context_t *context = (cy_stc_usb_dev_cdc_context_t *) classContext; + + /* Invalidate COM ports */ + context->port[COM1].valid = false; + context->port[COM2].valid = false; + + if (configuration > 0U) + { + /* Get current configuration */ + cy_stc_usb_dev_configuration_t const *config = devContext->devDescriptors->configurations[configuration - 1U]; + + uint32_t intf; + uint32_t portInt = 0U; + uint32_t portData = 0U; + uint32_t cdcEpNum = 0U; + + for (intf = 0U; intf < config->numInterfaces; ++intf) + { + /* CDC does not support alternate settings */ + uint32_t alt = 0U; + + /* Get alternate settings that belong to this interface */ + cy_stc_usb_dev_alternate_t const **altStructs = config->interfaces[intf]->alternates; + + /* Get pointer to current alternate descriptor */ + cy_stc_usbdev_interface_descr_t const *curAlternate = (cy_stc_usbdev_interface_descr_t const *) + altStructs[alt]->interfaceDescriptor; + + /* Check interface class */ + if (CY_USB_DEV_CDC_CLASS == curAlternate->bInterfaceClass) + { + /* Get endpoint descriptor */ + cy_stc_usbdev_endpoint_descr_t const *ep = (cy_stc_usbdev_endpoint_descr_t const *) + altStructs[alt]->endpoints[0U]->endpointDescriptor; + + context->port[portInt].interfaceNum = (uint8_t) intf; + + context->port[portInt].commEp = (uint8_t) CY_USB_DEV_EPADDR2EP(ep->bEndpointAddress); + context->port[portInt].commEpSize = CY_USB_DEV_GET_CFG_WORD(&ep->wMaxPacketSize); + context->port[portInt].serialStateNotification[SERIAL_STATE_WINDEX_OFFSET] = (uint8_t) intf; + + portInt = 1U; + cdcEpNum++; + } + else if (CY_USB_DEV_CDC_CLASS_DATA == curAlternate->bInterfaceClass) + { + uint32_t endpoint; + + /* Check all endpoints that belong to interface */ + for (endpoint = 0U; endpoint < altStructs[alt]->numEndpoints; ++endpoint) + { + /* Get endpoint descriptor */ + cy_stc_usbdev_endpoint_descr_t const *ep = (cy_stc_usbdev_endpoint_descr_t const *) + altStructs[alt]->endpoints[endpoint]->endpointDescriptor; + + if (CY_USB_DEV_IS_EP_DIR_IN(ep->bEndpointAddress)) + { + context->port[portData].dataInEp = (uint8_t) CY_USB_DEV_EPADDR2EP(ep->bEndpointAddress); + context->port[portData].dataInEpSize = CY_USB_DEV_GET_CFG_WORD(&ep->wMaxPacketSize); + } + else + { + context->port[portData].dataOutEp = (uint8_t) CY_USB_DEV_EPADDR2EP(ep->bEndpointAddress); + context->port[portData].dataOutEpSize = CY_USB_DEV_GET_CFG_WORD(&ep->wMaxPacketSize); + + /* Enable endpoint to receive data from Host. + * Discard status after set configuration is safe. + */ + (void) Cy_USB_Dev_StartReadEp((uint32_t) context->port[portData].dataOutEp, devContext); + } + + cdcEpNum++; + } + + portData = 1U; + } + else + { + /* Skip: Interface Class is not CDC */ + } + } + + context->port[COM1].valid = (cdcEpNum >= SINGLE_COM_PORT_EP_NUM); + context->port[COM2].valid = (DUAL_COM_PORT_EP_NUM == cdcEpNum); + } + + /* If comport is not found, it is marked not valid */ + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: HandleRequest +****************************************************************************//** +* +* Handles CDC class requests (SETUP packet received event). +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param classContext +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleRequest(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Process CDC Class requests */ + if (CY_USB_DEV_CLASS_TYPE == transfer->setup.bmRequestType.type) + { + cy_stc_usb_dev_cdc_context_t *context = (cy_stc_usb_dev_cdc_context_t *) classContext; + + uint32_t portNum = GetInterfaceComPort((uint32_t) transfer->setup.wIndex, context); + + if (IS_COM_VALID(portNum)) + { + switch (transfer->setup.bRequest) + { + case CY_USB_DEV_CDC_RQST_SET_LINE_CODING: + { + transfer->remaining = SET_LINE_CODING_LENGTH; + transfer->notify = true; + retStatus = CY_USB_DEV_SUCCESS; + } + break; + + case CY_USB_DEV_CDC_RQST_GET_LINE_CODING: + { + transfer->ptr = (uint8_t *) context->port[portNum].linesCoding; + transfer->remaining = SET_LINE_CODING_LENGTH; + retStatus = CY_USB_DEV_SUCCESS; + } + break; + + case CY_USB_DEV_CDC_RQST_SET_CONTROL_LINE_STATE: + { + context->port[portNum].linesControlBitmap = (uint8_t) transfer->setup.wValue; + context->port[portNum].linesChanged |= CY_USB_DEV_CDC_LINE_CONTROL_CHANGED; + retStatus = CY_USB_DEV_SUCCESS; /* There is Data stage */ + } + break; + + default: + { + /* Request was not recognized. Try custom request handler. */ + if (NULL != context->requestReceived) + { + retStatus = context->requestReceived(transfer, context, devContext); + } + } + break; + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: HandleRequestComplete +****************************************************************************//** +* +* Completes handling CDC class requests that expect data from the Host. +* Involved when data from the Host has been received. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param classContext +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleRequestComplete(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Process CDC Class requests */ + if (CY_USB_DEV_CLASS_TYPE == transfer->setup.bmRequestType.type) + { + cy_stc_usb_dev_cdc_context_t *context = (cy_stc_usb_dev_cdc_context_t *) classContext; + + uint32_t portNum = GetInterfaceComPort((uint32_t) transfer->setup.wIndex, context); + + if (IS_COM_VALID(portNum)) + { + switch (transfer->setup.bRequest) + { + case CY_USB_DEV_CDC_RQST_SET_LINE_CODING: + { + /* Copy received data */ + (void) memcpy((void *) context->port[portNum].linesCoding, transfer->ptr, CY_USB_DEV_CDC_LINE_CODING_SIZE); + + context->port[portNum].linesChanged |= CY_USB_DEV_CDC_LINE_CODING_CHANGED; + + retStatus = CY_USB_DEV_SUCCESS; + } + break; + + default: + { + /* Request was not recognized. Try custom request handler. */ + if (NULL != context->requestCompleted) + { + retStatus = context->requestCompleted(transfer, context, devContext); + } + } + break; + } + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetInterfaceComPort +****************************************************************************//** +* +* Returns number of COM port number that belong to a certain CDC interface. +* +* \param interface +* Interface number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* COM port number (COM1 or COM2). INVALID_COM if COM port does not exist. +* +*******************************************************************************/ +static uint32_t GetInterfaceComPort(uint32_t interface, cy_stc_usb_dev_cdc_context_t const *context) +{ + uint32_t portNum; + uint32_t locInterface = (uint32_t) CY_LO8(interface); + + if (context->port[COM1].interfaceNum == locInterface) + { + portNum = COM1; + } + else if (context->port[COM2].interfaceNum == locInterface) + { + portNum = COM2; + } + else + { + portNum = INVALID_COM; + } + + return (portNum); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_PutData +****************************************************************************//** +* +* Sends a specified number of bytes to USB Host. +* Call \ref Cy_USB_Dev_CDC_IsReady function to ensure that the COM port +* (CDC Data interface) is ready for sending data to the USB Host before calling +* this function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param buffer +* The pointer to the buffer containing data bytes to be sent. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param size +* The number of bytes to send. +* This value must be less than or equal to the maximum packet size of the +* CDC Data interface IN endpoint that belongs to the specified COM port. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutData(uint32_t port, uint8_t const *buffer, uint32_t size, + cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_BAD_PARAM; + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + if (com->valid) + { + retStatus = Cy_USB_Dev_WriteEpNonBlocking((uint32_t) com->dataInEp, buffer, size, context->devContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_PutString +****************************************************************************//** +* +* Sends a null terminated string to the USB Host. This function is blocking and +* returns after successful USB Host transfer, or an error or timeout occurred. +* Call \ref Cy_USB_Dev_CDC_IsReady function to ensure that the COM port +* (CDC Data interface) is ready for sending data to the USB Host before calling +* this function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param string +* The pointer to the string to be sent. \n +* The string must be allocated following rules in the section +* \ref group_usb_dev_ep_buf_alloc to be USBFS driver configuration +* independent. +* +* \param timeout +* Defines in milliseconds the time for which this function can block. +* If that time expires, the function returns. +* To wait forever, pass \ref CY_USB_DEV_WAIT_FOREVER. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +* \note +* If string parameter is a constant string (example: "USBUART"), it is stored +* in the stack and aligned to 4 bytes boundary what makes it USBFS +* driver configuration independent. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutString(uint32_t port, char_t const *string, int32_t timeout, + cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_BAD_PARAM; + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + if (com->valid) + { + uint32_t endpoint = com->dataInEp; + uint32_t stringLen = strlen(string); + uint32_t sendLen = 0U; + uint32_t sendIndex = 0U; + uint32_t bufSize = com->dataInEpSize; + + do + { + /* Send size equal to endpoint max packet sizes */ + sendLen = (stringLen > bufSize) ? bufSize : stringLen; + + retStatus = Cy_USB_Dev_WriteEpBlocking(endpoint, (uint8_t const *) &string[sendIndex], + sendLen, timeout, context->devContext); + stringLen -= sendLen; + sendIndex += sendLen; + } + while ((stringLen > 0U) && (CY_USB_DEV_SUCCESS == retStatus)); + + /* If last packet is exactly maximum packet size, it shall be followed + * by a zero-length packet to assure the end of segment is properly + * identified by the terminal. + */ + if ((sendLen == bufSize) && (CY_USB_DEV_SUCCESS == retStatus)) + { + uint8_t dummyByte = 0U; + retStatus = Cy_USB_Dev_WriteEpBlocking(endpoint, &dummyByte, + 0U, timeout, context->devContext); + } + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetCount +****************************************************************************//** +* +* Returns the number of bytes that were received from the USB Host and can be +* read using \ref Cy_USB_Dev_CDC_GetData or \ref Cy_USB_Dev_CDC_GetChar +* functions. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Returns the number of bytes that were received. +* +*******************************************************************************/ +uint32_t Cy_USB_Dev_CDC_GetCount(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + uint32_t count = 0U; + cy_stc_usb_dev_cdc_comport_t *com = GetCom(port, context); + + if (com->valid) + { + /* Read number of bytes in local buffer */ + count = com->writeBufIdx; + + /* Local buffer is empty. Check if there is data in the endpoint buffer */ + if (0U == count) + { + if (IsEndpointReady((uint32_t) com->dataOutEp, context->devContext)) + { + /* Update count if Host wrote anything into the endpoint */ + count = Cy_USB_Dev_GetEpNumToRead((uint32_t) com->dataOutEp, context->devContext); + } + } + } + + return count; +} + + +/******************************************************************************* +* Function Name: GetCom +****************************************************************************//** +* +* Returns pointer to port structure \ref cy_stc_usb_dev_cdc_comport_t +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Pointer to port structure \ref cy_stc_usb_dev_cdc_comport_t +* +*******************************************************************************/ +static cy_stc_usb_dev_cdc_comport_t* GetCom(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + return &context->port[port]; +} + + +/******************************************************************************* +* Function Name: IsEndpointReady +****************************************************************************//** +* +* Check if endpoint state is IDLE or COMPLETED. +* +* \param endpoint +* The endpoint number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* True - endpoint is ready. False - endpoint is not ready. +* +*******************************************************************************/ +static bool IsEndpointReady(uint32_t endpoint, cy_stc_usb_dev_context_t const *context) +{ + cy_en_usb_dev_ep_state_t epState; + + epState = Cy_USBFS_Dev_Drv_GetEndpointState(context->drvBase, + endpoint, + context->drvContext); + + return ((CY_USB_DEV_EP_IDLE == epState) || (CY_USB_DEV_EP_COMPLETED == epState)); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_IsDataReady +****************************************************************************//** +* +* Returns status if the COM port (CDC Data interface) received data from the +* USB Host (including zero-length packet). +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* * True - the COM port (CDC Data interface) received data from the USB Host. +* * False - the COM port (CDC Data interface) is waiting for data from the +* USB Host. +* +*******************************************************************************/ +bool Cy_USB_Dev_CDC_IsDataReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + bool retStatus = false; + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + if (com->valid) + { + retStatus = IsEndpointReady((uint32_t) com->dataOutEp, context->devContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_IsReady +****************************************************************************//** +* +* Returns status if the COM port (CDC Data interface) is ready for sending +* new data. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* * True - the COM port (CDC Data interface) is ready for sending new data. +* * False - the COM port (CDC Data interface) is waiting for the USB Host to +* read previous data. +* +*******************************************************************************/ +bool Cy_USB_Dev_CDC_IsReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + bool retStatus = false; + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + if (com->valid) + { + retStatus = IsEndpointReady((uint32_t) com->dataInEp, context->devContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: ReadInternalBuffer +****************************************************************************//** +* +* Internal function used for copy data from internal buffer +* +* \param port +* Pointer to the port structure. +* +* \param buffer +* Pointer to the data array where data will be placed. +* +* \param size +* Number of bytes to read into the data array from the RX buffer. The maximum +* length is limited by the number of received bytes. +* +* \return +* Number of copied bytes. +* +*******************************************************************************/ +static uint32_t ReadInternalBuffer(cy_stc_usb_dev_cdc_comport_t* port, uint8_t *buffer, + uint32_t size) +{ + uint32_t numBytes = port->writeBufIdx; + uint32_t idx = port->readBufIdx; + uint32_t numToCopy = (size > numBytes) ? numBytes : size; + + /* Copy data from internal buffer to the user buffer */ + (void) memcpy(buffer, &port->buffer[idx], numToCopy); + numBytes -= numToCopy; + + /* Adjust buffer pointers */ + if (0U == numBytes) + { + port->readBufIdx = 0U; + port->writeBufIdx = 0U; + } + else + { + port->readBufIdx += numToCopy; + port->writeBufIdx -= numToCopy; + } + + return numToCopy; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetData +****************************************************************************//** +* +* Read a specified number of data bytes received from USB Host by the COM port +* (CDC Data interface). +* Call \ref Cy_USB_Dev_CDC_IsDataReady function to ensure that +* data is received from the USB Host before calling this function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param buffer +* The pointer to buffer that stores data that was read. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param size +* The number of bytes to read. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data keeping. The user must not modify +* anything in this structure. +* +* \return +* The number of bytes that were actually read. +* +*******************************************************************************/ +uint32_t Cy_USB_Dev_CDC_GetData(uint32_t port, uint8_t *buffer, uint32_t size, + cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + uint32_t actSize = 0U; + cy_stc_usb_dev_cdc_comport_t * com = GetCom(port, context); + + if ((com->valid) && + (NULL != com->buffer) && (com->bufferSize == com->dataOutEpSize)) + { + /* Check whether buffer has some data */ + if (com->writeBufIdx > 0U) + { + actSize = ReadInternalBuffer(com, buffer, size); + } + else + { + cy_en_usb_dev_status_t locStatus; + locStatus = Cy_USB_Dev_ReadEpNonBlocking((uint32_t) com->dataOutEp, com->buffer, com->bufferSize, + &com->writeBufIdx, context->devContext); + + if (CY_USB_DEV_SUCCESS == locStatus) + { + actSize = ReadInternalBuffer(com, buffer, size); + + /* ReadEpNonBlocking returned success therefore safe to discard status */ + (void) Cy_USB_Dev_StartReadEp((uint32_t) com->dataOutEp, context->devContext); + } + } + } + + return actSize; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetAll +****************************************************************************//** +* +* Read all data received from USB Host by the COM port (CDC Data interface). +* Call \ref Cy_USB_Dev_CDC_IsDataReady function to ensure that +* data is received from the USB Host before calling this function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param buffer +* The pointer to buffer that stores data that was read. \n +* Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make +* it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc +* for more information). +* +* \param maxSize +* The size of buffer to read data into. +* This value must be not be less then CDC Data interface OUT endpoint maximum +* packet size that belongs to specified COM port. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* The number of bytes that were actually read. +* +*******************************************************************************/ +uint32_t Cy_USB_Dev_CDC_GetAll(uint32_t port, uint8_t *buffer, uint32_t maxSize, + cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + uint32_t actSize = 0U; + cy_stc_usb_dev_cdc_comport_t * com = GetCom(port, context); + + if (com->valid) + { + cy_en_usb_dev_status_t locStatus; + + locStatus = Cy_USB_Dev_ReadEpNonBlocking((uint32_t) com->dataOutEp, buffer, maxSize, &actSize, + context->devContext); + + /* Start read endpoint after read completed */ + if (CY_USB_DEV_SUCCESS == locStatus) + { + /* ReadEpNonBlocking returned success therefore safe to discard status */ + (void) Cy_USB_Dev_StartReadEp((uint32_t) com->dataOutEp, context->devContext); + } + } + + return actSize; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetChar +****************************************************************************//** +* +* Reads one byte of received data. +* Call \ref Cy_USB_Dev_CDC_IsDataReady function to ensure that +* data is received from the USB Host before calling this function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Received one character or zero value to indicate there is no data. +* +*******************************************************************************/ +char_t Cy_USB_Dev_CDC_GetChar(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + uint8_t data = 0U; + uint32_t number = Cy_USB_Dev_CDC_GetData(port, &data, 1U, context); + + if (0U == number) + { + data = 0U; + } + + return (char_t) data; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_SendSerialState +****************************************************************************//** +* +* Sends the serial state notification to the host using the COM port +* (CDC interface) IN interrupt endpoint. +* Call \ref Cy_USB_Dev_CDC_IsNotificationReady function to ensure that +* COM port (CDC interface) is ready send notification before calling this +* function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param serialState +* 16-bit value that will be sent from the USB Device to the USB Host as +* SERIAL_STATE notification using the CDC interface IN interrupt endpoint. +* Refer to revision 1.2 of the CDC PSTN Subclass specification for bit field +* definitions of the 16-bit serial state value. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +* \note +* The maximum packet size of the CDC interface IN interrupt endpoint +* (that belongs to specified COM port) must be at least 10 bytes to send +* serial state notifications. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_SendSerialState(uint32_t port, uint32_t serialState, + cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_BAD_PARAM; + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + if ((com->valid) && + (CY_USB_DEV_CDC_SERIAL_STATE_SIZE <= com->commEpSize)) + { + /* Update serial state */ + com->serialStateBitmap = (uint16_t) serialState; + + com->serialStateNotification[SERIAL_STATE_WSERIALSTATE_LSB_OFFSET] = CY_LO8(serialState); + com->serialStateNotification[SERIAL_STATE_WSERIALSTATE_MSB_OFFSET] = CY_HI8(serialState); + + retStatus = Cy_USB_Dev_WriteEpNonBlocking((uint32_t) com->commEp, + (uint8_t *) com->serialStateNotification, + CY_USB_DEV_CDC_SERIAL_STATE_SIZE, + context->devContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_IsNotificationReady +****************************************************************************//** +* +* Returns if the COM port (CDC interface) is ready to send notification to +* the USB Host. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* * True - the COM port (CDC interface) is ready for sending new notification. +* * False - the COM port (CDC interface) is waiting for the USB Host to read +* previous notification. +* +*******************************************************************************/ +bool Cy_USB_Dev_CDC_IsNotificationReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + bool retStatus = false; + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + if (com->valid) + { + retStatus = IsEndpointReady((uint32_t) com->commEp, context->devContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetDTERate +****************************************************************************//** +* +* Returns the data terminal rate set for this port in bits per second. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Data rate in bits per second. +* +*******************************************************************************/ +uint32_t Cy_USB_Dev_CDC_GetDTERate(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(IS_COM_VALID(port)); + + cy_stc_usb_dev_cdc_comport_t* com = GetCom(port, context); + + uint32_t rate = com->linesCoding[LINE_CODING_RATE_OFFSET + 3U]; + + rate = (rate << 8U) | com->linesCoding[LINE_CODING_RATE_OFFSET + 2U]; + rate = (rate << 8U) | com->linesCoding[LINE_CODING_RATE_OFFSET + 1U]; + rate = (rate << 8U) | com->linesCoding[LINE_CODING_RATE_OFFSET]; + + return rate; +} + +#endif /* CY_IP_MXUSBFS) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_cdc.h b/cy_usb_dev_cdc.h new file mode 100644 index 0000000..88b0135 --- /dev/null +++ b/cy_usb_dev_cdc.h @@ -0,0 +1,663 @@ +/***************************************************************************//** +* \file cy_usb_dev_cdc.h +* \version 2.0 +* +* Provides CDC class-specific API declarations. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + + +/** +* \addtogroup group_usb_dev_cdc +* This section provides API description for the CDC class. +* +* \{ +* \defgroup group_usb_dev_cdc_macros Macros +* \defgroup group_usb_dev_cdc_functions Functions +* \defgroup group_usb_dev_cdc_data_structures Data Structures +* \defgroup group_usb_dev_cdc_enums Enumerated Types +* \} +*/ + + +#if !defined(CY_USB_DEV_CDC_H) +#define CY_USB_DEV_CDC_H + +#include "cy_usb_dev.h" + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_cdc_macros +* \{ +*/ +/** Number of supported COM ports */ +#define CY_USB_DEV_CDC_COMPORT_NUMBER (2U) + +/* CDC Class requests */ +#define CY_USB_DEV_CDC_RQST_SET_LINE_CODING (0x20U) /**< SetLineCoding CDC class request */ +#define CY_USB_DEV_CDC_RQST_GET_LINE_CODING (0x21U) /**< GetLineCoding CDC class request */ +#define CY_USB_DEV_CDC_RQST_SET_CONTROL_LINE_STATE (0x22U) /**< SetControlLineState CDC class request */ +/** \} group_usb_dev_cdc_macros */ + + +/******************************************************************************* +* Internal Constants +*******************************************************************************/ + +/** \cond INTERNAL */ +#define CY_USB_DEV_CDC_SERIAL_STATE_SIZE (10U) +#define CY_USB_DEV_CDC_LINE_CODING_CHAR_FORMAT_POS (4U) +#define CY_USB_DEV_CDC_LINE_CODING_SIZE (7U) +#define CY_USB_DEV_CDC_LINE_CODING_PARITY_BITS_POS (5U) +#define CY_USB_DEV_CDC_LINE_CODING_DATA_BITS_POS (6U) + +#define CY_USB_DEV_CDC_IS_COM_VALID(com) ((com) <= CY_USB_DEV_CDC_COMPORT_NUMBER) +/** \endcond */ + + +/******************************************************************************* +* Enumerated Types +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_cdc_enums +* \{ +*/ + +/** CDC Stop bit */ +typedef enum +{ + CY_USB_DEV_CDC_STOPBIT_1, /**< 1 stop bit */ + CY_USB_DEV_CDC_STOPBITS_1_5, /**< 1.5 stop bits */ + CY_USB_DEV_CDC_STOPBITS_2, /**< 2 stop bits */ +} cy_en_usb_dev_cdc_stop_bit_t; + +/** CDC Parity type */ +typedef enum +{ + CY_USB_DEV_CDC_PARITY_NONE, /**< None parity */ + CY_USB_DEV_CDC_PARITY_ODD, /**< Odd parity */ + CY_USB_DEV_CDC_PARITY_EVEN, /**< Even parity */ + CY_USB_DEV_CDC_PARITY_MARK, /**< Mark */ + CY_USB_DEV_CDC_PARITY_SPACE, /**< Space */ +} cy_en_usb_dev_cdc_parity_type_t; + +/** \} group_usb_dev_cdc_enums */ + + +/******************************************************************************* +* Type Definitions +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_cdc_data_structures +* \{ +*/ +/** CDC class configuration structure */ +typedef struct +{ + /** The pointers to the buffers to store received data by COM port 0 and 1 + * appropriately. The buffer is mandatory to for \ref Cy_USB_Dev_CDC_GetData + * and \ref Cy_USB_Dev_CDC_GetChar function operation. If these functions + * will not be used by the application pass NULL as a pointer. \n + * Allocate buffer using \ref CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make + * it USBFS driver configuration independent (See \ref group_usb_dev_ep_buf_alloc + * for more information). + */ + uint8_t *buffer[CY_USB_DEV_CDC_COMPORT_NUMBER]; + + /** Size of provided buffers to for the COM port 0 and 1 appropriately. + * The buffer size must be equal to the maximum packet size of CDC Data + * interface IN endpoint that belongs to the COM port. + * Pass zero size if the pointer to the buffer is NULL. + */ + uint32_t bufferSize[CY_USB_DEV_CDC_COMPORT_NUMBER]; + + +} cy_stc_usb_dev_cdc_config_t; + +/** \cond INTERNAL: CDC COM port properties structure */ +typedef struct +{ + /** Defines whether port is valid for usage */ + volatile bool valid; + + /** Buffer for byte read organization */ + uint8_t *buffer; + + /** Size of buffer */ + uint32_t bufferSize; + + /** Number of occupied bytes in buffer */ + uint32_t writeBufIdx; + + /** Number of occupied bytes in buffer */ + uint32_t readBufIdx; + + /** Contains the interface number used to define port number in requests. */ + volatile uint8_t interfaceNum; + + /** + * Contains the data IN endpoint size. It is initialized after a + * SET_CONFIGURATION request based on a user descriptor. It is used + * in CDC functions to send data to the Host. + */ + volatile uint16_t dataInEpSize; + + /** + * Contains the data OUT endpoint size. It is initialized after a + * SET_CONFIGURATION request based on user descriptor. It is used in + * CDC functions to receive data from the Host. + */ + volatile uint16_t dataOutEpSize; + + /** + * Contains the IN interrupt endpoint size used for sending serial + * state notification to the Host. It is initialized after a + * SET_CONFIGURATION request based on a user descriptor. It is used + * in the CDC function SendSerialState(). + */ + volatile uint16_t commEpSize; + + /** + * Contains the current line coding structure. The Host sets it using + * a SET_LINE_CODING request and returns it to the user code using + * the GetDTERate(), GetCharFormat(), GetParityType(), and + * GetDataBits() functions. + */ + volatile uint8_t linesCoding[CY_USB_DEV_CDC_LINE_CODING_SIZE]; + /** + * Used as a flag for the IsLineChanged() function, to inform it that + * the host has been sent a request to change line coding or control + * bitmap. + */ + volatile uint8_t linesChanged; + + /** + * Contains the current control-signal bitmap. The Host sets it using + * a SET_CONTROL_LINE request and returns it to the user code using + * the GetLineControl() function. + */ + volatile uint8_t linesControlBitmap; + + /** + * Contains the 16-bit serial state value that was sent using the + * SendSerialState() function. + */ + volatile uint16_t serialStateBitmap; + + /** + * Contains the 16-bit serial state value that was sent using the + * SendSerialState() function. + */ + volatile uint8_t serialStateNotification[CY_USB_DEV_CDC_SERIAL_STATE_SIZE]; + + /** + * Contains the data IN endpoint number. It is initialized after a + * SET_CONFIGURATION request based on a user descriptor. It is used + * in CDC functions to send data to the host. + */ + volatile uint8_t dataInEp; + + /** + * Contains the data OUT endpoint number. It is initialized after a + * SET_CONFIGURATION request based on user descriptor. It is used in + * CDC functions to receive data from the Host. + */ + volatile uint8_t dataOutEp; + + /** + * Contains the IN interrupt endpoint number used for sending serial + * state notification to the host. It is initialized after a + * SET_CONFIGURATION request based on a user descriptor. It is used + * in the CDC function SendSerialState(). + */ + volatile uint8_t commEp; + +} cy_stc_usb_dev_cdc_comport_t; +/** \endcond */ + +/** CDC class context structure. +* All fields for the CDC context structure are internal. Firmware never reads or +* writes these values. Firmware allocates the structure and provides the +* address of the structure to the middleware in CDC function calls. Firmware +* must ensure that the defined instance of this structure remains in scope while +* the middleware is in use. +*/ +typedef struct +{ + /** \cond INTERNAL*/ + + /** COM port description array */ + cy_stc_usb_dev_cdc_comport_t port[CY_USB_DEV_CDC_COMPORT_NUMBER]; + + /** CDC class functions pointers */ + cy_stc_usb_dev_class_t classObj; + + /** CDC class linked list item */ + cy_stc_usb_dev_class_ll_item_t classItem; + + /** Device context */ + cy_stc_usb_dev_context_t *devContext; + + /** + * Called after setupRequest was received (before internal processing). + * Returns status of the event processing. + */ + cy_cb_usb_dev_request_received_t requestReceived; + + /** + * Called after setupRequest was received (before internal processing). + * Returns status of the event processing. + */ + cy_cb_usb_dev_request_cmplt_t requestCompleted; + + /** \endcond */ + +} cy_stc_usb_dev_cdc_context_t; +/** \} group_usb_dev_cdc_data_structures */ + + +/******************************************************************************* +* Function Prototypes +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_cdc_functions +* \{ +*/ +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_Init(cy_stc_usb_dev_cdc_config_t const *config, + cy_stc_usb_dev_cdc_context_t *context, + cy_stc_usb_dev_context_t *devContext); + +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutData(uint32_t port, uint8_t const *buffer, uint32_t size, + cy_stc_usb_dev_cdc_context_t *context); + +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutString(uint32_t port, char_t const *string, int32_t timeout, + cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutChar(uint32_t port, char_t ch, + cy_stc_usb_dev_cdc_context_t *context); + +uint32_t Cy_USB_Dev_CDC_GetCount(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +bool Cy_USB_Dev_CDC_IsDataReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +bool Cy_USB_Dev_CDC_IsReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +uint32_t Cy_USB_Dev_CDC_GetData(uint32_t port, uint8_t *buffer, uint32_t size, + cy_stc_usb_dev_cdc_context_t *context); + +uint32_t Cy_USB_Dev_CDC_GetAll(uint32_t port, uint8_t *buffer, uint32_t maxSize, + cy_stc_usb_dev_cdc_context_t *context); + +char_t Cy_USB_Dev_CDC_GetChar(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_IsLineChanged(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetLineControl(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context); + +uint32_t Cy_USB_Dev_CDC_GetDTERate(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE cy_en_usb_dev_cdc_stop_bit_t Cy_USB_Dev_CDC_GetCharFormat(uint32_t port, + cy_stc_usb_dev_cdc_context_t const *context); + +__STATIC_INLINE cy_en_usb_dev_cdc_parity_type_t Cy_USB_Dev_CDC_GetParity(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetDataBits(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context); + +cy_en_usb_dev_status_t Cy_USB_Dev_CDC_SendSerialState(uint32_t port, uint32_t serialState, + cy_stc_usb_dev_cdc_context_t *context); + +bool Cy_USB_Dev_CDC_IsNotificationReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE void Cy_USB_Dev_CDC_RegisterUserCallbacks(cy_cb_usb_dev_request_received_t requestReceivedHandle, + cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, + cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_CDC_GetClass(cy_stc_usb_dev_cdc_context_t *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetSerialState(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context); +/** \} group_usb_dev_cdc_functions */ + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_cdc_macros +* \{ +*/ + +/** +* Indicates that a DTR signal is present. This signal corresponds to V.24 +* signal 108/2 and RS232 signal DTR. +*/ +#define CY_USB_DEV_CDC_LINE_CONTROL_DTR (0x1U) + +/** +* Carrier control for half-duplex modems. This signal corresponds to V.24 +* signal 105 and RS232 signal RTS. +*/ +#define CY_USB_DEV_CDC_LINE_CONTROL_RTS (0x2U) + +#define CY_USB_DEV_CDC_LINE_NOT_CHANGED (0U) /**< No line coding/line control changes */ +#define CY_USB_DEV_CDC_LINE_CODING_CHANGED (1U) /**< Line coding changed */ +#define CY_USB_DEV_CDC_LINE_CONTROL_CHANGED (2U) /**< Line control changed */ + +/** \} group_usb_dev_cdc_macros */ + + +/******************************************************************************* +* In-line Function Implementation +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_cdc_functions +* \{ +*/ + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_RegisterUserCallbacks +****************************************************************************//** +* +* Registering user callback to handle CDC class requests that are not supported +* by provided CDC request handler. +* +* \param requestReceivedHandle +* The pointer to a callback function. +* This function is called when setup packet was received from USB Host but was +* not recognized, therefore might require the user class processing. +* To remove callback function pass NULL as function pointer. +* +* \param requestCompletedHandle +* The pointer to a callback function. +* This function is called when USB Device received data from the USB Host +* as part of current request processing. The requestReceivedHandle function +* must enable notification to trigger this event. This makes sense only when CDC +* request processing requires a data stage. +* To remove callback function pass NULL as function pointer. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the Audio Class operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_CDC_RegisterUserCallbacks(cy_cb_usb_dev_request_received_t requestReceivedHandle, + cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, + cy_stc_usb_dev_cdc_context_t *context) +{ + context->requestReceived = requestReceivedHandle; + context->requestCompleted = requestCompletedHandle; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetClass +****************************************************************************//** +* +* Returns pointer to the CDC class structure. +* This function is useful to override class event handlers using +* \ref group_usb_dev_functions_class_support. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* The pointer to the CDC class structure. +* +*******************************************************************************/ +__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_CDC_GetClass(cy_stc_usb_dev_cdc_context_t *context) +{ + return &context->classObj; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetSerialState +****************************************************************************//** +* +* Returns the current serial state value for the COM port. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* 16-bit serial state value. Refer to revision 1.2 of the CDC PSTN Subclass +* specification for bit field definitions of the 16-bit serial state value. +* Zero in case COM port is invalid. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetSerialState(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context) +{ + CY_ASSERT_L1(CY_USB_DEV_CDC_IS_COM_VALID(port)); + + uint32_t retState = (context->port[port].valid) ? + context->port[port].serialStateBitmap : 0U; + return retState; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_IsLineChanged +****************************************************************************//** +* +* Returns the clear-on-read status of the COM port. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* * \ref CY_USB_DEV_CDC_LINE_CODING_CHANGED when SET_LINE_CODING request is +* received. +* * \ref CY_USB_DEV_CDC_LINE_CONTROL_CHANGED when CDC_SET_CONTROL_LINE_STATE +* request is received. +* * \ref CY_USB_DEV_CDC_LINE_NOT_CHANGED when there were no request since last +* call. +* +* \note +* This function is not interrupt-protected and to prevent a race condition, +* it should be protected from the USBFS interruption in the place where it +* is called. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_IsLineChanged(uint32_t port, cy_stc_usb_dev_cdc_context_t *context) +{ + CY_ASSERT_L1(CY_USB_DEV_CDC_IS_COM_VALID(port)); + + uint32_t retState = context->port[port].linesChanged; + context->port[port].linesChanged = CY_USB_DEV_CDC_LINE_NOT_CHANGED; + + return retState; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetCharFormat +****************************************************************************//** +* +* Returns the number of stop bits for the COM port. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Number of stop bits \ref cy_en_usb_dev_cdc_stop_bit_t. +* +*******************************************************************************/ +__STATIC_INLINE cy_en_usb_dev_cdc_stop_bit_t Cy_USB_Dev_CDC_GetCharFormat(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context) +{ + CY_ASSERT_L1(CY_USB_DEV_CDC_IS_COM_VALID(port)); + + return (cy_en_usb_dev_cdc_stop_bit_t) context->port[port].linesCoding[CY_USB_DEV_CDC_LINE_CODING_CHAR_FORMAT_POS]; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_PutChar +****************************************************************************//** +* +* Sends a single character to the USB Host. +* Call \ref Cy_USB_Dev_CDC_IsReady function to ensure that the COM port +* (CDC Data interface) is ready for sending data to the USB Host before calling +* this function. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param ch +* Character to be sent. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutChar(uint32_t port, char_t ch, + cy_stc_usb_dev_cdc_context_t *context) +{ + /* Put data into the aligned buffer to work with 8-bit and 16-bit access type */ + uint16_t chBuffer = (uint16_t) ch; + + return Cy_USB_Dev_CDC_PutData(port, (uint8_t*) &chBuffer, 1U, context); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetParity +****************************************************************************//** +* +* Returns the parity type for the COM port. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Parity type \ref cy_en_usb_dev_cdc_parity_type_t. +* +*******************************************************************************/ +__STATIC_INLINE cy_en_usb_dev_cdc_parity_type_t Cy_USB_Dev_CDC_GetParity(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context) +{ + CY_ASSERT_L1(CY_USB_DEV_CDC_IS_COM_VALID(port)); + + return (cy_en_usb_dev_cdc_parity_type_t) context->port[port].linesCoding[CY_USB_DEV_CDC_LINE_CODING_PARITY_BITS_POS]; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetDataBits +****************************************************************************//** +* +* Returns the number of data bits for the COM port. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data keeping. The user must not modify +* anything in this structure. +* +* \return +* Number of data bits, which can be 5, 6, 7, 8, or 16. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetDataBits(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context) +{ + CY_ASSERT_L1(CY_USB_DEV_CDC_IS_COM_VALID(port)); + + return (uint32_t) context->port[port].linesCoding[CY_USB_DEV_CDC_LINE_CODING_DATA_BITS_POS]; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_CDC_GetLineControl +****************************************************************************//** +* +* Returns the line control bitmap for the COM port. +* +* \param port +* COM port number. Valid ports are 0 and 1. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_cdc_context_t +* allocated by the user. The structure is used during the CDC Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Line control bitmap \ref CY_USB_DEV_CDC_LINE_CONTROL_DTR and +* \ref CY_USB_DEV_CDC_LINE_CONTROL_RTS. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetLineControl(uint32_t port, cy_stc_usb_dev_cdc_context_t const *context) +{ + CY_ASSERT_L1(CY_USB_DEV_CDC_IS_COM_VALID(port)); + + return (uint32_t) context->port[port].linesControlBitmap; +} + +/** \} group_usb_dev_cdc_functions */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_CDC_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_cdc_descr.h b/cy_usb_dev_cdc_descr.h new file mode 100644 index 0000000..61dffba --- /dev/null +++ b/cy_usb_dev_cdc_descr.h @@ -0,0 +1,44 @@ +/***************************************************************************//** +* \file cy_usb_dev_cdc_descr.h +* \version 2.0 +* +* Provides CDC class-specific descriptor defines. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +#if !defined(CY_USB_DEV_CDC_DESCR_H) +#define CY_USB_DEV_CDC_DESCR_H + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** \cond INTERNAL */ +/* CDC class */ +#define CY_USB_DEV_CDC_CLASS (0x02U) +#define CY_USB_DEV_CDC_CLASS_DATA (0x0AU) +/** \endcond */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_CDC_DESCR_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_descr.h b/cy_usb_dev_descr.h new file mode 100644 index 0000000..0be1fae --- /dev/null +++ b/cy_usb_dev_descr.h @@ -0,0 +1,332 @@ +/***************************************************************************//** +* \file cy_usb_dev_descr.h +* \version 2.0 +* +* Provides device definition structures and descriptors structures. +* The descriptor structures can be used to access particular descriptors. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + + +#if !defined(CY_USB_DEV_DESCR_H) +#define CY_USB_DEV_DESCR_H + +#include +#include +#include + +#include "cy_usb_dev_audio_descr.h" +#include "cy_usb_dev_cdc_descr.h" +#include "cy_usb_dev_hid_descr.h" + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* Type Definitions +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_structures_device +* \{ +*/ + +/** USBFS Device endpointDescriptor structure */ +typedef struct +{ + /** Pointer to the endpointDescriptor Descriptor in the Configuration Descriptor */ + const uint8_t *endpointDescriptor; + +} cy_stc_usb_dev_endpoint_t; + + +/** USBFS Device HID structure */ +typedef struct +{ + /** Pointer to the HID Class Descriptor in the Configuration Descriptor */ + const uint8_t *hidDescriptor; + + /** Pointer to uint8_t array that stores HID Report Descriptor */ + const uint8_t *reportDescriptor; + + /** HID Report Descriptor size */ + uint16_t reportDescriptorSize; + + /** Start position of input report IDs in the array */ + uint8_t inputReportPos; + + /** Number of input report IDs */ + uint8_t numInputReports; + + /** Array of indexes for input report IDs */ + const uint8_t *inputReportIdx; + + /** Number of elements in the array of indexes */ + uint8_t inputReportIdxSize; + +} cy_stc_usb_dev_hid_t; + + +/** USBFS Device Alternate Interface structure */ +typedef struct +{ + /** Pointer to the Interface Descriptor in the Configuration Descriptor */ + const uint8_t *interfaceDescriptor; + + /** Pointer to array of pointers to structure that stores Endpoints information */ + const cy_stc_usb_dev_endpoint_t **endpoints; + + /** Number of endpoints that belong to this interface alternates */ + uint8_t numEndpoints; + + /** Pointer to the HID information structure */ + const cy_stc_usb_dev_hid_t *hid; +} cy_stc_usb_dev_alternate_t; + + +/** USBFS Device Interface structure */ +typedef struct +{ + /** Number of supported alternate settings */ + uint8_t numAlternates; + + /** Pointer to array of pointers to structure that stores Interface Alternates information */ + const cy_stc_usb_dev_alternate_t **alternates; + + /** Mask that represents endpoints that belong to Interface Alternates */ + uint16_t endpointsMask; +} cy_stc_usb_dev_interface_t; + + +/** USBFS Device Configuration structure */ +typedef struct +{ + /** Number of supported interfaces */ + uint8_t numInterfaces; + + /** Pointer to uint8_t array that stores Configuration Descriptor */ + const uint8_t *configDescriptor; + + /** Pointer to array of pointers to structure that store Interface information */ + const cy_stc_usb_dev_interface_t **interfaces; +} cy_stc_usb_dev_configuration_t; + +/** USBFS Device MS OS String Descriptors structure */ +typedef struct +{ + /** Pointer to MS OS String descriptor */ + const uint8_t *msOsDescriptor; + + /** Vendor code to get Extended Compat ID and Properties OS Descriptors */ + uint8_t msVendorCode; + + /** Pointer to Extended Compat ID OS Descriptor */ + const uint8_t *extCompatIdDescriptor; + + /** Pointer to Extended Properties OS Descriptor */ + const uint8_t *extPropertiesDescriptor; +} cy_stc_usb_dev_ms_os_string_t; + +/** USBFS Device String Descriptors structure */ +typedef struct +{ + /** Number of String Descriptors */ + uint8_t numStrings; + + /** Defines whether the MS OS String is enabled */ + bool enableWindowsOsDescriptor; + + /** Defines MS OS Strings structures */ + const cy_stc_usb_dev_ms_os_string_t *osStringDescriptors; + + /** Pointer to array of pointers to String Descriptors */ + const uint8_t **stringDescriptors; +} cy_stc_usb_dev_string_t; + + +/** USBFS Device structure */ +typedef struct +{ + /** Pointer to uint8_t array that stores Device Descriptor */ + const uint8_t *deviceDescriptor; + + /** Pointer to uint8_t array that stores BOS Descriptor */ + const uint8_t *bosDescriptor; + + /** Pointer to structure that stores Strings Descriptors information */ + const cy_stc_usb_dev_string_t *strings; + + /** Number of supported configurations */ + uint8_t numConfigurations; + + /** Pointer to array of pointers to structure that stores Configuration information */ + const cy_stc_usb_dev_configuration_t **configurations; + +} cy_stc_usb_dev_device_t; + +/** \} group_usb_dev_structures_device */ + + +/** +* \addtogroup group_usb_dev_structures_device_descr +* \{ +*/ + +/** Device descriptor */ +typedef struct +{ + uint8_t bLength; /**< Size of the Descriptor in Bytes */ + uint8_t bDescriptorType; /**< Constant Device Descriptor */ + uint16_t bcdUSB; /**< USB Specification Number to which the device complies */ + uint8_t bDeviceClass; /**< Class Code (Assigned by USB Org): + * If equal to Zero, each interface specifies its own class code + * If equal to 0xFF, the class code is vendor specified. + * Otherwise, field is valid Class Code. + */ + uint8_t bDeviceSubClass; /**< Subclass Code (Assigned by USB Org) */ + uint8_t bDeviceProtocol; /**< Protocol Code (Assigned by USB Org) */ + uint8_t bMaxPacketSize; /**< Maximum Packet Size for Zero Endpoint. Valid Sizes are 8, 16, 32, 64 */ + uint16_t idVendor; /**< Vendor ID (Assigned by USB Org) */ + uint16_t idProduct; /**< Product ID (Assigned by Manufacturer) */ + uint16_t bcdDevice; /**< Release Number */ + uint8_t iManufacturer; /**< Index of Manufacturer String Descriptor */ + uint8_t iProduct; /**< Index of Product String Descriptor */ + uint8_t iSerialNumber; /**< Index of Serial Number String Descriptor */ + uint8_t bNumConfigurations;/**< Number of Possible Configurations */ +} cy_stc_usbdev_device_descr_t; + +/** Configuration descriptor */ +typedef struct +{ + uint8_t bLength; /**< Size of Descriptor in Bytes */ + uint8_t bDescriptorType; /**< Configuration Descriptor */ + uint16_t wTotalLength; /**< Total length in bytes of data returned */ + uint8_t bNumInterfaces; /**< Number of Interfaces */ + uint8_t bConfigurationValue; /**< Value to use as an argument to select this configuration */ + uint8_t iConfiguration; /**< Index of String Descriptor describing this configuration */ + uint8_t bmAttributes; /**< Bitmap: + * D7 Reserved, set to 1. (USB 1.0 Bus Powered) + * D6 Self Powered + * D5 Remote Wakeup + * D4..0 Reserved, set to 0. + */ + uint8_t bMaxPower; /**< Maximum Power Consumption in 2 mA units */ +} cy_stc_usbdev_config_descr_t; + +/** Interface descriptor */ +typedef struct +{ + uint8_t bLength; /**< Size of Descriptor in Bytes (9 Bytes) */ + uint8_t bDescriptorType; /**< Interface Descriptor */ + uint8_t bInterfaceNumber; /**< Number of Interface */ + uint8_t bAlternateSetting; /**< Value used to select alternative setting */ + uint8_t bNumEndpoints; /**< Number of Endpoints used for this interface */ + uint8_t bInterfaceClass; /**< Class Code (Assigned by USB Org) */ + uint8_t bInterfaceSubClass; /**< Subclass Code (Assigned by USB Org) */ + uint8_t bInterfaceProtocol; /**< Protocol Code (Assigned by USB Org) */ + uint8_t iInterface; /**< Index of String Descriptor describing this interface */ +} cy_stc_usbdev_interface_descr_t; + + +/** Endpoint descriptor */ +typedef struct +{ + uint8_t bLength; /**< Size of Descriptor in Bytes */ + uint8_t bDescriptorType; /**< Endpoint Descriptor */ + uint8_t bEndpointAddress; /**< Endpoint Address: + * Bits 0..3 Endpoint Number. + * Bits 4..6 Reserved. Set to Zero + * Bit 7 Direction 0 = Out, 1 = In (Ignored for Control Endpoints) + */ + uint8_t bmAttributes; /**< Bitmap: + * Bits 0..1 Transfer Type: 00 = Control, 01 = Isochronous, 10 = Bulk, 11 = Interrupt + * Bits 2..7 are reserved. If Isochronous endpoint, + * Bits 3..2: Synchronization + * Type (Iso Mode): 00 = No Synchronization, 01 = Asynchronous, 10 = Adaptive, 11 = Synchronous + * Bits 5..4 = Usage Type (Iso Mode): 00 = Data Endpoint, 01 = Feedback Endpoint, + * 10 = Explicit Feedback Data Endpoint, 11 = Reserved + */ + uint16_t wMaxPacketSize; /**< Maximum Packet Size this endpoint is capable of sending or receiving */ + uint8_t bInterval; /**< Interval for polling endpoint data transfers. Value in frame counts. + * Ignored for Bulk & Control Endpoints. + * Isochronous must equal 1 and field may range from 1 to 255 for interrupt endpoints. + */ +} cy_stc_usbdev_endpoint_descr_t; + +/** \} group_usb_dev_structures_device_descr */ + + +/******************************************************************************* +* Macro for generation code usage +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_macros_device_descr +* \{ +*/ +#define CY_USB_DEV_USB_VERSION_2_0 (0x0200U) /**< USB Specification Release Number 2.0 */ +#define CY_USB_DEV_USB_VERSION_2_1 (0x0201U) /**< USB Specification Release Number 2.1 */ + +/* USB v2.0 spec: Table 9-5. Descriptor Types */ +#define CY_USB_DEV_DEVICE_DESCR (1U) /**< Device Descriptor type */ +#define CY_USB_DEV_CONFIG_DESCR (2U) /**< Device Configuration Descriptor type */ +#define CY_USB_DEV_STRING_DESCR (3U) /**< Device String Descriptor type */ +#define CY_USB_DEV_INTERFACE_DESCR (4U) /**< Device Interface Descriptor type */ +#define CY_USB_DEV_ENDPOINT_DESCR (5U) /**< Device Endpoint Descriptor type */ +#define CY_USB_DEV_DEVICE_QUALIFIER_DESCR (6U) /**< Device Qualifier Descriptor type */ +#define CY_USB_DEV_OTHER_SPEED_CFG_DESCR (7U) /**< Device Other Speed Descriptor type */ +#define CY_USB_DEV_INTERFACE_POWER_DESCR (8U) /**< Device Interface Power Descriptor type */ +#define CY_USB_DEV_BOS_DESCR (15U) /**< Device BOS Descriptor type */ + +/* MS OS String Descriptors */ +#define CY_USB_DEV_MS_OS_STRING_EXT_COMPAT_ID (4U) /**< Extended Compat ID OS Descriptor */ +#define CY_USB_DEV_MS_OS_STRING_EXT_PROPERTEIS (5U) /**< Extended Properties OS Descriptor */ + +/* Standard descriptor lengths */ +#define CY_USB_DEV_DEVICE_DESCR_LENGTH (18U) /**< Device Descriptor length */ +#define CY_USB_DEV_CONFIG_DESCR_LENGTH (9U) /**< Device Configuration Descriptor length */ +#define CY_USB_DEV_INTERFACE_DESCR_LENGTH (9U) /**< Device Interface Descriptor length */ +#define CY_USB_DEV_ENDPOINT_DESCR_LENGTH (7U) /**< Device Endpoint Descriptor length */ +#define CY_USB_DEV_BOS_DESCR_LENGTH (5U) /**< Device BOS Descriptor length */ + +/* String Language ID length */ +#define CY_USB_DEV_STRING_DESCR_LANG_ID_LENGTH (4U) /**< Device String LANG ID Descriptor length */ + +/* bmAttributes in endpoint descriptor */ +#define CY_USB_DEV_EP_CONTROL (0x00U) /**< Control Transfer type */ +#define CY_USB_DEV_EP_ISOCHRONOUS (0x01U) /**< Isochronous Transfer type */ +#define CY_USB_DEV_EP_BULK (0x02U) /**< Bulk Transfer type */ +#define CY_USB_DEV_EP_INTERRUPT (0x03U) /**< Interrupt Transfer type */ +#define CY_USB_DEV_EP_TRANS_TYPE_MASK (0x03U) /**< Transfer type mask */ + +/* For isochronous endpoints only */ +#define CY_USB_DEV_EP_NO_SYNCHRONIZATION (0x00U) /**< No Synchronization of Isochronous endpoint */ +#define CY_USB_DEV_EP_ASYNCHRONOUS (0x04U) /**< Asynchronous Isochronous endpoint */ +#define CY_USB_DEV_EP_ADAPTIVE (0x08U) /**< Adaptive Isochronous endpoint */ +#define CY_USB_DEV_EP_SYNCHRONOUS (0x0CU) /**< Synchronous Isochronous endpoint */ +#define CY_USB_DEV_EP_DATA (0x00U) /**< Data Isochronous endpoint */ +#define CY_USB_DEV_EP_FEEDBACK (0x10U) /**< Feedback Isochronous endpoint */ +#define CY_USB_DEV_EP_IMPLICIT_FEEDBACK (0x20U) /**< Implicit feedback Isochronous endpoint */ + +/** \} group_usb_dev_macros_device_descr */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_DESCR_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_hid.c b/cy_usb_dev_hid.c new file mode 100644 index 0000000..a8f07c1 --- /dev/null +++ b/cy_usb_dev_hid.c @@ -0,0 +1,952 @@ +/***************************************************************************//** +* \file cy_usb_dev_hid.c +* \version 2.0 +* +* Provides HID class-specific API implementation. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + + +#include "cy_usb_dev_hid.h" + +#if defined(CY_IP_MXUSBFS) + + +/******************************************************************************* +* Internal Macro +*******************************************************************************/ + +/* Get Idle request response length */ +#define HID_IDLE_RATE_LENGTH (1U) + +/* Get Protocol request response length */ +#define HID_PROTOCOL_LENGTH (1U) + +/* Set protocol mask */ +#define HID_PROTOCOL_MASK (0x01U) + +/* Set default idle rate */ +#define HID_IDLE_RATE_INDEFINITE (0U) + + +/******************************************************************************* +* Internal Functions Prototypes +*******************************************************************************/ + +static void HandleBusReset(void *classContext, cy_stc_usb_dev_context_t *devContext); + +static cy_en_usb_dev_status_t HandleRequest(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext); + +static cy_en_usb_dev_status_t HandleRequestComplete(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext); + +static cy_en_usb_dev_status_t GetDescriptorHidReportRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_t const *hid); + +static cy_en_usb_dev_status_t GetDescriptorHidClassRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_t const *hid); + +static cy_en_usb_dev_status_t GetReportRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t const *context); + +static cy_en_usb_dev_status_t GetProtocolRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t *context); + +static cy_en_usb_dev_status_t GetIdleRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_t const *hid, + cy_stc_usb_dev_hid_context_t *context); + +static cy_en_usb_dev_status_t SetReportRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t const *context); + +static cy_en_usb_dev_status_t SetReportRequestComplete(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t const *context); + +static cy_en_usb_dev_status_t SetProtocolRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_hid_context_t *context); + +static void UpdateIdleRateTimer(uint32_t idx, cy_stc_usb_dev_hid_context_t *context); + +static cy_en_usb_dev_status_t SetIdleRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_hid_t const *hid, + cy_stc_usb_dev_hid_context_t *context); + +static cy_stc_usb_dev_hid_t const * GetHidStruct(uint32_t intf, + cy_stc_usb_dev_context_t *devContext); + +static cy_en_usb_dev_status_t GetInputReportIdx(uint32_t reportId, uint32_t *idx, + cy_stc_usb_dev_hid_t const *hid, + cy_stc_usb_dev_hid_context_t const *context); + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_HID_Init +****************************************************************************//** +* +* Initializes the HID class. +* This function must be called to enable USB Device HID functionality. +* +* \param config +* The pointer to the HID configuration +* structure \ref cy_stc_usb_dev_hid_config_t. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the USB Device context structure \ref cy_stc_usb_dev_context_t. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +cy_en_usb_dev_status_t Cy_USB_Dev_HID_Init(cy_stc_usb_dev_hid_config_t const *config, + cy_stc_usb_dev_hid_context_t *context, + cy_stc_usb_dev_context_t *devContext) +{ + /* Input parameters verification */ + if ((NULL == config) || (NULL == context) || (NULL == devContext)) + { + return CY_USB_DEV_BAD_PARAM; + } + + /* SETUP data storage */ + context->idleRate = config->timers; + context->idleTimer = &config->timers[config->timersNum]; + context->timersNum = config->timersNum; + + /* Remove custom handlers */ + context->handleGetReport = NULL; + context->handleSetReport = NULL; + + /* Store device context */ + context->devContext = devContext; + + /* Register HID handlers */ + Cy_USB_Dev_RegisterClassBusResetCallback(&HandleBusReset, Cy_USB_Dev_HID_GetClass(context)); + Cy_USB_Dev_RegisterClassRequestRcvdCallback(&HandleRequest, Cy_USB_Dev_HID_GetClass(context)); + Cy_USB_Dev_RegisterClassRequestCmpltCallback(&HandleRequestComplete, Cy_USB_Dev_HID_GetClass(context)); + + return Cy_USB_Dev_RegisterClass(&context->classItem, &context->classObj, context, devContext); +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_HID_UpdateTimer +****************************************************************************//** +* +* Updates the HID Report idle timer and returns the status of the timer. This +* function also reloads the timer if it expires. +* +* \param interface +* Contains the interface number that contains the HID descriptor whose HID timer +* needs to be updated. +* +* \param reportId +* Report ID whose HID timer needs to be updated. +* Pass 0 if report ID is not used. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* The state of the HID timer \ref cy_en_usb_dev_hid_timer_state_t +* +*******************************************************************************/ +cy_en_usb_dev_hid_timer_state_t Cy_USB_Dev_HID_UpdateTimer(uint32_t interface, + uint32_t reportId, + cy_stc_usb_dev_hid_context_t *context) +{ + cy_en_usb_dev_hid_timer_state_t retState = CY_USB_DEV_HID_TIMER_INDEFINITE; + + cy_stc_usb_dev_hid_t const *hidStruct = GetHidStruct(interface, context->devContext); + + /* Check that HID exists for given interface */ + CY_ASSERT_L1(NULL != hidStruct); + + if (NULL != hidStruct) + { + uint32_t idx; + cy_en_usb_dev_status_t locStatus = GetInputReportIdx(reportId, &idx, hidStruct, context); + + /* Check that Report ID exists for given interface */ + CY_ASSERT_L1(CY_USB_DEV_SUCCESS == locStatus); + + if (CY_USB_DEV_SUCCESS == locStatus) + { + /* Protect from race condition between SET_IDLE request and timer update */ + uint32_t intrState = Cy_SysLib_EnterCriticalSection(); + + /* Check if duration is defined */ + if (context->idleRate[idx] != HID_IDLE_RATE_INDEFINITE) + { + /* Run timer */ + if (context->idleTimer[idx] > 0U) + { + context->idleTimer[idx]--; + retState = CY_USB_DEV_HID_TIMER_RUNNING; + } + else + { + context->idleTimer[idx] = context->idleRate[idx]; + retState = CY_USB_DEV_HID_TIMER_EXPIRED; + } + } + + Cy_SysLib_ExitCriticalSection(intrState); + } + } + + return retState; +} + + +/******************************************************************************* +* Function Name: HandleBusReset +****************************************************************************//** +* +* Handles Bus Reset event: clears HID protocol and idle rate timers. +* +* \param classContext +* Contains the interface number that contains the HID descriptor whose HID timer +* needs to be updated. +* +* \param devContext +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* +*******************************************************************************/ +static void HandleBusReset(void *classContext, cy_stc_usb_dev_context_t *devContext) +{ + /* Suppress a compiler warning about unused variables */ + (void) devContext; + + cy_stc_usb_dev_hid_context_t *context = (cy_stc_usb_dev_hid_context_t *) classContext; + + /* Set protocol to default */ + (void) memset((void *) context->protocol, (int32_t) CY_USB_DEV_HID_PROTOCOL_REPORT, (uint32_t) CY_USB_DEV_NUM_INTERFACES_MAX); + + /* Set idle rate to default */ + (void) memset(context->idleRate, (int32_t) HID_IDLE_RATE_INDEFINITE, (uint32_t) context->timersNum); + (void) memset(context->idleTimer, (int32_t) HID_IDLE_RATE_INDEFINITE, (uint32_t) context->timersNum); +} + + +/******************************************************************************* +* Function Name: HandleRequest +****************************************************************************//** +* +* Handles HID class requests (SETUP packet received event). +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param classContext +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleRequest(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Get HID pointer for this interface (all HID requests using wIndex to pass interface) */ + cy_stc_usb_dev_hid_t const *hidStruct = GetHidStruct((uint32_t) transfer->setup.wIndex, devContext); + + if (NULL == hidStruct) + { + return CY_USB_DEV_REQUEST_NOT_HANDLED; + } + + /* Process standard requests */ + if (CY_USB_DEV_STANDARD_TYPE == transfer->setup.bmRequestType.type) + { + if (CY_USB_DEV_RQST_GET_DESCRIPTOR == transfer->setup.bRequest) + { + switch (CY_USB_DEV_GET_DESCR_TYPE(transfer->setup.wValue)) + { + case CY_USB_DEV_HID_REPORT_DESCRIPTOR: + retStatus = GetDescriptorHidReportRequest(transfer, hidStruct); + break; + + case CY_USB_DEV_HID_DESCRIPTOR: + retStatus = GetDescriptorHidClassRequest(transfer, hidStruct); + break; + + default: + /* The request was not recognized */ + break; + } + } + } + /* Process class-specific requests */ + else if (CY_USB_DEV_CLASS_TYPE == transfer->setup.bmRequestType.type) + { + /* Get HID context */ + cy_stc_usb_dev_hid_context_t *context = (cy_stc_usb_dev_hid_context_t *) classContext; + + if (transfer->direction == CY_USB_DEV_DIR_DEVICE_TO_HOST) + { + switch (transfer->setup.bRequest) + { + case CY_USB_DEV_HID_RQST_GET_REPORT: + retStatus = GetReportRequest(transfer, context); + break; + + case CY_USB_DEV_HID_RQST_GET_PROTOCOL: + retStatus = GetProtocolRequest(transfer, context); + break; + + case CY_USB_DEV_HID_RQST_GET_IDLE: + retStatus = GetIdleRequest(transfer, hidStruct, context); + break; + + default: + /* The request was not recognized */ + break; + } + } + else + { + switch (transfer->setup.bRequest) + { + case CY_USB_DEV_HID_RQST_SET_REPORT: + retStatus = SetReportRequest(transfer, context); + break; + + case CY_USB_DEV_HID_RQST_SET_PROTOCOL: + retStatus = SetProtocolRequest(transfer, context); + break; + + case CY_USB_DEV_HID_RQST_SET_IDLE: + retStatus = SetIdleRequest(transfer, hidStruct, context); + break; + + default: + /* The request was not recognized */ + break; + } + } + } + else + { + /* The request was not recognized */ + } + + return (retStatus); +} + + +/******************************************************************************* +* Function Name: HandleRequestComplete +****************************************************************************//** +* +* Completes handling HID class requests that expects data from the host. +* Involved when data from the host was received. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param classContext +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \param devContext +* The pointer to the context structure \ref cy_stc_usb_dev_context_t allocated +* by the user. The structure is used during the USB Device operation for +* internal configuration and data retention. The user must not modify anything +* in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t HandleRequestComplete(cy_stc_usb_dev_control_transfer_t *transfer, + void *classContext, + cy_stc_usb_dev_context_t *devContext) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + /* Suppress a compiler warning about unused variables */ + (void) devContext; + + if (CY_USB_DEV_HID_RQST_SET_REPORT == transfer->setup.bRequest) + { + retStatus = SetReportRequestComplete(transfer, (cy_stc_usb_dev_hid_context_t *) classContext); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetDescriptorHidReportRequest +****************************************************************************//** +* +* Handles GET_DESCRIPOR HID Report request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param hid +* The pointer to the the structure that holds HID Class information. +* +* \return +* Returns \ref CY_USB_DEV_SUCCESS. +* The \ref HandleRequest function checks that HID structure exist for the +* specified interface before calling \ref GetDescriptorHidReportRequest function. +* Therefore \ref GetDescriptorHidReportRequest successfully access to +* the HID structure. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetDescriptorHidReportRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_t const *hid) +{ + /* SETUP control transfer */ + transfer->ptr = (uint8_t *) hid->reportDescriptor; + transfer->remaining = hid->reportDescriptorSize; + + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: GetDescriptorHidClassRequest +****************************************************************************//** +* +* Handles GET_DESCRIPOR HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param hid +* The pointer to the the structure that holds HID Class information. +* +* \return +* Returns \ref CY_USB_DEV_SUCCESS. +* The \ref HandleRequest function checks that HID structure exist for the +* specified interface before calling \ref GetDescriptorHidClassRequest function. +* Therefore \ref GetDescriptorHidClassRequest successfully access to +* the HID structure. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetDescriptorHidClassRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_t const *hid) +{ + /* SETUP control transfer */ + transfer->ptr = (uint8_t *) hid->hidDescriptor; + transfer->remaining = CY_USB_DEV_HID_DESCRIPTOR_LENGTH; + + return CY_USB_DEV_SUCCESS; +} + + +/******************************************************************************* +* Function Name: GetReportRequest +****************************************************************************//** +* +* Handles GET_REPORT HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetReportRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t const *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + if (NULL != context->handleGetReport) + { + uint32_t rptSize; + + /* Get from the user report to send */ + retStatus = context->handleGetReport( + (uint32_t) transfer->setup.wIndex, /* Interface */ + (uint32_t) CY_HI8(transfer->setup.wValue), /* Report Type */ + (uint32_t) CY_LO8(transfer->setup.wValue), /* Report ID */ + &(transfer->ptr), + &rptSize); + + transfer->remaining = (uint16_t) rptSize; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetProtocolRequest +****************************************************************************//** +* +* Handles GET_PROTOCOL HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetProtocolRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint32_t interface = transfer->setup.wIndex; + + if (interface < CY_USB_DEV_NUM_INTERFACES_MAX) + { + /* SETUP control transfer */ + transfer->ptr = (uint8_t *) &context->protocol[interface]; + transfer->remaining = HID_PROTOCOL_LENGTH; + + retStatus = CY_USB_DEV_SUCCESS; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetIdleRequest +****************************************************************************//** +* +* Handles GET_IDLE HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param hid +* The pointer to the the structure that holds HID Class information. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetIdleRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_t const *hid, + cy_stc_usb_dev_hid_context_t *context) +{ + cy_en_usb_dev_status_t retStatus; + uint32_t idx; + + retStatus = GetInputReportIdx((uint32_t) transfer->setup.wValue, &idx, hid, context); + + if (CY_USB_DEV_SUCCESS == retStatus) + { + /* SETUP control transfer */ + transfer->ptr = &context->idleRate[idx]; + transfer->remaining = HID_IDLE_RATE_LENGTH; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetReportRequest +****************************************************************************//** +* +* Handles SET_REPORT HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetReportRequest(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t const *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + if (NULL != context->handleSetReport) + { + /* SETUP control transfer */ + transfer->remaining = transfer->setup.wLength; + transfer->notify = true; + + retStatus = CY_USB_DEV_SUCCESS; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetReportRequestComplete +****************************************************************************//** +* +* Completes handling SET_REPORT HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetReportRequestComplete(cy_stc_usb_dev_control_transfer_t *transfer, + cy_stc_usb_dev_hid_context_t const *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + if (NULL != context->handleSetReport) + { + /* Provide the user with report data */ + retStatus = context->handleSetReport( + (uint32_t) transfer->setup.wIndex, /* Interface */ + (uint32_t) CY_HI8(transfer->setup.wValue), /* Report Type */ + (uint32_t) CY_LO8(transfer->setup.wValue), /* Report ID */ + transfer->ptr, + (uint32_t) transfer->size); + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: SetProtocolRequest +****************************************************************************//** +* +* Handles SET_PROTOCOL HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetProtocolRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_hid_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint32_t interface = transfer->setup.wIndex; + + if (interface < CY_USB_DEV_NUM_INTERFACES_MAX) + { + context->protocol[interface] = (uint8_t) (transfer->setup.wValue & HID_PROTOCOL_MASK); + + /* SETUP control transfer, no data stage */ + retStatus = CY_USB_DEV_SUCCESS; + } + + return retStatus; +} + + +/******************************************************************************* +* Function Name: UpdateIdleRateTimer +****************************************************************************//** +* +* Updates Idle Rate timer after SET_IDLE request was received. +* +* \param idx +* Idle Rate timer index. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +*******************************************************************************/ +static void UpdateIdleRateTimer(uint32_t idx, cy_stc_usb_dev_hid_context_t *context) +{ + /* Reset timer if Idle rate indefinite */ + if (HID_IDLE_RATE_INDEFINITE == context->idleRate[idx]) + { + context->idleTimer[idx] = 0U; + } + else + { + /* HID spec: Set_Idle request Latency */ + if (context->idleTimer[idx] >= context->idleRate[idx]) + { + /* Reload the timer: wait new period */ + context->idleTimer[idx] = context->idleRate[idx]; + } + else + { + if (context->idleTimer[idx] >= 1U) + { + /* If the current period has gone past the newly prescribed + * time duration, then a report will be generated immediately. + * Clear timer to return TIMER_EXPIRED on next HID_UpdateTimer call. + */ + context->idleTimer[idx] = 0U; + } + else + { + /* A new request will be executed as if it were issued + * immediately after the last report, if the new request + * is received at least 4 milliseconds before the end of + * the currently executing period. If the new request is + * received within 4 milliseconds of the end of the + * current period, then the new request will have no + * effect until after the report + */ + + /* Do nothing: let HID_UpdateTimer continue to counting + * and return TIMER_EXPIRED status. + */ + } + } + } +} + + +/******************************************************************************* +* Function Name: SetIdleRequest +****************************************************************************//** +* +* Handles SET_IDLE HID Class request. +* +* \param transfer +* Pointer to structure that holds SETUP packet and information for +* request processing. +* +* \param hid +* The pointer to the the structure that holds HID Class information. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status of request processing: \ref CY_USB_DEV_SUCCESS or +* \ref CY_USB_DEV_REQUEST_NOT_HANDLED. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t SetIdleRequest(cy_stc_usb_dev_control_transfer_t const *transfer, + cy_stc_usb_dev_hid_t const *hid, + cy_stc_usb_dev_hid_context_t *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + uint32_t reportId = CY_LO8(transfer->setup.wValue); + uint32_t idx; + + /* Get report ID index */ + retStatus = GetInputReportIdx(reportId, &idx, hid, context); + + if (CY_USB_DEV_SUCCESS == retStatus) + { + if (reportId > 0U) + { + /* Set IdleRate for defined report ID then update idle timers */ + context->idleRate[idx] = CY_HI8(transfer->setup.wValue); + UpdateIdleRateTimer(idx, context); + } + else + { + /* Set IdleRate to all Report IDs for this HID interface */ + (void) memset(&context->idleRate[idx], (int32_t) CY_HI8(transfer->setup.wValue), (uint32_t) hid->numInputReports); + + /* Update idle timers */ + for(;idx < hid->numInputReports; ++idx) + { + UpdateIdleRateTimer(idx, context); + } + } + } + + /* SETUP control transfer, no data stage */ + + return retStatus; +} + + +/******************************************************************************* +* Function Name: GetHidStruct +****************************************************************************//** +* +* Returns the pointer to the structure that holds HID Class information +* for a certain interface. +* +* \param intf +* Interface number. +* +* \param devContext +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t allocated +* by the user. +* +* \return +* The pointer to HID interface structure \ref cy_stc_usb_dev_hid_t. +* If interface protocol is not HID the NULL pointer is returned. +* +*******************************************************************************/ +static cy_stc_usb_dev_hid_t const * GetHidStruct(uint32_t intf, cy_stc_usb_dev_context_t *devContext) +{ + uint32_t cfg = Cy_USB_Dev_GetConfigurationIdx(devContext); + + cy_stc_usb_dev_hid_t const *hidStruct = NULL; + + /* Check if interface is valid */ + if (intf < devContext->devDescriptors->configurations[cfg]->numInterfaces) + { + uint32_t alt = Cy_USB_Dev_GetAlternateSettings(intf, devContext); + + /* Get report descriptor */ + hidStruct = devContext->devDescriptors->configurations[cfg]->interfaces[intf]->alternates[alt]->hid; + } + + return hidStruct; +} + + +/******************************************************************************* +* Function Name: GetInputReportIdx +****************************************************************************//** +* +* Finds idle rate timer index for a certain report ID. +* +* \param reportId +* Report ID. If there is no report ID, zero must be passed. +* +* \param idx +* Idle rate timer index. +* +* \param hid +* The pointer to the the structure that holds HID Class information. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Status code of the function execution \ref cy_en_usb_dev_status_t. +* +*******************************************************************************/ +static cy_en_usb_dev_status_t GetInputReportIdx(uint32_t reportId, uint32_t *idx, + cy_stc_usb_dev_hid_t const *hid, + cy_stc_usb_dev_hid_context_t const *context) +{ + cy_en_usb_dev_status_t retStatus = CY_USB_DEV_REQUEST_NOT_HANDLED; + + if (0U == reportId) + { + /* Return start index in idleTimer array */ + *idx = hid->inputReportPos; + retStatus = CY_USB_DEV_SUCCESS; + } + else + { + /* Check that input report ID exists */ + if (reportId < hid->inputReportIdxSize) + { + /* Get report ID index in timers array */ + uint32_t tmpIdx = (uint32_t) hid->inputReportIdx[reportId]; + + /* Check that index value is valid (0 is free location) */ + if ((tmpIdx > 0U) && (tmpIdx <= context->timersNum)) + { + /* Return index in idleTimer array for report ID */ + *idx = (tmpIdx - 1U); + retStatus = CY_USB_DEV_SUCCESS; + } + } + } + + return retStatus; +} + +#endif /* CY_IP_MXUSBFS) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_hid.h b/cy_usb_dev_hid.h new file mode 100644 index 0000000..ea076c9 --- /dev/null +++ b/cy_usb_dev_hid.h @@ -0,0 +1,320 @@ +/***************************************************************************//** +* \file cy_usb_dev_hid.h +* \version 2.0 +* +* Provides HID class-specific API declarations. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + + +/** +* \addtogroup group_usb_dev_hid +* This section provides the API description for the HID class. +* \{ +* \defgroup group_usb_dev_hid_macros Macros +* \defgroup group_usb_dev_hid_functions Functions +* \defgroup group_usb_dev_hid_data_structures Data Structures +* \defgroup group_usb_dev_hid_enums Enumerated Types +* \} +*/ + + +#if !defined(CY_USB_DEV_HID_H) +#define CY_USB_DEV_HID_H + +#include "cy_usb_dev.h" + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* Enumerated Types +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_hid_enums +* \{ +*/ + +/** Timer state */ +typedef enum +{ + CY_USB_DEV_HID_TIMER_EXPIRED, /**< Timer expired */ + CY_USB_DEV_HID_TIMER_RUNNING, /**< Timer is running */ + CY_USB_DEV_HID_TIMER_INDEFINITE, /**< Report is sent when data or state changes */ +} cy_en_usb_dev_hid_timer_state_t; + +/** \} group_usb_dev_hid_enums */ + + + +/******************************************************************************* +* Type Definitions +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_hid_data_structures +* \{ +*/ + +/** Handler for GET_REPORT request received */ +typedef cy_en_usb_dev_status_t (* cy_cb_usbfs_dev_hid_get_report_t) + (uint32_t intf, uint32_t type, uint32_t id, + uint8_t **report, uint32_t *size); + +/** Handler for SET_REPORT request completed. The Host sent report data to Device. */ +typedef cy_en_usb_dev_status_t (* cy_cb_usbfs_dev_hid_set_report_t) + (uint32_t intf, uint32_t type, uint32_t id, + uint8_t *report, uint32_t size); + +/** HID class configuration structure */ +typedef struct +{ + /** The pointer to the HID idle rate timers array. The array size must be 2 + * times greater than number of HID idle rate timers. + */ + uint8_t *timers; + + /** Number of HID idle rate timers (equal to number of report IDs, if + * report ID is not used report consumes 1 idle rate timer). + */ + uint8_t timersNum; + +} cy_stc_usb_dev_hid_config_t; + +/** HID class context structure. +* All fields for the HID context structure are internal. Firmware never reads or +* writes these values. Firmware allocates the structure and provides the +* address of the structure to the middleware in HID function calls. Firmware +* must ensure that the defined instance of this structure remains in scope while +* the middleware is in use. +*/ +typedef struct +{ + /** \cond INTERNAL */ + + /** Pointer to device context */ + cy_stc_usb_dev_context_t *devContext; + + /** Class functions pointers */ + cy_stc_usb_dev_class_t classObj; + + /** Class linked list item */ + cy_stc_usb_dev_class_ll_item_t classItem; + + /** HID boot protocol options */ + volatile uint8_t protocol[CY_USB_DEV_NUM_INTERFACES_MAX]; + + /** HID idle rates array */ + uint8_t *idleRate; + + /** HID idle rate timers array */ + uint8_t *idleTimer; + + /** Number of HID idle rate timers (equal to number of report IDs) */ + uint8_t timersNum; + + /** Pointer to function that handles GET_REPORT requests */ + cy_cb_usbfs_dev_hid_get_report_t handleGetReport; + + /** Pointer to function that handles SET_REPORT requests */ + cy_cb_usbfs_dev_hid_set_report_t handleSetReport; + /** \endcond */ + +} cy_stc_usb_dev_hid_context_t; + +/** \} group_usb_dev_hid_data_structures */ + + +/******************************************************************************* +* Function Prototypes +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_hid_functions +* \{ +*/ +cy_en_usb_dev_status_t Cy_USB_Dev_HID_Init(cy_stc_usb_dev_hid_config_t const *config, + cy_stc_usb_dev_hid_context_t *context, + cy_stc_usb_dev_context_t *devContext); + +cy_en_usb_dev_hid_timer_state_t Cy_USB_Dev_HID_UpdateTimer(uint32_t interface, + uint32_t reportId, + cy_stc_usb_dev_hid_context_t *context); + +__STATIC_INLINE uint32_t Cy_USB_Dev_HID_GetProtocol(uint32_t interface, + cy_stc_usb_dev_hid_context_t const *context); + +__STATIC_INLINE void Cy_USB_Dev_HID_RegisterGetReportCallback(cy_cb_usbfs_dev_hid_get_report_t callback, + cy_stc_usb_dev_hid_context_t *context); + +__STATIC_INLINE void Cy_USB_Dev_HID_RegisterSetReportCallback(cy_cb_usbfs_dev_hid_set_report_t callback, + cy_stc_usb_dev_hid_context_t *context); + +__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_HID_GetClass(cy_stc_usb_dev_hid_context_t *context); + +/** \} group_usb_dev_hid_functions */ + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_hid_macros +* \{ +*/ +/** Protocol options */ +#define CY_USB_DEV_HID_PROTOCOL_BOOT (0U) /**< Boot Protocol */ +#define CY_USB_DEV_HID_PROTOCOL_REPORT (1U) /**< Report Protocol */ + +/** Report types */ +#define CY_USB_DEV_HID_REPORT_TYPE_INPUT (1U) /**< Input report type */ +#define CY_USB_DEV_HID_REPORT_TYPE_OUTPUT (2U) /**< Output report type */ +#define CY_USB_DEV_HID_REPORT_TYPE_FEATURE (3U) /**< Feature report type */ + +/** HID Class Requests */ +#define CY_USB_DEV_HID_RQST_GET_REPORT (0x1U) /**< GET_REPORT HID Class Request */ +#define CY_USB_DEV_HID_RQST_GET_IDLE (0x2U) /**< GET_IDLE HID Class Request */ +#define CY_USB_DEV_HID_RQST_GET_PROTOCOL (0x3U) /**< GET_PROTOCOL HID Class Request */ +#define CY_USB_DEV_HID_RQST_SET_REPORT (0x9U) /**< SET_REPORT HID Class Request */ +#define CY_USB_DEV_HID_RQST_SET_IDLE (0xAU) /**< SET_IDLE HID Class Request */ +#define CY_USB_DEV_HID_RQST_SET_PROTOCOL (0xBU) /**< SET_PROTOCOL HID Class Request */ +/** \} group_usb_dev_hid_functions */ + + +/******************************************************************************* +* In-line Function Implementation +*******************************************************************************/ + +/** +* \addtogroup group_usb_dev_hid_functions +* \{ +*/ + +/******************************************************************************* +* Function Name: Cy_USB_Dev_HID_RegisterGetReportCallback +****************************************************************************//** +* +* Registers a callback function that handles a GET_REPORT request. +* The GET_REPORT request is STALLed if the callback function is not registered +* or returns an error. +* To remove the callback function, pass NULL as the function pointer. +* +* \param callback +* The pointer to a callback function. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_HID_RegisterGetReportCallback(cy_cb_usbfs_dev_hid_get_report_t callback, + cy_stc_usb_dev_hid_context_t *context) +{ + context->handleGetReport = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_HID_RegisterSetReportCallback +****************************************************************************//** +* +* Registers a callback function that handles SET_REPORT request. This function +* is called when data stage of control transfer was completed (USB Device +* received report data from the USB Host). The SET_REPORT request is STALLed +* if the callback function is not registered or returns an error. +* To remove handler, set the handle parameter to NULL and call this function. +* +* \param callback +* The pointer to a callback function. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +*******************************************************************************/ +__STATIC_INLINE void Cy_USB_Dev_HID_RegisterSetReportCallback(cy_cb_usbfs_dev_hid_set_report_t callback, + cy_stc_usb_dev_hid_context_t *context) +{ + context->handleSetReport = callback; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_HID_GetClass +****************************************************************************//** +* +* Returns pointer to the HID class structure. +* This function is useful to override class event handlers using +* \ref group_usb_dev_functions_class_support. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* The pointer to the HID class structure. +* +*******************************************************************************/ +__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_HID_GetClass(cy_stc_usb_dev_hid_context_t *context) +{ + return &context->classObj; +} + + +/******************************************************************************* +* Function Name: Cy_USB_Dev_HID_GetProtocol +****************************************************************************//** +* +* Returns the HID protocol value for a certain interface. +* +* \param interface +* Interface number. +* +* \param context +* The pointer to the context structure \ref cy_stc_usb_dev_hid_context_t +* allocated by the user. The structure is used during the HID Class operation +* for internal configuration and data retention. The user must not modify +* anything in this structure. +* +* \return +* Supported protocol: \ref CY_USB_DEV_HID_PROTOCOL_BOOT or +* \ref CY_USB_DEV_HID_PROTOCOL_REPORT. +* +*******************************************************************************/ +__STATIC_INLINE uint32_t Cy_USB_Dev_HID_GetProtocol(uint32_t interface, + cy_stc_usb_dev_hid_context_t const *context) +{ + return ((interface <= CY_USB_DEV_NUM_INTERFACES_MAX) ? + context->protocol[interface] : (uint32_t) -1); +} + +/** \} group_usb_dev_hid_functions */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_HID_H) */ + + +/* [] END OF FILE */ diff --git a/cy_usb_dev_hid_descr.h b/cy_usb_dev_hid_descr.h new file mode 100644 index 0000000..77ea042 --- /dev/null +++ b/cy_usb_dev_hid_descr.h @@ -0,0 +1,53 @@ +/***************************************************************************//** +* \file cy_usb_dev_hid_descr.h +* \version 2.0 +* +* Provides HID class-specific descriptor defines. +* +******************************************************************************** +* \copyright +* Copyright 2018-2019, Cypress Semiconductor Corporation. All rights reserved. +* You may use this file only in accordance with the license, terms, conditions, +* disclaimers, and limitations in the end user license agreement accompanying +* the software package with which this file was provided. +*******************************************************************************/ + +#if !defined(CY_USB_DEV_HID_DESCR_H) +#define CY_USB_DEV_HID_DESCR_H + +#if defined(CY_IP_MXUSBFS) + +#if defined(__cplusplus) +extern "C" { +#endif + + +/******************************************************************************* +* API Constants +*******************************************************************************/ + +/** \cond INTERNAL */ +/* Supported HID version */ +#define CY_USB_DEV_HID_VERSION_1_11 (0x0111U) + +/* HID Class */ +#define CY_USB_DEV_HID_CLASS (3U) +#define CY_USB_DEV_HID_SUBCLASS_NONE (0U) +#define CY_USB_DEV_HID_PROTOCOL_NONE (0U) + +/* Descriptors */ +#define CY_USB_DEV_HID_DESCRIPTOR (33U) +#define CY_USB_DEV_HID_DESCRIPTOR_LENGTH (9U) +#define CY_USB_DEV_HID_REPORT_DESCRIPTOR (34U) +/** \endcond */ + +#if defined(__cplusplus) +} +#endif + +#endif /* CY_IP_MXUSBFS) */ + +#endif /* (CY_USB_DEV_HID_DESCR_H) */ + + +/* [] END OF FILE */ diff --git a/docs/usbfs_dev_api_reference_manual.html b/docs/usbfs_dev_api_reference_manual.html new file mode 100644 index 0000000..3e698b2 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual.html @@ -0,0 +1,15 @@ + + + +Redirect to USBFS Device API Reference Manual main page after 0 seconds + + + + +

+ If the automatic redirection is failing, click the following link to open USBFS Device API Reference Manual. +

+ + \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/annotated.html b/docs/usbfs_dev_api_reference_manual/html/annotated.html new file mode 100644 index 0000000..7ebdfd8 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/annotated.html @@ -0,0 +1,128 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Structures + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + +
 Ccy_stc_usb_dev_alternate_tUSBFS Device Alternate Interface structure
 Ccy_stc_usb_dev_audio_context_tAudio class context structure
 Ccy_stc_usb_dev_bm_requestParsed bmRequest
 Ccy_stc_usb_dev_cdc_config_tCDC class configuration structure
 Ccy_stc_usb_dev_cdc_context_tCDC class context structure
 Ccy_stc_usb_dev_class_ll_item_tClass linked list element
 Ccy_stc_usb_dev_class_tClass support definition - each class must provide this structure
 Ccy_stc_usb_dev_config_tUSB Device configuration structure
 Ccy_stc_usb_dev_configuration_tUSBFS Device Configuration structure
 Ccy_stc_usb_dev_context_tUSB Device context structure
 Ccy_stc_usb_dev_control_transfer_tExecute transfer use this structure
 Ccy_stc_usb_dev_device_tUSBFS Device structure
 Ccy_stc_usb_dev_endpoint_tUSBFS Device endpointDescriptor structure
 Ccy_stc_usb_dev_hid_config_tHID class configuration structure
 Ccy_stc_usb_dev_hid_context_tHID class context structure
 Ccy_stc_usb_dev_hid_tUSBFS Device HID structure
 Ccy_stc_usb_dev_interface_tUSBFS Device Interface structure
 Ccy_stc_usb_dev_ms_os_string_tUSBFS Device MS OS String Descriptors structure
 Ccy_stc_usb_dev_setup_packet_tStore request
 Ccy_stc_usb_dev_string_tUSBFS Device String Descriptors structure
 Ccy_stc_usbdev_config_descr_tConfiguration descriptor
 Ccy_stc_usbdev_device_descr_tDevice descriptor
 Ccy_stc_usbdev_endpoint_descr_tEndpoint descriptor
 Ccy_stc_usbdev_interface_descr_tInterface descriptor
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/bc_s.png b/docs/usbfs_dev_api_reference_manual/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/bc_s.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/bdwn.png b/docs/usbfs_dev_api_reference_manual/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/bdwn.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/classes.html b/docs/usbfs_dev_api_reference_manual/html/classes.html new file mode 100644 index 0000000..e2199d2 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/classes.html @@ -0,0 +1,112 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Structure Index + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ + + + + diff --git a/docs/usbfs_dev_api_reference_manual/html/closed.png b/docs/usbfs_dev_api_reference_manual/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/closed.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/cypress_logo.png b/docs/usbfs_dev_api_reference_manual/html/cypress_logo.png new file mode 100644 index 0000000..ac9ba09 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/cypress_logo.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/doc.png b/docs/usbfs_dev_api_reference_manual/html/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/doc.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/doxygen.png b/docs/usbfs_dev_api_reference_manual/html/doxygen.png new file mode 100644 index 0000000..3ff17d8 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/doxygen.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/doxygen_style.css b/docs/usbfs_dev_api_reference_manual/html/doxygen_style.css new file mode 100644 index 0000000..a3ebbb0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/doxygen_style.css @@ -0,0 +1,1544 @@ +/* The standard CSS for doxygen 1.8.11 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #A8A8A8; + color: #000; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 250% sans-serif, Tahoma, Ariel; + margin: 0px; + padding: 2px 0px 2px 25px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + color: grey; + margin: 0 0 0 26px; + padding: 0; + + height: 0px; +} + +#projectnumber +{ + font: 40% sans-serif, Tahoma, Ariel; + color: #606060; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + + +/* ****************************************************/ + +/* + +#navrow1 +{ + display: none; +} + +*/ + +/* cypress logo */ +img[src="cypress_logo.png"]{ + height:75px; + /*float: right;*/ +} + +/* \section format */ +h1 +{ + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: bold; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +/* \subsection format */ +h2 +{ + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.0em; + padding-top: 4px; + width: 100%; +} + +/* \ssububsection format */ +h3 +{ + color: #354C7B; + font-size: 100%; + font-weight: bold; + margin-top: 1.0em; + padding-top: 4px; + width: 100%; +} + +/* \snippet_begin */ +pre.snippet_code +{ + font: 100% Consolas, Courier New; + border: 1px solid black; + border-radius: 0.5em; + -webkit-border-radius: 0.5em; + -moz-border-radius: 0.5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + padding: 8px; + margin: 0px 0px 0px -12px; +} diff --git a/docs/usbfs_dev_api_reference_manual/html/dynsections.js b/docs/usbfs_dev_api_reference_manual/html/dynsections.js new file mode 100644 index 0000000..85e1836 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/dynsections.js @@ -0,0 +1,97 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Fields + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- h -

+ + +

- i -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- w -

+ + +

- z -

+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/functions_vars.html b/docs/usbfs_dev_api_reference_manual/html/functions_vars.html new file mode 100644 index 0000000..7535883 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/functions_vars.html @@ -0,0 +1,437 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Fields - Variables + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- h -

+ + +

- i -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- w -

+ + +

- z -

+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio.html new file mode 100644 index 0000000..3066fb1 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio.html @@ -0,0 +1,114 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Audio Class + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Audio Class
+
+
+

General Description

+

This section provides API description for the Audio class.

+ + + + + + + + +

+API Reference

 Macros
 
 Functions
 
 Data Structures
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio.js new file mode 100644 index 0000000..76c0bd2 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio.js @@ -0,0 +1,6 @@ +var group__group__usb__dev__audio = +[ + [ "Macros", "group__group__usb__dev__audio__macros.html", "group__group__usb__dev__audio__macros" ], + [ "Functions", "group__group__usb__dev__audio__functions.html", "group__group__usb__dev__audio__functions" ], + [ "Data Structures", "group__group__usb__dev__audio__data__structures.html", "group__group__usb__dev__audio__data__structures" ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__data__structures.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__data__structures.html new file mode 100644 index 0000000..0c730d0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__data__structures.html @@ -0,0 +1,110 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Structures + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data Structures
+
+
+

General Description

+ + + + + +

+Data Structures

struct  cy_stc_usb_dev_audio_context_t
 Audio class context structure. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__data__structures.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__data__structures.js new file mode 100644 index 0000000..3e54260 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__data__structures.js @@ -0,0 +1,4 @@ +var group__group__usb__dev__audio__data__structures = +[ + [ "cy_stc_usb_dev_audio_context_t", "structcy__stc__usb__dev__audio__context__t.html", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__functions.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__functions.html new file mode 100644 index 0000000..382fe82 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__functions.html @@ -0,0 +1,234 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Functions
+
+
+

General Description

+ + + + + + + + + + + +

+Functions

cy_en_usb_dev_status_t Cy_USB_Dev_Audio_Init (void const *config, cy_stc_usb_dev_audio_context_t *context, cy_stc_usb_dev_context_t *devContext)
 Initializes the Audio class. More...
 
__STATIC_INLINE void Cy_USB_Dev_Audio_RegisterUserCallback (cy_cb_usb_dev_request_received_t requestReceivedHandle, cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, cy_stc_usb_dev_audio_context_t *context)
 Registers the user callbacks to handle Audio class requests. More...
 
__STATIC_INLINE cy_stc_usb_dev_class_tCy_USB_Dev_Audio_GetClass (cy_stc_usb_dev_audio_context_t *context)
 Returns pointer to the class structure for Audio class. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_Audio_Init()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_Audio_Init (void const * config,
cy_stc_usb_dev_audio_context_tcontext,
cy_stc_usb_dev_context_tdevContext 
)
+
+ +

Initializes the Audio class.

+

This function must be called to enable USB Device Audio functionality.

+
Parameters
+ + + + +
configPass NULL as an argument (left for future purposes).
contextThe pointer to the context structure cy_stc_usb_dev_audio_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.
devContextThe pointer to the USB Device context structure cy_stc_usb_dev_context_t.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_Audio_RegisterUserCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_Audio_RegisterUserCallback (cy_cb_usb_dev_request_received_t requestReceivedHandle,
cy_cb_usb_dev_request_cmplt_t requestCompletedHandle,
cy_stc_usb_dev_audio_context_tcontext 
)
+
+ +

Registers the user callbacks to handle Audio class requests.

+
Parameters
+ + + + +
requestReceivedHandleThe pointer to a callback function. This function is called when setup packet was received from the USB Host but was not recognized. Therefore this might require Audio class processing. To remove the callback function, pass a NULL as the function pointer.
requestCompletedHandleThe pointer to a callback function. This function is called when the USB Device received data from the USB Host as part of current request processing. The requestReceivedHandle function must enable notification to trigger this event. This makes sense only when class request processing requires a data stage. To remove the callback function, pass a NULL as the function pointer.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_Audio_GetClass()

+ +
+
+ + + + + + + + +
__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_Audio_GetClass (cy_stc_usb_dev_audio_context_tcontext)
+
+ +

Returns pointer to the class structure for Audio class.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status pointer to the class cy_stc_usb_dev_class_t.
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__functions.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__functions.js new file mode 100644 index 0000000..4d9725e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__functions.js @@ -0,0 +1,6 @@ +var group__group__usb__dev__audio__functions = +[ + [ "Cy_USB_Dev_Audio_Init", "group__group__usb__dev__audio__functions.html#ga8224694c94d72e5c3e2d717bd3a70f3c", null ], + [ "Cy_USB_Dev_Audio_RegisterUserCallback", "group__group__usb__dev__audio__functions.html#ga8293f60d0ba564a94b6afdf3175a3efb", null ], + [ "Cy_USB_Dev_Audio_GetClass", "group__group__usb__dev__audio__functions.html#gaaf4652c2f5f74568dd67a23df6918bd8", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__macros.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__macros.html new file mode 100644 index 0000000..375e878 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__macros.html @@ -0,0 +1,195 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Macros + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define CY_USB_DEV_AUDIO_RQST_GET_CUR   (0x81u)
 GET_CUR Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_GET_MIN   (0x82u)
 GET_MIN Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_GET_MAX   (0x83u)
 GET_MAX Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_GET_RES   (0x84u)
 GET_RES Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_GET_MEM   (0x85u)
 GET_MEM Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_GET_STAT   (0xFFu)
 GET_STAT Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_SET_CUR   (0x01u)
 SET_CUR Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_SET_MIN   (0x02u)
 SET_MIN Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_SET_MAX   (0x03u)
 SET_MAX Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_SET_RES   (0x04u)
 SET_RES Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO_RQST_SET_MEM   (0x05u)
 SET_STAT Audio v1.0 request.
 
+#define CY_USB_DEV_AUDIO2_RQST_CUR   (0x01u)
 CUR Audio v2.0 request.
 
+#define CY_USB_DEV_AUDIO2_RQST_RANGE   (0x02u)
 RANGE Audio v2.0 request.
 
+#define CY_USB_DEV_AUDIO2_RQST_MEM   (0x03u)
 MEM Audio v2.0 request.
 
+#define CY_USB_DEV_AUDIO_MASTER_CHANNEL   (0U)
 Master channel.
 
+#define CY_USB_DEV_AUDIO_VOLUME_MIN   (0x8001U)
 Volume minimum value.
 
+#define CY_USB_DEV_AUDIO_VOLUME_MAX   (0x7FFFU)
 Volume maximum value.
 
+#define CY_USB_DEV_AUDIO_VOLUME_SILENCE   (0x8000U)
 Volume value that represent silence (CUR attribute only)
 
+#define CY_USB_DEV_AUDIO_VOLUME_MIN_MSB   (0x80U)
 Volume minimum value MSB.
 
+#define CY_USB_DEV_AUDIO_VOLUME_MIN_LSB   (0x01U)
 Volume minimum value LSB.
 
+#define CY_USB_DEV_AUDIO_VOLUME_MAX_MSB   (0x7FU)
 Volume maximum value MSB.
 
+#define CY_USB_DEV_AUDIO_VOLUME_MAX_LSB   (0xFFU)
 Volume maximum value LSB.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__macros.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__macros.js new file mode 100644 index 0000000..c8cd85e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__audio__macros.js @@ -0,0 +1,25 @@ +var group__group__usb__dev__audio__macros = +[ + [ "CY_USB_DEV_AUDIO_RQST_GET_CUR", "group__group__usb__dev__audio__macros.html#gad27fbd09001566294e4d0247e1943ecb", null ], + [ "CY_USB_DEV_AUDIO_RQST_GET_MIN", "group__group__usb__dev__audio__macros.html#ga8027c253d6f52017920679a1fed373eb", null ], + [ "CY_USB_DEV_AUDIO_RQST_GET_MAX", "group__group__usb__dev__audio__macros.html#ga43ac3657d2c2e04fcfd61610ffebfcdf", null ], + [ "CY_USB_DEV_AUDIO_RQST_GET_RES", "group__group__usb__dev__audio__macros.html#gab54325c3064ad1474fc97e167f12b5bf", null ], + [ "CY_USB_DEV_AUDIO_RQST_GET_MEM", "group__group__usb__dev__audio__macros.html#gaeedfcf676374ddf2a4be997f6bfa024f", null ], + [ "CY_USB_DEV_AUDIO_RQST_GET_STAT", "group__group__usb__dev__audio__macros.html#ga22a2b84934e9a63edae640a436c22a3b", null ], + [ "CY_USB_DEV_AUDIO_RQST_SET_CUR", "group__group__usb__dev__audio__macros.html#ga29f208754239e19e18535e4d2b44d87d", null ], + [ "CY_USB_DEV_AUDIO_RQST_SET_MIN", "group__group__usb__dev__audio__macros.html#ga9aa23a3fd0a4059cc0e5f13249a090d9", null ], + [ "CY_USB_DEV_AUDIO_RQST_SET_MAX", "group__group__usb__dev__audio__macros.html#gac031ae6a65167f2c18cda490d66e3fe0", null ], + [ "CY_USB_DEV_AUDIO_RQST_SET_RES", "group__group__usb__dev__audio__macros.html#gacd0100110788a78373f810e35b4838f8", null ], + [ "CY_USB_DEV_AUDIO_RQST_SET_MEM", "group__group__usb__dev__audio__macros.html#ga0a74fbcb47d0f506100faad0033cf4c6", null ], + [ "CY_USB_DEV_AUDIO2_RQST_CUR", "group__group__usb__dev__audio__macros.html#gae22801ea6e6adba26c29c6b3efd08814", null ], + [ "CY_USB_DEV_AUDIO2_RQST_RANGE", "group__group__usb__dev__audio__macros.html#ga7d66dca27b97941f72a0065e205c1b4b", null ], + [ "CY_USB_DEV_AUDIO2_RQST_MEM", "group__group__usb__dev__audio__macros.html#ga65897e1ce33b8a8bc0099cb5facd80e1", null ], + [ "CY_USB_DEV_AUDIO_MASTER_CHANNEL", "group__group__usb__dev__audio__macros.html#ga75a141c13c6074fcf2bc75313b33b504", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_MIN", "group__group__usb__dev__audio__macros.html#gaac6fd7f1bd27de8590ead0c398fea2da", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_MAX", "group__group__usb__dev__audio__macros.html#ga28deab15fdff03b1c7468b69d568bc64", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_SILENCE", "group__group__usb__dev__audio__macros.html#ga27e0c25ae733bb10d70ae5dd6c2f345f", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_MIN_MSB", "group__group__usb__dev__audio__macros.html#gafe1e246f4f82ec8259cf0ff07cb37add", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_MIN_LSB", "group__group__usb__dev__audio__macros.html#ga7681f7c713666af9fa35156635828f11", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_MAX_MSB", "group__group__usb__dev__audio__macros.html#ga022bdd57ebc89458e734e35c508b5c83", null ], + [ "CY_USB_DEV_AUDIO_VOLUME_MAX_LSB", "group__group__usb__dev__audio__macros.html#ga719da2b23b0d408c662d56d04893ad09", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc.html new file mode 100644 index 0000000..6ceeb6a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc.html @@ -0,0 +1,116 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: CDC Class + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
CDC Class
+
+
+

General Description

+

This section provides API description for the CDC class.

+ + + + + + + + + + +

+API Reference

 Macros
 
 Functions
 
 Data Structures
 
 Enumerated Types
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc.js new file mode 100644 index 0000000..6dba801 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc.js @@ -0,0 +1,7 @@ +var group__group__usb__dev__cdc = +[ + [ "Macros", "group__group__usb__dev__cdc__macros.html", "group__group__usb__dev__cdc__macros" ], + [ "Functions", "group__group__usb__dev__cdc__functions.html", "group__group__usb__dev__cdc__functions" ], + [ "Data Structures", "group__group__usb__dev__cdc__data__structures.html", "group__group__usb__dev__cdc__data__structures" ], + [ "Enumerated Types", "group__group__usb__dev__cdc__enums.html", "group__group__usb__dev__cdc__enums" ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__data__structures.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__data__structures.html new file mode 100644 index 0000000..454fe0a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__data__structures.html @@ -0,0 +1,113 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Structures + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data Structures
+
+
+

General Description

+ + + + + + + + +

+Data Structures

struct  cy_stc_usb_dev_cdc_config_t
 CDC class configuration structure. More...
 
struct  cy_stc_usb_dev_cdc_context_t
 CDC class context structure. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__data__structures.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__data__structures.js new file mode 100644 index 0000000..36dd39b --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__data__structures.js @@ -0,0 +1,8 @@ +var group__group__usb__dev__cdc__data__structures = +[ + [ "cy_stc_usb_dev_cdc_config_t", "structcy__stc__usb__dev__cdc__config__t.html", [ + [ "buffer", "structcy__stc__usb__dev__cdc__config__t.html#ae96d5c2ad16b940ab4f9d1847754fc13", null ], + [ "bufferSize", "structcy__stc__usb__dev__cdc__config__t.html#a846a7527e69e3b4e77f39bd0f7e2ac7b", null ] + ] ], + [ "cy_stc_usb_dev_cdc_context_t", "structcy__stc__usb__dev__cdc__context__t.html", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__enums.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__enums.html new file mode 100644 index 0000000..f10562e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__enums.html @@ -0,0 +1,184 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Enumerated Types + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Enumerated Types
+
+
+

General Description

+ + + + + + + + +

+Enumerations

enum  cy_en_usb_dev_cdc_stop_bit_t {
+  CY_USB_DEV_CDC_STOPBIT_1, +
+  CY_USB_DEV_CDC_STOPBITS_1_5, +
+  CY_USB_DEV_CDC_STOPBITS_2 +
+ }
 CDC Stop bit. More...
 
enum  cy_en_usb_dev_cdc_parity_type_t {
+  CY_USB_DEV_CDC_PARITY_NONE, +
+  CY_USB_DEV_CDC_PARITY_ODD, +
+  CY_USB_DEV_CDC_PARITY_EVEN, +
+  CY_USB_DEV_CDC_PARITY_MARK, +
+  CY_USB_DEV_CDC_PARITY_SPACE +
+ }
 CDC Parity type. More...
 
+

Enumeration Type Documentation

+ +

◆ cy_en_usb_dev_cdc_stop_bit_t

+ +
+
+ +

CDC Stop bit.

+ + + + +
Enumerator
CY_USB_DEV_CDC_STOPBIT_1 

1 stop bit

+
CY_USB_DEV_CDC_STOPBITS_1_5 

1.5 stop bits

+
CY_USB_DEV_CDC_STOPBITS_2 

2 stop bits

+
+ +
+
+ +

◆ cy_en_usb_dev_cdc_parity_type_t

+ +
+
+ +

CDC Parity type.

+ + + + + + +
Enumerator
CY_USB_DEV_CDC_PARITY_NONE 

None parity.

+
CY_USB_DEV_CDC_PARITY_ODD 

Odd parity.

+
CY_USB_DEV_CDC_PARITY_EVEN 

Even parity.

+
CY_USB_DEV_CDC_PARITY_MARK 

Mark.

+
CY_USB_DEV_CDC_PARITY_SPACE 

Space.

+
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__enums.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__enums.js new file mode 100644 index 0000000..ea38df4 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__enums.js @@ -0,0 +1,15 @@ +var group__group__usb__dev__cdc__enums = +[ + [ "cy_en_usb_dev_cdc_stop_bit_t", "group__group__usb__dev__cdc__enums.html#gac6c77b9a53c97772dc7c036ef7f5d4c4", [ + [ "CY_USB_DEV_CDC_STOPBIT_1", "group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4a9f3c81b61d6053313dbd1ae5732e2966", null ], + [ "CY_USB_DEV_CDC_STOPBITS_1_5", "group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4af7f26d666bbcfca22e735f431fb4f71e", null ], + [ "CY_USB_DEV_CDC_STOPBITS_2", "group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4a969e21fef8f69138b6bc22c8bd0a17a2", null ] + ] ], + [ "cy_en_usb_dev_cdc_parity_type_t", "group__group__usb__dev__cdc__enums.html#ga513d1e722ab8286e63edd57411367730", [ + [ "CY_USB_DEV_CDC_PARITY_NONE", "group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730aaa24a5d6d89c9d152eacc8a05bc59e36", null ], + [ "CY_USB_DEV_CDC_PARITY_ODD", "group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a9af9099cffad91c5bcf469f05d7636c7", null ], + [ "CY_USB_DEV_CDC_PARITY_EVEN", "group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a748995c6c8381feaa26335d14af303eb", null ], + [ "CY_USB_DEV_CDC_PARITY_MARK", "group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730ae82e5ee3abd6103dee0efaefb08a7dd6", null ], + [ "CY_USB_DEV_CDC_PARITY_SPACE", "group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a9ee439c9ae803731e2e83b498ec40fdd", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__functions.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__functions.html new file mode 100644 index 0000000..2b02a1c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__functions.html @@ -0,0 +1,1074 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Functions
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

cy_en_usb_dev_status_t Cy_USB_Dev_CDC_Init (cy_stc_usb_dev_cdc_config_t const *config, cy_stc_usb_dev_cdc_context_t *context, cy_stc_usb_dev_context_t *devContext)
 Initializes the CDC class. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutData (uint32_t port, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context)
 Sends a specified number of bytes to USB Host. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutString (uint32_t port, char_t const *string, int32_t timeout, cy_stc_usb_dev_cdc_context_t *context)
 Sends a null terminated string to the USB Host. More...
 
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutChar (uint32_t port, char_t ch, cy_stc_usb_dev_cdc_context_t *context)
 Sends a single character to the USB Host. More...
 
uint32_t Cy_USB_Dev_CDC_GetCount (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Returns the number of bytes that were received from the USB Host and can be read using Cy_USB_Dev_CDC_GetData or Cy_USB_Dev_CDC_GetChar functions. More...
 
bool Cy_USB_Dev_CDC_IsDataReady (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Returns status if the COM port (CDC Data interface) received data from the USB Host (including zero-length packet). More...
 
bool Cy_USB_Dev_CDC_IsReady (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Returns status if the COM port (CDC Data interface) is ready for sending new data. More...
 
uint32_t Cy_USB_Dev_CDC_GetData (uint32_t port, uint8_t *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context)
 Read a specified number of data bytes received from USB Host by the COM port (CDC Data interface). More...
 
uint32_t Cy_USB_Dev_CDC_GetAll (uint32_t port, uint8_t *buffer, uint32_t maxSize, cy_stc_usb_dev_cdc_context_t *context)
 Read all data received from USB Host by the COM port (CDC Data interface). More...
 
char_t Cy_USB_Dev_CDC_GetChar (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Reads one byte of received data. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_IsLineChanged (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Returns the clear-on-read status of the COM port. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetLineControl (uint32_t port, cy_stc_usb_dev_cdc_context_t const *context)
 Returns the line control bitmap for the COM port. More...
 
uint32_t Cy_USB_Dev_CDC_GetDTERate (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Returns the data terminal rate set for this port in bits per second. More...
 
__STATIC_INLINE cy_en_usb_dev_cdc_stop_bit_t Cy_USB_Dev_CDC_GetCharFormat (uint32_t port, cy_stc_usb_dev_cdc_context_t const *context)
 Returns the number of stop bits for the COM port. More...
 
__STATIC_INLINE cy_en_usb_dev_cdc_parity_type_t Cy_USB_Dev_CDC_GetParity (uint32_t port, cy_stc_usb_dev_cdc_context_t const *context)
 Returns the parity type for the COM port. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetDataBits (uint32_t port, cy_stc_usb_dev_cdc_context_t const *context)
 Returns the number of data bits for the COM port. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_SendSerialState (uint32_t port, uint32_t serialState, cy_stc_usb_dev_cdc_context_t *context)
 Sends the serial state notification to the host using the COM port (CDC interface) IN interrupt endpoint. More...
 
bool Cy_USB_Dev_CDC_IsNotificationReady (uint32_t port, cy_stc_usb_dev_cdc_context_t *context)
 Returns if the COM port (CDC interface) is ready to send notification to the USB Host. More...
 
__STATIC_INLINE void Cy_USB_Dev_CDC_RegisterUserCallbacks (cy_cb_usb_dev_request_received_t requestReceivedHandle, cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, cy_stc_usb_dev_cdc_context_t *context)
 Registering user callback to handle CDC class requests that are not supported by provided CDC request handler. More...
 
__STATIC_INLINE cy_stc_usb_dev_class_tCy_USB_Dev_CDC_GetClass (cy_stc_usb_dev_cdc_context_t *context)
 Returns pointer to the CDC class structure. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetSerialState (uint32_t port, cy_stc_usb_dev_cdc_context_t const *context)
 Returns the current serial state value for the COM port. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_CDC_Init()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_Init (cy_stc_usb_dev_cdc_config_t const * config,
cy_stc_usb_dev_cdc_context_tcontext,
cy_stc_usb_dev_context_tdevContext 
)
+
+ +

Initializes the CDC class.

+

This function must be called to enable USB Device CDC functionality.

+
Parameters
+ + + + +
configThe pointer to the CDC configuration structure cy_stc_usb_dev_cdc_config_t.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
devContextThe pointer to the USB Device context structure cy_stc_usb_dev_context_t.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_PutData()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutData (uint32_t port,
uint8_t const * buffer,
uint32_t size,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Sends a specified number of bytes to USB Host.

+

Call Cy_USB_Dev_CDC_IsReady function to ensure that the COM port (CDC Data interface) is ready for sending data to the USB Host before calling this function.

+
Parameters
+ + + + + +
portCOM port number. Valid ports are 0 and 1.
bufferThe pointer to the buffer containing data bytes to be sent.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
sizeThe number of bytes to send. This value must be less than or equal to the maximum packet size of the CDC Data interface IN endpoint that belongs to the specified COM port.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_PutString()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutString (uint32_t port,
char_t const * string,
int32_t timeout,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Sends a null terminated string to the USB Host.

+

This function is blocking and returns after successful USB Host transfer, or an error or timeout occurred. Call Cy_USB_Dev_CDC_IsReady function to ensure that the COM port (CDC Data interface) is ready for sending data to the USB Host before calling this function.

+
Parameters
+ + + + + +
portCOM port number. Valid ports are 0 and 1.
stringThe pointer to the string to be sent.
+The string must be allocated following rules in the section Allocate Data Endpoint Buffer to be USBFS driver configuration independent.
timeoutDefines in milliseconds the time for which this function can block. If that time expires, the function returns. To wait forever, pass CY_USB_DEV_WAIT_FOREVER.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+
Note
If string parameter is a constant string (example: "USBUART"), it is stored in the stack and aligned to 4 bytes boundary what makes it USBFS driver configuration independent.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_PutChar()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_CDC_PutChar (uint32_t port,
char_t ch,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Sends a single character to the USB Host.

+

Call Cy_USB_Dev_CDC_IsReady function to ensure that the COM port (CDC Data interface) is ready for sending data to the USB Host before calling this function.

+
Parameters
+ + + + +
portCOM port number. Valid ports are 0 and 1.
chCharacter to be sent.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetCount()

+ +
+
+ + + + + + + + + + + + + + + + + + +
uint32_t Cy_USB_Dev_CDC_GetCount (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Returns the number of bytes that were received from the USB Host and can be read using Cy_USB_Dev_CDC_GetData or Cy_USB_Dev_CDC_GetChar functions.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Returns the number of bytes that were received.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_IsDataReady()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Cy_USB_Dev_CDC_IsDataReady (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Returns status if the COM port (CDC Data interface) received data from the USB Host (including zero-length packet).

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
    +
  • True - the COM port (CDC Data interface) received data from the USB Host.
  • +
  • False - the COM port (CDC Data interface) is waiting for data from the USB Host.
  • +
+
+ +
+
+ +

◆ Cy_USB_Dev_CDC_IsReady()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Cy_USB_Dev_CDC_IsReady (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Returns status if the COM port (CDC Data interface) is ready for sending new data.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
    +
  • True - the COM port (CDC Data interface) is ready for sending new data.
  • +
  • False - the COM port (CDC Data interface) is waiting for the USB Host to read previous data.
  • +
+
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetData()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint32_t Cy_USB_Dev_CDC_GetData (uint32_t port,
uint8_t * buffer,
uint32_t size,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Read a specified number of data bytes received from USB Host by the COM port (CDC Data interface).

+

Call Cy_USB_Dev_CDC_IsDataReady function to ensure that data is received from the USB Host before calling this function.

+
Parameters
+ + + + + +
portCOM port number. Valid ports are 0 and 1.
bufferThe pointer to buffer that stores data that was read.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
sizeThe number of bytes to read.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data keeping. The user must not modify anything in this structure.
+
+
+
Returns
The number of bytes that were actually read.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetAll()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uint32_t Cy_USB_Dev_CDC_GetAll (uint32_t port,
uint8_t * buffer,
uint32_t maxSize,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Read all data received from USB Host by the COM port (CDC Data interface).

+

Call Cy_USB_Dev_CDC_IsDataReady function to ensure that data is received from the USB Host before calling this function.

+
Parameters
+ + + + + +
portCOM port number. Valid ports are 0 and 1.
bufferThe pointer to buffer that stores data that was read.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
maxSizeThe size of buffer to read data into. This value must be not be less then CDC Data interface OUT endpoint maximum packet size that belongs to specified COM port.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
The number of bytes that were actually read.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetChar()

+ +
+
+ + + + + + + + + + + + + + + + + + +
char_t Cy_USB_Dev_CDC_GetChar (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Reads one byte of received data.

+

Call Cy_USB_Dev_CDC_IsDataReady function to ensure that data is received from the USB Host before calling this function.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Received one character or zero value to indicate there is no data.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_IsLineChanged()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_IsLineChanged (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Returns the clear-on-read status of the COM port.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
+
+
Note
This function is not interrupt-protected and to prevent a race condition, it should be protected from the USBFS interruption in the place where it is called.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetLineControl()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetLineControl (uint32_t port,
cy_stc_usb_dev_cdc_context_t const * context 
)
+
+ +

Returns the line control bitmap for the COM port.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Line control bitmap CY_USB_DEV_CDC_LINE_CONTROL_DTR and CY_USB_DEV_CDC_LINE_CONTROL_RTS.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetDTERate()

+ +
+
+ + + + + + + + + + + + + + + + + + +
uint32_t Cy_USB_Dev_CDC_GetDTERate (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Returns the data terminal rate set for this port in bits per second.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Data rate in bits per second.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetCharFormat()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE cy_en_usb_dev_cdc_stop_bit_t Cy_USB_Dev_CDC_GetCharFormat (uint32_t port,
cy_stc_usb_dev_cdc_context_t const * context 
)
+
+ +

Returns the number of stop bits for the COM port.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Number of stop bits cy_en_usb_dev_cdc_stop_bit_t.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetParity()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE cy_en_usb_dev_cdc_parity_type_t Cy_USB_Dev_CDC_GetParity (uint32_t port,
cy_stc_usb_dev_cdc_context_t const * context 
)
+
+ +

Returns the parity type for the COM port.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Parity type cy_en_usb_dev_cdc_parity_type_t.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetDataBits()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetDataBits (uint32_t port,
cy_stc_usb_dev_cdc_context_t const * context 
)
+
+ +

Returns the number of data bits for the COM port.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data keeping. The user must not modify anything in this structure.
+
+
+
Returns
Number of data bits, which can be 5, 6, 7, 8, or 16.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_SendSerialState()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_CDC_SendSerialState (uint32_t port,
uint32_t serialState,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Sends the serial state notification to the host using the COM port (CDC interface) IN interrupt endpoint.

+

Call Cy_USB_Dev_CDC_IsNotificationReady function to ensure that COM port (CDC interface) is ready send notification before calling this function.

+
Parameters
+ + + + +
portCOM port number. Valid ports are 0 and 1.
serialState16-bit value that will be sent from the USB Device to the USB Host as SERIAL_STATE notification using the CDC interface IN interrupt endpoint. Refer to revision 1.2 of the CDC PSTN Subclass specification for bit field definitions of the 16-bit serial state value.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+
Note
The maximum packet size of the CDC interface IN interrupt endpoint (that belongs to specified COM port) must be at least 10 bytes to send serial state notifications.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_IsNotificationReady()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool Cy_USB_Dev_CDC_IsNotificationReady (uint32_t port,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Returns if the COM port (CDC interface) is ready to send notification to the USB Host.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
    +
  • True - the COM port (CDC interface) is ready for sending new notification.
  • +
  • False - the COM port (CDC interface) is waiting for the USB Host to read previous notification.
  • +
+
+ +
+
+ +

◆ Cy_USB_Dev_CDC_RegisterUserCallbacks()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_CDC_RegisterUserCallbacks (cy_cb_usb_dev_request_received_t requestReceivedHandle,
cy_cb_usb_dev_request_cmplt_t requestCompletedHandle,
cy_stc_usb_dev_cdc_context_tcontext 
)
+
+ +

Registering user callback to handle CDC class requests that are not supported by provided CDC request handler.

+
Parameters
+ + + + +
requestReceivedHandleThe pointer to a callback function. This function is called when setup packet was received from USB Host but was not recognized, therefore might require the user class processing. To remove callback function pass NULL as function pointer.
requestCompletedHandleThe pointer to a callback function. This function is called when USB Device received data from the USB Host as part of current request processing. The requestReceivedHandle function must enable notification to trigger this event. This makes sense only when CDC request processing requires a data stage. To remove callback function pass NULL as function pointer.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the Audio Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetClass()

+ +
+
+ + + + + + + + +
__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_CDC_GetClass (cy_stc_usb_dev_cdc_context_tcontext)
+
+ +

Returns pointer to the CDC class structure.

+

This function is useful to override class event handlers using Class Support Functions.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
The pointer to the CDC class structure.
+ +
+
+ +

◆ Cy_USB_Dev_CDC_GetSerialState()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_CDC_GetSerialState (uint32_t port,
cy_stc_usb_dev_cdc_context_t const * context 
)
+
+ +

Returns the current serial state value for the COM port.

+
Parameters
+ + + +
portCOM port number. Valid ports are 0 and 1.
contextThe pointer to the context structure cy_stc_usb_dev_cdc_context_t allocated by the user. The structure is used during the CDC Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
16-bit serial state value. Refer to revision 1.2 of the CDC PSTN Subclass specification for bit field definitions of the 16-bit serial state value. Zero in case COM port is invalid.
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__functions.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__functions.js new file mode 100644 index 0000000..4a0059e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__functions.js @@ -0,0 +1,24 @@ +var group__group__usb__dev__cdc__functions = +[ + [ "Cy_USB_Dev_CDC_Init", "group__group__usb__dev__cdc__functions.html#ga674860e659c0f23538a9f6c11e64b03a", null ], + [ "Cy_USB_Dev_CDC_PutData", "group__group__usb__dev__cdc__functions.html#ga0e79dc7a18f6d24a15d2339f17bd2b26", null ], + [ "Cy_USB_Dev_CDC_PutString", "group__group__usb__dev__cdc__functions.html#ga8b064f67ce9e167e7b55a8e9dd8b77a4", null ], + [ "Cy_USB_Dev_CDC_PutChar", "group__group__usb__dev__cdc__functions.html#ga418ec0116904cebcdd9841e6ed7f72e5", null ], + [ "Cy_USB_Dev_CDC_GetCount", "group__group__usb__dev__cdc__functions.html#gacd239d3d29fc08657fab51ab61ebf0bf", null ], + [ "Cy_USB_Dev_CDC_IsDataReady", "group__group__usb__dev__cdc__functions.html#ga8146e47160e0c93b4cc6b60bb9aaf922", null ], + [ "Cy_USB_Dev_CDC_IsReady", "group__group__usb__dev__cdc__functions.html#ga36836547e498bda5fd6c0dd0033c5d45", null ], + [ "Cy_USB_Dev_CDC_GetData", "group__group__usb__dev__cdc__functions.html#ga3dc0c8a65af938773ad7a69eeec21be3", null ], + [ "Cy_USB_Dev_CDC_GetAll", "group__group__usb__dev__cdc__functions.html#gacdc33492311cc4ec24e33092506b5a18", null ], + [ "Cy_USB_Dev_CDC_GetChar", "group__group__usb__dev__cdc__functions.html#ga670d1ffa870d18999d74f78e043f3356", null ], + [ "Cy_USB_Dev_CDC_IsLineChanged", "group__group__usb__dev__cdc__functions.html#ga3245d5ee9319cdae02e8484309e1320b", null ], + [ "Cy_USB_Dev_CDC_GetLineControl", "group__group__usb__dev__cdc__functions.html#gaef1d41dadbebd22e50867b588fe8de36", null ], + [ "Cy_USB_Dev_CDC_GetDTERate", "group__group__usb__dev__cdc__functions.html#ga991b2f9afdfdda786a25dfbf3719c8f0", null ], + [ "Cy_USB_Dev_CDC_GetCharFormat", "group__group__usb__dev__cdc__functions.html#gaec69e84dbc1b2f007602f889f51f27c5", null ], + [ "Cy_USB_Dev_CDC_GetParity", "group__group__usb__dev__cdc__functions.html#ga5d0919faa039954d9ad813937cf8a535", null ], + [ "Cy_USB_Dev_CDC_GetDataBits", "group__group__usb__dev__cdc__functions.html#ga6b5a76c52e41f690871dc3c34cb92652", null ], + [ "Cy_USB_Dev_CDC_SendSerialState", "group__group__usb__dev__cdc__functions.html#ga4177475b2bd0de0bf4c4f5137de8b364", null ], + [ "Cy_USB_Dev_CDC_IsNotificationReady", "group__group__usb__dev__cdc__functions.html#gaba8ee7a47e213e9ba57e16ad3b93eb3e", null ], + [ "Cy_USB_Dev_CDC_RegisterUserCallbacks", "group__group__usb__dev__cdc__functions.html#gaf1450bbba1fc39dc88c64cc7b6b75432", null ], + [ "Cy_USB_Dev_CDC_GetClass", "group__group__usb__dev__cdc__functions.html#ga80dba44dfc5e6b5a3edd332a44aa888d", null ], + [ "Cy_USB_Dev_CDC_GetSerialState", "group__group__usb__dev__cdc__functions.html#ga10abe615bf61bb37382be268d53d1b55", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__macros.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__macros.html new file mode 100644 index 0000000..dcd134f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__macros.html @@ -0,0 +1,176 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Macros + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Macros
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define CY_USB_DEV_CDC_COMPORT_NUMBER   (2U)
 Number of supported COM ports.
 
+#define CY_USB_DEV_CDC_RQST_SET_LINE_CODING   (0x20U)
 SetLineCoding CDC class request.
 
+#define CY_USB_DEV_CDC_RQST_GET_LINE_CODING   (0x21U)
 GetLineCoding CDC class request.
 
+#define CY_USB_DEV_CDC_RQST_SET_CONTROL_LINE_STATE   (0x22U)
 SetControlLineState CDC class request.
 
#define CY_USB_DEV_CDC_LINE_CONTROL_DTR   (0x1U)
 Indicates that a DTR signal is present. More...
 
#define CY_USB_DEV_CDC_LINE_CONTROL_RTS   (0x2U)
 Carrier control for half-duplex modems. More...
 
+#define CY_USB_DEV_CDC_LINE_NOT_CHANGED   (0U)
 No line coding/line control changes.
 
+#define CY_USB_DEV_CDC_LINE_CODING_CHANGED   (1U)
 Line coding changed.
 
+#define CY_USB_DEV_CDC_LINE_CONTROL_CHANGED   (2U)
 Line control changed.
 
+

Macro Definition Documentation

+ +

◆ CY_USB_DEV_CDC_LINE_CONTROL_DTR

+ +
+
+ + + + +
#define CY_USB_DEV_CDC_LINE_CONTROL_DTR   (0x1U)
+
+ +

Indicates that a DTR signal is present.

+

This signal corresponds to V.24 signal 108/2 and RS232 signal DTR.

+ +
+
+ +

◆ CY_USB_DEV_CDC_LINE_CONTROL_RTS

+ +
+
+ + + + +
#define CY_USB_DEV_CDC_LINE_CONTROL_RTS   (0x2U)
+
+ +

Carrier control for half-duplex modems.

+

This signal corresponds to V.24 signal 105 and RS232 signal RTS.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__macros.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__macros.js new file mode 100644 index 0000000..c2bc0bb --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__cdc__macros.js @@ -0,0 +1,12 @@ +var group__group__usb__dev__cdc__macros = +[ + [ "CY_USB_DEV_CDC_COMPORT_NUMBER", "group__group__usb__dev__cdc__macros.html#ga6b26237bff957e7a91b4988f2d8d91e5", null ], + [ "CY_USB_DEV_CDC_RQST_SET_LINE_CODING", "group__group__usb__dev__cdc__macros.html#ga26cf92aac735e6e948d5705e86a44e00", null ], + [ "CY_USB_DEV_CDC_RQST_GET_LINE_CODING", "group__group__usb__dev__cdc__macros.html#gaecb0c6ab793e295aed61f9cadd22bb10", null ], + [ "CY_USB_DEV_CDC_RQST_SET_CONTROL_LINE_STATE", "group__group__usb__dev__cdc__macros.html#ga86071c51567be33ec4c655a0b5225096", null ], + [ "CY_USB_DEV_CDC_LINE_CONTROL_DTR", "group__group__usb__dev__cdc__macros.html#ga3fc81991b1f2e1e109cd2c422839c3c8", null ], + [ "CY_USB_DEV_CDC_LINE_CONTROL_RTS", "group__group__usb__dev__cdc__macros.html#ga5596b01a99b99a2498137427cb797736", null ], + [ "CY_USB_DEV_CDC_LINE_NOT_CHANGED", "group__group__usb__dev__cdc__macros.html#gafa7d3409835b362ad0d61bcb02ed5ede", null ], + [ "CY_USB_DEV_CDC_LINE_CODING_CHANGED", "group__group__usb__dev__cdc__macros.html#ga178d79174af9a82e8424c0098d2a4a3d", null ], + [ "CY_USB_DEV_CDC_LINE_CONTROL_CHANGED", "group__group__usb__dev__cdc__macros.html#gad41570dcf369f8d83ebe0480c11bd87b", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__data__structures.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__data__structures.html new file mode 100644 index 0000000..b1b9166 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__data__structures.html @@ -0,0 +1,127 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Structures + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data Structures
+
+
+

General Description

+ + + + + + + + + + + + +

+API Reference

 Device Information
 
 Device Descriptors
 
 Control Transfer
 
 Class Support
 
 Function Pointers
 
+ + + + + + + +

+Data Structures

struct  cy_stc_usb_dev_config_t
 USB Device configuration structure. More...
 
struct  cy_stc_usb_dev_context_t
 USB Device context structure. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__data__structures.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__data__structures.js new file mode 100644 index 0000000..a98f640 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__data__structures.js @@ -0,0 +1,13 @@ +var group__group__usb__dev__data__structures = +[ + [ "Device Information", "group__group__usb__dev__structures__device.html", "group__group__usb__dev__structures__device" ], + [ "Device Descriptors", "group__group__usb__dev__structures__device__descr.html", "group__group__usb__dev__structures__device__descr" ], + [ "Control Transfer", "group__group__usb__dev__structures__control.html", "group__group__usb__dev__structures__control" ], + [ "Class Support", "group__group__usb__dev__structures__class.html", "group__group__usb__dev__structures__class" ], + [ "Function Pointers", "group__group__usb__dev__structures__func__ptr.html", "group__group__usb__dev__structures__func__ptr" ], + [ "cy_stc_usb_dev_config_t", "structcy__stc__usb__dev__config__t.html", [ + [ "ep0Buffer", "structcy__stc__usb__dev__config__t.html#a7adc52048bd8d3e28786b1d6348fc789", null ], + [ "ep0BufferSize", "structcy__stc__usb__dev__config__t.html#a50c257d5b2319ed93596121084293db6", null ] + ] ], + [ "cy_stc_usb_dev_context_t", "structcy__stc__usb__dev__context__t.html", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__enums.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__enums.html new file mode 100644 index 0000000..6915e56 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__enums.html @@ -0,0 +1,268 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Enumerated Types + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Enumerated Types
+
+
+

General Description

+ + + + + + + + + + + + + + +

+Enumerations

enum  cy_en_usb_dev_status_t {
+  CY_USB_DEV_SUCCESS = 0U, +
+  CY_USB_DEV_BAD_PARAM = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 1U), +
+  CY_USB_DEV_REQUEST_NOT_HANDLED = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 2U), +
+  CY_USB_DEV_TIMEOUT = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 3U), +
+  CY_USB_DEV_DRV_HW_BUSY = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 4U), +
+  CY_USB_DEV_DRV_HW_DISABLED = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 5U), +
+  CY_USB_DEV_DRV_HW_ERROR = (CY_USB_DEV_ID | CY_PDL_STATUS_ERROR | 6U) +
+ }
 USBFS Device return codes. More...
 
enum  cy_en_usb_dev_state_t {
+  CY_USB_DEV_DISABLED, +
+  CY_USB_DEV_ATTACHED, +
+  CY_USB_DEV_POWERED, +
+  CY_USB_DEV_DEFAULT, +
+  CY_USB_DEV_ADDRESSED, +
+  CY_USB_DEV_CONFIGURED +
+ }
 Device states. More...
 
enum  cy_en_usb_dev_power_status_t {
+  CY_USB_DEV_STATUS_BUS_POWERED, +
+  CY_USB_DEV_STATUS_SELF_POWERED +
+ }
 Power Status. More...
 
enum  cy_en_usb_dev_callback_events_t {
+  CY_USB_DEV_EVENT_BUS_RESET, +
+  CY_USB_DEV_EVENT_SET_CONFIG, +
+  CY_USB_DEV_EVENT_SET_INTERFACE +
+ }
 Callback events. More...
 
+

Enumeration Type Documentation

+ +

◆ cy_en_usb_dev_status_t

+ +
+
+ + + + +
enum cy_en_usb_dev_status_t
+
+ +

USBFS Device return codes.

+ + + + + + + + +
Enumerator
CY_USB_DEV_SUCCESS 

Operation completed successfully.

+
CY_USB_DEV_BAD_PARAM 

One or more input parameters are invalid.

+
CY_USB_DEV_REQUEST_NOT_HANDLED 

The request is not handled.

+
CY_USB_DEV_TIMEOUT 

Timeout occurred for the operation.

+
CY_USB_DEV_DRV_HW_BUSY 

The hardware is busy executing previous operation.

+
CY_USB_DEV_DRV_HW_DISABLED 

The hardware is disabled.

+
CY_USB_DEV_DRV_HW_ERROR 

The hardware error occurred during operation.

+
+ +
+
+ +

◆ cy_en_usb_dev_state_t

+ +
+
+ + + + +
enum cy_en_usb_dev_state_t
+
+ +

Device states.

+ + + + + + + +
Enumerator
CY_USB_DEV_DISABLED 

Device is disabled.

+
CY_USB_DEV_ATTACHED 

Device is attached.

+
CY_USB_DEV_POWERED 

Device is powered.

+
CY_USB_DEV_DEFAULT 

Device is in default state (after bus reset)

+
CY_USB_DEV_ADDRESSED 

Device set address (device is ready to communicate using this address)

+
CY_USB_DEV_CONFIGURED 

Device is configured (device is ready to communicate using data endpoints)

+
+ +
+
+ +

◆ cy_en_usb_dev_power_status_t

+ +
+
+ +

Power Status.

+ + + +
Enumerator
CY_USB_DEV_STATUS_BUS_POWERED 

Device is bus powered.

+
CY_USB_DEV_STATUS_SELF_POWERED 

Device is self powered.

+
+ +
+
+ +

◆ cy_en_usb_dev_callback_events_t

+ +
+
+ +

Callback events.

+ + + + +
Enumerator
CY_USB_DEV_EVENT_BUS_RESET 

Bus Reset detected.

+
CY_USB_DEV_EVENT_SET_CONFIG 

SET_CONFIGURATION request received.

+
CY_USB_DEV_EVENT_SET_INTERFACE 

SET_INTERFACE request received.

+
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__enums.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__enums.js new file mode 100644 index 0000000..c46cbe3 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__enums.js @@ -0,0 +1,29 @@ +var group__group__usb__dev__enums = +[ + [ "cy_en_usb_dev_status_t", "group__group__usb__dev__enums.html#ga143c13515bfded27b9dc5ebc18d4cdaf", [ + [ "CY_USB_DEV_SUCCESS", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafabf8d747d814384b26bf7e65e59648744", null ], + [ "CY_USB_DEV_BAD_PARAM", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa2b72ad2fd19c7d4fe00ac0152e55f7b8", null ], + [ "CY_USB_DEV_REQUEST_NOT_HANDLED", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa82f79a70755a503f983d9594ee02372a", null ], + [ "CY_USB_DEV_TIMEOUT", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa8269becd3832e1c2b452c4e6ac69f4a1", null ], + [ "CY_USB_DEV_DRV_HW_BUSY", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafaed025de81754aa5e5d7629dc9b937265", null ], + [ "CY_USB_DEV_DRV_HW_DISABLED", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa0991f7a73dd697d482b9e0d3d4411524", null ], + [ "CY_USB_DEV_DRV_HW_ERROR", "group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa9ffa2df4a2f20a453e4361b50fc33c95", null ] + ] ], + [ "cy_en_usb_dev_state_t", "group__group__usb__dev__enums.html#ga8031906d685904649e67faaee7810dbe", [ + [ "CY_USB_DEV_DISABLED", "group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbeac593d58ec7f0f3702b5ea09776e8bfb1", null ], + [ "CY_USB_DEV_ATTACHED", "group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea41b95a6a9fa14b807ff0c86c2273b086", null ], + [ "CY_USB_DEV_POWERED", "group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea5de0f6f66b09380698c3d0e6c75b50f3", null ], + [ "CY_USB_DEV_DEFAULT", "group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea12d4040ced408fd8cc40d95665e402e6", null ], + [ "CY_USB_DEV_ADDRESSED", "group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbead8bbade2aea08c1df601dacd32fbf1e1", null ], + [ "CY_USB_DEV_CONFIGURED", "group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea3549813ede03d96bed9febadf9e80fe4", null ] + ] ], + [ "cy_en_usb_dev_power_status_t", "group__group__usb__dev__enums.html#ga24aecb8903fe9acea9c3fac59379684a", [ + [ "CY_USB_DEV_STATUS_BUS_POWERED", "group__group__usb__dev__enums.html#gga24aecb8903fe9acea9c3fac59379684aaaa62c52051f379e36e6163dcb4d01c9f", null ], + [ "CY_USB_DEV_STATUS_SELF_POWERED", "group__group__usb__dev__enums.html#gga24aecb8903fe9acea9c3fac59379684aaafddb94fc7cb2cf0a20aac8d539b7926", null ] + ] ], + [ "cy_en_usb_dev_callback_events_t", "group__group__usb__dev__enums.html#gad38a8a2002a67f7b109d6beaa20ceb98", [ + [ "CY_USB_DEV_EVENT_BUS_RESET", "group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a21b36d54a1bed713ab5018918bb63247", null ], + [ "CY_USB_DEV_EVENT_SET_CONFIG", "group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a48cfdb3d0e5adcd2ec3bb4a1ed0be3d1", null ], + [ "CY_USB_DEV_EVENT_SET_INTERFACE", "group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a8061ab548dd75281b3538840d1a1616d", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions.html new file mode 100644 index 0000000..57ca5dc --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions.html @@ -0,0 +1,117 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Functions
+
+
+

General Description

+ + + + + + + + + + + + +

+API Reference

 Initialization Functions
 
 Service Functions
 
 Data Transfer Functions
 
 Vendor Request Support Functions
 
 Class Support Functions
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions.js new file mode 100644 index 0000000..e4e075d --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions.js @@ -0,0 +1,8 @@ +var group__group__usb__dev__functions = +[ + [ "Initialization Functions", "group__group__usb__dev__functions__common.html", "group__group__usb__dev__functions__common" ], + [ "Service Functions", "group__group__usb__dev__functions__service.html", "group__group__usb__dev__functions__service" ], + [ "Data Transfer Functions", "group__group__usb__dev__functions__data__transfer.html", "group__group__usb__dev__functions__data__transfer" ], + [ "Vendor Request Support Functions", "group__group__usb__dev__functions__vendor__support.html", "group__group__usb__dev__functions__vendor__support" ], + [ "Class Support Functions", "group__group__usb__dev__functions__class__support.html", "group__group__usb__dev__functions__class__support" ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__class__support.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__class__support.html new file mode 100644 index 0000000..1408592 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__class__support.html @@ -0,0 +1,369 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Class Support Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Class Support Functions
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + +

+Functions

cy_en_usb_dev_status_t Cy_USB_Dev_RegisterClass (cy_stc_usb_dev_class_ll_item_t *classItem, cy_stc_usb_dev_class_t *classObj, void *classContext, cy_stc_usb_dev_context_t *context)
 Registers device class that will be supported by USB Device. More...
 
__STATIC_INLINE void Cy_USB_Dev_RegisterClassBusResetCallback (cy_cb_usb_dev_bus_reset_t callback, cy_stc_usb_dev_class_t *classObj)
 Registers a callback function to notify a certain class about a Bus Reset event. More...
 
__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetConfigCallback (cy_cb_usb_dev_set_config_t callback, cy_stc_usb_dev_class_t *classObj)
 Registers a callback function to notify a certain class that SET_CONFIGURATION request was received from USB Host. More...
 
__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetInterfaceCallback (cy_cb_usb_dev_set_interface_t callback, cy_stc_usb_dev_class_t *classObj)
 Registers a callback function to notify a certain class that SET_INTERFACE request was received from the USB Host. More...
 
__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestRcvdCallback (cy_cb_usb_dev_request_received_t callback, cy_stc_usb_dev_class_t *classObj)
 Registers a callback function to notify a certain class that setup packet was received from USB Host but was not recognized. More...
 
__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestCmpltCallback (cy_cb_usb_dev_request_cmplt_t callback, cy_stc_usb_dev_class_t *classObj)
 Registers a callback function to notify a certain class that the USB Device received data from the USB Host as part of current request processing. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_RegisterClass()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_RegisterClass (cy_stc_usb_dev_class_ll_item_tclassItem,
cy_stc_usb_dev_class_tclassObj,
void * classContext,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Registers device class that will be supported by USB Device.

+

The USB Device provides a hooks to implement required class support.

+
Parameters
+ + + + + +
classItemThe pointer to class linked list element.
classObjThe pointer to the class structure.
classContextThe pointer to the context class structure allocated by the user. The structure is used during the custom class operation for internal configuration and data retention.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_RegisterClassBusResetCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterClassBusResetCallback (cy_cb_usb_dev_bus_reset_t callback,
cy_stc_usb_dev_class_tclassObj 
)
+
+ +

Registers a callback function to notify a certain class about a Bus Reset event.

+

To remove the callback function, pass NULL as the function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
classObjThe pointer to the class structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_RegisterClassSetConfigCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetConfigCallback (cy_cb_usb_dev_set_config_t callback,
cy_stc_usb_dev_class_tclassObj 
)
+
+ +

Registers a callback function to notify a certain class that SET_CONFIGURATION request was received from USB Host.

+

To remove the callback function, pass a NULL as the function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
classObjThe pointer to the class structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_RegisterClassSetInterfaceCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterClassSetInterfaceCallback (cy_cb_usb_dev_set_interface_t callback,
cy_stc_usb_dev_class_tclassObj 
)
+
+ +

Registers a callback function to notify a certain class that SET_INTERFACE request was received from the USB Host.

+

To remove the callback function, pass a NULL as the function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
classObjThe pointer to the class structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_RegisterClassRequestRcvdCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestRcvdCallback (cy_cb_usb_dev_request_received_t callback,
cy_stc_usb_dev_class_tclassObj 
)
+
+ +

Registers a callback function to notify a certain class that setup packet was received from USB Host but was not recognized.

+

Therefore, this might require manual class processing. To remove the callback function, pass a NULL as the function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
classObjThe pointer to the class structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_RegisterClassRequestCmpltCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterClassRequestCmpltCallback (cy_cb_usb_dev_request_cmplt_t callback,
cy_stc_usb_dev_class_tclassObj 
)
+
+ +

Registers a callback function to notify a certain class that the USB Device received data from the USB Host as part of current request processing.

+

The class setup packet callback function must enable notification to trigger this event. This makes sense only when class request processing requires a data stage. To remove callback function pass NULL as function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
classObjThe pointer to the class structure.
+
+
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__class__support.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__class__support.js new file mode 100644 index 0000000..2a641d4 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__class__support.js @@ -0,0 +1,9 @@ +var group__group__usb__dev__functions__class__support = +[ + [ "Cy_USB_Dev_RegisterClass", "group__group__usb__dev__functions__class__support.html#ga7796c2ddd1f1bb389cbad19acdeb5c9a", null ], + [ "Cy_USB_Dev_RegisterClassBusResetCallback", "group__group__usb__dev__functions__class__support.html#gac6977953928e6da80cf6074f6bc5cc9e", null ], + [ "Cy_USB_Dev_RegisterClassSetConfigCallback", "group__group__usb__dev__functions__class__support.html#gaa51aa8db9df18ffe8f6da8f409b89728", null ], + [ "Cy_USB_Dev_RegisterClassSetInterfaceCallback", "group__group__usb__dev__functions__class__support.html#ga573e8f24614508d8db6149dd064a6f1c", null ], + [ "Cy_USB_Dev_RegisterClassRequestRcvdCallback", "group__group__usb__dev__functions__class__support.html#ga25494add7cc8061b7fb13d3465e94726", null ], + [ "Cy_USB_Dev_RegisterClassRequestCmpltCallback", "group__group__usb__dev__functions__class__support.html#gab1f754d7b4e60336a6b712e16dde21a8", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__common.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__common.html new file mode 100644 index 0000000..1c78452 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__common.html @@ -0,0 +1,283 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Initialization Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Initialization Functions
+
+
+

General Description

+ + + + + + + + + + + + + + +

+Functions

cy_en_usb_dev_status_t Cy_USB_Dev_Init (USBFS_Type *base, struct cy_stc_usbfs_dev_drv_config const *drvConfig, struct cy_stc_usbfs_dev_drv_context *drvContext, cy_stc_usb_dev_device_t const *device, cy_stc_usb_dev_config_t const *config, cy_stc_usb_dev_context_t *context)
 Initialize the USB Device stack and underneath USBFS hardware driver. More...
 
void Cy_USB_Dev_DeInit (cy_stc_usb_dev_context_t *context)
 De-initialize the USB Device stack and underneath hardware driver. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_Connect (bool blocking, int32_t timeout, cy_stc_usb_dev_context_t *context)
 Enables pull-up on D+ (hardware supports only full-speed device) line to signal USB Device connection on USB Bus. More...
 
void Cy_USB_Dev_Disconnect (cy_stc_usb_dev_context_t *context)
 Disables pull-up on D+ (hardware supports only full-speed device) line to signal USB Device disconnection on USB Bus. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_Init()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_Init (USBFS_Type * base,
struct cy_stc_usbfs_dev_drv_config const * drvConfig,
struct cy_stc_usbfs_dev_drv_context * drvContext,
cy_stc_usb_dev_device_t const * device,
cy_stc_usb_dev_config_t const * config,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Initialize the USB Device stack and underneath USBFS hardware driver.

+
Parameters
+ + + + + + + +
baseThe pointer to the USBFS instance.
drvConfigThe pointer to the USBFS driver configuration structure.
drvContextThe pointer to the USBFS driver context structure allocated by the user. The structure is used during the USBFS driver operation for internal configuration and data retention. The user must not modify anything in this structure.
deviceThe pointer to the device structure cy_stc_usb_dev_device_t.
configThe pointer to the driver configuration structure cy_stc_usb_dev_config_t.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+
Note
The configuration of USB clocks, pins, and interrupts is not handled by this function and must be done on the application level.
+ +
+
+ +

◆ Cy_USB_Dev_DeInit()

+ +
+
+ + + + + + + + +
void Cy_USB_Dev_DeInit (cy_stc_usb_dev_context_tcontext)
+
+ +

De-initialize the USB Device stack and underneath hardware driver.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_Connect()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_Connect (bool blocking,
int32_t timeout,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Enables pull-up on D+ (hardware supports only full-speed device) line to signal USB Device connection on USB Bus.

+
Parameters
+ + + + +
blockingWait until device is configured.
timeoutDefines in milliseconds the time for which this function can block. If that time expires, the USB Device is disconnected and the function returns. To wait forever, pass CY_USB_DEV_WAIT_FOREVER.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_Disconnect()

+ +
+
+ + + + + + + + +
void Cy_USB_Dev_Disconnect (cy_stc_usb_dev_context_tcontext)
+
+ +

Disables pull-up on D+ (hardware supports only full-speed device) line to signal USB Device disconnection on USB Bus.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__common.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__common.js new file mode 100644 index 0000000..f4dd2dc --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__common.js @@ -0,0 +1,7 @@ +var group__group__usb__dev__functions__common = +[ + [ "Cy_USB_Dev_Init", "group__group__usb__dev__functions__common.html#ga12b36659b72aa85166e85323eb96e36a", null ], + [ "Cy_USB_Dev_DeInit", "group__group__usb__dev__functions__common.html#gad3b25c869fcca5706d0ebfe135df0783", null ], + [ "Cy_USB_Dev_Connect", "group__group__usb__dev__functions__common.html#ga368f2e081a58b7eef81a17c4781fca8e", null ], + [ "Cy_USB_Dev_Disconnect", "group__group__usb__dev__functions__common.html#ga15cde7caa00a43d253198ea70935e47c", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__data__transfer.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__data__transfer.html new file mode 100644 index 0000000..4428f42 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__data__transfer.html @@ -0,0 +1,531 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Transfer Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data Transfer Functions
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

cy_en_usb_dev_status_t Cy_USB_Dev_StartReadEp (uint32_t endpoint, cy_stc_usb_dev_context_t *context)
 Start a reading on a certain endpoint. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpBlocking (uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, int32_t timeout, cy_stc_usb_dev_context_t *context)
 Read data received from USB Host from a certain endpoint. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpNonBlocking (uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, cy_stc_usb_dev_context_t *context)
 Read data received from USB Host from a certain endpoint. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_AbortEpTransfer (uint32_t endpoint, cy_stc_usb_dev_context_t *context)
 Aborts pending read or write endpoint operation. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_GetEpNumToRead (uint32_t endpoint, cy_stc_usb_dev_context_t const *context)
 Returns the number of bytes that available to be read from a certain endpoint buffer. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpBlocking (uint32_t endpoint, uint8_t const *buffer, uint32_t size, int32_t timeout, cy_stc_usb_dev_context_t *context)
 Write data to be transferred to USB Host from a certain endpoint. More...
 
cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpNonBlocking (uint32_t endpoint, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_context_t *context)
 Write data to be transferred to USB Host from a certain endpoint. More...
 
__STATIC_INLINE void Cy_USB_Dev_OverwriteHandleTimeout (cy_fn_usb_dev_handle_timeout_ptr_t handleTimeout, cy_stc_usb_dev_context_t *context)
 Overwrite the handle timeout function that is implemented internally. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_StartReadEp()

+ +
+
+ + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_StartReadEp (uint32_t endpoint,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Start a reading on a certain endpoint.

+
Parameters
+ + + +
endpointThe OUT data endpoint number.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+
Note
The read is not allowed for OUT endpoints after SET_CONFIGURATION or SET_INTERFACE request therefore this function must be called before reading data from OUT endpoints.
+ +
+
+ +

◆ Cy_USB_Dev_ReadEpBlocking()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpBlocking (uint32_t endpoint,
uint8_t * buffer,
uint32_t size,
uint32_t * actSize,
int32_t timeout,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Read data received from USB Host from a certain endpoint.

+

Before calling this function, Cy_USB_Dev_StartReadEp must be called. This function is blocking and returns after successful USB Host transfer, or an error or timeout occurred.

+
Parameters
+ + + + + + + +
endpointThe OUT data endpoint number.
bufferThe pointer to buffer that stores data that was read.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
sizeThe number of bytes to read. This value must be less or equal to endpoint maximum packet size.
actSizeThe number of bytes that were actually read.
timeoutDefines in milliseconds the time for which this function can block. If that time expires the function returns. To wait forever pass CY_USB_DEV_WAIT_FOREVER.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_ReadEpNonBlocking()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_ReadEpNonBlocking (uint32_t endpoint,
uint8_t * buffer,
uint32_t size,
uint32_t * actSize,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Read data received from USB Host from a certain endpoint.

+

Before calling this function, Cy_USB_Dev_StartReadEp must be called.

+
Parameters
+ + + + + + +
endpointThe OUT data endpoint number.
bufferThe pointer to buffer that stores data that was read.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
sizeThe number of bytes to read. This value must be less than or equal to endpoint maximum packet size.
actSizeThe number of bytes that were actually read.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_AbortEpTransfer()

+ +
+
+ + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_AbortEpTransfer (uint32_t endpoint,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Aborts pending read or write endpoint operation.

+

If there is any bus activity after abort operation requested the function waits for its completion or timeout. The timeout is time to transfer bulk or interrupt packet of maximum playload size. If this bus activity is a transfer to the aborting endpoint the received data is lost and endpoint transfer completion callbacks is not invoked. After function returns new read or write endpoint operation can be submitted.

+
Parameters
+ + + +
endpointThe data endpoint number.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+
Note
The abort operation is not supported for ISOC endpoints because these endpoints do not have handshake and are always accessible by the USB Host. Therefore, abort can cause unexpected behavior.
+ +
+
+ +

◆ Cy_USB_Dev_GetEpNumToRead()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_GetEpNumToRead (uint32_t endpoint,
cy_stc_usb_dev_context_t const * context 
)
+
+ +

Returns the number of bytes that available to be read from a certain endpoint buffer.

+

Before calling this function ensure that the Host wrote data into the endpoint. The returned value is updated after the Host access to the endpoint but remains unchanged after data has been read from the endpoint buffer.

+
Parameters
+ + + +
endpointThe OUT data endpoint number.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Number of bytes in OUT endpoint buffer.
+ +
+
+ +

◆ Cy_USB_Dev_WriteEpBlocking()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpBlocking (uint32_t endpoint,
uint8_t const * buffer,
uint32_t size,
int32_t timeout,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Write data to be transferred to USB Host from a certain endpoint.

+

This function is blocking and returns after successful USB Host transfer, or an error or timeout occurred.

+
Parameters
+ + + + + + +
endpointThe IN data endpoint number.
bufferThe pointer to the buffer containing data bytes to write.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
sizeThe number of bytes to write. This value must be less than or equal to endpoint maximum packet size.
timeoutDefines in milliseconds the time for which this function can block. If that time expires, the function returns. To wait forever, pass CY_USB_DEV_WAIT_FOREVER.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_WriteEpNonBlocking()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_WriteEpNonBlocking (uint32_t endpoint,
uint8_t const * buffer,
uint32_t size,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Write data to be transferred to USB Host from a certain endpoint.

+
Parameters
+ + + + + +
endpointThe IN data endpoint number.
bufferThe pointer to the buffer containing data bytes to write.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).
sizeThe number of bytes to write. This value must be less than or equal to endpoint maximum packet size.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_OverwriteHandleTimeout()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_OverwriteHandleTimeout (cy_fn_usb_dev_handle_timeout_ptr_t handleTimeout,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Overwrite the handle timeout function that is implemented internally.

+

The internal implementation converts one timeout unit to milliseconds.

+
Parameters
+ + + +
handleTimeoutThe pointer to function to be executed to handle timeout for blocking operations.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__data__transfer.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__data__transfer.js new file mode 100644 index 0000000..6e8a8a1 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__data__transfer.js @@ -0,0 +1,11 @@ +var group__group__usb__dev__functions__data__transfer = +[ + [ "Cy_USB_Dev_StartReadEp", "group__group__usb__dev__functions__data__transfer.html#ga87f178d2a65510bd26dff4ee5d2c06ab", null ], + [ "Cy_USB_Dev_ReadEpBlocking", "group__group__usb__dev__functions__data__transfer.html#ga0ffcc053f1154d6f77b1744f7a517ef5", null ], + [ "Cy_USB_Dev_ReadEpNonBlocking", "group__group__usb__dev__functions__data__transfer.html#ga5f3bb59175bd8b46a558b8206d6f9cdf", null ], + [ "Cy_USB_Dev_AbortEpTransfer", "group__group__usb__dev__functions__data__transfer.html#gafe804a021cfbea888a966b8cf1b4172e", null ], + [ "Cy_USB_Dev_GetEpNumToRead", "group__group__usb__dev__functions__data__transfer.html#ga79a6fbd0663556eb7ccc586e6dbe7e4e", null ], + [ "Cy_USB_Dev_WriteEpBlocking", "group__group__usb__dev__functions__data__transfer.html#ga1bf916540d58d458568b2eed1a186df4", null ], + [ "Cy_USB_Dev_WriteEpNonBlocking", "group__group__usb__dev__functions__data__transfer.html#gafca5c6c661b90572a5278322b0773ba6", null ], + [ "Cy_USB_Dev_OverwriteHandleTimeout", "group__group__usb__dev__functions__data__transfer.html#ga17873db332970f17f9cfa8b7f383c019", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__service.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__service.html new file mode 100644 index 0000000..8cb3a71 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__service.html @@ -0,0 +1,527 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Service Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Service Functions
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

__STATIC_INLINE void Cy_USB_Dev_RegisterEventsCallback (cy_cb_usb_dev_events_callback_t callback, cy_stc_usb_dev_context_t *context)
 Registers a callback function to notify number of events: Bus Reset detected, SET_CONFIGURATION request received and SET_INTERFACE request received. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_GetConfiguration (cy_stc_usb_dev_context_t const *context)
 Returns USB Device configuration. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_GetAlternateSettings (uint32_t interface, cy_stc_usb_dev_context_t const *context)
 Returns alternate setting for a certain interface. More...
 
__STATIC_INLINE bool Cy_USB_Dev_IsConfigurationChanged (cy_stc_usb_dev_context_t *context)
 Returns configuration state that is cleared after read. More...
 
__STATIC_INLINE bool Cy_USB_Dev_IsRemoteWakeupEnabled (cy_stc_usb_dev_context_t const *context)
 Returns Remote Wakeup status. More...
 
__STATIC_INLINE void Cy_USB_Dev_SetPowerStatus (cy_en_usb_dev_power_status_t status, cy_stc_usb_dev_context_t *context)
 Sets Power status to report it when USB Host issues GET_STATUS standard requests. More...
 
__STATIC_INLINE uint8_t * Cy_USB_Dev_GetSerialNumberString (cy_stc_usb_dev_context_t *context)
 Returns pointer to the serial number string generated from silicon ID. More...
 
__STATIC_INLINE void Cy_USB_Dev_RegisterSerialNumStringCallback (cy_fn_usb_dev_sn_string_ptr_t callback, cy_stc_usb_dev_context_t *context)
 Registers a callback function that returns the serial string descriptor when it is requested by the USB Host. More...
 
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlRead (cy_stc_usb_dev_control_transfer_t *transfer, uint8_t *ptr, uint32_t size)
 Setup control read (Host reads) transfer. More...
 
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWrite (cy_stc_usb_dev_control_transfer_t *transfer, uint32_t size)
 Setup control write transfer (Host writes) and sets CY_USB_DEV_SUCCESS status. More...
 
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWriteResult (cy_stc_usb_dev_control_transfer_t const *transfer, uint8_t *ptr)
 Copies data received from the Host into the specified memory location. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_RegisterEventsCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterEventsCallback (cy_cb_usb_dev_events_callback_t callback,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Registers a callback function to notify number of events: Bus Reset detected, SET_CONFIGURATION request received and SET_INTERFACE request received.

+

To remove the callback function, pass NULL as the function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_GetConfiguration()

+ +
+
+ + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_GetConfiguration (cy_stc_usb_dev_context_t const * context)
+
+ +

Returns USB Device configuration.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Configuration value. The configuration value is 0 until USB Device was not enumerated by the USB Host.
+ +
+
+ +

◆ Cy_USB_Dev_GetAlternateSettings()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_GetAlternateSettings (uint32_t interface,
cy_stc_usb_dev_context_t const * context 
)
+
+ +

Returns alternate setting for a certain interface.

+

This function is useful to determine which alternate settings are active for a certain interface.

+
Parameters
+ + + +
interfaceInterface number.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Alternate settings value.
+ +
+
+ +

◆ Cy_USB_Dev_IsConfigurationChanged()

+ +
+
+ + + + + + + + +
__STATIC_INLINE bool Cy_USB_Dev_IsConfigurationChanged (cy_stc_usb_dev_context_tcontext)
+
+ +

Returns configuration state that is cleared after read.

+

This function is useful to determine which configuration or alternate settings of the interface were changed. After configuration state has been changed, Data Transfer Functions functions should be used to start communication with the USB Host.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
True - if configuration has been changed since last call. False - otherwise.
+
Note
This function is not interrupt-protected and to prevent a race condition, it should be protected from the USBFS interruption in the place where it is called.
+ +
+
+ +

◆ Cy_USB_Dev_IsRemoteWakeupEnabled()

+ +
+
+ + + + + + + + +
__STATIC_INLINE bool Cy_USB_Dev_IsRemoteWakeupEnabled (cy_stc_usb_dev_context_t const * context)
+
+ +

Returns Remote Wakeup status.

+

This function is useful to determine whether Remote Wakeup was enabled by the USB Host when USB Device supports this option.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
True - if Remote Wakeup was enabled by the USB Host. False - otherwise.
+ +
+
+ +

◆ Cy_USB_Dev_SetPowerStatus()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_SetPowerStatus (cy_en_usb_dev_power_status_t status,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Sets Power status to report it when USB Host issues GET_STATUS standard requests.

+

Call this function any time when power source is changed from Self-Powered to Bus-Powered or vice versa.

+
Parameters
+ + + +
statusPower status cy_en_usb_dev_power_status_t
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_GetSerialNumberString()

+ +
+
+ + + + + + + + +
__STATIC_INLINE uint8_t * Cy_USB_Dev_GetSerialNumberString (cy_stc_usb_dev_context_tcontext)
+
+ +

Returns pointer to the serial number string generated from silicon ID.

+

The string length is CY_USB_DEV_SN_STRING_LENGTH.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
The pointer to the serial number string.
+ +
+
+ +

◆ Cy_USB_Dev_RegisterSerialNumStringCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterSerialNumStringCallback (cy_fn_usb_dev_sn_string_ptr_t callback,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Registers a callback function that returns the serial string descriptor when it is requested by the USB Host.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_SetupControlRead()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlRead (cy_stc_usb_dev_control_transfer_ttransfer,
uint8_t * ptr,
uint32_t size 
)
+
+ +

Setup control read (Host reads) transfer.

+
Parameters
+ + + + +
transferPointer to structure that holds SETUP packet and information for request processing.
ptrThe pointer to the data which will be read by the Host.
sizeNumber of bytes to read.
+
+
+
Returns
Returns CY_USB_DEV_SUCCESS (there is input parameters verification).
+ +
+
+ +

◆ Cy_USB_Dev_SetupControlWrite()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWrite (cy_stc_usb_dev_control_transfer_ttransfer,
uint32_t size 
)
+
+ +

Setup control write transfer (Host writes) and sets CY_USB_DEV_SUCCESS status.

+
Parameters
+ + + +
transferPointer to structure that holds SETUP packet and information for request processing.
sizeNumber of bytes which Host is allowed to write.
+
+
+
Returns
Returns CY_USB_DEV_SUCCESS (there is input parameters verification).
+ +
+
+ +

◆ Cy_USB_Dev_SetupControlWriteResult()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE cy_en_usb_dev_status_t Cy_USB_Dev_SetupControlWriteResult (cy_stc_usb_dev_control_transfer_t const * transfer,
uint8_t * ptr 
)
+
+ +

Copies data received from the Host into the specified memory location.

+

There must provide enough place to store number of bytes provided in Cy_USB_Dev_SetupControlWrite.

+
Parameters
+ + + +
transferPointer to structure that holds SETUP packet and information for request processing.
ptrThe pointer to the memory location to copy to.
+
+
+
Returns
Returns CY_USB_DEV_SUCCESS (there is input parameters verification).
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__service.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__service.js new file mode 100644 index 0000000..cd8df43 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__service.js @@ -0,0 +1,14 @@ +var group__group__usb__dev__functions__service = +[ + [ "Cy_USB_Dev_RegisterEventsCallback", "group__group__usb__dev__functions__service.html#gafe853fd59fdb48ef9569953a352768f5", null ], + [ "Cy_USB_Dev_GetConfiguration", "group__group__usb__dev__functions__service.html#gabdce652e7c8eb4cf3647dd1557e36822", null ], + [ "Cy_USB_Dev_GetAlternateSettings", "group__group__usb__dev__functions__service.html#ga677676df1eda5c90bad152278d66c0cf", null ], + [ "Cy_USB_Dev_IsConfigurationChanged", "group__group__usb__dev__functions__service.html#ga9c026e8afd1caf12f3934168bc152a23", null ], + [ "Cy_USB_Dev_IsRemoteWakeupEnabled", "group__group__usb__dev__functions__service.html#gaf754fa7ea2f155c05b5fa9b862235a66", null ], + [ "Cy_USB_Dev_SetPowerStatus", "group__group__usb__dev__functions__service.html#ga082afaccf8f10762300cfb1c996290fc", null ], + [ "Cy_USB_Dev_GetSerialNumberString", "group__group__usb__dev__functions__service.html#gaecedf09db3f4674cb1c37cd93bb80b97", null ], + [ "Cy_USB_Dev_RegisterSerialNumStringCallback", "group__group__usb__dev__functions__service.html#ga0aff856f8658d08ffcef513eede344b8", null ], + [ "Cy_USB_Dev_SetupControlRead", "group__group__usb__dev__functions__service.html#ga1308439c2f55fe4bb51386b92ad2ceec", null ], + [ "Cy_USB_Dev_SetupControlWrite", "group__group__usb__dev__functions__service.html#ga2e622f1f37d67dd6d34607f11a961a6f", null ], + [ "Cy_USB_Dev_SetupControlWriteResult", "group__group__usb__dev__functions__service.html#gafaec73b3837988a08b02a6b0fde4c5eb", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__vendor__support.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__vendor__support.html new file mode 100644 index 0000000..663c069 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__vendor__support.html @@ -0,0 +1,156 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Vendor Request Support Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Vendor Request Support Functions
+
+
+

General Description

+ + + + + +

+Functions

__STATIC_INLINE void Cy_USB_Dev_RegisterVendorCallbacks (cy_cb_usb_dev_request_received_t requestReceivedHandle, cy_cb_usb_dev_request_cmplt_t requestCompletedHandle, cy_stc_usb_dev_context_t *context)
 Registering user callback to handle Vendor-Specific requests. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_RegisterVendorCallbacks()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_RegisterVendorCallbacks (cy_cb_usb_dev_request_received_t requestReceivedHandle,
cy_cb_usb_dev_request_cmplt_t requestCompletedHandle,
cy_stc_usb_dev_context_tcontext 
)
+
+ +

Registering user callback to handle Vendor-Specific requests.

+
Parameters
+ + + + +
requestReceivedHandleThe pointer to a callback function. This function is called when setup packet was received from USB Host but was not recognized. Therefore this might require manual class processing. To remove the callback function, pass a NULL as the function pointer.
requestCompletedHandleThe pointer to a callback function. This function is called when the USB Device received data from the USB Host as part of current request processing. The requestReceivedHandle function must enable notification to trigger this event. This makes sense only when CDC request processing requires a data stage. To remove callback function pass NULL as function pointer.
contextThe pointer to the context structure cy_stc_usb_dev_context_t allocated by the user. The structure is used during the USB Device operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Note
The callbacks registered by this function does not overrides processing of MS OS String vendor-specific request to retrieve an OS Feature Descriptor.
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__vendor__support.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__vendor__support.js new file mode 100644 index 0000000..2d28331 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__functions__vendor__support.js @@ -0,0 +1,4 @@ +var group__group__usb__dev__functions__vendor__support = +[ + [ "Cy_USB_Dev_RegisterVendorCallbacks", "group__group__usb__dev__functions__vendor__support.html#gad864982cf48ad57727e40d9e9fc3e239", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid.html new file mode 100644 index 0000000..6668b44 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid.html @@ -0,0 +1,116 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: HID Class + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
HID Class
+
+
+

General Description

+

This section provides the API description for the HID class.

+ + + + + + + + + + +

+API Reference

 Macros
 
 Functions
 
 Data Structures
 
 Enumerated Types
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid.js new file mode 100644 index 0000000..f96fed9 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid.js @@ -0,0 +1,7 @@ +var group__group__usb__dev__hid = +[ + [ "Macros", "group__group__usb__dev__hid__macros.html", "group__group__usb__dev__hid__macros" ], + [ "Functions", "group__group__usb__dev__hid__functions.html", "group__group__usb__dev__hid__functions" ], + [ "Data Structures", "group__group__usb__dev__hid__data__structures.html", "group__group__usb__dev__hid__data__structures" ], + [ "Enumerated Types", "group__group__usb__dev__hid__enums.html", "group__group__usb__dev__hid__enums" ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__data__structures.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__data__structures.html new file mode 100644 index 0000000..d64bdc3 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__data__structures.html @@ -0,0 +1,142 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Data Structures + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Data Structures
+
+
+

General Description

+ + + + + + + + +

+Data Structures

struct  cy_stc_usb_dev_hid_config_t
 HID class configuration structure. More...
 
struct  cy_stc_usb_dev_hid_context_t
 HID class context structure. More...
 
+ + + + + + + +

+Typedefs

+typedef cy_en_usb_dev_status_t(* cy_cb_usbfs_dev_hid_get_report_t) (uint32_t intf, uint32_t type, uint32_t id, uint8_t **report, uint32_t *size)
 Handler for GET_REPORT request received.
 
typedef cy_en_usb_dev_status_t(* cy_cb_usbfs_dev_hid_set_report_t) (uint32_t intf, uint32_t type, uint32_t id, uint8_t *report, uint32_t size)
 Handler for SET_REPORT request completed. More...
 
+

Typedef Documentation

+ +

◆ cy_cb_usbfs_dev_hid_set_report_t

+ +
+
+ + + + +
typedef cy_en_usb_dev_status_t(* cy_cb_usbfs_dev_hid_set_report_t) (uint32_t intf, uint32_t type, uint32_t id, uint8_t *report, uint32_t size)
+
+ +

Handler for SET_REPORT request completed.

+

The Host sent report data to Device.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__data__structures.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__data__structures.js new file mode 100644 index 0000000..4501d72 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__data__structures.js @@ -0,0 +1,10 @@ +var group__group__usb__dev__hid__data__structures = +[ + [ "cy_stc_usb_dev_hid_config_t", "structcy__stc__usb__dev__hid__config__t.html", [ + [ "timers", "structcy__stc__usb__dev__hid__config__t.html#a5b7720207db9a5910233571b7ede35e6", null ], + [ "timersNum", "structcy__stc__usb__dev__hid__config__t.html#a6fcb3f02d21b149099457fa2d74a9471", null ] + ] ], + [ "cy_stc_usb_dev_hid_context_t", "structcy__stc__usb__dev__hid__context__t.html", null ], + [ "cy_cb_usbfs_dev_hid_get_report_t", "group__group__usb__dev__hid__data__structures.html#gaebf080dd87c52f34b1953fc0a26326df", null ], + [ "cy_cb_usbfs_dev_hid_set_report_t", "group__group__usb__dev__hid__data__structures.html#gadb23e2c86255463c972463b350f52e83", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__enums.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__enums.html new file mode 100644 index 0000000..b3184a0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__enums.html @@ -0,0 +1,142 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Enumerated Types + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Enumerated Types
+
+
+

General Description

+ + + + + +

+Enumerations

enum  cy_en_usb_dev_hid_timer_state_t {
+  CY_USB_DEV_HID_TIMER_EXPIRED, +
+  CY_USB_DEV_HID_TIMER_RUNNING, +
+  CY_USB_DEV_HID_TIMER_INDEFINITE +
+ }
 Timer state. More...
 
+

Enumeration Type Documentation

+ +

◆ cy_en_usb_dev_hid_timer_state_t

+ +
+
+ +

Timer state.

+ + + + +
Enumerator
CY_USB_DEV_HID_TIMER_EXPIRED 

Timer expired.

+
CY_USB_DEV_HID_TIMER_RUNNING 

Timer is running.

+
CY_USB_DEV_HID_TIMER_INDEFINITE 

Report is sent when data or state changes.

+
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__enums.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__enums.js new file mode 100644 index 0000000..4122e3f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__enums.js @@ -0,0 +1,8 @@ +var group__group__usb__dev__hid__enums = +[ + [ "cy_en_usb_dev_hid_timer_state_t", "group__group__usb__dev__hid__enums.html#ga4603043f111ffa28cd992b33bf067bdf", [ + [ "CY_USB_DEV_HID_TIMER_EXPIRED", "group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa3803a43c55c6c87e709e9973a384334b", null ], + [ "CY_USB_DEV_HID_TIMER_RUNNING", "group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa814f17572af01dc8756d5677bd79d065", null ], + [ "CY_USB_DEV_HID_TIMER_INDEFINITE", "group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa4082df3b2c2a1f57e20aaf5d138902bd", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__functions.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__functions.html new file mode 100644 index 0000000..9bed755 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__functions.html @@ -0,0 +1,360 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Functions + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Functions
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + +

+Functions

cy_en_usb_dev_status_t Cy_USB_Dev_HID_Init (cy_stc_usb_dev_hid_config_t const *config, cy_stc_usb_dev_hid_context_t *context, cy_stc_usb_dev_context_t *devContext)
 Initializes the HID class. More...
 
cy_en_usb_dev_hid_timer_state_t Cy_USB_Dev_HID_UpdateTimer (uint32_t interface, uint32_t reportId, cy_stc_usb_dev_hid_context_t *context)
 Updates the HID Report idle timer and returns the status of the timer. More...
 
__STATIC_INLINE uint32_t Cy_USB_Dev_HID_GetProtocol (uint32_t interface, cy_stc_usb_dev_hid_context_t const *context)
 Returns the HID protocol value for a certain interface. More...
 
__STATIC_INLINE void Cy_USB_Dev_HID_RegisterGetReportCallback (cy_cb_usbfs_dev_hid_get_report_t callback, cy_stc_usb_dev_hid_context_t *context)
 Registers a callback function that handles a GET_REPORT request. More...
 
__STATIC_INLINE void Cy_USB_Dev_HID_RegisterSetReportCallback (cy_cb_usbfs_dev_hid_set_report_t callback, cy_stc_usb_dev_hid_context_t *context)
 Registers a callback function that handles SET_REPORT request. More...
 
__STATIC_INLINE cy_stc_usb_dev_class_tCy_USB_Dev_HID_GetClass (cy_stc_usb_dev_hid_context_t *context)
 Returns pointer to the HID class structure. More...
 
+

Function Documentation

+ +

◆ Cy_USB_Dev_HID_Init()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_status_t Cy_USB_Dev_HID_Init (cy_stc_usb_dev_hid_config_t const * config,
cy_stc_usb_dev_hid_context_tcontext,
cy_stc_usb_dev_context_tdevContext 
)
+
+ +

Initializes the HID class.

+

This function must be called to enable USB Device HID functionality.

+
Parameters
+ + + + +
configThe pointer to the HID configuration structure cy_stc_usb_dev_hid_config_t.
contextThe pointer to the context structure cy_stc_usb_dev_hid_context_t allocated by the user. The structure is used during the HID Class operation for internal configuration and data retention. The user must not modify anything in this structure.
devContextThe pointer to the USB Device context structure cy_stc_usb_dev_context_t.
+
+
+
Returns
Status code of the function execution cy_en_usb_dev_status_t.
+ +
+
+ +

◆ Cy_USB_Dev_HID_UpdateTimer()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
cy_en_usb_dev_hid_timer_state_t Cy_USB_Dev_HID_UpdateTimer (uint32_t interface,
uint32_t reportId,
cy_stc_usb_dev_hid_context_tcontext 
)
+
+ +

Updates the HID Report idle timer and returns the status of the timer.

+

This function also reloads the timer if it expires.

+
Parameters
+ + + + +
interfaceContains the interface number that contains the HID descriptor whose HID timer needs to be updated.
reportIdReport ID whose HID timer needs to be updated. Pass 0 if report ID is not used.
contextThe pointer to the context structure cy_stc_usb_dev_hid_context_t allocated by the user. The structure is used during the HID Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
The state of the HID timer cy_en_usb_dev_hid_timer_state_t
+ +
+
+ +

◆ Cy_USB_Dev_HID_GetProtocol()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE uint32_t Cy_USB_Dev_HID_GetProtocol (uint32_t interface,
cy_stc_usb_dev_hid_context_t const * context 
)
+
+ +

Returns the HID protocol value for a certain interface.

+
Parameters
+ + + +
interfaceInterface number.
contextThe pointer to the context structure cy_stc_usb_dev_hid_context_t allocated by the user. The structure is used during the HID Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
Supported protocol: CY_USB_DEV_HID_PROTOCOL_BOOT or CY_USB_DEV_HID_PROTOCOL_REPORT.
+ +
+
+ +

◆ Cy_USB_Dev_HID_RegisterGetReportCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_HID_RegisterGetReportCallback (cy_cb_usbfs_dev_hid_get_report_t callback,
cy_stc_usb_dev_hid_context_tcontext 
)
+
+ +

Registers a callback function that handles a GET_REPORT request.

+

The GET_REPORT request is STALLed if the callback function is not registered or returns an error. To remove the callback function, pass NULL as the function pointer.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
contextThe pointer to the context structure cy_stc_usb_dev_hid_context_t allocated by the user. The structure is used during the HID Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_HID_RegisterSetReportCallback()

+ +
+
+ + + + + + + + + + + + + + + + + + +
__STATIC_INLINE void Cy_USB_Dev_HID_RegisterSetReportCallback (cy_cb_usbfs_dev_hid_set_report_t callback,
cy_stc_usb_dev_hid_context_tcontext 
)
+
+ +

Registers a callback function that handles SET_REPORT request.

+

This function is called when data stage of control transfer was completed (USB Device received report data from the USB Host). The SET_REPORT request is STALLed if the callback function is not registered or returns an error. To remove handler, set the handle parameter to NULL and call this function.

+
Parameters
+ + + +
callbackThe pointer to a callback function.
contextThe pointer to the context structure cy_stc_usb_dev_hid_context_t allocated by the user. The structure is used during the HID Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+ +
+
+ +

◆ Cy_USB_Dev_HID_GetClass()

+ +
+
+ + + + + + + + +
__STATIC_INLINE cy_stc_usb_dev_class_t * Cy_USB_Dev_HID_GetClass (cy_stc_usb_dev_hid_context_tcontext)
+
+ +

Returns pointer to the HID class structure.

+

This function is useful to override class event handlers using Class Support Functions.

+
Parameters
+ + +
contextThe pointer to the context structure cy_stc_usb_dev_hid_context_t allocated by the user. The structure is used during the HID Class operation for internal configuration and data retention. The user must not modify anything in this structure.
+
+
+
Returns
The pointer to the HID class structure.
+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__functions.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__functions.js new file mode 100644 index 0000000..356501f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__functions.js @@ -0,0 +1,9 @@ +var group__group__usb__dev__hid__functions = +[ + [ "Cy_USB_Dev_HID_Init", "group__group__usb__dev__hid__functions.html#ga96ac1be9fe988572712f3111180170bb", null ], + [ "Cy_USB_Dev_HID_UpdateTimer", "group__group__usb__dev__hid__functions.html#gab3344668f13ee59263a7aee62a2dfd5b", null ], + [ "Cy_USB_Dev_HID_GetProtocol", "group__group__usb__dev__hid__functions.html#gade5ee4ca8f844a1a7090f6f3ff5a0aea", null ], + [ "Cy_USB_Dev_HID_RegisterGetReportCallback", "group__group__usb__dev__hid__functions.html#gaf195bbaa7da5ef81f7dd94f4ff2f94d9", null ], + [ "Cy_USB_Dev_HID_RegisterSetReportCallback", "group__group__usb__dev__hid__functions.html#ga7986e8977e9d061774af646997f9a6ef", null ], + [ "Cy_USB_Dev_HID_GetClass", "group__group__usb__dev__hid__functions.html#ga6bd8294cac3ad4c9f3e85bd8a4b9c351", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__macros.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__macros.html new file mode 100644 index 0000000..f9d3827 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__macros.html @@ -0,0 +1,200 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Macros + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Macros
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define CY_USB_DEV_HID_PROTOCOL_BOOT   (0U)
 Protocol options. More...
 
+#define CY_USB_DEV_HID_PROTOCOL_REPORT   (1U)
 Report Protocol.
 
#define CY_USB_DEV_HID_REPORT_TYPE_INPUT   (1U)
 Report types. More...
 
+#define CY_USB_DEV_HID_REPORT_TYPE_OUTPUT   (2U)
 Output report type.
 
+#define CY_USB_DEV_HID_REPORT_TYPE_FEATURE   (3U)
 Feature report type.
 
#define CY_USB_DEV_HID_RQST_GET_REPORT   (0x1U)
 HID Class Requests. More...
 
+#define CY_USB_DEV_HID_RQST_GET_IDLE   (0x2U)
 GET_IDLE HID Class Request.
 
+#define CY_USB_DEV_HID_RQST_GET_PROTOCOL   (0x3U)
 GET_PROTOCOL HID Class Request.
 
+#define CY_USB_DEV_HID_RQST_SET_REPORT   (0x9U)
 SET_REPORT HID Class Request.
 
+#define CY_USB_DEV_HID_RQST_SET_IDLE   (0xAU)
 SET_IDLE HID Class Request.
 
+#define CY_USB_DEV_HID_RQST_SET_PROTOCOL   (0xBU)
 SET_PROTOCOL HID Class Request.
 
+

Macro Definition Documentation

+ +

◆ CY_USB_DEV_HID_PROTOCOL_BOOT

+ +
+
+ + + + +
#define CY_USB_DEV_HID_PROTOCOL_BOOT   (0U)
+
+ +

Protocol options.

+

Boot Protocol

+ +
+
+ +

◆ CY_USB_DEV_HID_REPORT_TYPE_INPUT

+ +
+
+ + + + +
#define CY_USB_DEV_HID_REPORT_TYPE_INPUT   (1U)
+
+ +

Report types.

+

Input report type

+ +
+
+ +

◆ CY_USB_DEV_HID_RQST_GET_REPORT

+ +
+
+ + + + +
#define CY_USB_DEV_HID_RQST_GET_REPORT   (0x1U)
+
+ +

HID Class Requests.

+

GET_REPORT HID Class Request

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__macros.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__macros.js new file mode 100644 index 0000000..78d1522 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__hid__macros.js @@ -0,0 +1,14 @@ +var group__group__usb__dev__hid__macros = +[ + [ "CY_USB_DEV_HID_PROTOCOL_BOOT", "group__group__usb__dev__hid__macros.html#gab9f7baea982d40e15cbe9c552a3c2f00", null ], + [ "CY_USB_DEV_HID_PROTOCOL_REPORT", "group__group__usb__dev__hid__macros.html#gac73df8d407149de5d35e826f4ed2d870", null ], + [ "CY_USB_DEV_HID_REPORT_TYPE_INPUT", "group__group__usb__dev__hid__macros.html#gaf90046d27c63c3f3df29b0a80fe270a8", null ], + [ "CY_USB_DEV_HID_REPORT_TYPE_OUTPUT", "group__group__usb__dev__hid__macros.html#gaa13e7554b88d899fe1aeafa178a25003", null ], + [ "CY_USB_DEV_HID_REPORT_TYPE_FEATURE", "group__group__usb__dev__hid__macros.html#ga2c3c38a02556e3fd3023c331489dba61", null ], + [ "CY_USB_DEV_HID_RQST_GET_REPORT", "group__group__usb__dev__hid__macros.html#ga1e583698917b6492689f97791b48cc2d", null ], + [ "CY_USB_DEV_HID_RQST_GET_IDLE", "group__group__usb__dev__hid__macros.html#gab5bcc4aa49a9d612c670798ca9b7445f", null ], + [ "CY_USB_DEV_HID_RQST_GET_PROTOCOL", "group__group__usb__dev__hid__macros.html#ga19f7910f6824592454fefdf6e914f22a", null ], + [ "CY_USB_DEV_HID_RQST_SET_REPORT", "group__group__usb__dev__hid__macros.html#ga141844f4c4c063845a0398507fbe44c5", null ], + [ "CY_USB_DEV_HID_RQST_SET_IDLE", "group__group__usb__dev__hid__macros.html#ga61d6cc450774df2493307150295a64c7", null ], + [ "CY_USB_DEV_HID_RQST_SET_PROTOCOL", "group__group__usb__dev__hid__macros.html#ga0dbb9f8be3fce7f6ab14de3d893dc7fc", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros.html new file mode 100644 index 0000000..53d3d2f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros.html @@ -0,0 +1,280 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Macros + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Macros
+
+
+

General Description

+ + + + +

+API Reference

 Descriptors
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define CY_USB_DEV_MW_VERSION_MAJOR   (2)
 USB Device Middleware major version.
 
+#define CY_USB_DEV_MW_VERSION_MINOR   (0)
 USB Device Middleware minor version.
 
+#define CY_USB_DEV_ID   CY_PDL_DRV_ID(0x08U)
 USB Device Middleware identifier.
 
+#define CY_USB_DEV_NUM_INTERFACES_MAX   CY_USBFS_DEV_DRV_NUM_EPS_MAX
 Maximum number of interfaces (this equals to the maximum number of hardware endpoints where each interface has at least one endpoint).
 
+#define CY_USB_DEV_EP0_PACKET_SIZE   CY_USBFS_DEV_DRV_EP0_BUFFER_SIZE
 USBFS Device endpoint 0 packet size.
 
+#define CY_USB_DEV_SN_STRING_LENGTH   (32U)
 Length of serial string number generated from silicon ID.
 
+#define CY_USB_DEV_SN_STRING_DESR_LENGTH   (CY_USB_DEV_SN_STRING_LENGTH + 2U)
 Length of serial string number.
 
+#define CY_USB_DEV_WAIT_FOREVER   (0)
 Timeout value that defines wait forever.
 
#define CY_USB_DEV_ALLOC_ENDPOINT_BUFFER(buf, size)   CY_USBFS_DEV_DRV_ALLOC_ENDPOINT_BUFFER(buf,size)
 Allocates static buffer for data endpoint. More...
 
+#define CY_USB_DEV_DIR_HOST_TO_DEVICE   (0U)
 Transfer direction from Host to Device (setup packet)
 
+#define CY_USB_DEV_DIR_DEVICE_TO_HOST   (1U)
 Transfer direction from Device to Host (setup packet)
 
+#define CY_USB_DEV_STANDARD_TYPE   (0U)
 Standard request type (setup packet)
 
+#define CY_USB_DEV_CLASS_TYPE   (1U)
 Class-specific request type (setup packet)
 
+#define CY_USB_DEV_VENDOR_TYPE   (2U)
 Vendor-specific request type (setup packet)
 
+#define CY_USB_DEV_RESERVED_TYPE   (3U)
 Reserved request type (setup packet)
 
+#define CY_USB_DEV_RECIPIENT_DEVICE   (0U)
 Request recipient device (setup packet)
 
+#define CY_USB_DEV_RECIPIENT_INTERFACE   (1U)
 Request recipient interface (setup packet)
 
+#define CY_USB_DEV_RECIPIENT_ENDPOINT   (2U)
 Request recipient endpoint (setup packet)
 
+#define CY_USB_DEV_RECIPIENT_OTHER   (3U)
 Request recipient other (setup packet)
 
+#define CY_USB_DEV_RQST_GET_STATUS   (0U)
 GET_STATUS standard request.
 
+#define CY_USB_DEV_RQST_CLEAR_FEATURE   (1U)
 CLEAR_FEATURE standard request.
 
+#define CY_USB_DEV_RQST_SET_FEATURE   (3U)
 SET_FEATURE standard request.
 
+#define CY_USB_DEV_RQST_SET_ADDRESS   (5U)
 SET_ADDRESS standard request.
 
+#define CY_USB_DEV_RQST_GET_DESCRIPTOR   (6U)
 GET_DESCRIPTOR standard request.
 
+#define CY_USB_DEV_RQST_SET_DESCRIPTOR   (7U)
 SET_DESCRIPTOR standard request.
 
+#define CY_USB_DEV_RQST_GET_CONFIGURATION   (8U)
 GET_CONFIGURATION standard request.
 
+#define CY_USB_DEV_RQST_SET_CONFIGURATION   (9U)
 SET_CONFIGURATION standard request.
 
+#define CY_USB_DEV_RQST_GET_INTERFACE   (10U)
 GET_INTERFACE standard request.
 
+#define CY_USB_DEV_RQST_SET_INTERFACE   (11U)
 SET_INTERFACE standard request.
 
+#define CY_USB_DEV_RQST_SYNCH_FRAME   (12U)
 SYNCH_FRAME standard request.
 
+#define CY_USB_DEV_DEVICE_REMOTE_WAKEUP   (1U)
 REMOTE_WAKEUP feature selector.
 
+#define CY_USB_DEV_ENDPOINT_HALT   (0U)
 ENDPOINT_HALT feature selector.
 
+#define CY_USB_DEV_ENDPOINT_STATUS_HALT   (1U)
 ENDPOINT_STATUS_HALT feature selector.
 
+#define CY_USB_DEV_TEST_MODE   (2U)
 TEST_MODE feature selector.
 
+

Macro Definition Documentation

+ +

◆ CY_USB_DEV_ALLOC_ENDPOINT_BUFFER

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define CY_USB_DEV_ALLOC_ENDPOINT_BUFFER( buf,
 size 
)   CY_USBFS_DEV_DRV_ALLOC_ENDPOINT_BUFFER(buf,size)
+
+ +

Allocates static buffer for data endpoint.

+

The size parameter must be a constant. The allocated buffer is aligned on a 2 byte boundary. An odd buffer size is converted to even consuming 1 extra byte. The application must discard this extra byte. This manipulation is needed to support different 8-bit and 16-bit hardware buffer access types in the driver (See Hardware Buffer Access section of the USBFS driver for more information).

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros.js new file mode 100644 index 0000000..3a29c28 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros.js @@ -0,0 +1,38 @@ +var group__group__usb__dev__macros = +[ + [ "Descriptors", "group__group__usb__dev__macros__device__descr.html", "group__group__usb__dev__macros__device__descr" ], + [ "CY_USB_DEV_MW_VERSION_MAJOR", "group__group__usb__dev__macros.html#ga2b1b1ab2182e9a4b865b1d8dccc6a3ff", null ], + [ "CY_USB_DEV_MW_VERSION_MINOR", "group__group__usb__dev__macros.html#ga7b62e45cc1f37aebbd341652cb9074cd", null ], + [ "CY_USB_DEV_ID", "group__group__usb__dev__macros.html#ga37c2fedfec7c8f484ea9da326451e65e", null ], + [ "CY_USB_DEV_NUM_INTERFACES_MAX", "group__group__usb__dev__macros.html#ga5bfa3f34bf648991801398d8828c5719", null ], + [ "CY_USB_DEV_EP0_PACKET_SIZE", "group__group__usb__dev__macros.html#gabc727a651f9a6c66a4b9987c292bf165", null ], + [ "CY_USB_DEV_SN_STRING_LENGTH", "group__group__usb__dev__macros.html#gaf84569a606b766d63e4047552fff85ee", null ], + [ "CY_USB_DEV_SN_STRING_DESR_LENGTH", "group__group__usb__dev__macros.html#gaa1bdc5173c5aaca2fa8643497b2812e6", null ], + [ "CY_USB_DEV_WAIT_FOREVER", "group__group__usb__dev__macros.html#gad8a978b86bb53dd8e46d9f9db9399ee8", null ], + [ "CY_USB_DEV_ALLOC_ENDPOINT_BUFFER", "group__group__usb__dev__macros.html#ga0ccd70a937ab3d69aeb40030713bc69b", null ], + [ "CY_USB_DEV_DIR_HOST_TO_DEVICE", "group__group__usb__dev__macros.html#ga8bf26b29efb3aa94398438c484b1abc1", null ], + [ "CY_USB_DEV_DIR_DEVICE_TO_HOST", "group__group__usb__dev__macros.html#gada4b43e3c521c5adfefefba1463d7f36", null ], + [ "CY_USB_DEV_STANDARD_TYPE", "group__group__usb__dev__macros.html#gada9f6982182b1c05b2541eca5bd7f059", null ], + [ "CY_USB_DEV_CLASS_TYPE", "group__group__usb__dev__macros.html#ga578fa3654e397517d4bcaada2414d6c8", null ], + [ "CY_USB_DEV_VENDOR_TYPE", "group__group__usb__dev__macros.html#gaefe1b57cab648a9d5675417adcea7406", null ], + [ "CY_USB_DEV_RESERVED_TYPE", "group__group__usb__dev__macros.html#ga4299f5337c6c1450befa3ce512bd0d34", null ], + [ "CY_USB_DEV_RECIPIENT_DEVICE", "group__group__usb__dev__macros.html#ga95f44bf292a30cdc5d1b6d4547644b5d", null ], + [ "CY_USB_DEV_RECIPIENT_INTERFACE", "group__group__usb__dev__macros.html#ga82ff1db5174f6e4e3b85af80d74a6e5e", null ], + [ "CY_USB_DEV_RECIPIENT_ENDPOINT", "group__group__usb__dev__macros.html#ga698deb13b0e7d758a4385cf8d9d5a578", null ], + [ "CY_USB_DEV_RECIPIENT_OTHER", "group__group__usb__dev__macros.html#ga8c0625fa05cedbdb464c86d1183ba048", null ], + [ "CY_USB_DEV_RQST_GET_STATUS", "group__group__usb__dev__macros.html#ga2976ae12e9a52921c2701524cb5ab08c", null ], + [ "CY_USB_DEV_RQST_CLEAR_FEATURE", "group__group__usb__dev__macros.html#gaca311c63b5f91ab1056ae113c5ae93f3", null ], + [ "CY_USB_DEV_RQST_SET_FEATURE", "group__group__usb__dev__macros.html#gaf05a6aad1e0c2b39567a9abe586bed8d", null ], + [ "CY_USB_DEV_RQST_SET_ADDRESS", "group__group__usb__dev__macros.html#gaefdf2cac245b25e4e51f86edb180a1b7", null ], + [ "CY_USB_DEV_RQST_GET_DESCRIPTOR", "group__group__usb__dev__macros.html#ga763dad955e9e9b1d8e4b9d3e97749e5a", null ], + [ "CY_USB_DEV_RQST_SET_DESCRIPTOR", "group__group__usb__dev__macros.html#gad770816535f47bd9f803848a30a3170a", null ], + [ "CY_USB_DEV_RQST_GET_CONFIGURATION", "group__group__usb__dev__macros.html#ga9405e586707adde4511fd708d9bbd65b", null ], + [ "CY_USB_DEV_RQST_SET_CONFIGURATION", "group__group__usb__dev__macros.html#ga7f7e7a865760d17846e4ae107d1c182a", null ], + [ "CY_USB_DEV_RQST_GET_INTERFACE", "group__group__usb__dev__macros.html#ga0bd23c856f3367574d044be56b38ae63", null ], + [ "CY_USB_DEV_RQST_SET_INTERFACE", "group__group__usb__dev__macros.html#ga2174df8e0243d842093d84de91c86c87", null ], + [ "CY_USB_DEV_RQST_SYNCH_FRAME", "group__group__usb__dev__macros.html#ga20ed11e7b8270d284c85831fde68a861", null ], + [ "CY_USB_DEV_DEVICE_REMOTE_WAKEUP", "group__group__usb__dev__macros.html#gad21c69225cb5b6a85f6aacd66882b062", null ], + [ "CY_USB_DEV_ENDPOINT_HALT", "group__group__usb__dev__macros.html#gaba6bab4720f6f509e721905f6215a80a", null ], + [ "CY_USB_DEV_ENDPOINT_STATUS_HALT", "group__group__usb__dev__macros.html#ga33cf779d2bbb24c0059c7cb3df79e1fd", null ], + [ "CY_USB_DEV_TEST_MODE", "group__group__usb__dev__macros.html#ga4fcb9f7053bfedbc87703649541ac980", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros__device__descr.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros__device__descr.html new file mode 100644 index 0000000..59d59a6 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros__device__descr.html @@ -0,0 +1,231 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Descriptors + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Descriptors
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define CY_USB_DEV_USB_VERSION_2_0   (0x0200U)
 USB Specification Release Number 2.0.
 
+#define CY_USB_DEV_USB_VERSION_2_1   (0x0201U)
 USB Specification Release Number 2.1.
 
+#define CY_USB_DEV_DEVICE_DESCR   (1U)
 Device Descriptor type.
 
+#define CY_USB_DEV_CONFIG_DESCR   (2U)
 Device Configuration Descriptor type.
 
+#define CY_USB_DEV_STRING_DESCR   (3U)
 Device String Descriptor type.
 
+#define CY_USB_DEV_INTERFACE_DESCR   (4U)
 Device Interface Descriptor type.
 
+#define CY_USB_DEV_ENDPOINT_DESCR   (5U)
 Device Endpoint Descriptor type.
 
+#define CY_USB_DEV_DEVICE_QUALIFIER_DESCR   (6U)
 Device Qualifier Descriptor type.
 
+#define CY_USB_DEV_OTHER_SPEED_CFG_DESCR   (7U)
 Device Other Speed Descriptor type.
 
+#define CY_USB_DEV_INTERFACE_POWER_DESCR   (8U)
 Device Interface Power Descriptor type.
 
+#define CY_USB_DEV_BOS_DESCR   (15U)
 Device BOS Descriptor type.
 
+#define CY_USB_DEV_MS_OS_STRING_EXT_COMPAT_ID   (4U)
 Extended Compat ID OS Descriptor.
 
+#define CY_USB_DEV_MS_OS_STRING_EXT_PROPERTEIS   (5U)
 Extended Properties OS Descriptor.
 
+#define CY_USB_DEV_DEVICE_DESCR_LENGTH   (18U)
 Device Descriptor length.
 
+#define CY_USB_DEV_CONFIG_DESCR_LENGTH   (9U)
 Device Configuration Descriptor length.
 
+#define CY_USB_DEV_INTERFACE_DESCR_LENGTH   (9U)
 Device Interface Descriptor length.
 
+#define CY_USB_DEV_ENDPOINT_DESCR_LENGTH   (7U)
 Device Endpoint Descriptor length.
 
+#define CY_USB_DEV_BOS_DESCR_LENGTH   (5U)
 Device BOS Descriptor length.
 
+#define CY_USB_DEV_STRING_DESCR_LANG_ID_LENGTH   (4U)
 Device String LANG ID Descriptor length.
 
+#define CY_USB_DEV_EP_CONTROL   (0x00U)
 Control Transfer type.
 
+#define CY_USB_DEV_EP_ISOCHRONOUS   (0x01U)
 Isochronous Transfer type.
 
+#define CY_USB_DEV_EP_BULK   (0x02U)
 Bulk Transfer type.
 
+#define CY_USB_DEV_EP_INTERRUPT   (0x03U)
 Interrupt Transfer type.
 
+#define CY_USB_DEV_EP_TRANS_TYPE_MASK   (0x03U)
 Transfer type mask.
 
+#define CY_USB_DEV_EP_NO_SYNCHRONIZATION   (0x00U)
 No Synchronization of Isochronous endpoint.
 
+#define CY_USB_DEV_EP_ASYNCHRONOUS   (0x04U)
 Asynchronous Isochronous endpoint.
 
+#define CY_USB_DEV_EP_ADAPTIVE   (0x08U)
 Adaptive Isochronous endpoint.
 
+#define CY_USB_DEV_EP_SYNCHRONOUS   (0x0CU)
 Synchronous Isochronous endpoint.
 
+#define CY_USB_DEV_EP_DATA   (0x00U)
 Data Isochronous endpoint.
 
+#define CY_USB_DEV_EP_FEEDBACK   (0x10U)
 Feedback Isochronous endpoint.
 
+#define CY_USB_DEV_EP_IMPLICIT_FEEDBACK   (0x20U)
 Implicit feedback Isochronous endpoint.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros__device__descr.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros__device__descr.js new file mode 100644 index 0000000..0e32f3c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__macros__device__descr.js @@ -0,0 +1,34 @@ +var group__group__usb__dev__macros__device__descr = +[ + [ "CY_USB_DEV_USB_VERSION_2_0", "group__group__usb__dev__macros__device__descr.html#ga9659150258f1cc740fc125a2dd912f9a", null ], + [ "CY_USB_DEV_USB_VERSION_2_1", "group__group__usb__dev__macros__device__descr.html#gad5ae19a1edf585ebd4588a7e9714f7fc", null ], + [ "CY_USB_DEV_DEVICE_DESCR", "group__group__usb__dev__macros__device__descr.html#ga05df8b8c5e7345bb0e45598cc2c28ee2", null ], + [ "CY_USB_DEV_CONFIG_DESCR", "group__group__usb__dev__macros__device__descr.html#ga6bbc45b1b70462406aaaad072f12019c", null ], + [ "CY_USB_DEV_STRING_DESCR", "group__group__usb__dev__macros__device__descr.html#ga71ff6a3e4f22161ada7bbc55378241c2", null ], + [ "CY_USB_DEV_INTERFACE_DESCR", "group__group__usb__dev__macros__device__descr.html#gaac6149951b3e3a59fcfa3fbed2f3d7da", null ], + [ "CY_USB_DEV_ENDPOINT_DESCR", "group__group__usb__dev__macros__device__descr.html#gac741996147c46141dc7b80ad7dd17775", null ], + [ "CY_USB_DEV_DEVICE_QUALIFIER_DESCR", "group__group__usb__dev__macros__device__descr.html#ga5a27b4ad17ad01feb7dacb393300b17b", null ], + [ "CY_USB_DEV_OTHER_SPEED_CFG_DESCR", "group__group__usb__dev__macros__device__descr.html#ga7bcd772381d213a7bd6e2dfd32a762d2", null ], + [ "CY_USB_DEV_INTERFACE_POWER_DESCR", "group__group__usb__dev__macros__device__descr.html#gaf122f5cc627b0d29be470e2f032e2efe", null ], + [ "CY_USB_DEV_BOS_DESCR", "group__group__usb__dev__macros__device__descr.html#gae2435cba88591af16d4847b13ff04158", null ], + [ "CY_USB_DEV_MS_OS_STRING_EXT_COMPAT_ID", "group__group__usb__dev__macros__device__descr.html#gafdf1de25518973fbf5e7c0e95c5752c5", null ], + [ "CY_USB_DEV_MS_OS_STRING_EXT_PROPERTEIS", "group__group__usb__dev__macros__device__descr.html#gae937565e3384ed42401a64dfe92ea0cf", null ], + [ "CY_USB_DEV_DEVICE_DESCR_LENGTH", "group__group__usb__dev__macros__device__descr.html#ga7271c896052b7ecb327dd8e7ecbc9100", null ], + [ "CY_USB_DEV_CONFIG_DESCR_LENGTH", "group__group__usb__dev__macros__device__descr.html#gada28bacc29b00cd2d78d4a9663679818", null ], + [ "CY_USB_DEV_INTERFACE_DESCR_LENGTH", "group__group__usb__dev__macros__device__descr.html#ga11b731b67c4fe9500e96404399b1be99", null ], + [ "CY_USB_DEV_ENDPOINT_DESCR_LENGTH", "group__group__usb__dev__macros__device__descr.html#gac59ff7abdf73897c96e6175530eb6d2b", null ], + [ "CY_USB_DEV_BOS_DESCR_LENGTH", "group__group__usb__dev__macros__device__descr.html#gaf30c55c2d0a02f8481333b741c85dc27", null ], + [ "CY_USB_DEV_STRING_DESCR_LANG_ID_LENGTH", "group__group__usb__dev__macros__device__descr.html#ga2ae3f4f4b10186d809915da92b52427b", null ], + [ "CY_USB_DEV_EP_CONTROL", "group__group__usb__dev__macros__device__descr.html#gacad2b37ccebfb8554d595833ecbef75f", null ], + [ "CY_USB_DEV_EP_ISOCHRONOUS", "group__group__usb__dev__macros__device__descr.html#gadac2633f0cd73dd4e884599753038bd7", null ], + [ "CY_USB_DEV_EP_BULK", "group__group__usb__dev__macros__device__descr.html#gaaf0c1769ca78e4ba876a06cf4911e6e1", null ], + [ "CY_USB_DEV_EP_INTERRUPT", "group__group__usb__dev__macros__device__descr.html#ga826caac6d33bc28ee0478c9d044ba805", null ], + [ "CY_USB_DEV_EP_TRANS_TYPE_MASK", "group__group__usb__dev__macros__device__descr.html#ga2266222ebac21a6a441b06da9f479b09", null ], + [ "CY_USB_DEV_EP_NO_SYNCHRONIZATION", "group__group__usb__dev__macros__device__descr.html#gaaefb29a0307685f1c3d40013cf97bfef", null ], + [ "CY_USB_DEV_EP_ASYNCHRONOUS", "group__group__usb__dev__macros__device__descr.html#gad142a099e4a06a6aedc1e6c444575d56", null ], + [ "CY_USB_DEV_EP_ADAPTIVE", "group__group__usb__dev__macros__device__descr.html#ga677b1d0349824df7bcbd7e458a8affc1", null ], + [ "CY_USB_DEV_EP_SYNCHRONOUS", "group__group__usb__dev__macros__device__descr.html#ga3c4d8fd11f7f9ba05f688c0f72b8c8c2", null ], + [ "CY_USB_DEV_EP_DATA", "group__group__usb__dev__macros__device__descr.html#gab3cb99752d9d1002ba6ef697de0ee860", null ], + [ "CY_USB_DEV_EP_FEEDBACK", "group__group__usb__dev__macros__device__descr.html#ga434979fcecd7fdca64bc5e811a22ad7c", null ], + [ "CY_USB_DEV_EP_IMPLICIT_FEEDBACK", "group__group__usb__dev__macros__device__descr.html#gae75647f76e250a43080ac182808cde26", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__class.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__class.html new file mode 100644 index 0000000..8d21528 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__class.html @@ -0,0 +1,113 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Class Support + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Class Support
+
+
+

General Description

+ + + + + + + + +

+Data Structures

struct  cy_stc_usb_dev_class_t
 Class support definition - each class must provide this structure. More...
 
struct  cy_stc_usb_dev_class_ll_item_t
 Class linked list element. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__class.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__class.js new file mode 100644 index 0000000..090b6a5 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__class.js @@ -0,0 +1,15 @@ +var group__group__usb__dev__structures__class = +[ + [ "cy_stc_usb_dev_class_t", "structcy__stc__usb__dev__class__t.html", [ + [ "busReset", "structcy__stc__usb__dev__class__t.html#a503cd36eebb5c1e3b12d75028a2481ba", null ], + [ "setConfiguration", "structcy__stc__usb__dev__class__t.html#ad460bded0f5dc7fab26727c9a4302137", null ], + [ "setInterface", "structcy__stc__usb__dev__class__t.html#a0f4844f6f51206be703add0ff1eaa2ac", null ], + [ "requestReceived", "structcy__stc__usb__dev__class__t.html#ab580b6b05e25a1fc43040c2b42540465", null ], + [ "requestCompleted", "structcy__stc__usb__dev__class__t.html#af498868795ad7fdc5da2cf4e2949b6bd", null ] + ] ], + [ "cy_stc_usb_dev_class_ll_item_t", "structcy__stc__usb__dev__class__ll__item__t.html", [ + [ "next", "structcy__stc__usb__dev__class__ll__item__t.html#a466e1619be2ddc3d8349a22b54f750f6", null ], + [ "classObj", "structcy__stc__usb__dev__class__ll__item__t.html#ab664a4c86bee67eb0b4f995cdb63cdc3", null ], + [ "classData", "structcy__stc__usb__dev__class__ll__item__t.html#af20af14f197b59640794d4eb6ccadbf2", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__control.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__control.html new file mode 100644 index 0000000..6478114 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__control.html @@ -0,0 +1,116 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Control Transfer + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Control Transfer
+
+
+

General Description

+ + + + + + + + + + + +

+Data Structures

struct  cy_stc_usb_dev_bm_request
 Parsed bmRequest. More...
 
struct  cy_stc_usb_dev_setup_packet_t
 Store request. More...
 
struct  cy_stc_usb_dev_control_transfer_t
 Execute transfer use this structure. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__control.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__control.js new file mode 100644 index 0000000..a0cfb63 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__control.js @@ -0,0 +1,26 @@ +var group__group__usb__dev__structures__control = +[ + [ "cy_stc_usb_dev_bm_request", "structcy__stc__usb__dev__bm__request.html", [ + [ "direction", "structcy__stc__usb__dev__bm__request.html#a8cbda434a4858f6bcbc1afa2eda2f2cd", null ], + [ "type", "structcy__stc__usb__dev__bm__request.html#a0cc454375f0c545389782837320fb608", null ], + [ "recipient", "structcy__stc__usb__dev__bm__request.html#a089186e8e7b77af303b6a96d078f264a", null ] + ] ], + [ "cy_stc_usb_dev_setup_packet_t", "structcy__stc__usb__dev__setup__packet__t.html", [ + [ "bmRequestType", "structcy__stc__usb__dev__setup__packet__t.html#ab9cb2efd5a3d00e9ac03300af3595495", null ], + [ "bRequest", "structcy__stc__usb__dev__setup__packet__t.html#a0842936f9d00ef0f75c28afe9827dda3", null ], + [ "wValue", "structcy__stc__usb__dev__setup__packet__t.html#aecfaa2d162fee8bcbe8d1be67ee51224", null ], + [ "wIndex", "structcy__stc__usb__dev__setup__packet__t.html#a03313abe6497667bddd0eece8046a4ae", null ], + [ "wLength", "structcy__stc__usb__dev__setup__packet__t.html#af6b129674006959fcf0d9602dec9784c", null ] + ] ], + [ "cy_stc_usb_dev_control_transfer_t", "structcy__stc__usb__dev__control__transfer__t.html", [ + [ "setup", "structcy__stc__usb__dev__control__transfer__t.html#af38eb6ea917b51d00f4840bc0a18f854", null ], + [ "ptr", "structcy__stc__usb__dev__control__transfer__t.html#a2d7d027a0888f204f958a9a71e11dafb", null ], + [ "buffer", "structcy__stc__usb__dev__control__transfer__t.html#af228b416d7c0725c487a258074236880", null ], + [ "remaining", "structcy__stc__usb__dev__control__transfer__t.html#af7f3075f7c992d51b94012e82826a334", null ], + [ "size", "structcy__stc__usb__dev__control__transfer__t.html#a80311bdcebd3f0e0f3508aee417f3a04", null ], + [ "bufferSize", "structcy__stc__usb__dev__control__transfer__t.html#add72c6a43cd0be4fea770a6bf0555352", null ], + [ "direction", "structcy__stc__usb__dev__control__transfer__t.html#a9c8f84635ed0847187969f097179e85f", null ], + [ "zlp", "structcy__stc__usb__dev__control__transfer__t.html#a517e6d7516cd5f0373e8ed4efdf8ecf4", null ], + [ "notify", "structcy__stc__usb__dev__control__transfer__t.html#a504cb022673eaec9d7e05cd8783c916e", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device.html new file mode 100644 index 0000000..46902b3 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device.html @@ -0,0 +1,131 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Device Information + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Device Information
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

struct  cy_stc_usb_dev_endpoint_t
 USBFS Device endpointDescriptor structure. More...
 
struct  cy_stc_usb_dev_hid_t
 USBFS Device HID structure. More...
 
struct  cy_stc_usb_dev_alternate_t
 USBFS Device Alternate Interface structure. More...
 
struct  cy_stc_usb_dev_interface_t
 USBFS Device Interface structure. More...
 
struct  cy_stc_usb_dev_configuration_t
 USBFS Device Configuration structure. More...
 
struct  cy_stc_usb_dev_ms_os_string_t
 USBFS Device MS OS String Descriptors structure. More...
 
struct  cy_stc_usb_dev_string_t
 USBFS Device String Descriptors structure. More...
 
struct  cy_stc_usb_dev_device_t
 USBFS Device structure. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device.js new file mode 100644 index 0000000..9efc284 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device.js @@ -0,0 +1,50 @@ +var group__group__usb__dev__structures__device = +[ + [ "cy_stc_usb_dev_endpoint_t", "structcy__stc__usb__dev__endpoint__t.html", [ + [ "endpointDescriptor", "structcy__stc__usb__dev__endpoint__t.html#ae9d4c2900e45fccbbe3eb56a7fcbf0f0", null ] + ] ], + [ "cy_stc_usb_dev_hid_t", "structcy__stc__usb__dev__hid__t.html", [ + [ "hidDescriptor", "structcy__stc__usb__dev__hid__t.html#a926e62d147abf63ad183d7892b051d78", null ], + [ "reportDescriptor", "structcy__stc__usb__dev__hid__t.html#a99129f9cbbd9a2ecdab10f490a85942c", null ], + [ "reportDescriptorSize", "structcy__stc__usb__dev__hid__t.html#a6e958dec1a35a4b54691572374adc217", null ], + [ "inputReportPos", "structcy__stc__usb__dev__hid__t.html#a67be9900d3911f977019e54b906ae8cb", null ], + [ "numInputReports", "structcy__stc__usb__dev__hid__t.html#a8dce054b73e15149cc2122f52a877f47", null ], + [ "inputReportIdx", "structcy__stc__usb__dev__hid__t.html#af5bacc172028ab6342ef2e7a24bbadb5", null ], + [ "inputReportIdxSize", "structcy__stc__usb__dev__hid__t.html#aa1a4adec2e0033e4ac18683bd11c19bb", null ] + ] ], + [ "cy_stc_usb_dev_alternate_t", "structcy__stc__usb__dev__alternate__t.html", [ + [ "interfaceDescriptor", "structcy__stc__usb__dev__alternate__t.html#ad9a20b7d91d73ee6a4cbaf72694a0ecc", null ], + [ "endpoints", "structcy__stc__usb__dev__alternate__t.html#a3fe8acef267c90b9071112b651f34ae1", null ], + [ "numEndpoints", "structcy__stc__usb__dev__alternate__t.html#a8563b62feb70137fcb51627e72104e64", null ], + [ "hid", "structcy__stc__usb__dev__alternate__t.html#a795a71c8dbc0452ad693edf2ea29a939", null ] + ] ], + [ "cy_stc_usb_dev_interface_t", "structcy__stc__usb__dev__interface__t.html", [ + [ "numAlternates", "structcy__stc__usb__dev__interface__t.html#aa916744fe431cf674283079749baf38a", null ], + [ "alternates", "structcy__stc__usb__dev__interface__t.html#af49504d16931dee60e726c4496ce3282", null ], + [ "endpointsMask", "structcy__stc__usb__dev__interface__t.html#a8415563edb976c4ae2d7c93743182a10", null ] + ] ], + [ "cy_stc_usb_dev_configuration_t", "structcy__stc__usb__dev__configuration__t.html", [ + [ "numInterfaces", "structcy__stc__usb__dev__configuration__t.html#a19e2848efee55af859e8c7de5e10e156", null ], + [ "configDescriptor", "structcy__stc__usb__dev__configuration__t.html#a6189ea5773ef735287936e3e7b05e539", null ], + [ "interfaces", "structcy__stc__usb__dev__configuration__t.html#a84e2ae881e023b0719437251db69ee3c", null ] + ] ], + [ "cy_stc_usb_dev_ms_os_string_t", "structcy__stc__usb__dev__ms__os__string__t.html", [ + [ "msOsDescriptor", "structcy__stc__usb__dev__ms__os__string__t.html#a228033f20928ae1f1744757daf98ad14", null ], + [ "msVendorCode", "structcy__stc__usb__dev__ms__os__string__t.html#a1a964ea38ee9a11d162ff44fcce0b6c7", null ], + [ "extCompatIdDescriptor", "structcy__stc__usb__dev__ms__os__string__t.html#aa129d3d88701b9cbaf057be63ffc6a25", null ], + [ "extPropertiesDescriptor", "structcy__stc__usb__dev__ms__os__string__t.html#a4987b03af76a60ba4181fa6f0d393f2c", null ] + ] ], + [ "cy_stc_usb_dev_string_t", "structcy__stc__usb__dev__string__t.html", [ + [ "numStrings", "structcy__stc__usb__dev__string__t.html#af614fbdb115198cdee79fa47bfc1f8e5", null ], + [ "enableWindowsOsDescriptor", "structcy__stc__usb__dev__string__t.html#a02e123dfb487a9e22fe716e374f3bc73", null ], + [ "osStringDescriptors", "structcy__stc__usb__dev__string__t.html#abb5c17aa695bc35907fe957e9c6a0044", null ], + [ "stringDescriptors", "structcy__stc__usb__dev__string__t.html#a3ecf7701b1b97b3a1f5bd859211e376d", null ] + ] ], + [ "cy_stc_usb_dev_device_t", "structcy__stc__usb__dev__device__t.html", [ + [ "deviceDescriptor", "structcy__stc__usb__dev__device__t.html#a685c419bd8298dc6715cd133e975be5d", null ], + [ "bosDescriptor", "structcy__stc__usb__dev__device__t.html#a5ca8d248ab89bb4cccdab2f15c3fb0c8", null ], + [ "strings", "structcy__stc__usb__dev__device__t.html#a62bd21476cfd2035c8ce6e82c5b554ca", null ], + [ "numConfigurations", "structcy__stc__usb__dev__device__t.html#ad49158f747f355b4ecaa2a5795fd89f5", null ], + [ "configurations", "structcy__stc__usb__dev__device__t.html#a34f2a84a67e79a5eda6ce2205684070c", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device__descr.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device__descr.html new file mode 100644 index 0000000..ad14436 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device__descr.html @@ -0,0 +1,119 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Device Descriptors + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Device Descriptors
+
+
+

General Description

+ + + + + + + + + + + + + + +

+Data Structures

struct  cy_stc_usbdev_device_descr_t
 Device descriptor. More...
 
struct  cy_stc_usbdev_config_descr_t
 Configuration descriptor. More...
 
struct  cy_stc_usbdev_interface_descr_t
 Interface descriptor. More...
 
struct  cy_stc_usbdev_endpoint_descr_t
 Endpoint descriptor. More...
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device__descr.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device__descr.js new file mode 100644 index 0000000..f4519f7 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__device__descr.js @@ -0,0 +1,48 @@ +var group__group__usb__dev__structures__device__descr = +[ + [ "cy_stc_usbdev_device_descr_t", "structcy__stc__usbdev__device__descr__t.html", [ + [ "bLength", "structcy__stc__usbdev__device__descr__t.html#aecbd813046544b9250117a0566aadd14", null ], + [ "bDescriptorType", "structcy__stc__usbdev__device__descr__t.html#ae8fc0e6c17397e9f19e76b2d52cab4a8", null ], + [ "bcdUSB", "structcy__stc__usbdev__device__descr__t.html#ac56838bd4119bb5094df9468e6a5c6ca", null ], + [ "bDeviceClass", "structcy__stc__usbdev__device__descr__t.html#aaf704494fc8e026e78af2abbc9c81e32", null ], + [ "bDeviceSubClass", "structcy__stc__usbdev__device__descr__t.html#a688f054dcbda5a8afcc5e0f03a01989d", null ], + [ "bDeviceProtocol", "structcy__stc__usbdev__device__descr__t.html#af5ae81fcf8bd3f21d118deb05c64b99c", null ], + [ "bMaxPacketSize", "structcy__stc__usbdev__device__descr__t.html#acd3e640f123462bdead0e5df36723f5c", null ], + [ "idVendor", "structcy__stc__usbdev__device__descr__t.html#abbc0f9e538526d6e3b1945275418d1cc", null ], + [ "idProduct", "structcy__stc__usbdev__device__descr__t.html#afa761db25b797feb1aba98a02c5e27a3", null ], + [ "bcdDevice", "structcy__stc__usbdev__device__descr__t.html#ac6163f32cdd505a3c79bff9cb0798902", null ], + [ "iManufacturer", "structcy__stc__usbdev__device__descr__t.html#a61f92b9a09bc8729c445cd11a7c4951a", null ], + [ "iProduct", "structcy__stc__usbdev__device__descr__t.html#a0a48ffc9d33d53a530adef55bf139ee0", null ], + [ "iSerialNumber", "structcy__stc__usbdev__device__descr__t.html#a01e1fc974ba95d20cb473298ae976d3f", null ], + [ "bNumConfigurations", "structcy__stc__usbdev__device__descr__t.html#ac31afb5eb41cec65609c2c290877b268", null ] + ] ], + [ "cy_stc_usbdev_config_descr_t", "structcy__stc__usbdev__config__descr__t.html", [ + [ "bLength", "structcy__stc__usbdev__config__descr__t.html#a5e57a1c41471aabd2add6513974f0464", null ], + [ "bDescriptorType", "structcy__stc__usbdev__config__descr__t.html#aff0680f735725beac0d5864faddb54d3", null ], + [ "wTotalLength", "structcy__stc__usbdev__config__descr__t.html#a234eeb09dab42628e330b0d5eef3e8b0", null ], + [ "bNumInterfaces", "structcy__stc__usbdev__config__descr__t.html#a8e0f1164631005d3ab62e9617bb47550", null ], + [ "bConfigurationValue", "structcy__stc__usbdev__config__descr__t.html#a28290fc090d1300ce689675dbf03d516", null ], + [ "iConfiguration", "structcy__stc__usbdev__config__descr__t.html#ac2e058ba9bf10e7609d6ec7ad2acb338", null ], + [ "bmAttributes", "structcy__stc__usbdev__config__descr__t.html#afcb2b8c7eea77e13d12b25e34640bab8", null ], + [ "bMaxPower", "structcy__stc__usbdev__config__descr__t.html#a66639e32037402566bf51b27936b1317", null ] + ] ], + [ "cy_stc_usbdev_interface_descr_t", "structcy__stc__usbdev__interface__descr__t.html", [ + [ "bLength", "structcy__stc__usbdev__interface__descr__t.html#ab011bb57b0b7abe3586579dd9172cf23", null ], + [ "bDescriptorType", "structcy__stc__usbdev__interface__descr__t.html#aa37e85cf76e7095200b6fd4e294436f7", null ], + [ "bInterfaceNumber", "structcy__stc__usbdev__interface__descr__t.html#a65aebee33eca7791ad41ac8347868221", null ], + [ "bAlternateSetting", "structcy__stc__usbdev__interface__descr__t.html#abdaec91851978ad55037fef4a986e4ff", null ], + [ "bNumEndpoints", "structcy__stc__usbdev__interface__descr__t.html#a75309a6a1b724a3a5c2bf57ab05a4e9c", null ], + [ "bInterfaceClass", "structcy__stc__usbdev__interface__descr__t.html#abe8e150e34fa7dcdbe2b0af11ca27477", null ], + [ "bInterfaceSubClass", "structcy__stc__usbdev__interface__descr__t.html#ab41a710838240522c1860420f9924a67", null ], + [ "bInterfaceProtocol", "structcy__stc__usbdev__interface__descr__t.html#a010297774bd7ae3f718ee98568748898", null ], + [ "iInterface", "structcy__stc__usbdev__interface__descr__t.html#a4776c5bec4daa50f11789c9879c8cb8a", null ] + ] ], + [ "cy_stc_usbdev_endpoint_descr_t", "structcy__stc__usbdev__endpoint__descr__t.html", [ + [ "bLength", "structcy__stc__usbdev__endpoint__descr__t.html#a443da99568684d1973b5424a0c89a29e", null ], + [ "bDescriptorType", "structcy__stc__usbdev__endpoint__descr__t.html#a0c1a90e2ae955eee9543879e5a664e6d", null ], + [ "bEndpointAddress", "structcy__stc__usbdev__endpoint__descr__t.html#a02f288a3116dfef6e82d25796fa7ebef", null ], + [ "bmAttributes", "structcy__stc__usbdev__endpoint__descr__t.html#a94505d0dbed1f7b18fb138aab0f55756", null ], + [ "wMaxPacketSize", "structcy__stc__usbdev__endpoint__descr__t.html#a788154a9655bed34e586df4c975639ca", null ], + [ "bInterval", "structcy__stc__usbdev__endpoint__descr__t.html#ae48eec6ba3bae7f7c1e6f3ed7de2cfdf", null ] + ] ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__func__ptr.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__func__ptr.html new file mode 100644 index 0000000..2380fcb --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__func__ptr.html @@ -0,0 +1,276 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Function Pointers + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Function Pointers
+
+
+

General Description

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Typedefs

typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_events_callback_t) (cy_en_usb_dev_callback_events_t event, uint32_t wValue, uint32_t wIndex, struct cy_stc_usb_dev_context *devContext)
 Pointer to a function that implements a callback for the following events: Bus Reset detected, SET_CONFIGURATION request received and SET_INTERFACE request received. More...
 
typedef int32_t(* cy_fn_usb_dev_handle_timeout_ptr_t) (int32_t milliseconds)
 Pointer to a function that implements a timeout handler. More...
 
typedef uint8_t *(* cy_fn_usb_dev_sn_string_ptr_t) (void)
 Pointer to function that returns pointer to uint8_t array, which contains a serial number string and accepts the device context cy_stc_usb_dev_context_t. More...
 
typedef void(* cy_cb_usb_dev_bus_reset_t) (void *classData, struct cy_stc_usb_dev_context *devContext)
 Pointer to function that returns nothing and accepts a pointer to void and a pointer to cy_stc_usb_dev_context_t. More...
 
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_set_config_t) (uint32_t configuration, void *classData, struct cy_stc_usb_dev_context *devContext)
 Pointer to function that returns the status of operation and accepts received configuration number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t. More...
 
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_set_interface_t) (uint32_t interface, uint32_t alternate, void *classContext, struct cy_stc_usb_dev_context *devContext)
 Pointer to function that returns the status of operation and accepts received interface alternate settings number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t. More...
 
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_request_received_t) (cy_stc_usb_dev_control_transfer_t *transfer, void *classContext, struct cy_stc_usb_dev_context *devContext)
 Pointer to function that returns the status of operation and accepts pointer to received control transfer number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t. More...
 
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_request_cmplt_t) (cy_stc_usb_dev_control_transfer_t *transfer, void *classContext, struct cy_stc_usb_dev_context *devContext)
 Pointer to function that returns status of operation and accepts pointer to received control transfer number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t. More...
 
+

Typedef Documentation

+ +

◆ cy_cb_usb_dev_events_callback_t

+ +
+
+ + + + +
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_events_callback_t) (cy_en_usb_dev_callback_events_t event, uint32_t wValue, uint32_t wIndex, struct cy_stc_usb_dev_context *devContext)
+
+ +

Pointer to a function that implements a callback for the following events: Bus Reset detected, SET_CONFIGURATION request received and SET_INTERFACE request received.

+

The notified events are defined by event argument (see cy_en_usb_dev_callback_events_t). Only one event is notified when callback invoked. This callback invoked in the USB interrupt handler context and must be short as possible.
+Input arguments:

    +
  • Bus Reset detected event: ignore wValue and wIndex arguments.
  • +
  • SET_CONFIGURATION request received event: the wValue is new configuration value and wIndex can be ignored.
  • +
  • SET_CONFIGURATION request received event: the wValue is new alternative setting value and wIndex interface value to which alternate belongs.
    + The returned status defines following operation:
  • +
  • Bus Reset detected event: status is ignored and event processing is passed to class event handlers.
  • +
  • SET_CONFIGURATION or SET_INTERFACE received event: the returned status defines following request processing. If returned status fail the request is STALLed and event notification stops. If returned status is success the event is notified to the appropriate class event handlers which status defines request response STALL or ACK.
  • +
+ +
+
+ +

◆ cy_fn_usb_dev_handle_timeout_ptr_t

+ +
+
+ + + + +
typedef int32_t(* cy_fn_usb_dev_handle_timeout_ptr_t) (int32_t milliseconds)
+
+ +

Pointer to a function that implements a timeout handler.

+

The function accepts the number of milliseconds that remain to wait before timeout expires. This returns the number of milliseconds remaining to wait minus the milliseconds that have elapsed inside the function.

+ +
+
+ +

◆ cy_fn_usb_dev_sn_string_ptr_t

+ +
+
+ + + + +
typedef uint8_t*(* cy_fn_usb_dev_sn_string_ptr_t) (void)
+
+ +

Pointer to function that returns pointer to uint8_t array, which contains a serial number string and accepts the device context cy_stc_usb_dev_context_t.

+

This type is used to define a callback that returns serial number string.

+ +
+
+ +

◆ cy_cb_usb_dev_bus_reset_t

+ +
+
+ + + + +
typedef void(* cy_cb_usb_dev_bus_reset_t) (void *classData, struct cy_stc_usb_dev_context *devContext)
+
+ +

Pointer to function that returns nothing and accepts a pointer to void and a pointer to cy_stc_usb_dev_context_t.

+

This type is used to define a callback that notifies the class about a bus reset event.

+ +
+
+ +

◆ cy_cb_usb_dev_set_config_t

+ +
+
+ + + + +
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_set_config_t) (uint32_t configuration, void *classData, struct cy_stc_usb_dev_context *devContext)
+
+ +

Pointer to function that returns the status of operation and accepts received configuration number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t.

+

This type is used to define a callback that notifies the class about a set configuration request event.

+ +
+
+ +

◆ cy_cb_usb_dev_set_interface_t

+ +
+
+ + + + +
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_set_interface_t) (uint32_t interface, uint32_t alternate, void *classContext, struct cy_stc_usb_dev_context *devContext)
+
+ +

Pointer to function that returns the status of operation and accepts received interface alternate settings number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t.

+

This type is used to define a callback that notifies the class about a set interface request event.

+ +
+
+ +

◆ cy_cb_usb_dev_request_received_t

+ +
+
+ + + + +
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_request_received_t) (cy_stc_usb_dev_control_transfer_t *transfer, void *classContext, struct cy_stc_usb_dev_context *devContext)
+
+ +

Pointer to function that returns the status of operation and accepts pointer to received control transfer number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t.

+

This type is used to define a callback that notifies the class about a request received event.

+ +
+
+ +

◆ cy_cb_usb_dev_request_cmplt_t

+ +
+
+ + + + +
typedef cy_en_usb_dev_status_t(* cy_cb_usb_dev_request_cmplt_t) (cy_stc_usb_dev_control_transfer_t *transfer, void *classContext, struct cy_stc_usb_dev_context *devContext)
+
+ +

Pointer to function that returns status of operation and accepts pointer to received control transfer number, pointer to class context, and pointer to device context cy_stc_usb_dev_context_t.

+

This type is used to define a callback that notifies the class that a request completed (data is received in response for current request) event.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__func__ptr.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__func__ptr.js new file mode 100644 index 0000000..4a2d60f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__dev__structures__func__ptr.js @@ -0,0 +1,11 @@ +var group__group__usb__dev__structures__func__ptr = +[ + [ "cy_cb_usb_dev_events_callback_t", "group__group__usb__dev__structures__func__ptr.html#gabf238de7ed223e1dbae8a08e56b6b680", null ], + [ "cy_fn_usb_dev_handle_timeout_ptr_t", "group__group__usb__dev__structures__func__ptr.html#gab48bb4326ac3019669c6697714b1c377", null ], + [ "cy_fn_usb_dev_sn_string_ptr_t", "group__group__usb__dev__structures__func__ptr.html#ga03fce0dd6a2c28e632694c21c749b0fb", null ], + [ "cy_cb_usb_dev_bus_reset_t", "group__group__usb__dev__structures__func__ptr.html#gab6f8a0de15b09fe6a39e6d8032069a62", null ], + [ "cy_cb_usb_dev_set_config_t", "group__group__usb__dev__structures__func__ptr.html#ga18e8445fcb1392dd424ae65a726c4bd6", null ], + [ "cy_cb_usb_dev_set_interface_t", "group__group__usb__dev__structures__func__ptr.html#gaba4c41daa173f3dfc3a60c2260d1f0c1", null ], + [ "cy_cb_usb_dev_request_received_t", "group__group__usb__dev__structures__func__ptr.html#ga3a7649a1c575110ac8e4480d70da8c2c", null ], + [ "cy_cb_usb_dev_request_cmplt_t", "group__group__usb__dev__structures__func__ptr.html#ga626db28aeab6dfd0f7004866225bb0ee", null ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__device.html b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__device.html new file mode 100644 index 0000000..7e8ef10 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__device.html @@ -0,0 +1,116 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Device + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Device
+
+
+

General Description

+

This section provides an API description for the core functionality of the USB Device: initialization, status information, data transfers, and class support.

+ + + + + + + + + + +

+API Reference

 Macros
 
 Functions
 
 Data Structures
 
 Enumerated Types
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/group__group__usb__device.js b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__device.js new file mode 100644 index 0000000..a1bab8e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/group__group__usb__device.js @@ -0,0 +1,7 @@ +var group__group__usb__device = +[ + [ "Macros", "group__group__usb__dev__macros.html", "group__group__usb__dev__macros" ], + [ "Functions", "group__group__usb__dev__functions.html", "group__group__usb__dev__functions" ], + [ "Data Structures", "group__group__usb__dev__data__structures.html", "group__group__usb__dev__data__structures" ], + [ "Enumerated Types", "group__group__usb__dev__enums.html", "group__group__usb__dev__enums" ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/index.html b/docs/usbfs_dev_api_reference_manual/html/index.html new file mode 100644 index 0000000..9643210 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/index.html @@ -0,0 +1,432 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: Cypress USB Device Middleware Library 2.0 + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Cypress USB Device Middleware Library 2.0
+
+
+

The USB Device middleware provides a full-speed USB 2.0 Chapter 9 specification -compliant device framework. It uses the USBFS driver from PDL to interface with the hardware. The middleware provides support for Audio, CDC, and HID classes. Also, it allows implementing other class support. The USB Configurator tool makes it easy to construct the USB Device descriptor.

+

Features:

+

+General Description

+

The USB Device structure is divided into layers. The implementation is event-driven: the USBFS driver receives interrupts from the hardware and provides callbacks to the USB Device layer which implements them and provides events to the Class layer. A simplified image is shown below.
+
+

+usb_dev_solution_struct.png +
+

Include cy_usb_dev.h along with the header for the USB class to be used (cy_usb_dev_hid.h, cy_usb_dev_cdc.h, cy_usb_dev_audio.h) to get access to all the functions and other declarations in this library. If you use ModusToolbox USB Device Configurator, also include cycfg_usbdev.h.

+

+Quick Start Guide

+

Cypress USB Device middleware can be used in various software environments. Refer to the Supported Software and Tools. The quickest way to get started is using the Code Examples. Cypress Semiconductor continuously extends its portfolio of code examples at Cypress Semiconductor website and at Cypress Semiconductor GitHub.

+

This quick start guide is for an environment configured to use for development PSoC 6 Peripheral Driver Library(psoc6pdl) included in the project.

+

To easily run a USB, use the ModusToolbox USBCommDevice or USBM project. The steps below show how to set up a USB Device based on a basic ModusToolbox project (like Hello_World).

+

The following steps set up a USB device recognized as an standard HID device - USB mouse and moves it from right to the left, and vice-versa.

Note
Some steps contain a corresponding to the figure below number in brackets.
+

+STEP 1: Enable the USB Device middleware.

+

Launch ModusToolbox Library Manager and enable the USB Device middleware. This step is required only if the ModusToolbox IDE is used. Otherwise, ensure the USB Device Middleware is included in your project.

+

+STEP 2: Generate initialization code.

+
    +
  1. Launch the ModusToolbox Device Configurator Tool and switch to the Peripherals tab (#1.1).
  2. +
  3. Enable the USB personality under Communication and enter Alias (#1.2). We use USBHID in Quick Start Guide
  4. +
  5. Go to the Parameters pane and configure the USB personality: assign the peripheral clock divider (#1.3) for Clock (Bus Reset). Any available free divider can be used.
  6. +
  7. Set Endpoint Mask to 1 to enable data endpoint 1 (#1.4) Enabled data endpoints must match the descriptor tree in the USB Configurator.
    +usb_dev_device_cfg.png +
    +
  8. +
  9. Switch to the System tab (#2.1).
  10. +
  11. Check the IMO clock is enabled (#2.2). Select Trim with USB (#2.3)
  12. +
  13. Select one of the PLLs, if your device supports more than one. Enable the PLL and set a frequency of 48 MHz (#2.4).
  14. +
  15. Select the CLK_HF3 USB clock (#2.5). Assign the source clock to the CLK_PATH connected to the configured previously PLL (#2.6).
  16. +
  17. Check the FLL clock is enabled (#2.7).
  18. +
  19. Select File->Save to generate initialization code.
    +usb_dev_system_cfg.png +
    +
  20. +
+

+STEP 3: Generate USB descriptors.

+
    +
  1. Run the USB Configurator.
  2. +
  3. In the Device Descriptor node, set bDeviceClass - 0x02(#3.1), iProduct - the device name to identify among connected devices. We use "USB Device Quick Start guide"(#3.2).
  4. +
  5. Remove default Alternate Settings.
  6. +
  7. Add HID Alternate Settings.
  8. +
  9. Add HID Descriptor and select 3-Button Mouse in HID Report (#3.3).
  10. +
  11. Add Endpoint Descriptor and set: direction - IN, Transfer Type - Interrupt, wMaxPacketSize - 3, bInterval - 10(#3.4).
  12. +
  13. Perform File->Save to generate initialization code. If configuration is saved for the first time, choose a name (like design.cyusbdev) and save it to the project root.
    +usb_dev_configurator.png +
    +
  14. +
+

+STEP 4: Update main.c

+
    +
  1. Include the USB headers to get access to the generated descriptor structures, USB driver, device, and class layers APIs.
    #include "cy_pdl.h"
    #include "cy_usb_dev.h"
    #include "cy_usb_dev_audio.h"
    #include "cy_usb_dev_cdc.h"
    #include "cy_usb_dev_hid.h"
    #include "cycfg_usbdev.h"
    #include "cycfg.h"
  2. +
  3. Declare the USB context global variables:
    /*******************************************************************************
    * Global constants
    *******************************************************************************/
    cy_stc_usbfs_dev_drv_context_t USBHID_context;
    cy_stc_usb_dev_context_t USBHID_devContext;
    cy_stc_usb_dev_hid_context_t USBHID_hidContext;
  4. +
  5. Configure the USB interrupt structures and declare interrupt handlers (refer to the Configure Interrupts section of the USBFS driver in the PDL API Reference).
    /*******************************************************************************
    * USBFS interrupts functions and configurations
    *******************************************************************************/
    static void USBD_IsrLow(void);
    static void USBD_IsrMedium(void);
    static void USBD_IsrHigh(void);
    const cy_stc_sysint_t USBD_IntrHighConfig =
    {
    .intrSrc = (IRQn_Type) usb_interrupt_hi_IRQn,
    .intrPriority = 5U,
    };
    const cy_stc_sysint_t USBD_IntrMeduimConfig =
    {
    .intrSrc = (IRQn_Type) usb_interrupt_med_IRQn,
    .intrPriority = 6U,
    };
    const cy_stc_sysint_t USBD_IntrLowConfig =
    {
    .intrSrc = (IRQn_Type) usb_interrupt_lo_IRQn,
    .intrPriority = 7U,
    };
  6. +
  7. Implement the interrupt handlers:
    /*******************************************************************************
    * Function Name: USBD_IsrHigh
    *******************************************************************************/
    static void USBD_IsrHigh(void)
    {
    /* Call interrupt processing */
    Cy_USBFS_Dev_Drv_Interrupt(USBHID_HW, Cy_USBFS_Dev_Drv_GetInterruptCauseHi(USBHID_HW),
    &USBHID_context);
    }
    /*******************************************************************************
    * Function Name: USBD_IsrMedium
    *******************************************************************************/
    static void USBD_IsrMedium(void)
    {
    /* Call interrupt processing */
    Cy_USBFS_Dev_Drv_Interrupt(USBHID_HW, Cy_USBFS_Dev_Drv_GetInterruptCauseMed(USBHID_HW),
    &USBHID_context);
    }
    /*******************************************************************************
    * Function Name: USBD_IsrLow
    *******************************************************************************/
    static void USBD_IsrLow(void)
    {
    /* Call interrupt processing */
    Cy_USBFS_Dev_Drv_Interrupt(USBHID_HW, Cy_USBFS_Dev_Drv_GetInterruptCauseLo(USBHID_HW),
    &USBHID_context);
    }
  8. +
  9. Update the main() function with the USB and interrupt initialization routines:
    /* Initialize device hardware */
    init_cycfg_all();
    /* Initialize USB */
    status = Cy_USB_Dev_Init(USBHID_HW, &USBHID_config, &USBHID_context,
    &usb_devices[0], &usb_devConfig, &USBHID_devContext);
    if (CY_USB_DEV_SUCCESS != status)
    {
    /* Initialization error - stop execution */
    while(1);
    }
    status = Cy_USB_Dev_HID_Init(&usb_hidConfig, &USBHID_hidContext, &USBHID_devContext);
    if (CY_USB_DEV_SUCCESS != status)
    {
    /* HID Initialization error - stop execution */
    while(1);
    }
    /* Hook interrupt service routines */
    (void) Cy_SysInt_Init(&USBD_IntrLowConfig, &USBD_IsrLow);
    (void) Cy_SysInt_Init(&USBD_IntrMeduimConfig, &USBD_IsrMedium);
    (void) Cy_SysInt_Init(&USBD_IntrHighConfig, &USBD_IsrHigh);
    /* Enable interrupts */
    NVIC_EnableIRQ((IRQn_Type) USBD_IntrLowConfig.intrSrc);
    NVIC_EnableIRQ((IRQn_Type) USBD_IntrMeduimConfig.intrSrc);
    NVIC_EnableIRQ((IRQn_Type) USBD_IntrHighConfig.intrSrc);
    /* Enable interrupts */
    __enable_irq();
    /* Make device appear on the bus */
    Cy_USB_Dev_Connect(true, CY_USB_DEV_WAIT_FOREVER, &USBHID_devContext);
  10. +
  11. Example of the routine to move mouse from right to the left, and vice-versa.
    const uint32_t CURSOR_X_POS = 1UL;
    const uint32_t MOUSE_DATA_LEN = 3UL;
    const uint32_t MOUSE_IN_EP = 1UL;
    const uint8_t CURSOR_STEP = 5U;
    const uint32_t STEPS_NUMBER = 96UL;
    uint8_t counter = 0U;
    bool moveRight = true;
    /* Mouse packet array: buttons (1st byte), X (2nd byte), Y (3rd byte) */
    mouseData[2U] = 0U; /* No changes in Y - position */
    for(;;)
    {
    /* Move mouse to the right or to the left appropriate number of steps */
    mouseData[CURSOR_X_POS] = moveRight ? CURSOR_STEP : (uint8_t)-CURSOR_STEP;
    /* Define direction of the movement */
    if (0U == counter)
    {
    counter = STEPS_NUMBER;
    moveRight = !moveRight;
    }
    /* Update mouse position */
    Cy_USB_Dev_WriteEpBlocking(MOUSE_IN_EP, mouseData, MOUSE_DATA_LEN,
    CY_USB_DEV_WAIT_FOREVER, &USBHID_devContext);
    counter--;
    Cy_SysLib_Delay(10UL);
    }
  12. +
+

+STEP 5: Build and program the device.

+

Connect the device to the Host PC. On the PC, verify a new USB device was enumerated as a mouse device. The mouse’s cursor shall move left to right and vice-versa.

+

+Configuration Considerations

+

This section explains how to configure the USB Device for operation.

+

+Configure USBFS driver

+

The driver and system resources configuration details are provided in the USBFS driver section Configuration Considerations in the PDL API Reference Manual. The provided code snippets expect that driver and system resources configuration is done.

+

+Construct USB Device Descriptors

+

Run standalone USB Configurator tool to construct the USB Device descriptors. After USB Device descriptors are constructed, save generated source and header files. Add these files to your project. Open header files to get external definitions for:

+

These definitions will be required in the configuration steps provided below.

+

+Configure USB Device

+

To initialize the USB Device middleware, call Cy_USB_Dev_Init function providing:

    +
  • The pointer to the USBFS instance.
  • +
  • The pointer to the filled USBFS driver configuration structure cy_stc_usbfs_dev_drv_config_t.
  • +
  • The pointer to the allocated USBFS driver context structure cy_stc_usbfs_dev_drv_context_t.
  • +
  • The pointer to the generated middleware USB Device structure cy_stc_usb_dev_device_t.
  • +
  • The pointer to the generated middleware USB Device configuration structure cy_stc_usb_dev_config_t.
  • +
  • The pointer to the allocated middleware USB Device context structure cy_stc_usb_dev_context_t.
  • +
+

+Configure USB Classes

+

The USB Device middleware provides support of Audio, HID, and CDC classes. Each class has own initialization function. This function must be called after Cy_USB_Dev_Init to initialize class data and register it. The class-specific request will be passed to the class handler after registration. Note that the USB Configurator tool generates HID and CDC Class configuration structures that are required class initialization. Find these structure external declaration in the generated header file.

+

To initialize the Audio Class, call Cy_USB_Dev_Audio_Init function providing:

+

To initialize the CDC Class, call Cy_USB_Dev_CDC_Init function providing:

+

To initialize the HID Class, call Cy_USB_Dev_HID_Init function providing:

+

+Enable USB Device

+

Finally, enable the USB Device operation calling Cy_USB_Dev_Connect. This function call enables pull-up on D+ to signal USB Device connection on USB Bus. The USB Host detects device connection and starts device enumeration. It requests the device descriptors to define device capabilities and finally sets device configuration for the following operation. The Cy_USB_Dev_Connect provides an argument to block until enumeration completes or exits after the USB Device is enabled.

+
/* Allocate required context structures */
cy_stc_usbfs_dev_drv_context_t USBD_drvContext;
cy_stc_usb_dev_context_t USBD_devContext;
/* Initialize USB Device (status is ignored for code simplicity) */
(void) Cy_USB_Dev_Init(USBD_HW, &USBD_config, &USBD_drvContext,
&usb_devices[0], &usb_devConfig, &USBD_devContext);
/* Initialize requires USB Device Classes (status is ignored for code simplicity) */
(void) Cy_USB_Dev_Audio_Init(NULL, &USBD_audioContext, &USBD_devContext);
(void) Cy_USB_Dev_CDC_Init(&usb_cdcConfig, &USBD_cdcContext, &USBD_devContext);
(void) Cy_USB_Dev_HID_Init(&usb_hidConfig, &USBD_hidContext, &USBD_devContext);
/* Hook interrupt service routines */
(void) Cy_SysInt_Init(&USBD_IntrLowConfig, &USBD_IsrLow);
(void) Cy_SysInt_Init(&USBD_IntrMeduimConfig, &USBD_IsrMedium);
(void) Cy_SysInt_Init(&USBD_IntrHighConfig, &USBD_IsrHigh);
/* Enable interrupts */
NVIC_EnableIRQ((IRQn_Type) USBD_IntrLowConfig.intrSrc);
NVIC_EnableIRQ((IRQn_Type) USBD_IntrMeduimConfig.intrSrc);
NVIC_EnableIRQ((IRQn_Type) USBD_IntrHighConfig.intrSrc);
/* Enable global interrupts */
__enable_irq();
/* Make USB device appear on the bus */
Note
The interrupts are mandatory for the USB Device operation. Therefore, USBFS interrupts must be enabled in the NVIC and global interrupts must be enabled as well.
+

+Design Considerations

+

The typical use case is that application calls the middleware API interface provided by the USB Device or Class layer to implement application logic. However, some features are provided only by the USBFS driver layer. Therefore, if the application needs them, the driver API interface must be used. The list of these features is provided in the section Driver Features.

+

+USB Configurator

+

The standalone USB Configurator tool helps construct USB Device descriptors. The USB device descriptors provide to the USB Host complete information about the connected device. The tool output are generated source and header files that contain information about the USB Device: device descriptors plus structures that help access device descriptors. Generated files are mandatory for the middleware operation and must be added to your project. The header file provides access to instances of the USB Device configuration structure cy_stc_usb_dev_config_t and array of the USB Device structures cy_stc_usb_dev_device_t. Both these definitions are required for USB Device configuration. The tool also generates instances of configuration structures required for CDC and HID Class configuration.

+

A detailed information about USB Descriptors is provided by the USB Specification

+

The USB Configurator tool provides the User Guide, which can be found in the documentation.

+

+Standard Request Support

+

The USB Device supports standard requests listed in the table below.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Standard RequestRequest Processing DescriptionUSB Spec Reference
CLEAR_FEATURE Clears or disables a specific feature. Support recipients: Device, Interface and Endpoint. The TEST_MODE feature selector is not supported. 9.4.1
GET_CONFIGURATION Returns the current device configuration value. 9.4.2
GET_DESCRIPTOR Returns the specified descriptor if the descriptor exists. 9.4.3
GET_INTERFACE Returns the selected alternate interface setting for the specified interface. 9.4.4
GET_STATUS Returns status for the specified recipient. Support recipients: Device, Interface, and Endpoint. 9.4.5
SET_ADDRESS Sets the device address for all future device accesses. 9.4.6
SET_CONFIGURATION Sets the device configuration. After this request, the device is ready for communication. 9.4.7
SET_DESCRIPTOR Not supported (optional request). 9.4.8
SET_FEATURE Enables a specific feature. Support recipients: Device, Interface, and Endpoint. The TEST_MODE feature selector is not supported. 9.4.9
SET_INTERFACE Allows the USB Host to select an alternate setting for the specified interface. 9.4.10
SYNCH_FRAME Not supported. 9.4.11
+

+Audio Class

+

The USB Audio class can be used in a large amount of applications, either Made for iPod (MFI) or general USB Audio based. These applications consist of, but are not limited to, speakers, microphones, headsets, music creation tools (DJ equipment, guitar jacks, etc), and mixers. An additional application for the Audio class is in Musical Instrument Digital Interface (MIDI) applications. This interface uses a digital UART-like interface and allows the information to be sent across to the Host to be used with software applications, such as Apple Garage Band. Various instruments, such as electronic pianos, interface with MIDI.

+

A detailed description about Audio Class is provided by the USB Implementers Forum (USB-IF) Class Documentation

+

The Audio Class does not provide support any of Audio v1.0 or v2.0 requests processing and provides only the API interface to register Audio request handlers implemented on the application level. However, USB Configurator supports Audio v1.0 or v2.0 descriptors.

+
Note
The MIDI Class support is not available in this version.
+

+CDC: Communication Device Class

+

Common use case for this class in a PSoC design is to replace a legacy serial (RS232) COM port with a USB connection. This allows customers to use legacy serial software while updating the communication interface to something more readily available on today's computers. The type of data that might be streamed across USB can vary depending on the end application. This could be as simple as streaming raw ADC counts to an entire command protocol. Additionally, CDC is extremely useful for debug purposes. Users can easily develop a USB interface that can send and receive information across CDC. On the Host side, GUI applications are widely available to view the data being transmitted, such as TeraTerm, Terminal, or Hyper-Terminal (depending on version of Microsoft Windows).

+

A detailed description about CDC class is provided by the USB Implementers Forum (USB-IF) Class Documentation

+

The CDC Class supports requests listed in the table below.

+ + + + + + + + +
Class RequestRequest Processing DescriptionCommunications Class Subclass Specification for PSTN Devices
SET_LINE_CODING Allows the host to specify typical asynchronous line-character formatting properties such as: data terminal rate, number of stop bits, parity type and number of data bits. It applies to data transfers both from the Host to the Device and from the Device to the Host. 6.3.10
GET_LINE_CODING Allows the host to discover the currently configured line coding. 6.3.11
SET_CONTROL_LINE_STATE Generates RS-232/V.24 style control signals - RTS and DTR. 6.3.12
+

The CDC Class supports notifications listed in the table below.

+ + + + +
Class NotificationNotification Processing DescriptionCommunications Class Subclass Specification for PSTN Devices
SERIAL_STATE Allows the Host to read the current state of the carrier detect (CD), DSR, break, and ring signal (RI). 6.3.4
+

+HID: Human Interface Device

+

There are many possible use cases for HID depending on the end application. A keyboard/keypad is a common HID application that has been implemented previously with PSoC. Additionally, customers can use PSoC to implement a PC mouse or game controller device. A more generic use case seen is with regards to customers using USB as general-purpose interface between PSoC and the Host, without conforming to specific USAGE such as a Keyboard, Mouse, etc. Instead the user configures the HID descriptor to be a generic device, which allows them to transfer Vendor-Specific information, such as ADC data, button presses, etc., across the HID protocol. This allows customers to perform custom/generic data transfers over USB, without needing to provide an INF or SYS file during enumeration or worry about WHQL certification. All this is accomplished using the HID drivers that are built into all modern operation systems today. This includes Windows, Mac, and Linux.

+

A detailed description about HID is provided by the USB Implementers Forum (USB-IF) Class Documentation

+

The HID Class supports requests listed in the table below.

+ + + + + + + + + + + + + + +
Class RequestRequest Processing DescriptionHID Spec Reference
GET_REPORT Allows the USB Host to receive a report via the control pipe. 7.2.1
SET_REPORT Allows the USB Host to send a report via the control pipe (set a state of input, output, or feature report controls). 7.2.2
GET_IDLE Reads the current idle rate for a particular Input report.
+ The recommended default idle rate (rate when the device is initialized) is 500 milliseconds for keyboards (delay before first repeat rate) and infinity for joysticks and mice.
7.2.3
SET_IDLE Sets idle rate for a particular report. This request is used to limit the reporting frequency of an interrupt in endpoint.
+ When the idle rate byte is 0 (zero), the duration is indefinite. The endpoint reports only when a change is detected in the report data. When the idle rate byte is non-zero, then a fixed duration is used (defined by idle rate).
7.2.4
GET_PROTOCOL Reads which protocol is currently active (either the boot or the report protocol). 7.2.5
SET_PROTOCOL Switches between the boot protocol and the report protocol (or vice versa). 7.2.6
+

+Adding Custom Class

+

The USB Device middleware provides API interface that allows the user to implement custom class support. The middleware notifies registered class about following events:

+

To create a new custom Class, follow the steps below:

    +
  1. Implement functions to service events (from the list above) required for class operation. Typically, class should implement service of class-specific requests therefore needs to implement functions defined by cy_cb_usb_dev_request_received_t and cy_cb_usb_dev_request_cmplt_t.
  2. +
  3. Initialize instance of cy_stc_usb_dev_class_t structure using implemented service functions. Provide NULL pointer as function pointer if class does not use this event.
  4. +
  5. Allocate instance of cy_stc_usb_dev_class_ll_item_t structure to provide storage for a linked list item of the class.
  6. +
  7. The class might need a context to store class-specific data. If needed, define context type specific for this class and allocate it.
  8. +
  9. To enable class operation, this needs to be registered using Cy_USB_Dev_RegisterClass function after USB Device middleware is initialized.
  10. +
+

Any of supported classes can be taken as an example to implement a custom class.

+

+Vendor-Specific Requests Support

+

The vendor-specific requests are STALLed by USB Device middleware by default. The exception is MS OS String vendor-specific request to retrieve an OS Feature Descriptor (Note that USB device must contain MS OS String descriptor to handle this vendor-specific by middleware). The middleware provides the Cy_USB_Dev_RegisterVendorCallbacks function to register callbacks to handle vendor-specific requests.

+

+Allocate Data Endpoint Buffer

+

The application allocates buffers for data endpoints to operate. The buffer allocation depends on USBFS driver endpoint buffer access type configuration. It specifies which hardware register set 8-bit or 16-bit is used to access hardware endpoints buffer. The 16-bit access requires that the specific rules for the endpoints buffer allocation must be met (See Hardware Buffer Access section of the USBFS driver for more information).
+To make endpoint buffer allocation configuration independent, use the CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro.

+

+Self-Powered Devices

+

The USB Device responds to GET_STATUS requests based on the status set with the Cy_USB_Dev_SetPowerStatus function. To set the correct status, Cy_USB_Dev_SetPowerStatus must be called during initialization if USB Device is configured as self-powered. The Cy_USB_Dev_SetPowerStatus must be called any time the device changes status. A self-powered device also requires monitoring VBUS to control pull-up resistors. The pull-up resistor does not supply power to the data line until you call Cy_USB_Dev_Connect. Cy_USB_Dev_Disconnect disconnects the pull-up resistor from the data line. Find information about how to add VBUS monitoring in your application in the USBFS driver section VBUS Detection in the PDL API Reference Manual.

+

+Timeout Function Redefinition

+

The USB Device middleware provides following blocking functions: Cy_USB_Dev_ReadEpBlocking, Cy_USB_Dev_WriteEpBlocking, and Cy_USB_Dev_Connect (the behavior defined by the blocking parameter of the connect function). The blocking functions parameter timeout defines how many milliseconds to wait before timeout. The SysLib driver function Cy_SysLib_Delay is used to implement a 1 millisecond wait cycle. The middleware provides function Cy_USB_Dev_OverwriteHandleTimeout that allows overriding the wait function implementation. This might be useful when an operation system is used in your application.

+
Note
The blocking function must be used carefully to not cause application lock-up. The preferred solution is using non-blocking functions.
+

+Driver Features

+

There are driver features that do not have corresponding an API interface provided in the middleware. However, the application might need these features for USB Device implementation. If there is such a need, the driver functions must be used. These features are listed below:

    +
  • Data Endpoint 1 - 8 Completion, SOF received and LPM transfer ACKed events notification.
  • +
  • Low power support: Suspend / Resume, Remote wakeup signaling.
  • +
  • Link Power Management (LPM) support.
  • +
+

Find more information in the appropriate section of the USBFS driver documentation provided in the PDL API Reference Manual.

+

+Supported Software and Tools

+

This version of the USB Device Middleware was validated for the 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
+

+MISRA-C Compliance

+

The MISRA-C Compliant verification is not performed for Beta release.

+ + + + + + + + + + +
MISRA Rule Rule Class (Required/Advisory) Rule Description Description of Deviation(s)
11.4 A A cast should not be performed between a pointer to object type and a different pointer to object type. A cast involving pointers is conducted with caution that the pointers are correctly aligned for the type of object being pointed to.
11.5 R A cast shall not be performed that removes any const or volatile qualification from the type addressed by a pointer.
    +
  1. All device descriptors are stored in flash. On the USB Host get descriptor request, the pointer to descriptor is assigned to a pointer that manages data transfer losing const qualification. Despite the qualification being lost, the middleware does not perform any write access using this pointer.
  2. +
  3. Some device characteristics are stored in volatile variables. On the USB Host request, the pointer to a characteristic variable is assigned to a pointer that manages data transfer losing volatile qualification. Despite the qualification being lost, this does not cause any negative impact because the data transfer is managed by the interrupt handler. The same happens when these variables are passed as parameters to memcpy or memset function.
  4. +
+
14.7 R A function shall have a single point of exit at the end of the function. The functions can return from several points. This is typically done to improve code clarity when returning error status code if input parameters validation fails.
16.7 A A pointer parameter in a function prototype should be declared as a pointer to const if the pointer is not used to modify the addressed object. The usbfs driver and middleware defines general function prototypes and pointers to functions types but the function's implementation depends on configuration. Therefore, some functions' implementation require parameters to be pointers to const. This is not met because of the generalized implementation approach.
+

+Errata

+

This section lists the known problems with the USB Device middleware.

+ + + + + + + +
Cypress IDKnown IssueWorkaround
DRIVERS-1401 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.
DRIVERS-1427 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.
/* Read and save value of ARB_CFG register
* USBD_HW is a pointer to the base address of USBFS Device */
uint32_t tempReg = USBFS_DEV_ARB_CFG(USBD_HW);
/* Entering Deep Sleep */
/* Resume after Deep Sleep */
Cy_USBFS_Dev_Drv_Resume(USBD_HW, &USBD_context);
/* Restore ARB_CFG register after deep sleep */
USBFS_DEV_ARB_CFG(USBD_HW) &= (~USBFS_USBDEV_ARB_CFG_CFG_CMP_Msk);
USBFS_DEV_ARB_CFG(USBD_HW) = tempReg;
(void) USBFS_DEV_ARB_CFG(USBD_HW);
+

+Changelog

+ + + + + + + + + + + + + + + +
VersionChangesReason for Change
2.0 Updated the internal processing to support USBFS driver updates. The USBFS driver is updated to v2.0.
Moved the timeout from Cy_USB_Dev_AbortEpTransfer() to the driver layer. The maximum function's wait time is significantly reduced. Align with the changes of the USBFS driver.
Changed the functions parameter name and the structure member name class to classObj. Fixed the ambiguity related to the usage of the C++ keyword class as a name.
Enclosed middleware sources within a conditional compilation to exclude the USB Device middleware for devices without USB hardware. Fixed a compilation error for devices without USB hardware.
Updated the major and minor version defines to follow the naming convention.
1.0 The initial version.
+

+More Information

+

For more detail, refer to the following documents:

+ +
Note
The links to the other software component’s documentation (middleware and PDL) point to GitHub to the software latest available version. To get documentation of the specified version, download from GitHub and unzip the component archive. The documentation is available in the docs folder.
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/jquery.js b/docs/usbfs_dev_api_reference_manual/html/jquery.js new file mode 100644 index 0000000..f5343ed --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/jquery.js @@ -0,0 +1,87 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + +
+
+
API Reference
+
+
+
Provides the list of API Reference
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 DeviceThis section provides an API description for the core functionality of the USB Device: initialization, status information, data transfers, and class support
 Macros
 Descriptors
 Functions
 Initialization Functions
 Service Functions
 Data Transfer Functions
 Vendor Request Support Functions
 Class Support Functions
 Data Structures
 Device Information
 Device Descriptors
 Control Transfer
 Class Support
 Function Pointers
 Enumerated Types
 Audio ClassThis section provides API description for the Audio class
 Macros
 Functions
 Data Structures
 CDC ClassThis section provides API description for the CDC class
 Macros
 Functions
 Data Structures
 Enumerated Types
 HID ClassThis section provides the API description for the HID class
 Macros
 Functions
 Data Structures
 Enumerated Types
+ + + + + + diff --git a/docs/usbfs_dev_api_reference_manual/html/modules.js b/docs/usbfs_dev_api_reference_manual/html/modules.js new file mode 100644 index 0000000..7012aad --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/modules.js @@ -0,0 +1,7 @@ +var modules = +[ + [ "Device", "group__group__usb__device.html", "group__group__usb__device" ], + [ "Audio Class", "group__group__usb__dev__audio.html", "group__group__usb__dev__audio" ], + [ "CDC Class", "group__group__usb__dev__cdc.html", "group__group__usb__dev__cdc" ], + [ "HID Class", "group__group__usb__dev__hid.html", "group__group__usb__dev__hid" ] +]; \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/nav_f.png b/docs/usbfs_dev_api_reference_manual/html/nav_f.png new file mode 100644 index 0000000..72a58a5 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/nav_f.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/nav_g.png b/docs/usbfs_dev_api_reference_manual/html/nav_g.png new file mode 100644 index 0000000..2093a23 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/nav_g.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/nav_h.png b/docs/usbfs_dev_api_reference_manual/html/nav_h.png new file mode 100644 index 0000000..33389b1 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/nav_h.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/navtree.css b/docs/usbfs_dev_api_reference_manual/html/navtree.css new file mode 100644 index 0000000..0cc7e77 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/navtree.css @@ -0,0 +1,146 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; + outline:none; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:#fff; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + background-color: #FAFAFF; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: 250px; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url("splitbar.png"); + background-size:100%; + background-repeat:no-repeat; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/docs/usbfs_dev_api_reference_manual/html/navtree.js b/docs/usbfs_dev_api_reference_manual/html/navtree.js new file mode 100644 index 0000000..e6d31b0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/navtree.js @@ -0,0 +1,517 @@ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func,show) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + if ($.browser.msie && $.browser.version<=8) { + // script.onload does not work with older versions of IE + script.onreadystatechange = function() { + if (script.readyState=='complete' || script.readyState=='loaded') { + func(); if (show) showRoot(); + } + } + } + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, showRoot) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, showRoot); + }, showRoot); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } if (imm || ($.browser.msie && $.browser.version>8)) { + // somehow slideDown jumps to the start of tree for IE9 :-( + $(node.getChildrenUL()).show(); + } else { + $(node.getChildrenUL()).slideDown("fast"); + } + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + gotoAnchor(anchor,aname,false); +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + },true); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + },true); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + $(window).load(function(){ + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + }); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/=desktop_vp) { + if (!collapsed) { + collapseExpand(); + } + } else if (width>desktop_vp && collapsedWidth0) { + restoreWidth(0); + collapsed=true; + } + else { + var width = readCookie('width'); + if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } + collapsed=false; + } + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + $(window).load(resizeHeight); +} + + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_0.html b/docs/usbfs_dev_api_reference_manual/html/search/all_0.html new file mode 100644 index 0000000..f25360b --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_0.js b/docs/usbfs_dev_api_reference_manual/html/search/all_0.js new file mode 100644 index 0000000..b4b4de4 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['alternates',['alternates',['../structcy__stc__usb__dev__interface__t.html#af49504d16931dee60e726c4496ce3282',1,'cy_stc_usb_dev_interface_t']]], + ['audio_20class',['Audio Class',['../group__group__usb__dev__audio.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_1.html b/docs/usbfs_dev_api_reference_manual/html/search/all_1.html new file mode 100644 index 0000000..b13f0f7 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_1.js b/docs/usbfs_dev_api_reference_manual/html/search/all_1.js new file mode 100644 index 0000000..48c7f08 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_1.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['balternatesetting',['bAlternateSetting',['../structcy__stc__usbdev__interface__descr__t.html#abdaec91851978ad55037fef4a986e4ff',1,'cy_stc_usbdev_interface_descr_t']]], + ['bcddevice',['bcdDevice',['../structcy__stc__usbdev__device__descr__t.html#ac6163f32cdd505a3c79bff9cb0798902',1,'cy_stc_usbdev_device_descr_t']]], + ['bcdusb',['bcdUSB',['../structcy__stc__usbdev__device__descr__t.html#ac56838bd4119bb5094df9468e6a5c6ca',1,'cy_stc_usbdev_device_descr_t']]], + ['bconfigurationvalue',['bConfigurationValue',['../structcy__stc__usbdev__config__descr__t.html#a28290fc090d1300ce689675dbf03d516',1,'cy_stc_usbdev_config_descr_t']]], + ['bdescriptortype',['bDescriptorType',['../structcy__stc__usbdev__device__descr__t.html#ae8fc0e6c17397e9f19e76b2d52cab4a8',1,'cy_stc_usbdev_device_descr_t::bDescriptorType()'],['../structcy__stc__usbdev__config__descr__t.html#aff0680f735725beac0d5864faddb54d3',1,'cy_stc_usbdev_config_descr_t::bDescriptorType()'],['../structcy__stc__usbdev__interface__descr__t.html#aa37e85cf76e7095200b6fd4e294436f7',1,'cy_stc_usbdev_interface_descr_t::bDescriptorType()'],['../structcy__stc__usbdev__endpoint__descr__t.html#a0c1a90e2ae955eee9543879e5a664e6d',1,'cy_stc_usbdev_endpoint_descr_t::bDescriptorType()']]], + ['bdeviceclass',['bDeviceClass',['../structcy__stc__usbdev__device__descr__t.html#aaf704494fc8e026e78af2abbc9c81e32',1,'cy_stc_usbdev_device_descr_t']]], + ['bdeviceprotocol',['bDeviceProtocol',['../structcy__stc__usbdev__device__descr__t.html#af5ae81fcf8bd3f21d118deb05c64b99c',1,'cy_stc_usbdev_device_descr_t']]], + ['bdevicesubclass',['bDeviceSubClass',['../structcy__stc__usbdev__device__descr__t.html#a688f054dcbda5a8afcc5e0f03a01989d',1,'cy_stc_usbdev_device_descr_t']]], + ['bendpointaddress',['bEndpointAddress',['../structcy__stc__usbdev__endpoint__descr__t.html#a02f288a3116dfef6e82d25796fa7ebef',1,'cy_stc_usbdev_endpoint_descr_t']]], + ['binterfaceclass',['bInterfaceClass',['../structcy__stc__usbdev__interface__descr__t.html#abe8e150e34fa7dcdbe2b0af11ca27477',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterfacenumber',['bInterfaceNumber',['../structcy__stc__usbdev__interface__descr__t.html#a65aebee33eca7791ad41ac8347868221',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterfaceprotocol',['bInterfaceProtocol',['../structcy__stc__usbdev__interface__descr__t.html#a010297774bd7ae3f718ee98568748898',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterfacesubclass',['bInterfaceSubClass',['../structcy__stc__usbdev__interface__descr__t.html#ab41a710838240522c1860420f9924a67',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterval',['bInterval',['../structcy__stc__usbdev__endpoint__descr__t.html#ae48eec6ba3bae7f7c1e6f3ed7de2cfdf',1,'cy_stc_usbdev_endpoint_descr_t']]], + ['blength',['bLength',['../structcy__stc__usbdev__device__descr__t.html#aecbd813046544b9250117a0566aadd14',1,'cy_stc_usbdev_device_descr_t::bLength()'],['../structcy__stc__usbdev__config__descr__t.html#a5e57a1c41471aabd2add6513974f0464',1,'cy_stc_usbdev_config_descr_t::bLength()'],['../structcy__stc__usbdev__interface__descr__t.html#ab011bb57b0b7abe3586579dd9172cf23',1,'cy_stc_usbdev_interface_descr_t::bLength()'],['../structcy__stc__usbdev__endpoint__descr__t.html#a443da99568684d1973b5424a0c89a29e',1,'cy_stc_usbdev_endpoint_descr_t::bLength()']]], + ['bmattributes',['bmAttributes',['../structcy__stc__usbdev__config__descr__t.html#afcb2b8c7eea77e13d12b25e34640bab8',1,'cy_stc_usbdev_config_descr_t::bmAttributes()'],['../structcy__stc__usbdev__endpoint__descr__t.html#a94505d0dbed1f7b18fb138aab0f55756',1,'cy_stc_usbdev_endpoint_descr_t::bmAttributes()']]], + ['bmaxpacketsize',['bMaxPacketSize',['../structcy__stc__usbdev__device__descr__t.html#acd3e640f123462bdead0e5df36723f5c',1,'cy_stc_usbdev_device_descr_t']]], + ['bmaxpower',['bMaxPower',['../structcy__stc__usbdev__config__descr__t.html#a66639e32037402566bf51b27936b1317',1,'cy_stc_usbdev_config_descr_t']]], + ['bmrequesttype',['bmRequestType',['../structcy__stc__usb__dev__setup__packet__t.html#ab9cb2efd5a3d00e9ac03300af3595495',1,'cy_stc_usb_dev_setup_packet_t']]], + ['bnumconfigurations',['bNumConfigurations',['../structcy__stc__usbdev__device__descr__t.html#ac31afb5eb41cec65609c2c290877b268',1,'cy_stc_usbdev_device_descr_t']]], + ['bnumendpoints',['bNumEndpoints',['../structcy__stc__usbdev__interface__descr__t.html#a75309a6a1b724a3a5c2bf57ab05a4e9c',1,'cy_stc_usbdev_interface_descr_t']]], + ['bnuminterfaces',['bNumInterfaces',['../structcy__stc__usbdev__config__descr__t.html#a8e0f1164631005d3ab62e9617bb47550',1,'cy_stc_usbdev_config_descr_t']]], + ['bosdescriptor',['bosDescriptor',['../structcy__stc__usb__dev__device__t.html#a5ca8d248ab89bb4cccdab2f15c3fb0c8',1,'cy_stc_usb_dev_device_t']]], + ['brequest',['bRequest',['../structcy__stc__usb__dev__setup__packet__t.html#a0842936f9d00ef0f75c28afe9827dda3',1,'cy_stc_usb_dev_setup_packet_t']]], + ['buffer',['buffer',['../structcy__stc__usb__dev__control__transfer__t.html#af228b416d7c0725c487a258074236880',1,'cy_stc_usb_dev_control_transfer_t::buffer()'],['../structcy__stc__usb__dev__cdc__config__t.html#ae96d5c2ad16b940ab4f9d1847754fc13',1,'cy_stc_usb_dev_cdc_config_t::buffer()']]], + ['buffersize',['bufferSize',['../structcy__stc__usb__dev__control__transfer__t.html#add72c6a43cd0be4fea770a6bf0555352',1,'cy_stc_usb_dev_control_transfer_t::bufferSize()'],['../structcy__stc__usb__dev__cdc__config__t.html#a846a7527e69e3b4e77f39bd0f7e2ac7b',1,'cy_stc_usb_dev_cdc_config_t::bufferSize()']]], + ['busreset',['busReset',['../structcy__stc__usb__dev__class__t.html#a503cd36eebb5c1e3b12d75028a2481ba',1,'cy_stc_usb_dev_class_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_10.html b/docs/usbfs_dev_api_reference_manual/html/search/all_10.html new file mode 100644 index 0000000..d1345a1 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_10.js b/docs/usbfs_dev_api_reference_manual/html/search/all_10.js new file mode 100644 index 0000000..6993e29 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_10.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['windex',['wIndex',['../structcy__stc__usb__dev__setup__packet__t.html#a03313abe6497667bddd0eece8046a4ae',1,'cy_stc_usb_dev_setup_packet_t']]], + ['wlength',['wLength',['../structcy__stc__usb__dev__setup__packet__t.html#af6b129674006959fcf0d9602dec9784c',1,'cy_stc_usb_dev_setup_packet_t']]], + ['wmaxpacketsize',['wMaxPacketSize',['../structcy__stc__usbdev__endpoint__descr__t.html#a788154a9655bed34e586df4c975639ca',1,'cy_stc_usbdev_endpoint_descr_t']]], + ['wtotallength',['wTotalLength',['../structcy__stc__usbdev__config__descr__t.html#a234eeb09dab42628e330b0d5eef3e8b0',1,'cy_stc_usbdev_config_descr_t']]], + ['wvalue',['wValue',['../structcy__stc__usb__dev__setup__packet__t.html#aecfaa2d162fee8bcbe8d1be67ee51224',1,'cy_stc_usb_dev_setup_packet_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_11.html b/docs/usbfs_dev_api_reference_manual/html/search/all_11.html new file mode 100644 index 0000000..2be8b71 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_11.js b/docs/usbfs_dev_api_reference_manual/html/search/all_11.js new file mode 100644 index 0000000..0cb79fd --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zlp',['zlp',['../structcy__stc__usb__dev__control__transfer__t.html#a517e6d7516cd5f0373e8ed4efdf8ecf4',1,'cy_stc_usb_dev_control_transfer_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_2.html b/docs/usbfs_dev_api_reference_manual/html/search/all_2.html new file mode 100644 index 0000000..9543c57 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_2.js b/docs/usbfs_dev_api_reference_manual/html/search/all_2.js new file mode 100644 index 0000000..0cb25bb --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_2.js @@ -0,0 +1,249 @@ +var searchData= +[ + ['classdata',['classData',['../structcy__stc__usb__dev__class__ll__item__t.html#af20af14f197b59640794d4eb6ccadbf2',1,'cy_stc_usb_dev_class_ll_item_t']]], + ['classobj',['classObj',['../structcy__stc__usb__dev__class__ll__item__t.html#ab664a4c86bee67eb0b4f995cdb63cdc3',1,'cy_stc_usb_dev_class_ll_item_t']]], + ['configdescriptor',['configDescriptor',['../structcy__stc__usb__dev__configuration__t.html#a6189ea5773ef735287936e3e7b05e539',1,'cy_stc_usb_dev_configuration_t']]], + ['configurations',['configurations',['../structcy__stc__usb__dev__device__t.html#a34f2a84a67e79a5eda6ce2205684070c',1,'cy_stc_usb_dev_device_t']]], + ['cy_5fcb_5fusb_5fdev_5fbus_5freset_5ft',['cy_cb_usb_dev_bus_reset_t',['../group__group__usb__dev__structures__func__ptr.html#gab6f8a0de15b09fe6a39e6d8032069a62',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5fevents_5fcallback_5ft',['cy_cb_usb_dev_events_callback_t',['../group__group__usb__dev__structures__func__ptr.html#gabf238de7ed223e1dbae8a08e56b6b680',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5frequest_5fcmplt_5ft',['cy_cb_usb_dev_request_cmplt_t',['../group__group__usb__dev__structures__func__ptr.html#ga626db28aeab6dfd0f7004866225bb0ee',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5frequest_5freceived_5ft',['cy_cb_usb_dev_request_received_t',['../group__group__usb__dev__structures__func__ptr.html#ga3a7649a1c575110ac8e4480d70da8c2c',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5fset_5fconfig_5ft',['cy_cb_usb_dev_set_config_t',['../group__group__usb__dev__structures__func__ptr.html#ga18e8445fcb1392dd424ae65a726c4bd6',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5fset_5finterface_5ft',['cy_cb_usb_dev_set_interface_t',['../group__group__usb__dev__structures__func__ptr.html#gaba4c41daa173f3dfc3a60c2260d1f0c1',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusbfs_5fdev_5fhid_5fget_5freport_5ft',['cy_cb_usbfs_dev_hid_get_report_t',['../group__group__usb__dev__hid__data__structures.html#gaebf080dd87c52f34b1953fc0a26326df',1,'cy_usb_dev_hid.h']]], + ['cy_5fcb_5fusbfs_5fdev_5fhid_5fset_5freport_5ft',['cy_cb_usbfs_dev_hid_set_report_t',['../group__group__usb__dev__hid__data__structures.html#gadb23e2c86255463c972463b350f52e83',1,'cy_usb_dev_hid.h']]], + ['cy_5fen_5fusb_5fdev_5fcallback_5fevents_5ft',['cy_en_usb_dev_callback_events_t',['../group__group__usb__dev__enums.html#gad38a8a2002a67f7b109d6beaa20ceb98',1,'cy_usb_dev.h']]], + ['cy_5fen_5fusb_5fdev_5fcdc_5fparity_5ftype_5ft',['cy_en_usb_dev_cdc_parity_type_t',['../group__group__usb__dev__cdc__enums.html#ga513d1e722ab8286e63edd57411367730',1,'cy_usb_dev_cdc.h']]], + ['cy_5fen_5fusb_5fdev_5fcdc_5fstop_5fbit_5ft',['cy_en_usb_dev_cdc_stop_bit_t',['../group__group__usb__dev__cdc__enums.html#gac6c77b9a53c97772dc7c036ef7f5d4c4',1,'cy_usb_dev_cdc.h']]], + ['cy_5fen_5fusb_5fdev_5fhid_5ftimer_5fstate_5ft',['cy_en_usb_dev_hid_timer_state_t',['../group__group__usb__dev__hid__enums.html#ga4603043f111ffa28cd992b33bf067bdf',1,'cy_usb_dev_hid.h']]], + ['cy_5fen_5fusb_5fdev_5fpower_5fstatus_5ft',['cy_en_usb_dev_power_status_t',['../group__group__usb__dev__enums.html#ga24aecb8903fe9acea9c3fac59379684a',1,'cy_usb_dev.h']]], + ['cy_5fen_5fusb_5fdev_5fstate_5ft',['cy_en_usb_dev_state_t',['../group__group__usb__dev__enums.html#ga8031906d685904649e67faaee7810dbe',1,'cy_usb_dev.h']]], + ['cy_5fen_5fusb_5fdev_5fstatus_5ft',['cy_en_usb_dev_status_t',['../group__group__usb__dev__enums.html#ga143c13515bfded27b9dc5ebc18d4cdaf',1,'cy_usb_dev.h']]], + ['cy_5ffn_5fusb_5fdev_5fhandle_5ftimeout_5fptr_5ft',['cy_fn_usb_dev_handle_timeout_ptr_t',['../group__group__usb__dev__structures__func__ptr.html#gab48bb4326ac3019669c6697714b1c377',1,'cy_usb_dev.h']]], + ['cy_5ffn_5fusb_5fdev_5fsn_5fstring_5fptr_5ft',['cy_fn_usb_dev_sn_string_ptr_t',['../group__group__usb__dev__structures__func__ptr.html#ga03fce0dd6a2c28e632694c21c749b0fb',1,'cy_usb_dev.h']]], + ['cy_5fstc_5fusb_5fdev_5falternate_5ft',['cy_stc_usb_dev_alternate_t',['../structcy__stc__usb__dev__alternate__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5faudio_5fcontext_5ft',['cy_stc_usb_dev_audio_context_t',['../structcy__stc__usb__dev__audio__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fbm_5frequest',['cy_stc_usb_dev_bm_request',['../structcy__stc__usb__dev__bm__request.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcdc_5fconfig_5ft',['cy_stc_usb_dev_cdc_config_t',['../structcy__stc__usb__dev__cdc__config__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcdc_5fcontext_5ft',['cy_stc_usb_dev_cdc_context_t',['../structcy__stc__usb__dev__cdc__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fclass_5fll_5fitem_5ft',['cy_stc_usb_dev_class_ll_item_t',['../structcy__stc__usb__dev__class__ll__item__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fclass_5ft',['cy_stc_usb_dev_class_t',['../structcy__stc__usb__dev__class__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fconfig_5ft',['cy_stc_usb_dev_config_t',['../structcy__stc__usb__dev__config__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fconfiguration_5ft',['cy_stc_usb_dev_configuration_t',['../structcy__stc__usb__dev__configuration__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcontext_5ft',['cy_stc_usb_dev_context_t',['../structcy__stc__usb__dev__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcontrol_5ftransfer_5ft',['cy_stc_usb_dev_control_transfer_t',['../structcy__stc__usb__dev__control__transfer__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fdevice_5ft',['cy_stc_usb_dev_device_t',['../structcy__stc__usb__dev__device__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fendpoint_5ft',['cy_stc_usb_dev_endpoint_t',['../structcy__stc__usb__dev__endpoint__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fhid_5fconfig_5ft',['cy_stc_usb_dev_hid_config_t',['../structcy__stc__usb__dev__hid__config__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fhid_5fcontext_5ft',['cy_stc_usb_dev_hid_context_t',['../structcy__stc__usb__dev__hid__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fhid_5ft',['cy_stc_usb_dev_hid_t',['../structcy__stc__usb__dev__hid__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5finterface_5ft',['cy_stc_usb_dev_interface_t',['../structcy__stc__usb__dev__interface__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fms_5fos_5fstring_5ft',['cy_stc_usb_dev_ms_os_string_t',['../structcy__stc__usb__dev__ms__os__string__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fsetup_5fpacket_5ft',['cy_stc_usb_dev_setup_packet_t',['../structcy__stc__usb__dev__setup__packet__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fstring_5ft',['cy_stc_usb_dev_string_t',['../structcy__stc__usb__dev__string__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5fconfig_5fdescr_5ft',['cy_stc_usbdev_config_descr_t',['../structcy__stc__usbdev__config__descr__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5fdevice_5fdescr_5ft',['cy_stc_usbdev_device_descr_t',['../structcy__stc__usbdev__device__descr__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5fendpoint_5fdescr_5ft',['cy_stc_usbdev_endpoint_descr_t',['../structcy__stc__usbdev__endpoint__descr__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5finterface_5fdescr_5ft',['cy_stc_usbdev_interface_descr_t',['../structcy__stc__usbdev__interface__descr__t.html',1,'']]], + ['cy_5fusb_5fdev_5faborteptransfer',['Cy_USB_Dev_AbortEpTransfer',['../group__group__usb__dev__functions__data__transfer.html#gafe804a021cfbea888a966b8cf1b4172e',1,'Cy_USB_Dev_AbortEpTransfer(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#gafe804a021cfbea888a966b8cf1b4172e',1,'Cy_USB_Dev_AbortEpTransfer(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5faddressed',['CY_USB_DEV_ADDRESSED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbead8bbade2aea08c1df601dacd32fbf1e1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5falloc_5fendpoint_5fbuffer',['CY_USB_DEV_ALLOC_ENDPOINT_BUFFER',['../group__group__usb__dev__macros.html#ga0ccd70a937ab3d69aeb40030713bc69b',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fattached',['CY_USB_DEV_ATTACHED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea41b95a6a9fa14b807ff0c86c2273b086',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5faudio2_5frqst_5fcur',['CY_USB_DEV_AUDIO2_RQST_CUR',['../group__group__usb__dev__audio__macros.html#gae22801ea6e6adba26c29c6b3efd08814',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio2_5frqst_5fmem',['CY_USB_DEV_AUDIO2_RQST_MEM',['../group__group__usb__dev__audio__macros.html#ga65897e1ce33b8a8bc0099cb5facd80e1',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio2_5frqst_5frange',['CY_USB_DEV_AUDIO2_RQST_RANGE',['../group__group__usb__dev__audio__macros.html#ga7d66dca27b97941f72a0065e205c1b4b',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fgetclass',['Cy_USB_Dev_Audio_GetClass',['../group__group__usb__dev__audio__functions.html#gaaf4652c2f5f74568dd67a23df6918bd8',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5finit',['Cy_USB_Dev_Audio_Init',['../group__group__usb__dev__audio__functions.html#ga8224694c94d72e5c3e2d717bd3a70f3c',1,'Cy_USB_Dev_Audio_Init(void const *config, cy_stc_usb_dev_audio_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_audio.c'],['../group__group__usb__dev__audio__functions.html#ga8224694c94d72e5c3e2d717bd3a70f3c',1,'Cy_USB_Dev_Audio_Init(void const *config, cy_stc_usb_dev_audio_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_audio.c']]], + ['cy_5fusb_5fdev_5faudio_5fmaster_5fchannel',['CY_USB_DEV_AUDIO_MASTER_CHANNEL',['../group__group__usb__dev__audio__macros.html#ga75a141c13c6074fcf2bc75313b33b504',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fregisterusercallback',['Cy_USB_Dev_Audio_RegisterUserCallback',['../group__group__usb__dev__audio__functions.html#ga8293f60d0ba564a94b6afdf3175a3efb',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fget_5fcur',['CY_USB_DEV_AUDIO_RQST_GET_CUR',['../group__group__usb__dev__audio__macros.html#gad27fbd09001566294e4d0247e1943ecb',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fget_5fmax',['CY_USB_DEV_AUDIO_RQST_GET_MAX',['../group__group__usb__dev__audio__macros.html#ga43ac3657d2c2e04fcfd61610ffebfcdf',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fget_5fmem',['CY_USB_DEV_AUDIO_RQST_GET_MEM',['../group__group__usb__dev__audio__macros.html#gaeedfcf676374ddf2a4be997f6bfa024f',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fget_5fmin',['CY_USB_DEV_AUDIO_RQST_GET_MIN',['../group__group__usb__dev__audio__macros.html#ga8027c253d6f52017920679a1fed373eb',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fget_5fres',['CY_USB_DEV_AUDIO_RQST_GET_RES',['../group__group__usb__dev__audio__macros.html#gab54325c3064ad1474fc97e167f12b5bf',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fget_5fstat',['CY_USB_DEV_AUDIO_RQST_GET_STAT',['../group__group__usb__dev__audio__macros.html#ga22a2b84934e9a63edae640a436c22a3b',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fset_5fcur',['CY_USB_DEV_AUDIO_RQST_SET_CUR',['../group__group__usb__dev__audio__macros.html#ga29f208754239e19e18535e4d2b44d87d',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fset_5fmax',['CY_USB_DEV_AUDIO_RQST_SET_MAX',['../group__group__usb__dev__audio__macros.html#gac031ae6a65167f2c18cda490d66e3fe0',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fset_5fmem',['CY_USB_DEV_AUDIO_RQST_SET_MEM',['../group__group__usb__dev__audio__macros.html#ga0a74fbcb47d0f506100faad0033cf4c6',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fset_5fmin',['CY_USB_DEV_AUDIO_RQST_SET_MIN',['../group__group__usb__dev__audio__macros.html#ga9aa23a3fd0a4059cc0e5f13249a090d9',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5frqst_5fset_5fres',['CY_USB_DEV_AUDIO_RQST_SET_RES',['../group__group__usb__dev__audio__macros.html#gacd0100110788a78373f810e35b4838f8',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fmax',['CY_USB_DEV_AUDIO_VOLUME_MAX',['../group__group__usb__dev__audio__macros.html#ga28deab15fdff03b1c7468b69d568bc64',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fmax_5flsb',['CY_USB_DEV_AUDIO_VOLUME_MAX_LSB',['../group__group__usb__dev__audio__macros.html#ga719da2b23b0d408c662d56d04893ad09',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fmax_5fmsb',['CY_USB_DEV_AUDIO_VOLUME_MAX_MSB',['../group__group__usb__dev__audio__macros.html#ga022bdd57ebc89458e734e35c508b5c83',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fmin',['CY_USB_DEV_AUDIO_VOLUME_MIN',['../group__group__usb__dev__audio__macros.html#gaac6fd7f1bd27de8590ead0c398fea2da',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fmin_5flsb',['CY_USB_DEV_AUDIO_VOLUME_MIN_LSB',['../group__group__usb__dev__audio__macros.html#ga7681f7c713666af9fa35156635828f11',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fmin_5fmsb',['CY_USB_DEV_AUDIO_VOLUME_MIN_MSB',['../group__group__usb__dev__audio__macros.html#gafe1e246f4f82ec8259cf0ff07cb37add',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5fvolume_5fsilence',['CY_USB_DEV_AUDIO_VOLUME_SILENCE',['../group__group__usb__dev__audio__macros.html#ga27e0c25ae733bb10d70ae5dd6c2f345f',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5fbad_5fparam',['CY_USB_DEV_BAD_PARAM',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa2b72ad2fd19c7d4fe00ac0152e55f7b8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fbos_5fdescr',['CY_USB_DEV_BOS_DESCR',['../group__group__usb__dev__macros__device__descr.html#gae2435cba88591af16d4847b13ff04158',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fbos_5fdescr_5flength',['CY_USB_DEV_BOS_DESCR_LENGTH',['../group__group__usb__dev__macros__device__descr.html#gaf30c55c2d0a02f8481333b741c85dc27',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fcdc_5fcomport_5fnumber',['CY_USB_DEV_CDC_COMPORT_NUMBER',['../group__group__usb__dev__cdc__macros.html#ga6b26237bff957e7a91b4988f2d8d91e5',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetall',['Cy_USB_Dev_CDC_GetAll',['../group__group__usb__dev__cdc__functions.html#gacdc33492311cc4ec24e33092506b5a18',1,'Cy_USB_Dev_CDC_GetAll(uint32_t port, uint8_t *buffer, uint32_t maxSize, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#gacdc33492311cc4ec24e33092506b5a18',1,'Cy_USB_Dev_CDC_GetAll(uint32_t port, uint8_t *buffer, uint32_t maxSize, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetchar',['Cy_USB_Dev_CDC_GetChar',['../group__group__usb__dev__cdc__functions.html#ga670d1ffa870d18999d74f78e043f3356',1,'Cy_USB_Dev_CDC_GetChar(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga670d1ffa870d18999d74f78e043f3356',1,'Cy_USB_Dev_CDC_GetChar(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetcharformat',['Cy_USB_Dev_CDC_GetCharFormat',['../group__group__usb__dev__cdc__functions.html#gaec69e84dbc1b2f007602f889f51f27c5',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetclass',['Cy_USB_Dev_CDC_GetClass',['../group__group__usb__dev__cdc__functions.html#ga80dba44dfc5e6b5a3edd332a44aa888d',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetcount',['Cy_USB_Dev_CDC_GetCount',['../group__group__usb__dev__cdc__functions.html#gacd239d3d29fc08657fab51ab61ebf0bf',1,'Cy_USB_Dev_CDC_GetCount(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#gacd239d3d29fc08657fab51ab61ebf0bf',1,'Cy_USB_Dev_CDC_GetCount(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetdata',['Cy_USB_Dev_CDC_GetData',['../group__group__usb__dev__cdc__functions.html#ga3dc0c8a65af938773ad7a69eeec21be3',1,'Cy_USB_Dev_CDC_GetData(uint32_t port, uint8_t *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga3dc0c8a65af938773ad7a69eeec21be3',1,'Cy_USB_Dev_CDC_GetData(uint32_t port, uint8_t *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetdatabits',['Cy_USB_Dev_CDC_GetDataBits',['../group__group__usb__dev__cdc__functions.html#ga6b5a76c52e41f690871dc3c34cb92652',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetdterate',['Cy_USB_Dev_CDC_GetDTERate',['../group__group__usb__dev__cdc__functions.html#ga991b2f9afdfdda786a25dfbf3719c8f0',1,'Cy_USB_Dev_CDC_GetDTERate(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga991b2f9afdfdda786a25dfbf3719c8f0',1,'Cy_USB_Dev_CDC_GetDTERate(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetlinecontrol',['Cy_USB_Dev_CDC_GetLineControl',['../group__group__usb__dev__cdc__functions.html#gaef1d41dadbebd22e50867b588fe8de36',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetparity',['Cy_USB_Dev_CDC_GetParity',['../group__group__usb__dev__cdc__functions.html#ga5d0919faa039954d9ad813937cf8a535',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetserialstate',['Cy_USB_Dev_CDC_GetSerialState',['../group__group__usb__dev__cdc__functions.html#ga10abe615bf61bb37382be268d53d1b55',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5finit',['Cy_USB_Dev_CDC_Init',['../group__group__usb__dev__cdc__functions.html#ga674860e659c0f23538a9f6c11e64b03a',1,'Cy_USB_Dev_CDC_Init(cy_stc_usb_dev_cdc_config_t const *config, cy_stc_usb_dev_cdc_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga674860e659c0f23538a9f6c11e64b03a',1,'Cy_USB_Dev_CDC_Init(cy_stc_usb_dev_cdc_config_t const *config, cy_stc_usb_dev_cdc_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fisdataready',['Cy_USB_Dev_CDC_IsDataReady',['../group__group__usb__dev__cdc__functions.html#ga8146e47160e0c93b4cc6b60bb9aaf922',1,'Cy_USB_Dev_CDC_IsDataReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga8146e47160e0c93b4cc6b60bb9aaf922',1,'Cy_USB_Dev_CDC_IsDataReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fislinechanged',['Cy_USB_Dev_CDC_IsLineChanged',['../group__group__usb__dev__cdc__functions.html#ga3245d5ee9319cdae02e8484309e1320b',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fisnotificationready',['Cy_USB_Dev_CDC_IsNotificationReady',['../group__group__usb__dev__cdc__functions.html#gaba8ee7a47e213e9ba57e16ad3b93eb3e',1,'Cy_USB_Dev_CDC_IsNotificationReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#gaba8ee7a47e213e9ba57e16ad3b93eb3e',1,'Cy_USB_Dev_CDC_IsNotificationReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fisready',['Cy_USB_Dev_CDC_IsReady',['../group__group__usb__dev__cdc__functions.html#ga36836547e498bda5fd6c0dd0033c5d45',1,'Cy_USB_Dev_CDC_IsReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga36836547e498bda5fd6c0dd0033c5d45',1,'Cy_USB_Dev_CDC_IsReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fline_5fcoding_5fchanged',['CY_USB_DEV_CDC_LINE_CODING_CHANGED',['../group__group__usb__dev__cdc__macros.html#ga178d79174af9a82e8424c0098d2a4a3d',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fline_5fcontrol_5fchanged',['CY_USB_DEV_CDC_LINE_CONTROL_CHANGED',['../group__group__usb__dev__cdc__macros.html#gad41570dcf369f8d83ebe0480c11bd87b',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fline_5fcontrol_5fdtr',['CY_USB_DEV_CDC_LINE_CONTROL_DTR',['../group__group__usb__dev__cdc__macros.html#ga3fc81991b1f2e1e109cd2c422839c3c8',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fline_5fcontrol_5frts',['CY_USB_DEV_CDC_LINE_CONTROL_RTS',['../group__group__usb__dev__cdc__macros.html#ga5596b01a99b99a2498137427cb797736',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fline_5fnot_5fchanged',['CY_USB_DEV_CDC_LINE_NOT_CHANGED',['../group__group__usb__dev__cdc__macros.html#gafa7d3409835b362ad0d61bcb02ed5ede',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5feven',['CY_USB_DEV_CDC_PARITY_EVEN',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a748995c6c8381feaa26335d14af303eb',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fmark',['CY_USB_DEV_CDC_PARITY_MARK',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730ae82e5ee3abd6103dee0efaefb08a7dd6',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fnone',['CY_USB_DEV_CDC_PARITY_NONE',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730aaa24a5d6d89c9d152eacc8a05bc59e36',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fodd',['CY_USB_DEV_CDC_PARITY_ODD',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a9af9099cffad91c5bcf469f05d7636c7',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fspace',['CY_USB_DEV_CDC_PARITY_SPACE',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a9ee439c9ae803731e2e83b498ec40fdd',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fputchar',['Cy_USB_Dev_CDC_PutChar',['../group__group__usb__dev__cdc__functions.html#ga418ec0116904cebcdd9841e6ed7f72e5',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fputdata',['Cy_USB_Dev_CDC_PutData',['../group__group__usb__dev__cdc__functions.html#ga0e79dc7a18f6d24a15d2339f17bd2b26',1,'Cy_USB_Dev_CDC_PutData(uint32_t port, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga0e79dc7a18f6d24a15d2339f17bd2b26',1,'Cy_USB_Dev_CDC_PutData(uint32_t port, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fputstring',['Cy_USB_Dev_CDC_PutString',['../group__group__usb__dev__cdc__functions.html#ga8b064f67ce9e167e7b55a8e9dd8b77a4',1,'Cy_USB_Dev_CDC_PutString(uint32_t port, char_t const *string, int32_t timeout, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga8b064f67ce9e167e7b55a8e9dd8b77a4',1,'Cy_USB_Dev_CDC_PutString(uint32_t port, char_t const *string, int32_t timeout, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fregisterusercallbacks',['Cy_USB_Dev_CDC_RegisterUserCallbacks',['../group__group__usb__dev__cdc__functions.html#gaf1450bbba1fc39dc88c64cc7b6b75432',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5frqst_5fget_5fline_5fcoding',['CY_USB_DEV_CDC_RQST_GET_LINE_CODING',['../group__group__usb__dev__cdc__macros.html#gaecb0c6ab793e295aed61f9cadd22bb10',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5frqst_5fset_5fcontrol_5fline_5fstate',['CY_USB_DEV_CDC_RQST_SET_CONTROL_LINE_STATE',['../group__group__usb__dev__cdc__macros.html#ga86071c51567be33ec4c655a0b5225096',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5frqst_5fset_5fline_5fcoding',['CY_USB_DEV_CDC_RQST_SET_LINE_CODING',['../group__group__usb__dev__cdc__macros.html#ga26cf92aac735e6e948d5705e86a44e00',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fsendserialstate',['Cy_USB_Dev_CDC_SendSerialState',['../group__group__usb__dev__cdc__functions.html#ga4177475b2bd0de0bf4c4f5137de8b364',1,'Cy_USB_Dev_CDC_SendSerialState(uint32_t port, uint32_t serialState, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga4177475b2bd0de0bf4c4f5137de8b364',1,'Cy_USB_Dev_CDC_SendSerialState(uint32_t port, uint32_t serialState, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fstopbit_5f1',['CY_USB_DEV_CDC_STOPBIT_1',['../group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4a9f3c81b61d6053313dbd1ae5732e2966',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fstopbits_5f1_5f5',['CY_USB_DEV_CDC_STOPBITS_1_5',['../group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4af7f26d666bbcfca22e735f431fb4f71e',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fstopbits_5f2',['CY_USB_DEV_CDC_STOPBITS_2',['../group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4a969e21fef8f69138b6bc22c8bd0a17a2',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fclass_5ftype',['CY_USB_DEV_CLASS_TYPE',['../group__group__usb__dev__macros.html#ga578fa3654e397517d4bcaada2414d6c8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fconfig_5fdescr',['CY_USB_DEV_CONFIG_DESCR',['../group__group__usb__dev__macros__device__descr.html#ga6bbc45b1b70462406aaaad072f12019c',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fconfig_5fdescr_5flength',['CY_USB_DEV_CONFIG_DESCR_LENGTH',['../group__group__usb__dev__macros__device__descr.html#gada28bacc29b00cd2d78d4a9663679818',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fconfigured',['CY_USB_DEV_CONFIGURED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea3549813ede03d96bed9febadf9e80fe4',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fconnect',['Cy_USB_Dev_Connect',['../group__group__usb__dev__functions__common.html#ga368f2e081a58b7eef81a17c4781fca8e',1,'Cy_USB_Dev_Connect(bool blocking, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#ga368f2e081a58b7eef81a17c4781fca8e',1,'Cy_USB_Dev_Connect(bool blocking, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fdefault',['CY_USB_DEV_DEFAULT',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea12d4040ced408fd8cc40d95665e402e6',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdeinit',['Cy_USB_Dev_DeInit',['../group__group__usb__dev__functions__common.html#gad3b25c869fcca5706d0ebfe135df0783',1,'Cy_USB_Dev_DeInit(cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#gad3b25c869fcca5706d0ebfe135df0783',1,'Cy_USB_Dev_DeInit(cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fdevice_5fdescr',['CY_USB_DEV_DEVICE_DESCR',['../group__group__usb__dev__macros__device__descr.html#ga05df8b8c5e7345bb0e45598cc2c28ee2',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fdevice_5fdescr_5flength',['CY_USB_DEV_DEVICE_DESCR_LENGTH',['../group__group__usb__dev__macros__device__descr.html#ga7271c896052b7ecb327dd8e7ecbc9100',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fdevice_5fqualifier_5fdescr',['CY_USB_DEV_DEVICE_QUALIFIER_DESCR',['../group__group__usb__dev__macros__device__descr.html#ga5a27b4ad17ad01feb7dacb393300b17b',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fdevice_5fremote_5fwakeup',['CY_USB_DEV_DEVICE_REMOTE_WAKEUP',['../group__group__usb__dev__macros.html#gad21c69225cb5b6a85f6aacd66882b062',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdir_5fdevice_5fto_5fhost',['CY_USB_DEV_DIR_DEVICE_TO_HOST',['../group__group__usb__dev__macros.html#gada4b43e3c521c5adfefefba1463d7f36',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdir_5fhost_5fto_5fdevice',['CY_USB_DEV_DIR_HOST_TO_DEVICE',['../group__group__usb__dev__macros.html#ga8bf26b29efb3aa94398438c484b1abc1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdisabled',['CY_USB_DEV_DISABLED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbeac593d58ec7f0f3702b5ea09776e8bfb1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdisconnect',['Cy_USB_Dev_Disconnect',['../group__group__usb__dev__functions__common.html#ga15cde7caa00a43d253198ea70935e47c',1,'Cy_USB_Dev_Disconnect(cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#ga15cde7caa00a43d253198ea70935e47c',1,'Cy_USB_Dev_Disconnect(cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fdrv_5fhw_5fbusy',['CY_USB_DEV_DRV_HW_BUSY',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafaed025de81754aa5e5d7629dc9b937265',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdrv_5fhw_5fdisabled',['CY_USB_DEV_DRV_HW_DISABLED',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa0991f7a73dd697d482b9e0d3d4411524',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdrv_5fhw_5ferror',['CY_USB_DEV_DRV_HW_ERROR',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa9ffa2df4a2f20a453e4361b50fc33c95',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fendpoint_5fdescr',['CY_USB_DEV_ENDPOINT_DESCR',['../group__group__usb__dev__macros__device__descr.html#gac741996147c46141dc7b80ad7dd17775',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fendpoint_5fdescr_5flength',['CY_USB_DEV_ENDPOINT_DESCR_LENGTH',['../group__group__usb__dev__macros__device__descr.html#gac59ff7abdf73897c96e6175530eb6d2b',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fendpoint_5fhalt',['CY_USB_DEV_ENDPOINT_HALT',['../group__group__usb__dev__macros.html#gaba6bab4720f6f509e721905f6215a80a',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fendpoint_5fstatus_5fhalt',['CY_USB_DEV_ENDPOINT_STATUS_HALT',['../group__group__usb__dev__macros.html#ga33cf779d2bbb24c0059c7cb3df79e1fd',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fep0_5fpacket_5fsize',['CY_USB_DEV_EP0_PACKET_SIZE',['../group__group__usb__dev__macros.html#gabc727a651f9a6c66a4b9987c292bf165',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fep_5fadaptive',['CY_USB_DEV_EP_ADAPTIVE',['../group__group__usb__dev__macros__device__descr.html#ga677b1d0349824df7bcbd7e458a8affc1',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fasynchronous',['CY_USB_DEV_EP_ASYNCHRONOUS',['../group__group__usb__dev__macros__device__descr.html#gad142a099e4a06a6aedc1e6c444575d56',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fbulk',['CY_USB_DEV_EP_BULK',['../group__group__usb__dev__macros__device__descr.html#gaaf0c1769ca78e4ba876a06cf4911e6e1',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fcontrol',['CY_USB_DEV_EP_CONTROL',['../group__group__usb__dev__macros__device__descr.html#gacad2b37ccebfb8554d595833ecbef75f',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fdata',['CY_USB_DEV_EP_DATA',['../group__group__usb__dev__macros__device__descr.html#gab3cb99752d9d1002ba6ef697de0ee860',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5ffeedback',['CY_USB_DEV_EP_FEEDBACK',['../group__group__usb__dev__macros__device__descr.html#ga434979fcecd7fdca64bc5e811a22ad7c',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fimplicit_5ffeedback',['CY_USB_DEV_EP_IMPLICIT_FEEDBACK',['../group__group__usb__dev__macros__device__descr.html#gae75647f76e250a43080ac182808cde26',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5finterrupt',['CY_USB_DEV_EP_INTERRUPT',['../group__group__usb__dev__macros__device__descr.html#ga826caac6d33bc28ee0478c9d044ba805',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fisochronous',['CY_USB_DEV_EP_ISOCHRONOUS',['../group__group__usb__dev__macros__device__descr.html#gadac2633f0cd73dd4e884599753038bd7',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fno_5fsynchronization',['CY_USB_DEV_EP_NO_SYNCHRONIZATION',['../group__group__usb__dev__macros__device__descr.html#gaaefb29a0307685f1c3d40013cf97bfef',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5fsynchronous',['CY_USB_DEV_EP_SYNCHRONOUS',['../group__group__usb__dev__macros__device__descr.html#ga3c4d8fd11f7f9ba05f688c0f72b8c8c2',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fep_5ftrans_5ftype_5fmask',['CY_USB_DEV_EP_TRANS_TYPE_MASK',['../group__group__usb__dev__macros__device__descr.html#ga2266222ebac21a6a441b06da9f479b09',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fevent_5fbus_5freset',['CY_USB_DEV_EVENT_BUS_RESET',['../group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a21b36d54a1bed713ab5018918bb63247',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fevent_5fset_5fconfig',['CY_USB_DEV_EVENT_SET_CONFIG',['../group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a48cfdb3d0e5adcd2ec3bb4a1ed0be3d1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fevent_5fset_5finterface',['CY_USB_DEV_EVENT_SET_INTERFACE',['../group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a8061ab548dd75281b3538840d1a1616d',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetalternatesettings',['Cy_USB_Dev_GetAlternateSettings',['../group__group__usb__dev__functions__service.html#ga677676df1eda5c90bad152278d66c0cf',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetconfiguration',['Cy_USB_Dev_GetConfiguration',['../group__group__usb__dev__functions__service.html#gabdce652e7c8eb4cf3647dd1557e36822',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetepnumtoread',['Cy_USB_Dev_GetEpNumToRead',['../group__group__usb__dev__functions__data__transfer.html#ga79a6fbd0663556eb7ccc586e6dbe7e4e',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetserialnumberstring',['Cy_USB_Dev_GetSerialNumberString',['../group__group__usb__dev__functions__service.html#gaecedf09db3f4674cb1c37cd93bb80b97',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fhid_5fgetclass',['Cy_USB_Dev_HID_GetClass',['../group__group__usb__dev__hid__functions.html#ga6bd8294cac3ad4c9f3e85bd8a4b9c351',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fgetprotocol',['Cy_USB_Dev_HID_GetProtocol',['../group__group__usb__dev__hid__functions.html#gade5ee4ca8f844a1a7090f6f3ff5a0aea',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5finit',['Cy_USB_Dev_HID_Init',['../group__group__usb__dev__hid__functions.html#ga96ac1be9fe988572712f3111180170bb',1,'Cy_USB_Dev_HID_Init(cy_stc_usb_dev_hid_config_t const *config, cy_stc_usb_dev_hid_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_hid.c'],['../group__group__usb__dev__hid__functions.html#ga96ac1be9fe988572712f3111180170bb',1,'Cy_USB_Dev_HID_Init(cy_stc_usb_dev_hid_config_t const *config, cy_stc_usb_dev_hid_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_hid.c']]], + ['cy_5fusb_5fdev_5fhid_5fprotocol_5fboot',['CY_USB_DEV_HID_PROTOCOL_BOOT',['../group__group__usb__dev__hid__macros.html#gab9f7baea982d40e15cbe9c552a3c2f00',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fprotocol_5freport',['CY_USB_DEV_HID_PROTOCOL_REPORT',['../group__group__usb__dev__hid__macros.html#gac73df8d407149de5d35e826f4ed2d870',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fregistergetreportcallback',['Cy_USB_Dev_HID_RegisterGetReportCallback',['../group__group__usb__dev__hid__functions.html#gaf195bbaa7da5ef81f7dd94f4ff2f94d9',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fregistersetreportcallback',['Cy_USB_Dev_HID_RegisterSetReportCallback',['../group__group__usb__dev__hid__functions.html#ga7986e8977e9d061774af646997f9a6ef',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5freport_5ftype_5ffeature',['CY_USB_DEV_HID_REPORT_TYPE_FEATURE',['../group__group__usb__dev__hid__macros.html#ga2c3c38a02556e3fd3023c331489dba61',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5freport_5ftype_5finput',['CY_USB_DEV_HID_REPORT_TYPE_INPUT',['../group__group__usb__dev__hid__macros.html#gaf90046d27c63c3f3df29b0a80fe270a8',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5freport_5ftype_5foutput',['CY_USB_DEV_HID_REPORT_TYPE_OUTPUT',['../group__group__usb__dev__hid__macros.html#gaa13e7554b88d899fe1aeafa178a25003',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5frqst_5fget_5fidle',['CY_USB_DEV_HID_RQST_GET_IDLE',['../group__group__usb__dev__hid__macros.html#gab5bcc4aa49a9d612c670798ca9b7445f',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5frqst_5fget_5fprotocol',['CY_USB_DEV_HID_RQST_GET_PROTOCOL',['../group__group__usb__dev__hid__macros.html#ga19f7910f6824592454fefdf6e914f22a',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5frqst_5fget_5freport',['CY_USB_DEV_HID_RQST_GET_REPORT',['../group__group__usb__dev__hid__macros.html#ga1e583698917b6492689f97791b48cc2d',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5frqst_5fset_5fidle',['CY_USB_DEV_HID_RQST_SET_IDLE',['../group__group__usb__dev__hid__macros.html#ga61d6cc450774df2493307150295a64c7',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5frqst_5fset_5fprotocol',['CY_USB_DEV_HID_RQST_SET_PROTOCOL',['../group__group__usb__dev__hid__macros.html#ga0dbb9f8be3fce7f6ab14de3d893dc7fc',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5frqst_5fset_5freport',['CY_USB_DEV_HID_RQST_SET_REPORT',['../group__group__usb__dev__hid__macros.html#ga141844f4c4c063845a0398507fbe44c5',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5ftimer_5fexpired',['CY_USB_DEV_HID_TIMER_EXPIRED',['../group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa3803a43c55c6c87e709e9973a384334b',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5ftimer_5findefinite',['CY_USB_DEV_HID_TIMER_INDEFINITE',['../group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa4082df3b2c2a1f57e20aaf5d138902bd',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5ftimer_5frunning',['CY_USB_DEV_HID_TIMER_RUNNING',['../group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa814f17572af01dc8756d5677bd79d065',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fupdatetimer',['Cy_USB_Dev_HID_UpdateTimer',['../group__group__usb__dev__hid__functions.html#gab3344668f13ee59263a7aee62a2dfd5b',1,'Cy_USB_Dev_HID_UpdateTimer(uint32_t interface, uint32_t reportId, cy_stc_usb_dev_hid_context_t *context): cy_usb_dev_hid.c'],['../group__group__usb__dev__hid__functions.html#gab3344668f13ee59263a7aee62a2dfd5b',1,'Cy_USB_Dev_HID_UpdateTimer(uint32_t interface, uint32_t reportId, cy_stc_usb_dev_hid_context_t *context): cy_usb_dev_hid.c']]], + ['cy_5fusb_5fdev_5fid',['CY_USB_DEV_ID',['../group__group__usb__dev__macros.html#ga37c2fedfec7c8f484ea9da326451e65e',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5finit',['Cy_USB_Dev_Init',['../group__group__usb__dev__functions__common.html#ga12b36659b72aa85166e85323eb96e36a',1,'Cy_USB_Dev_Init(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_config const *drvConfig, struct cy_stc_usbfs_dev_drv_context *drvContext, cy_stc_usb_dev_device_t const *device, cy_stc_usb_dev_config_t const *config, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#ga12b36659b72aa85166e85323eb96e36a',1,'Cy_USB_Dev_Init(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_config const *drvConfig, struct cy_stc_usbfs_dev_drv_context *drvContext, cy_stc_usb_dev_device_t const *device, cy_stc_usb_dev_config_t const *config, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5finterface_5fdescr',['CY_USB_DEV_INTERFACE_DESCR',['../group__group__usb__dev__macros__device__descr.html#gaac6149951b3e3a59fcfa3fbed2f3d7da',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5finterface_5fdescr_5flength',['CY_USB_DEV_INTERFACE_DESCR_LENGTH',['../group__group__usb__dev__macros__device__descr.html#ga11b731b67c4fe9500e96404399b1be99',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5finterface_5fpower_5fdescr',['CY_USB_DEV_INTERFACE_POWER_DESCR',['../group__group__usb__dev__macros__device__descr.html#gaf122f5cc627b0d29be470e2f032e2efe',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fisconfigurationchanged',['Cy_USB_Dev_IsConfigurationChanged',['../group__group__usb__dev__functions__service.html#ga9c026e8afd1caf12f3934168bc152a23',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fisremotewakeupenabled',['Cy_USB_Dev_IsRemoteWakeupEnabled',['../group__group__usb__dev__functions__service.html#gaf754fa7ea2f155c05b5fa9b862235a66',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fms_5fos_5fstring_5fext_5fcompat_5fid',['CY_USB_DEV_MS_OS_STRING_EXT_COMPAT_ID',['../group__group__usb__dev__macros__device__descr.html#gafdf1de25518973fbf5e7c0e95c5752c5',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fms_5fos_5fstring_5fext_5fproperteis',['CY_USB_DEV_MS_OS_STRING_EXT_PROPERTEIS',['../group__group__usb__dev__macros__device__descr.html#gae937565e3384ed42401a64dfe92ea0cf',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fmw_5fversion_5fmajor',['CY_USB_DEV_MW_VERSION_MAJOR',['../group__group__usb__dev__macros.html#ga2b1b1ab2182e9a4b865b1d8dccc6a3ff',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fmw_5fversion_5fminor',['CY_USB_DEV_MW_VERSION_MINOR',['../group__group__usb__dev__macros.html#ga7b62e45cc1f37aebbd341652cb9074cd',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fnum_5finterfaces_5fmax',['CY_USB_DEV_NUM_INTERFACES_MAX',['../group__group__usb__dev__macros.html#ga5bfa3f34bf648991801398d8828c5719',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fother_5fspeed_5fcfg_5fdescr',['CY_USB_DEV_OTHER_SPEED_CFG_DESCR',['../group__group__usb__dev__macros__device__descr.html#ga7bcd772381d213a7bd6e2dfd32a762d2',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5foverwritehandletimeout',['Cy_USB_Dev_OverwriteHandleTimeout',['../group__group__usb__dev__functions__data__transfer.html#ga17873db332970f17f9cfa8b7f383c019',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fpowered',['CY_USB_DEV_POWERED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea5de0f6f66b09380698c3d0e6c75b50f3',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5freadepblocking',['Cy_USB_Dev_ReadEpBlocking',['../group__group__usb__dev__functions__data__transfer.html#ga0ffcc053f1154d6f77b1744f7a517ef5',1,'Cy_USB_Dev_ReadEpBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga0ffcc053f1154d6f77b1744f7a517ef5',1,'Cy_USB_Dev_ReadEpBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5freadepnonblocking',['Cy_USB_Dev_ReadEpNonBlocking',['../group__group__usb__dev__functions__data__transfer.html#ga5f3bb59175bd8b46a558b8206d6f9cdf',1,'Cy_USB_Dev_ReadEpNonBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga5f3bb59175bd8b46a558b8206d6f9cdf',1,'Cy_USB_Dev_ReadEpNonBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5frecipient_5fdevice',['CY_USB_DEV_RECIPIENT_DEVICE',['../group__group__usb__dev__macros.html#ga95f44bf292a30cdc5d1b6d4547644b5d',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frecipient_5fendpoint',['CY_USB_DEV_RECIPIENT_ENDPOINT',['../group__group__usb__dev__macros.html#ga698deb13b0e7d758a4385cf8d9d5a578',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frecipient_5finterface',['CY_USB_DEV_RECIPIENT_INTERFACE',['../group__group__usb__dev__macros.html#ga82ff1db5174f6e4e3b85af80d74a6e5e',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frecipient_5fother',['CY_USB_DEV_RECIPIENT_OTHER',['../group__group__usb__dev__macros.html#ga8c0625fa05cedbdb464c86d1183ba048',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclass',['Cy_USB_Dev_RegisterClass',['../group__group__usb__dev__functions__class__support.html#ga7796c2ddd1f1bb389cbad19acdeb5c9a',1,'Cy_USB_Dev_RegisterClass(cy_stc_usb_dev_class_ll_item_t *classItem, cy_stc_usb_dev_class_t *classObj, void *classContext, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__class__support.html#ga7796c2ddd1f1bb389cbad19acdeb5c9a',1,'Cy_USB_Dev_RegisterClass(cy_stc_usb_dev_class_ll_item_t *classItem, cy_stc_usb_dev_class_t *classObj, void *classContext, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fregisterclassbusresetcallback',['Cy_USB_Dev_RegisterClassBusResetCallback',['../group__group__usb__dev__functions__class__support.html#gac6977953928e6da80cf6074f6bc5cc9e',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclassrequestcmpltcallback',['Cy_USB_Dev_RegisterClassRequestCmpltCallback',['../group__group__usb__dev__functions__class__support.html#gab1f754d7b4e60336a6b712e16dde21a8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclassrequestrcvdcallback',['Cy_USB_Dev_RegisterClassRequestRcvdCallback',['../group__group__usb__dev__functions__class__support.html#ga25494add7cc8061b7fb13d3465e94726',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclasssetconfigcallback',['Cy_USB_Dev_RegisterClassSetConfigCallback',['../group__group__usb__dev__functions__class__support.html#gaa51aa8db9df18ffe8f6da8f409b89728',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclasssetinterfacecallback',['Cy_USB_Dev_RegisterClassSetInterfaceCallback',['../group__group__usb__dev__functions__class__support.html#ga573e8f24614508d8db6149dd064a6f1c',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregistereventscallback',['Cy_USB_Dev_RegisterEventsCallback',['../group__group__usb__dev__functions__service.html#gafe853fd59fdb48ef9569953a352768f5',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterserialnumstringcallback',['Cy_USB_Dev_RegisterSerialNumStringCallback',['../group__group__usb__dev__functions__service.html#ga0aff856f8658d08ffcef513eede344b8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregistervendorcallbacks',['Cy_USB_Dev_RegisterVendorCallbacks',['../group__group__usb__dev__functions__vendor__support.html#gad864982cf48ad57727e40d9e9fc3e239',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frequest_5fnot_5fhandled',['CY_USB_DEV_REQUEST_NOT_HANDLED',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa82f79a70755a503f983d9594ee02372a',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5freserved_5ftype',['CY_USB_DEV_RESERVED_TYPE',['../group__group__usb__dev__macros.html#ga4299f5337c6c1450befa3ce512bd0d34',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fclear_5ffeature',['CY_USB_DEV_RQST_CLEAR_FEATURE',['../group__group__usb__dev__macros.html#gaca311c63b5f91ab1056ae113c5ae93f3',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fget_5fconfiguration',['CY_USB_DEV_RQST_GET_CONFIGURATION',['../group__group__usb__dev__macros.html#ga9405e586707adde4511fd708d9bbd65b',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fget_5fdescriptor',['CY_USB_DEV_RQST_GET_DESCRIPTOR',['../group__group__usb__dev__macros.html#ga763dad955e9e9b1d8e4b9d3e97749e5a',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fget_5finterface',['CY_USB_DEV_RQST_GET_INTERFACE',['../group__group__usb__dev__macros.html#ga0bd23c856f3367574d044be56b38ae63',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fget_5fstatus',['CY_USB_DEV_RQST_GET_STATUS',['../group__group__usb__dev__macros.html#ga2976ae12e9a52921c2701524cb5ab08c',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fset_5faddress',['CY_USB_DEV_RQST_SET_ADDRESS',['../group__group__usb__dev__macros.html#gaefdf2cac245b25e4e51f86edb180a1b7',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fset_5fconfiguration',['CY_USB_DEV_RQST_SET_CONFIGURATION',['../group__group__usb__dev__macros.html#ga7f7e7a865760d17846e4ae107d1c182a',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fset_5fdescriptor',['CY_USB_DEV_RQST_SET_DESCRIPTOR',['../group__group__usb__dev__macros.html#gad770816535f47bd9f803848a30a3170a',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fset_5ffeature',['CY_USB_DEV_RQST_SET_FEATURE',['../group__group__usb__dev__macros.html#gaf05a6aad1e0c2b39567a9abe586bed8d',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fset_5finterface',['CY_USB_DEV_RQST_SET_INTERFACE',['../group__group__usb__dev__macros.html#ga2174df8e0243d842093d84de91c86c87',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frqst_5fsynch_5fframe',['CY_USB_DEV_RQST_SYNCH_FRAME',['../group__group__usb__dev__macros.html#ga20ed11e7b8270d284c85831fde68a861',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetpowerstatus',['Cy_USB_Dev_SetPowerStatus',['../group__group__usb__dev__functions__service.html#ga082afaccf8f10762300cfb1c996290fc',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetupcontrolread',['Cy_USB_Dev_SetupControlRead',['../group__group__usb__dev__functions__service.html#ga1308439c2f55fe4bb51386b92ad2ceec',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetupcontrolwrite',['Cy_USB_Dev_SetupControlWrite',['../group__group__usb__dev__functions__service.html#ga2e622f1f37d67dd6d34607f11a961a6f',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetupcontrolwriteresult',['Cy_USB_Dev_SetupControlWriteResult',['../group__group__usb__dev__functions__service.html#gafaec73b3837988a08b02a6b0fde4c5eb',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsn_5fstring_5fdesr_5flength',['CY_USB_DEV_SN_STRING_DESR_LENGTH',['../group__group__usb__dev__macros.html#gaa1bdc5173c5aaca2fa8643497b2812e6',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsn_5fstring_5flength',['CY_USB_DEV_SN_STRING_LENGTH',['../group__group__usb__dev__macros.html#gaf84569a606b766d63e4047552fff85ee',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstandard_5ftype',['CY_USB_DEV_STANDARD_TYPE',['../group__group__usb__dev__macros.html#gada9f6982182b1c05b2541eca5bd7f059',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstartreadep',['Cy_USB_Dev_StartReadEp',['../group__group__usb__dev__functions__data__transfer.html#ga87f178d2a65510bd26dff4ee5d2c06ab',1,'Cy_USB_Dev_StartReadEp(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga87f178d2a65510bd26dff4ee5d2c06ab',1,'Cy_USB_Dev_StartReadEp(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fstatus_5fbus_5fpowered',['CY_USB_DEV_STATUS_BUS_POWERED',['../group__group__usb__dev__enums.html#gga24aecb8903fe9acea9c3fac59379684aaaa62c52051f379e36e6163dcb4d01c9f',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstatus_5fself_5fpowered',['CY_USB_DEV_STATUS_SELF_POWERED',['../group__group__usb__dev__enums.html#gga24aecb8903fe9acea9c3fac59379684aaafddb94fc7cb2cf0a20aac8d539b7926',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstring_5fdescr',['CY_USB_DEV_STRING_DESCR',['../group__group__usb__dev__macros__device__descr.html#ga71ff6a3e4f22161ada7bbc55378241c2',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fstring_5fdescr_5flang_5fid_5flength',['CY_USB_DEV_STRING_DESCR_LANG_ID_LENGTH',['../group__group__usb__dev__macros__device__descr.html#ga2ae3f4f4b10186d809915da92b52427b',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fsuccess',['CY_USB_DEV_SUCCESS',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafabf8d747d814384b26bf7e65e59648744',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5ftest_5fmode',['CY_USB_DEV_TEST_MODE',['../group__group__usb__dev__macros.html#ga4fcb9f7053bfedbc87703649541ac980',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5ftimeout',['CY_USB_DEV_TIMEOUT',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa8269becd3832e1c2b452c4e6ac69f4a1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fusb_5fversion_5f2_5f0',['CY_USB_DEV_USB_VERSION_2_0',['../group__group__usb__dev__macros__device__descr.html#ga9659150258f1cc740fc125a2dd912f9a',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fusb_5fversion_5f2_5f1',['CY_USB_DEV_USB_VERSION_2_1',['../group__group__usb__dev__macros__device__descr.html#gad5ae19a1edf585ebd4588a7e9714f7fc',1,'cy_usb_dev_descr.h']]], + ['cy_5fusb_5fdev_5fvendor_5ftype',['CY_USB_DEV_VENDOR_TYPE',['../group__group__usb__dev__macros.html#gaefe1b57cab648a9d5675417adcea7406',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fwait_5fforever',['CY_USB_DEV_WAIT_FOREVER',['../group__group__usb__dev__macros.html#gad8a978b86bb53dd8e46d9f9db9399ee8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fwriteepblocking',['Cy_USB_Dev_WriteEpBlocking',['../group__group__usb__dev__functions__data__transfer.html#ga1bf916540d58d458568b2eed1a186df4',1,'Cy_USB_Dev_WriteEpBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga1bf916540d58d458568b2eed1a186df4',1,'Cy_USB_Dev_WriteEpBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fwriteepnonblocking',['Cy_USB_Dev_WriteEpNonBlocking',['../group__group__usb__dev__functions__data__transfer.html#gafca5c6c661b90572a5278322b0773ba6',1,'Cy_USB_Dev_WriteEpNonBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#gafca5c6c661b90572a5278322b0773ba6',1,'Cy_USB_Dev_WriteEpNonBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cdc_20class',['CDC Class',['../group__group__usb__dev__cdc.html',1,'']]], + ['class_20support_20functions',['Class Support Functions',['../group__group__usb__dev__functions__class__support.html',1,'']]], + ['class_20support',['Class Support',['../group__group__usb__dev__structures__class.html',1,'']]], + ['control_20transfer',['Control Transfer',['../group__group__usb__dev__structures__control.html',1,'']]], + ['cypress_20usb_20device_20middleware_20library_202_2e0',['Cypress USB Device Middleware Library 2.0',['../index.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_3.html b/docs/usbfs_dev_api_reference_manual/html/search/all_3.html new file mode 100644 index 0000000..03405c0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_3.js b/docs/usbfs_dev_api_reference_manual/html/search/all_3.js new file mode 100644 index 0000000..727be61 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_3.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['devicedescriptor',['deviceDescriptor',['../structcy__stc__usb__dev__device__t.html#a685c419bd8298dc6715cd133e975be5d',1,'cy_stc_usb_dev_device_t']]], + ['direction',['direction',['../structcy__stc__usb__dev__bm__request.html#a8cbda434a4858f6bcbc1afa2eda2f2cd',1,'cy_stc_usb_dev_bm_request::direction()'],['../structcy__stc__usb__dev__control__transfer__t.html#a9c8f84635ed0847187969f097179e85f',1,'cy_stc_usb_dev_control_transfer_t::direction()']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__audio__data__structures.html',1,'']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__cdc__data__structures.html',1,'']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__data__structures.html',1,'']]], + ['data_20transfer_20functions',['Data Transfer Functions',['../group__group__usb__dev__functions__data__transfer.html',1,'']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__hid__data__structures.html',1,'']]], + ['descriptors',['Descriptors',['../group__group__usb__dev__macros__device__descr.html',1,'']]], + ['device_20information',['Device Information',['../group__group__usb__dev__structures__device.html',1,'']]], + ['device_20descriptors',['Device Descriptors',['../group__group__usb__dev__structures__device__descr.html',1,'']]], + ['device',['Device',['../group__group__usb__device.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_4.html b/docs/usbfs_dev_api_reference_manual/html/search/all_4.html new file mode 100644 index 0000000..8e1f4b9 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_4.js b/docs/usbfs_dev_api_reference_manual/html/search/all_4.js new file mode 100644 index 0000000..6d59855 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_4.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['enablewindowsosdescriptor',['enableWindowsOsDescriptor',['../structcy__stc__usb__dev__string__t.html#a02e123dfb487a9e22fe716e374f3bc73',1,'cy_stc_usb_dev_string_t']]], + ['endpointdescriptor',['endpointDescriptor',['../structcy__stc__usb__dev__endpoint__t.html#ae9d4c2900e45fccbbe3eb56a7fcbf0f0',1,'cy_stc_usb_dev_endpoint_t']]], + ['endpoints',['endpoints',['../structcy__stc__usb__dev__alternate__t.html#a3fe8acef267c90b9071112b651f34ae1',1,'cy_stc_usb_dev_alternate_t']]], + ['endpointsmask',['endpointsMask',['../structcy__stc__usb__dev__interface__t.html#a8415563edb976c4ae2d7c93743182a10',1,'cy_stc_usb_dev_interface_t']]], + ['ep0buffer',['ep0Buffer',['../structcy__stc__usb__dev__config__t.html#a7adc52048bd8d3e28786b1d6348fc789',1,'cy_stc_usb_dev_config_t']]], + ['ep0buffersize',['ep0BufferSize',['../structcy__stc__usb__dev__config__t.html#a50c257d5b2319ed93596121084293db6',1,'cy_stc_usb_dev_config_t']]], + ['extcompatiddescriptor',['extCompatIdDescriptor',['../structcy__stc__usb__dev__ms__os__string__t.html#aa129d3d88701b9cbaf057be63ffc6a25',1,'cy_stc_usb_dev_ms_os_string_t']]], + ['extpropertiesdescriptor',['extPropertiesDescriptor',['../structcy__stc__usb__dev__ms__os__string__t.html#a4987b03af76a60ba4181fa6f0d393f2c',1,'cy_stc_usb_dev_ms_os_string_t']]], + ['enumerated_20types',['Enumerated Types',['../group__group__usb__dev__cdc__enums.html',1,'']]], + ['enumerated_20types',['Enumerated Types',['../group__group__usb__dev__enums.html',1,'']]], + ['enumerated_20types',['Enumerated Types',['../group__group__usb__dev__hid__enums.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_5.html b/docs/usbfs_dev_api_reference_manual/html/search/all_5.html new file mode 100644 index 0000000..89a879e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_5.js b/docs/usbfs_dev_api_reference_manual/html/search/all_5.js new file mode 100644 index 0000000..4fe48e4 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['functions',['Functions',['../group__group__usb__dev__audio__functions.html',1,'']]], + ['functions',['Functions',['../group__group__usb__dev__cdc__functions.html',1,'']]], + ['functions',['Functions',['../group__group__usb__dev__functions.html',1,'']]], + ['functions',['Functions',['../group__group__usb__dev__hid__functions.html',1,'']]], + ['function_20pointers',['Function Pointers',['../group__group__usb__dev__structures__func__ptr.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_6.html b/docs/usbfs_dev_api_reference_manual/html/search/all_6.html new file mode 100644 index 0000000..6afac06 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_6.js b/docs/usbfs_dev_api_reference_manual/html/search/all_6.js new file mode 100644 index 0000000..e773656 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['hid_20class',['HID Class',['../group__group__usb__dev__hid.html',1,'']]], + ['hid',['hid',['../structcy__stc__usb__dev__alternate__t.html#a795a71c8dbc0452ad693edf2ea29a939',1,'cy_stc_usb_dev_alternate_t']]], + ['hiddescriptor',['hidDescriptor',['../structcy__stc__usb__dev__hid__t.html#a926e62d147abf63ad183d7892b051d78',1,'cy_stc_usb_dev_hid_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_7.html b/docs/usbfs_dev_api_reference_manual/html/search/all_7.html new file mode 100644 index 0000000..de19107 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_7.js b/docs/usbfs_dev_api_reference_manual/html/search/all_7.js new file mode 100644 index 0000000..37e6cd0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_7.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['initialization_20functions',['Initialization Functions',['../group__group__usb__dev__functions__common.html',1,'']]], + ['iconfiguration',['iConfiguration',['../structcy__stc__usbdev__config__descr__t.html#ac2e058ba9bf10e7609d6ec7ad2acb338',1,'cy_stc_usbdev_config_descr_t']]], + ['idproduct',['idProduct',['../structcy__stc__usbdev__device__descr__t.html#afa761db25b797feb1aba98a02c5e27a3',1,'cy_stc_usbdev_device_descr_t']]], + ['idvendor',['idVendor',['../structcy__stc__usbdev__device__descr__t.html#abbc0f9e538526d6e3b1945275418d1cc',1,'cy_stc_usbdev_device_descr_t']]], + ['iinterface',['iInterface',['../structcy__stc__usbdev__interface__descr__t.html#a4776c5bec4daa50f11789c9879c8cb8a',1,'cy_stc_usbdev_interface_descr_t']]], + ['imanufacturer',['iManufacturer',['../structcy__stc__usbdev__device__descr__t.html#a61f92b9a09bc8729c445cd11a7c4951a',1,'cy_stc_usbdev_device_descr_t']]], + ['inputreportidx',['inputReportIdx',['../structcy__stc__usb__dev__hid__t.html#af5bacc172028ab6342ef2e7a24bbadb5',1,'cy_stc_usb_dev_hid_t']]], + ['inputreportidxsize',['inputReportIdxSize',['../structcy__stc__usb__dev__hid__t.html#aa1a4adec2e0033e4ac18683bd11c19bb',1,'cy_stc_usb_dev_hid_t']]], + ['inputreportpos',['inputReportPos',['../structcy__stc__usb__dev__hid__t.html#a67be9900d3911f977019e54b906ae8cb',1,'cy_stc_usb_dev_hid_t']]], + ['interfacedescriptor',['interfaceDescriptor',['../structcy__stc__usb__dev__alternate__t.html#ad9a20b7d91d73ee6a4cbaf72694a0ecc',1,'cy_stc_usb_dev_alternate_t']]], + ['interfaces',['interfaces',['../structcy__stc__usb__dev__configuration__t.html#a84e2ae881e023b0719437251db69ee3c',1,'cy_stc_usb_dev_configuration_t']]], + ['iproduct',['iProduct',['../structcy__stc__usbdev__device__descr__t.html#a0a48ffc9d33d53a530adef55bf139ee0',1,'cy_stc_usbdev_device_descr_t']]], + ['iserialnumber',['iSerialNumber',['../structcy__stc__usbdev__device__descr__t.html#a01e1fc974ba95d20cb473298ae976d3f',1,'cy_stc_usbdev_device_descr_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_8.html b/docs/usbfs_dev_api_reference_manual/html/search/all_8.html new file mode 100644 index 0000000..11e27cd --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_8.js b/docs/usbfs_dev_api_reference_manual/html/search/all_8.js new file mode 100644 index 0000000..23dc39f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_8.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['macros',['Macros',['../group__group__usb__dev__audio__macros.html',1,'']]], + ['macros',['Macros',['../group__group__usb__dev__cdc__macros.html',1,'']]], + ['macros',['Macros',['../group__group__usb__dev__hid__macros.html',1,'']]], + ['macros',['Macros',['../group__group__usb__dev__macros.html',1,'']]], + ['msosdescriptor',['msOsDescriptor',['../structcy__stc__usb__dev__ms__os__string__t.html#a228033f20928ae1f1744757daf98ad14',1,'cy_stc_usb_dev_ms_os_string_t']]], + ['msvendorcode',['msVendorCode',['../structcy__stc__usb__dev__ms__os__string__t.html#a1a964ea38ee9a11d162ff44fcce0b6c7',1,'cy_stc_usb_dev_ms_os_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_9.html b/docs/usbfs_dev_api_reference_manual/html/search/all_9.html new file mode 100644 index 0000000..f8abbbe --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_9.js b/docs/usbfs_dev_api_reference_manual/html/search/all_9.js new file mode 100644 index 0000000..76fab55 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_9.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['next',['next',['../structcy__stc__usb__dev__class__ll__item__t.html#a466e1619be2ddc3d8349a22b54f750f6',1,'cy_stc_usb_dev_class_ll_item_t']]], + ['notify',['notify',['../structcy__stc__usb__dev__control__transfer__t.html#a504cb022673eaec9d7e05cd8783c916e',1,'cy_stc_usb_dev_control_transfer_t']]], + ['numalternates',['numAlternates',['../structcy__stc__usb__dev__interface__t.html#aa916744fe431cf674283079749baf38a',1,'cy_stc_usb_dev_interface_t']]], + ['numconfigurations',['numConfigurations',['../structcy__stc__usb__dev__device__t.html#ad49158f747f355b4ecaa2a5795fd89f5',1,'cy_stc_usb_dev_device_t']]], + ['numendpoints',['numEndpoints',['../structcy__stc__usb__dev__alternate__t.html#a8563b62feb70137fcb51627e72104e64',1,'cy_stc_usb_dev_alternate_t']]], + ['numinputreports',['numInputReports',['../structcy__stc__usb__dev__hid__t.html#a8dce054b73e15149cc2122f52a877f47',1,'cy_stc_usb_dev_hid_t']]], + ['numinterfaces',['numInterfaces',['../structcy__stc__usb__dev__configuration__t.html#a19e2848efee55af859e8c7de5e10e156',1,'cy_stc_usb_dev_configuration_t']]], + ['numstrings',['numStrings',['../structcy__stc__usb__dev__string__t.html#af614fbdb115198cdee79fa47bfc1f8e5',1,'cy_stc_usb_dev_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_a.html b/docs/usbfs_dev_api_reference_manual/html/search/all_a.html new file mode 100644 index 0000000..9601fce --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_a.js b/docs/usbfs_dev_api_reference_manual/html/search/all_a.js new file mode 100644 index 0000000..c2d3df9 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['osstringdescriptors',['osStringDescriptors',['../structcy__stc__usb__dev__string__t.html#abb5c17aa695bc35907fe957e9c6a0044',1,'cy_stc_usb_dev_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_b.html b/docs/usbfs_dev_api_reference_manual/html/search/all_b.html new file mode 100644 index 0000000..0814e4e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_b.js b/docs/usbfs_dev_api_reference_manual/html/search/all_b.js new file mode 100644 index 0000000..ba1891e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ptr',['ptr',['../structcy__stc__usb__dev__control__transfer__t.html#a2d7d027a0888f204f958a9a71e11dafb',1,'cy_stc_usb_dev_control_transfer_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_c.html b/docs/usbfs_dev_api_reference_manual/html/search/all_c.html new file mode 100644 index 0000000..da08c38 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_c.js b/docs/usbfs_dev_api_reference_manual/html/search/all_c.js new file mode 100644 index 0000000..2a76bfa --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_c.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['recipient',['recipient',['../structcy__stc__usb__dev__bm__request.html#a089186e8e7b77af303b6a96d078f264a',1,'cy_stc_usb_dev_bm_request']]], + ['remaining',['remaining',['../structcy__stc__usb__dev__control__transfer__t.html#af7f3075f7c992d51b94012e82826a334',1,'cy_stc_usb_dev_control_transfer_t']]], + ['reportdescriptor',['reportDescriptor',['../structcy__stc__usb__dev__hid__t.html#a99129f9cbbd9a2ecdab10f490a85942c',1,'cy_stc_usb_dev_hid_t']]], + ['reportdescriptorsize',['reportDescriptorSize',['../structcy__stc__usb__dev__hid__t.html#a6e958dec1a35a4b54691572374adc217',1,'cy_stc_usb_dev_hid_t']]], + ['requestcompleted',['requestCompleted',['../structcy__stc__usb__dev__class__t.html#af498868795ad7fdc5da2cf4e2949b6bd',1,'cy_stc_usb_dev_class_t']]], + ['requestreceived',['requestReceived',['../structcy__stc__usb__dev__class__t.html#ab580b6b05e25a1fc43040c2b42540465',1,'cy_stc_usb_dev_class_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_d.html b/docs/usbfs_dev_api_reference_manual/html/search/all_d.html new file mode 100644 index 0000000..9986c9c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_d.js b/docs/usbfs_dev_api_reference_manual/html/search/all_d.js new file mode 100644 index 0000000..989d756 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_d.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['service_20functions',['Service Functions',['../group__group__usb__dev__functions__service.html',1,'']]], + ['setconfiguration',['setConfiguration',['../structcy__stc__usb__dev__class__t.html#ad460bded0f5dc7fab26727c9a4302137',1,'cy_stc_usb_dev_class_t']]], + ['setinterface',['setInterface',['../structcy__stc__usb__dev__class__t.html#a0f4844f6f51206be703add0ff1eaa2ac',1,'cy_stc_usb_dev_class_t']]], + ['setup',['setup',['../structcy__stc__usb__dev__control__transfer__t.html#af38eb6ea917b51d00f4840bc0a18f854',1,'cy_stc_usb_dev_control_transfer_t']]], + ['size',['size',['../structcy__stc__usb__dev__control__transfer__t.html#a80311bdcebd3f0e0f3508aee417f3a04',1,'cy_stc_usb_dev_control_transfer_t']]], + ['stringdescriptors',['stringDescriptors',['../structcy__stc__usb__dev__string__t.html#a3ecf7701b1b97b3a1f5bd859211e376d',1,'cy_stc_usb_dev_string_t']]], + ['strings',['strings',['../structcy__stc__usb__dev__device__t.html#a62bd21476cfd2035c8ce6e82c5b554ca',1,'cy_stc_usb_dev_device_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_e.html b/docs/usbfs_dev_api_reference_manual/html/search/all_e.html new file mode 100644 index 0000000..9fa42bb --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_e.js b/docs/usbfs_dev_api_reference_manual/html/search/all_e.js new file mode 100644 index 0000000..957f281 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_e.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['timers',['timers',['../structcy__stc__usb__dev__hid__config__t.html#a5b7720207db9a5910233571b7ede35e6',1,'cy_stc_usb_dev_hid_config_t']]], + ['timersnum',['timersNum',['../structcy__stc__usb__dev__hid__config__t.html#a6fcb3f02d21b149099457fa2d74a9471',1,'cy_stc_usb_dev_hid_config_t']]], + ['type',['type',['../structcy__stc__usb__dev__bm__request.html#a0cc454375f0c545389782837320fb608',1,'cy_stc_usb_dev_bm_request']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_f.html b/docs/usbfs_dev_api_reference_manual/html/search/all_f.html new file mode 100644 index 0000000..6ecfc0e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/all_f.js b/docs/usbfs_dev_api_reference_manual/html/search/all_f.js new file mode 100644 index 0000000..f2d492a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/all_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vendor_20request_20support_20functions',['Vendor Request Support Functions',['../group__group__usb__dev__functions__vendor__support.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/classes_0.html b/docs/usbfs_dev_api_reference_manual/html/search/classes_0.html new file mode 100644 index 0000000..1c3e406 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/classes_0.js b/docs/usbfs_dev_api_reference_manual/html/search/classes_0.js new file mode 100644 index 0000000..7d54efc --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/classes_0.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['cy_5fstc_5fusb_5fdev_5falternate_5ft',['cy_stc_usb_dev_alternate_t',['../structcy__stc__usb__dev__alternate__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5faudio_5fcontext_5ft',['cy_stc_usb_dev_audio_context_t',['../structcy__stc__usb__dev__audio__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fbm_5frequest',['cy_stc_usb_dev_bm_request',['../structcy__stc__usb__dev__bm__request.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcdc_5fconfig_5ft',['cy_stc_usb_dev_cdc_config_t',['../structcy__stc__usb__dev__cdc__config__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcdc_5fcontext_5ft',['cy_stc_usb_dev_cdc_context_t',['../structcy__stc__usb__dev__cdc__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fclass_5fll_5fitem_5ft',['cy_stc_usb_dev_class_ll_item_t',['../structcy__stc__usb__dev__class__ll__item__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fclass_5ft',['cy_stc_usb_dev_class_t',['../structcy__stc__usb__dev__class__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fconfig_5ft',['cy_stc_usb_dev_config_t',['../structcy__stc__usb__dev__config__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fconfiguration_5ft',['cy_stc_usb_dev_configuration_t',['../structcy__stc__usb__dev__configuration__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcontext_5ft',['cy_stc_usb_dev_context_t',['../structcy__stc__usb__dev__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fcontrol_5ftransfer_5ft',['cy_stc_usb_dev_control_transfer_t',['../structcy__stc__usb__dev__control__transfer__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fdevice_5ft',['cy_stc_usb_dev_device_t',['../structcy__stc__usb__dev__device__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fendpoint_5ft',['cy_stc_usb_dev_endpoint_t',['../structcy__stc__usb__dev__endpoint__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fhid_5fconfig_5ft',['cy_stc_usb_dev_hid_config_t',['../structcy__stc__usb__dev__hid__config__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fhid_5fcontext_5ft',['cy_stc_usb_dev_hid_context_t',['../structcy__stc__usb__dev__hid__context__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fhid_5ft',['cy_stc_usb_dev_hid_t',['../structcy__stc__usb__dev__hid__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5finterface_5ft',['cy_stc_usb_dev_interface_t',['../structcy__stc__usb__dev__interface__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fms_5fos_5fstring_5ft',['cy_stc_usb_dev_ms_os_string_t',['../structcy__stc__usb__dev__ms__os__string__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fsetup_5fpacket_5ft',['cy_stc_usb_dev_setup_packet_t',['../structcy__stc__usb__dev__setup__packet__t.html',1,'']]], + ['cy_5fstc_5fusb_5fdev_5fstring_5ft',['cy_stc_usb_dev_string_t',['../structcy__stc__usb__dev__string__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5fconfig_5fdescr_5ft',['cy_stc_usbdev_config_descr_t',['../structcy__stc__usbdev__config__descr__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5fdevice_5fdescr_5ft',['cy_stc_usbdev_device_descr_t',['../structcy__stc__usbdev__device__descr__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5fendpoint_5fdescr_5ft',['cy_stc_usbdev_endpoint_descr_t',['../structcy__stc__usbdev__endpoint__descr__t.html',1,'']]], + ['cy_5fstc_5fusbdev_5finterface_5fdescr_5ft',['cy_stc_usbdev_interface_descr_t',['../structcy__stc__usbdev__interface__descr__t.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/close.png b/docs/usbfs_dev_api_reference_manual/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/search/close.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/search/enums_0.html b/docs/usbfs_dev_api_reference_manual/html/search/enums_0.html new file mode 100644 index 0000000..ee343ac --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/enums_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/enums_0.js b/docs/usbfs_dev_api_reference_manual/html/search/enums_0.js new file mode 100644 index 0000000..b55e9ee --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/enums_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['cy_5fen_5fusb_5fdev_5fcallback_5fevents_5ft',['cy_en_usb_dev_callback_events_t',['../group__group__usb__dev__enums.html#gad38a8a2002a67f7b109d6beaa20ceb98',1,'cy_usb_dev.h']]], + ['cy_5fen_5fusb_5fdev_5fcdc_5fparity_5ftype_5ft',['cy_en_usb_dev_cdc_parity_type_t',['../group__group__usb__dev__cdc__enums.html#ga513d1e722ab8286e63edd57411367730',1,'cy_usb_dev_cdc.h']]], + ['cy_5fen_5fusb_5fdev_5fcdc_5fstop_5fbit_5ft',['cy_en_usb_dev_cdc_stop_bit_t',['../group__group__usb__dev__cdc__enums.html#gac6c77b9a53c97772dc7c036ef7f5d4c4',1,'cy_usb_dev_cdc.h']]], + ['cy_5fen_5fusb_5fdev_5fhid_5ftimer_5fstate_5ft',['cy_en_usb_dev_hid_timer_state_t',['../group__group__usb__dev__hid__enums.html#ga4603043f111ffa28cd992b33bf067bdf',1,'cy_usb_dev_hid.h']]], + ['cy_5fen_5fusb_5fdev_5fpower_5fstatus_5ft',['cy_en_usb_dev_power_status_t',['../group__group__usb__dev__enums.html#ga24aecb8903fe9acea9c3fac59379684a',1,'cy_usb_dev.h']]], + ['cy_5fen_5fusb_5fdev_5fstate_5ft',['cy_en_usb_dev_state_t',['../group__group__usb__dev__enums.html#ga8031906d685904649e67faaee7810dbe',1,'cy_usb_dev.h']]], + ['cy_5fen_5fusb_5fdev_5fstatus_5ft',['cy_en_usb_dev_status_t',['../group__group__usb__dev__enums.html#ga143c13515bfded27b9dc5ebc18d4cdaf',1,'cy_usb_dev.h']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/enumvalues_0.html b/docs/usbfs_dev_api_reference_manual/html/search/enumvalues_0.html new file mode 100644 index 0000000..9387b6a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/enumvalues_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/enumvalues_0.js b/docs/usbfs_dev_api_reference_manual/html/search/enumvalues_0.js new file mode 100644 index 0000000..822c18f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/enumvalues_0.js @@ -0,0 +1,32 @@ +var searchData= +[ + ['cy_5fusb_5fdev_5faddressed',['CY_USB_DEV_ADDRESSED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbead8bbade2aea08c1df601dacd32fbf1e1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fattached',['CY_USB_DEV_ATTACHED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea41b95a6a9fa14b807ff0c86c2273b086',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fbad_5fparam',['CY_USB_DEV_BAD_PARAM',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa2b72ad2fd19c7d4fe00ac0152e55f7b8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5feven',['CY_USB_DEV_CDC_PARITY_EVEN',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a748995c6c8381feaa26335d14af303eb',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fmark',['CY_USB_DEV_CDC_PARITY_MARK',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730ae82e5ee3abd6103dee0efaefb08a7dd6',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fnone',['CY_USB_DEV_CDC_PARITY_NONE',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730aaa24a5d6d89c9d152eacc8a05bc59e36',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fodd',['CY_USB_DEV_CDC_PARITY_ODD',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a9af9099cffad91c5bcf469f05d7636c7',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fparity_5fspace',['CY_USB_DEV_CDC_PARITY_SPACE',['../group__group__usb__dev__cdc__enums.html#gga513d1e722ab8286e63edd57411367730a9ee439c9ae803731e2e83b498ec40fdd',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fstopbit_5f1',['CY_USB_DEV_CDC_STOPBIT_1',['../group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4a9f3c81b61d6053313dbd1ae5732e2966',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fstopbits_5f1_5f5',['CY_USB_DEV_CDC_STOPBITS_1_5',['../group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4af7f26d666bbcfca22e735f431fb4f71e',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fstopbits_5f2',['CY_USB_DEV_CDC_STOPBITS_2',['../group__group__usb__dev__cdc__enums.html#ggac6c77b9a53c97772dc7c036ef7f5d4c4a969e21fef8f69138b6bc22c8bd0a17a2',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fconfigured',['CY_USB_DEV_CONFIGURED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea3549813ede03d96bed9febadf9e80fe4',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdefault',['CY_USB_DEV_DEFAULT',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea12d4040ced408fd8cc40d95665e402e6',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdisabled',['CY_USB_DEV_DISABLED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbeac593d58ec7f0f3702b5ea09776e8bfb1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdrv_5fhw_5fbusy',['CY_USB_DEV_DRV_HW_BUSY',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafaed025de81754aa5e5d7629dc9b937265',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdrv_5fhw_5fdisabled',['CY_USB_DEV_DRV_HW_DISABLED',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa0991f7a73dd697d482b9e0d3d4411524',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fdrv_5fhw_5ferror',['CY_USB_DEV_DRV_HW_ERROR',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa9ffa2df4a2f20a453e4361b50fc33c95',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fevent_5fbus_5freset',['CY_USB_DEV_EVENT_BUS_RESET',['../group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a21b36d54a1bed713ab5018918bb63247',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fevent_5fset_5fconfig',['CY_USB_DEV_EVENT_SET_CONFIG',['../group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a48cfdb3d0e5adcd2ec3bb4a1ed0be3d1',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fevent_5fset_5finterface',['CY_USB_DEV_EVENT_SET_INTERFACE',['../group__group__usb__dev__enums.html#ggad38a8a2002a67f7b109d6beaa20ceb98a8061ab548dd75281b3538840d1a1616d',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fhid_5ftimer_5fexpired',['CY_USB_DEV_HID_TIMER_EXPIRED',['../group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa3803a43c55c6c87e709e9973a384334b',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5ftimer_5findefinite',['CY_USB_DEV_HID_TIMER_INDEFINITE',['../group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa4082df3b2c2a1f57e20aaf5d138902bd',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5ftimer_5frunning',['CY_USB_DEV_HID_TIMER_RUNNING',['../group__group__usb__dev__hid__enums.html#gga4603043f111ffa28cd992b33bf067bdfa814f17572af01dc8756d5677bd79d065',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fpowered',['CY_USB_DEV_POWERED',['../group__group__usb__dev__enums.html#gga8031906d685904649e67faaee7810dbea5de0f6f66b09380698c3d0e6c75b50f3',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5frequest_5fnot_5fhandled',['CY_USB_DEV_REQUEST_NOT_HANDLED',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa82f79a70755a503f983d9594ee02372a',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstatus_5fbus_5fpowered',['CY_USB_DEV_STATUS_BUS_POWERED',['../group__group__usb__dev__enums.html#gga24aecb8903fe9acea9c3fac59379684aaaa62c52051f379e36e6163dcb4d01c9f',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstatus_5fself_5fpowered',['CY_USB_DEV_STATUS_SELF_POWERED',['../group__group__usb__dev__enums.html#gga24aecb8903fe9acea9c3fac59379684aaafddb94fc7cb2cf0a20aac8d539b7926',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsuccess',['CY_USB_DEV_SUCCESS',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafabf8d747d814384b26bf7e65e59648744',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5ftimeout',['CY_USB_DEV_TIMEOUT',['../group__group__usb__dev__enums.html#gga143c13515bfded27b9dc5ebc18d4cdafa8269becd3832e1c2b452c4e6ac69f4a1',1,'cy_usb_dev.h']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/functions_0.html b/docs/usbfs_dev_api_reference_manual/html/search/functions_0.html new file mode 100644 index 0000000..4e6d87d --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/functions_0.js b/docs/usbfs_dev_api_reference_manual/html/search/functions_0.js new file mode 100644 index 0000000..b27c3c3 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/functions_0.js @@ -0,0 +1,63 @@ +var searchData= +[ + ['cy_5fusb_5fdev_5faborteptransfer',['Cy_USB_Dev_AbortEpTransfer',['../group__group__usb__dev__functions__data__transfer.html#gafe804a021cfbea888a966b8cf1b4172e',1,'Cy_USB_Dev_AbortEpTransfer(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#gafe804a021cfbea888a966b8cf1b4172e',1,'Cy_USB_Dev_AbortEpTransfer(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5faudio_5fgetclass',['Cy_USB_Dev_Audio_GetClass',['../group__group__usb__dev__audio__functions.html#gaaf4652c2f5f74568dd67a23df6918bd8',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5faudio_5finit',['Cy_USB_Dev_Audio_Init',['../group__group__usb__dev__audio__functions.html#ga8224694c94d72e5c3e2d717bd3a70f3c',1,'Cy_USB_Dev_Audio_Init(void const *config, cy_stc_usb_dev_audio_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_audio.c'],['../group__group__usb__dev__audio__functions.html#ga8224694c94d72e5c3e2d717bd3a70f3c',1,'Cy_USB_Dev_Audio_Init(void const *config, cy_stc_usb_dev_audio_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_audio.c']]], + ['cy_5fusb_5fdev_5faudio_5fregisterusercallback',['Cy_USB_Dev_Audio_RegisterUserCallback',['../group__group__usb__dev__audio__functions.html#ga8293f60d0ba564a94b6afdf3175a3efb',1,'cy_usb_dev_audio.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetall',['Cy_USB_Dev_CDC_GetAll',['../group__group__usb__dev__cdc__functions.html#gacdc33492311cc4ec24e33092506b5a18',1,'Cy_USB_Dev_CDC_GetAll(uint32_t port, uint8_t *buffer, uint32_t maxSize, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#gacdc33492311cc4ec24e33092506b5a18',1,'Cy_USB_Dev_CDC_GetAll(uint32_t port, uint8_t *buffer, uint32_t maxSize, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetchar',['Cy_USB_Dev_CDC_GetChar',['../group__group__usb__dev__cdc__functions.html#ga670d1ffa870d18999d74f78e043f3356',1,'Cy_USB_Dev_CDC_GetChar(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga670d1ffa870d18999d74f78e043f3356',1,'Cy_USB_Dev_CDC_GetChar(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetcharformat',['Cy_USB_Dev_CDC_GetCharFormat',['../group__group__usb__dev__cdc__functions.html#gaec69e84dbc1b2f007602f889f51f27c5',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetclass',['Cy_USB_Dev_CDC_GetClass',['../group__group__usb__dev__cdc__functions.html#ga80dba44dfc5e6b5a3edd332a44aa888d',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetcount',['Cy_USB_Dev_CDC_GetCount',['../group__group__usb__dev__cdc__functions.html#gacd239d3d29fc08657fab51ab61ebf0bf',1,'Cy_USB_Dev_CDC_GetCount(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#gacd239d3d29fc08657fab51ab61ebf0bf',1,'Cy_USB_Dev_CDC_GetCount(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetdata',['Cy_USB_Dev_CDC_GetData',['../group__group__usb__dev__cdc__functions.html#ga3dc0c8a65af938773ad7a69eeec21be3',1,'Cy_USB_Dev_CDC_GetData(uint32_t port, uint8_t *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga3dc0c8a65af938773ad7a69eeec21be3',1,'Cy_USB_Dev_CDC_GetData(uint32_t port, uint8_t *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetdatabits',['Cy_USB_Dev_CDC_GetDataBits',['../group__group__usb__dev__cdc__functions.html#ga6b5a76c52e41f690871dc3c34cb92652',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetdterate',['Cy_USB_Dev_CDC_GetDTERate',['../group__group__usb__dev__cdc__functions.html#ga991b2f9afdfdda786a25dfbf3719c8f0',1,'Cy_USB_Dev_CDC_GetDTERate(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga991b2f9afdfdda786a25dfbf3719c8f0',1,'Cy_USB_Dev_CDC_GetDTERate(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fgetlinecontrol',['Cy_USB_Dev_CDC_GetLineControl',['../group__group__usb__dev__cdc__functions.html#gaef1d41dadbebd22e50867b588fe8de36',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetparity',['Cy_USB_Dev_CDC_GetParity',['../group__group__usb__dev__cdc__functions.html#ga5d0919faa039954d9ad813937cf8a535',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fgetserialstate',['Cy_USB_Dev_CDC_GetSerialState',['../group__group__usb__dev__cdc__functions.html#ga10abe615bf61bb37382be268d53d1b55',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5finit',['Cy_USB_Dev_CDC_Init',['../group__group__usb__dev__cdc__functions.html#ga674860e659c0f23538a9f6c11e64b03a',1,'Cy_USB_Dev_CDC_Init(cy_stc_usb_dev_cdc_config_t const *config, cy_stc_usb_dev_cdc_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga674860e659c0f23538a9f6c11e64b03a',1,'Cy_USB_Dev_CDC_Init(cy_stc_usb_dev_cdc_config_t const *config, cy_stc_usb_dev_cdc_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fisdataready',['Cy_USB_Dev_CDC_IsDataReady',['../group__group__usb__dev__cdc__functions.html#ga8146e47160e0c93b4cc6b60bb9aaf922',1,'Cy_USB_Dev_CDC_IsDataReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga8146e47160e0c93b4cc6b60bb9aaf922',1,'Cy_USB_Dev_CDC_IsDataReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fislinechanged',['Cy_USB_Dev_CDC_IsLineChanged',['../group__group__usb__dev__cdc__functions.html#ga3245d5ee9319cdae02e8484309e1320b',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fisnotificationready',['Cy_USB_Dev_CDC_IsNotificationReady',['../group__group__usb__dev__cdc__functions.html#gaba8ee7a47e213e9ba57e16ad3b93eb3e',1,'Cy_USB_Dev_CDC_IsNotificationReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#gaba8ee7a47e213e9ba57e16ad3b93eb3e',1,'Cy_USB_Dev_CDC_IsNotificationReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fisready',['Cy_USB_Dev_CDC_IsReady',['../group__group__usb__dev__cdc__functions.html#ga36836547e498bda5fd6c0dd0033c5d45',1,'Cy_USB_Dev_CDC_IsReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga36836547e498bda5fd6c0dd0033c5d45',1,'Cy_USB_Dev_CDC_IsReady(uint32_t port, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fputchar',['Cy_USB_Dev_CDC_PutChar',['../group__group__usb__dev__cdc__functions.html#ga418ec0116904cebcdd9841e6ed7f72e5',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fputdata',['Cy_USB_Dev_CDC_PutData',['../group__group__usb__dev__cdc__functions.html#ga0e79dc7a18f6d24a15d2339f17bd2b26',1,'Cy_USB_Dev_CDC_PutData(uint32_t port, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga0e79dc7a18f6d24a15d2339f17bd2b26',1,'Cy_USB_Dev_CDC_PutData(uint32_t port, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fputstring',['Cy_USB_Dev_CDC_PutString',['../group__group__usb__dev__cdc__functions.html#ga8b064f67ce9e167e7b55a8e9dd8b77a4',1,'Cy_USB_Dev_CDC_PutString(uint32_t port, char_t const *string, int32_t timeout, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga8b064f67ce9e167e7b55a8e9dd8b77a4',1,'Cy_USB_Dev_CDC_PutString(uint32_t port, char_t const *string, int32_t timeout, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fcdc_5fregisterusercallbacks',['Cy_USB_Dev_CDC_RegisterUserCallbacks',['../group__group__usb__dev__cdc__functions.html#gaf1450bbba1fc39dc88c64cc7b6b75432',1,'cy_usb_dev_cdc.h']]], + ['cy_5fusb_5fdev_5fcdc_5fsendserialstate',['Cy_USB_Dev_CDC_SendSerialState',['../group__group__usb__dev__cdc__functions.html#ga4177475b2bd0de0bf4c4f5137de8b364',1,'Cy_USB_Dev_CDC_SendSerialState(uint32_t port, uint32_t serialState, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c'],['../group__group__usb__dev__cdc__functions.html#ga4177475b2bd0de0bf4c4f5137de8b364',1,'Cy_USB_Dev_CDC_SendSerialState(uint32_t port, uint32_t serialState, cy_stc_usb_dev_cdc_context_t *context): cy_usb_dev_cdc.c']]], + ['cy_5fusb_5fdev_5fconnect',['Cy_USB_Dev_Connect',['../group__group__usb__dev__functions__common.html#ga368f2e081a58b7eef81a17c4781fca8e',1,'Cy_USB_Dev_Connect(bool blocking, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#ga368f2e081a58b7eef81a17c4781fca8e',1,'Cy_USB_Dev_Connect(bool blocking, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fdeinit',['Cy_USB_Dev_DeInit',['../group__group__usb__dev__functions__common.html#gad3b25c869fcca5706d0ebfe135df0783',1,'Cy_USB_Dev_DeInit(cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#gad3b25c869fcca5706d0ebfe135df0783',1,'Cy_USB_Dev_DeInit(cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fdisconnect',['Cy_USB_Dev_Disconnect',['../group__group__usb__dev__functions__common.html#ga15cde7caa00a43d253198ea70935e47c',1,'Cy_USB_Dev_Disconnect(cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#ga15cde7caa00a43d253198ea70935e47c',1,'Cy_USB_Dev_Disconnect(cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fgetalternatesettings',['Cy_USB_Dev_GetAlternateSettings',['../group__group__usb__dev__functions__service.html#ga677676df1eda5c90bad152278d66c0cf',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetconfiguration',['Cy_USB_Dev_GetConfiguration',['../group__group__usb__dev__functions__service.html#gabdce652e7c8eb4cf3647dd1557e36822',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetepnumtoread',['Cy_USB_Dev_GetEpNumToRead',['../group__group__usb__dev__functions__data__transfer.html#ga79a6fbd0663556eb7ccc586e6dbe7e4e',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fgetserialnumberstring',['Cy_USB_Dev_GetSerialNumberString',['../group__group__usb__dev__functions__service.html#gaecedf09db3f4674cb1c37cd93bb80b97',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fhid_5fgetclass',['Cy_USB_Dev_HID_GetClass',['../group__group__usb__dev__hid__functions.html#ga6bd8294cac3ad4c9f3e85bd8a4b9c351',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fgetprotocol',['Cy_USB_Dev_HID_GetProtocol',['../group__group__usb__dev__hid__functions.html#gade5ee4ca8f844a1a7090f6f3ff5a0aea',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5finit',['Cy_USB_Dev_HID_Init',['../group__group__usb__dev__hid__functions.html#ga96ac1be9fe988572712f3111180170bb',1,'Cy_USB_Dev_HID_Init(cy_stc_usb_dev_hid_config_t const *config, cy_stc_usb_dev_hid_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_hid.c'],['../group__group__usb__dev__hid__functions.html#ga96ac1be9fe988572712f3111180170bb',1,'Cy_USB_Dev_HID_Init(cy_stc_usb_dev_hid_config_t const *config, cy_stc_usb_dev_hid_context_t *context, cy_stc_usb_dev_context_t *devContext): cy_usb_dev_hid.c']]], + ['cy_5fusb_5fdev_5fhid_5fregistergetreportcallback',['Cy_USB_Dev_HID_RegisterGetReportCallback',['../group__group__usb__dev__hid__functions.html#gaf195bbaa7da5ef81f7dd94f4ff2f94d9',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fregistersetreportcallback',['Cy_USB_Dev_HID_RegisterSetReportCallback',['../group__group__usb__dev__hid__functions.html#ga7986e8977e9d061774af646997f9a6ef',1,'cy_usb_dev_hid.h']]], + ['cy_5fusb_5fdev_5fhid_5fupdatetimer',['Cy_USB_Dev_HID_UpdateTimer',['../group__group__usb__dev__hid__functions.html#gab3344668f13ee59263a7aee62a2dfd5b',1,'Cy_USB_Dev_HID_UpdateTimer(uint32_t interface, uint32_t reportId, cy_stc_usb_dev_hid_context_t *context): cy_usb_dev_hid.c'],['../group__group__usb__dev__hid__functions.html#gab3344668f13ee59263a7aee62a2dfd5b',1,'Cy_USB_Dev_HID_UpdateTimer(uint32_t interface, uint32_t reportId, cy_stc_usb_dev_hid_context_t *context): cy_usb_dev_hid.c']]], + ['cy_5fusb_5fdev_5finit',['Cy_USB_Dev_Init',['../group__group__usb__dev__functions__common.html#ga12b36659b72aa85166e85323eb96e36a',1,'Cy_USB_Dev_Init(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_config const *drvConfig, struct cy_stc_usbfs_dev_drv_context *drvContext, cy_stc_usb_dev_device_t const *device, cy_stc_usb_dev_config_t const *config, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__common.html#ga12b36659b72aa85166e85323eb96e36a',1,'Cy_USB_Dev_Init(USBFS_Type *base, struct cy_stc_usbfs_dev_drv_config const *drvConfig, struct cy_stc_usbfs_dev_drv_context *drvContext, cy_stc_usb_dev_device_t const *device, cy_stc_usb_dev_config_t const *config, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fisconfigurationchanged',['Cy_USB_Dev_IsConfigurationChanged',['../group__group__usb__dev__functions__service.html#ga9c026e8afd1caf12f3934168bc152a23',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fisremotewakeupenabled',['Cy_USB_Dev_IsRemoteWakeupEnabled',['../group__group__usb__dev__functions__service.html#gaf754fa7ea2f155c05b5fa9b862235a66',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5foverwritehandletimeout',['Cy_USB_Dev_OverwriteHandleTimeout',['../group__group__usb__dev__functions__data__transfer.html#ga17873db332970f17f9cfa8b7f383c019',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5freadepblocking',['Cy_USB_Dev_ReadEpBlocking',['../group__group__usb__dev__functions__data__transfer.html#ga0ffcc053f1154d6f77b1744f7a517ef5',1,'Cy_USB_Dev_ReadEpBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga0ffcc053f1154d6f77b1744f7a517ef5',1,'Cy_USB_Dev_ReadEpBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5freadepnonblocking',['Cy_USB_Dev_ReadEpNonBlocking',['../group__group__usb__dev__functions__data__transfer.html#ga5f3bb59175bd8b46a558b8206d6f9cdf',1,'Cy_USB_Dev_ReadEpNonBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga5f3bb59175bd8b46a558b8206d6f9cdf',1,'Cy_USB_Dev_ReadEpNonBlocking(uint32_t endpoint, uint8_t *buffer, uint32_t size, uint32_t *actSize, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fregisterclass',['Cy_USB_Dev_RegisterClass',['../group__group__usb__dev__functions__class__support.html#ga7796c2ddd1f1bb389cbad19acdeb5c9a',1,'Cy_USB_Dev_RegisterClass(cy_stc_usb_dev_class_ll_item_t *classItem, cy_stc_usb_dev_class_t *classObj, void *classContext, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__class__support.html#ga7796c2ddd1f1bb389cbad19acdeb5c9a',1,'Cy_USB_Dev_RegisterClass(cy_stc_usb_dev_class_ll_item_t *classItem, cy_stc_usb_dev_class_t *classObj, void *classContext, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fregisterclassbusresetcallback',['Cy_USB_Dev_RegisterClassBusResetCallback',['../group__group__usb__dev__functions__class__support.html#gac6977953928e6da80cf6074f6bc5cc9e',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclassrequestcmpltcallback',['Cy_USB_Dev_RegisterClassRequestCmpltCallback',['../group__group__usb__dev__functions__class__support.html#gab1f754d7b4e60336a6b712e16dde21a8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclassrequestrcvdcallback',['Cy_USB_Dev_RegisterClassRequestRcvdCallback',['../group__group__usb__dev__functions__class__support.html#ga25494add7cc8061b7fb13d3465e94726',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclasssetconfigcallback',['Cy_USB_Dev_RegisterClassSetConfigCallback',['../group__group__usb__dev__functions__class__support.html#gaa51aa8db9df18ffe8f6da8f409b89728',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterclasssetinterfacecallback',['Cy_USB_Dev_RegisterClassSetInterfaceCallback',['../group__group__usb__dev__functions__class__support.html#ga573e8f24614508d8db6149dd064a6f1c',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregistereventscallback',['Cy_USB_Dev_RegisterEventsCallback',['../group__group__usb__dev__functions__service.html#gafe853fd59fdb48ef9569953a352768f5',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregisterserialnumstringcallback',['Cy_USB_Dev_RegisterSerialNumStringCallback',['../group__group__usb__dev__functions__service.html#ga0aff856f8658d08ffcef513eede344b8',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fregistervendorcallbacks',['Cy_USB_Dev_RegisterVendorCallbacks',['../group__group__usb__dev__functions__vendor__support.html#gad864982cf48ad57727e40d9e9fc3e239',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetpowerstatus',['Cy_USB_Dev_SetPowerStatus',['../group__group__usb__dev__functions__service.html#ga082afaccf8f10762300cfb1c996290fc',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetupcontrolread',['Cy_USB_Dev_SetupControlRead',['../group__group__usb__dev__functions__service.html#ga1308439c2f55fe4bb51386b92ad2ceec',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetupcontrolwrite',['Cy_USB_Dev_SetupControlWrite',['../group__group__usb__dev__functions__service.html#ga2e622f1f37d67dd6d34607f11a961a6f',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fsetupcontrolwriteresult',['Cy_USB_Dev_SetupControlWriteResult',['../group__group__usb__dev__functions__service.html#gafaec73b3837988a08b02a6b0fde4c5eb',1,'cy_usb_dev.h']]], + ['cy_5fusb_5fdev_5fstartreadep',['Cy_USB_Dev_StartReadEp',['../group__group__usb__dev__functions__data__transfer.html#ga87f178d2a65510bd26dff4ee5d2c06ab',1,'Cy_USB_Dev_StartReadEp(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga87f178d2a65510bd26dff4ee5d2c06ab',1,'Cy_USB_Dev_StartReadEp(uint32_t endpoint, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fwriteepblocking',['Cy_USB_Dev_WriteEpBlocking',['../group__group__usb__dev__functions__data__transfer.html#ga1bf916540d58d458568b2eed1a186df4',1,'Cy_USB_Dev_WriteEpBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#ga1bf916540d58d458568b2eed1a186df4',1,'Cy_USB_Dev_WriteEpBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, int32_t timeout, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]], + ['cy_5fusb_5fdev_5fwriteepnonblocking',['Cy_USB_Dev_WriteEpNonBlocking',['../group__group__usb__dev__functions__data__transfer.html#gafca5c6c661b90572a5278322b0773ba6',1,'Cy_USB_Dev_WriteEpNonBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_context_t *context): cy_usb_dev.c'],['../group__group__usb__dev__functions__data__transfer.html#gafca5c6c661b90572a5278322b0773ba6',1,'Cy_USB_Dev_WriteEpNonBlocking(uint32_t endpoint, uint8_t const *buffer, uint32_t size, cy_stc_usb_dev_context_t *context): cy_usb_dev.c']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_0.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_0.html new file mode 100644 index 0000000..1ede28d --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_0.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_0.js new file mode 100644 index 0000000..25826d0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['audio_20class',['Audio Class',['../group__group__usb__dev__audio.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_1.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_1.html new file mode 100644 index 0000000..3c05216 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_1.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_1.js new file mode 100644 index 0000000..d2ed69e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['cdc_20class',['CDC Class',['../group__group__usb__dev__cdc.html',1,'']]], + ['class_20support_20functions',['Class Support Functions',['../group__group__usb__dev__functions__class__support.html',1,'']]], + ['class_20support',['Class Support',['../group__group__usb__dev__structures__class.html',1,'']]], + ['control_20transfer',['Control Transfer',['../group__group__usb__dev__structures__control.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_2.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_2.html new file mode 100644 index 0000000..7191495 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_2.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_2.js new file mode 100644 index 0000000..359dc08 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_2.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['data_20structures',['Data Structures',['../group__group__usb__dev__audio__data__structures.html',1,'']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__cdc__data__structures.html',1,'']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__data__structures.html',1,'']]], + ['data_20transfer_20functions',['Data Transfer Functions',['../group__group__usb__dev__functions__data__transfer.html',1,'']]], + ['data_20structures',['Data Structures',['../group__group__usb__dev__hid__data__structures.html',1,'']]], + ['descriptors',['Descriptors',['../group__group__usb__dev__macros__device__descr.html',1,'']]], + ['device_20information',['Device Information',['../group__group__usb__dev__structures__device.html',1,'']]], + ['device_20descriptors',['Device Descriptors',['../group__group__usb__dev__structures__device__descr.html',1,'']]], + ['device',['Device',['../group__group__usb__device.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_3.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_3.html new file mode 100644 index 0000000..3af27ea --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_3.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_3.js new file mode 100644 index 0000000..14696c0 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['enumerated_20types',['Enumerated Types',['../group__group__usb__dev__cdc__enums.html',1,'']]], + ['enumerated_20types',['Enumerated Types',['../group__group__usb__dev__enums.html',1,'']]], + ['enumerated_20types',['Enumerated Types',['../group__group__usb__dev__hid__enums.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_4.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_4.html new file mode 100644 index 0000000..e7abc74 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_4.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_4.js new file mode 100644 index 0000000..4fe48e4 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_4.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['functions',['Functions',['../group__group__usb__dev__audio__functions.html',1,'']]], + ['functions',['Functions',['../group__group__usb__dev__cdc__functions.html',1,'']]], + ['functions',['Functions',['../group__group__usb__dev__functions.html',1,'']]], + ['functions',['Functions',['../group__group__usb__dev__hid__functions.html',1,'']]], + ['function_20pointers',['Function Pointers',['../group__group__usb__dev__structures__func__ptr.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_5.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_5.html new file mode 100644 index 0000000..edc563e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_5.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_5.js new file mode 100644 index 0000000..0888643 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['hid_20class',['HID Class',['../group__group__usb__dev__hid.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_6.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_6.html new file mode 100644 index 0000000..176b61a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_6.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_6.js new file mode 100644 index 0000000..a1d3331 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['initialization_20functions',['Initialization Functions',['../group__group__usb__dev__functions__common.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_7.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_7.html new file mode 100644 index 0000000..0b8fa02 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_7.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_7.js new file mode 100644 index 0000000..72d2c32 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_7.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['macros',['Macros',['../group__group__usb__dev__audio__macros.html',1,'']]], + ['macros',['Macros',['../group__group__usb__dev__cdc__macros.html',1,'']]], + ['macros',['Macros',['../group__group__usb__dev__hid__macros.html',1,'']]], + ['macros',['Macros',['../group__group__usb__dev__macros.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_8.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_8.html new file mode 100644 index 0000000..5bee592 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_8.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_8.js new file mode 100644 index 0000000..039caa1 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['service_20functions',['Service Functions',['../group__group__usb__dev__functions__service.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_9.html b/docs/usbfs_dev_api_reference_manual/html/search/groups_9.html new file mode 100644 index 0000000..00d9cb3 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/groups_9.js b/docs/usbfs_dev_api_reference_manual/html/search/groups_9.js new file mode 100644 index 0000000..f2d492a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/groups_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['vendor_20request_20support_20functions',['Vendor Request Support Functions',['../group__group__usb__dev__functions__vendor__support.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/mag_sel.png b/docs/usbfs_dev_api_reference_manual/html/search/mag_sel.png new file mode 100644 index 0000000..81f6040 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/search/mag_sel.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/search/nomatches.html b/docs/usbfs_dev_api_reference_manual/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/pages_0.html b/docs/usbfs_dev_api_reference_manual/html/search/pages_0.html new file mode 100644 index 0000000..4955b9e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/pages_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/pages_0.js b/docs/usbfs_dev_api_reference_manual/html/search/pages_0.js new file mode 100644 index 0000000..b269978 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['cypress_20usb_20device_20middleware_20library_202_2e0',['Cypress USB Device Middleware Library 2.0',['../index.html',1,'']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/search.css b/docs/usbfs_dev_api_reference_manual/html/search/search.css new file mode 100644 index 0000000..3cf9df9 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 8px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:115px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:8px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/search.js b/docs/usbfs_dev_api_reference_manual/html/search/search.js new file mode 100644 index 0000000..dedce3b --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/search.js @@ -0,0 +1,791 @@ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/typedefs_0.js b/docs/usbfs_dev_api_reference_manual/html/search/typedefs_0.js new file mode 100644 index 0000000..60e03c1 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/typedefs_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['cy_5fcb_5fusb_5fdev_5fbus_5freset_5ft',['cy_cb_usb_dev_bus_reset_t',['../group__group__usb__dev__structures__func__ptr.html#gab6f8a0de15b09fe6a39e6d8032069a62',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5fevents_5fcallback_5ft',['cy_cb_usb_dev_events_callback_t',['../group__group__usb__dev__structures__func__ptr.html#gabf238de7ed223e1dbae8a08e56b6b680',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5frequest_5fcmplt_5ft',['cy_cb_usb_dev_request_cmplt_t',['../group__group__usb__dev__structures__func__ptr.html#ga626db28aeab6dfd0f7004866225bb0ee',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5frequest_5freceived_5ft',['cy_cb_usb_dev_request_received_t',['../group__group__usb__dev__structures__func__ptr.html#ga3a7649a1c575110ac8e4480d70da8c2c',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5fset_5fconfig_5ft',['cy_cb_usb_dev_set_config_t',['../group__group__usb__dev__structures__func__ptr.html#ga18e8445fcb1392dd424ae65a726c4bd6',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusb_5fdev_5fset_5finterface_5ft',['cy_cb_usb_dev_set_interface_t',['../group__group__usb__dev__structures__func__ptr.html#gaba4c41daa173f3dfc3a60c2260d1f0c1',1,'cy_usb_dev.h']]], + ['cy_5fcb_5fusbfs_5fdev_5fhid_5fget_5freport_5ft',['cy_cb_usbfs_dev_hid_get_report_t',['../group__group__usb__dev__hid__data__structures.html#gaebf080dd87c52f34b1953fc0a26326df',1,'cy_usb_dev_hid.h']]], + ['cy_5fcb_5fusbfs_5fdev_5fhid_5fset_5freport_5ft',['cy_cb_usbfs_dev_hid_set_report_t',['../group__group__usb__dev__hid__data__structures.html#gadb23e2c86255463c972463b350f52e83',1,'cy_usb_dev_hid.h']]], + ['cy_5ffn_5fusb_5fdev_5fhandle_5ftimeout_5fptr_5ft',['cy_fn_usb_dev_handle_timeout_ptr_t',['../group__group__usb__dev__structures__func__ptr.html#gab48bb4326ac3019669c6697714b1c377',1,'cy_usb_dev.h']]], + ['cy_5ffn_5fusb_5fdev_5fsn_5fstring_5fptr_5ft',['cy_fn_usb_dev_sn_string_ptr_t',['../group__group__usb__dev__structures__func__ptr.html#ga03fce0dd6a2c28e632694c21c749b0fb',1,'cy_usb_dev.h']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_0.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_0.html new file mode 100644 index 0000000..74ce807 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_0.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_0.js new file mode 100644 index 0000000..9fce15c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['alternates',['alternates',['../structcy__stc__usb__dev__interface__t.html#af49504d16931dee60e726c4496ce3282',1,'cy_stc_usb_dev_interface_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_1.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_1.html new file mode 100644 index 0000000..84237b6 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_1.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_1.js new file mode 100644 index 0000000..48c7f08 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_1.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['balternatesetting',['bAlternateSetting',['../structcy__stc__usbdev__interface__descr__t.html#abdaec91851978ad55037fef4a986e4ff',1,'cy_stc_usbdev_interface_descr_t']]], + ['bcddevice',['bcdDevice',['../structcy__stc__usbdev__device__descr__t.html#ac6163f32cdd505a3c79bff9cb0798902',1,'cy_stc_usbdev_device_descr_t']]], + ['bcdusb',['bcdUSB',['../structcy__stc__usbdev__device__descr__t.html#ac56838bd4119bb5094df9468e6a5c6ca',1,'cy_stc_usbdev_device_descr_t']]], + ['bconfigurationvalue',['bConfigurationValue',['../structcy__stc__usbdev__config__descr__t.html#a28290fc090d1300ce689675dbf03d516',1,'cy_stc_usbdev_config_descr_t']]], + ['bdescriptortype',['bDescriptorType',['../structcy__stc__usbdev__device__descr__t.html#ae8fc0e6c17397e9f19e76b2d52cab4a8',1,'cy_stc_usbdev_device_descr_t::bDescriptorType()'],['../structcy__stc__usbdev__config__descr__t.html#aff0680f735725beac0d5864faddb54d3',1,'cy_stc_usbdev_config_descr_t::bDescriptorType()'],['../structcy__stc__usbdev__interface__descr__t.html#aa37e85cf76e7095200b6fd4e294436f7',1,'cy_stc_usbdev_interface_descr_t::bDescriptorType()'],['../structcy__stc__usbdev__endpoint__descr__t.html#a0c1a90e2ae955eee9543879e5a664e6d',1,'cy_stc_usbdev_endpoint_descr_t::bDescriptorType()']]], + ['bdeviceclass',['bDeviceClass',['../structcy__stc__usbdev__device__descr__t.html#aaf704494fc8e026e78af2abbc9c81e32',1,'cy_stc_usbdev_device_descr_t']]], + ['bdeviceprotocol',['bDeviceProtocol',['../structcy__stc__usbdev__device__descr__t.html#af5ae81fcf8bd3f21d118deb05c64b99c',1,'cy_stc_usbdev_device_descr_t']]], + ['bdevicesubclass',['bDeviceSubClass',['../structcy__stc__usbdev__device__descr__t.html#a688f054dcbda5a8afcc5e0f03a01989d',1,'cy_stc_usbdev_device_descr_t']]], + ['bendpointaddress',['bEndpointAddress',['../structcy__stc__usbdev__endpoint__descr__t.html#a02f288a3116dfef6e82d25796fa7ebef',1,'cy_stc_usbdev_endpoint_descr_t']]], + ['binterfaceclass',['bInterfaceClass',['../structcy__stc__usbdev__interface__descr__t.html#abe8e150e34fa7dcdbe2b0af11ca27477',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterfacenumber',['bInterfaceNumber',['../structcy__stc__usbdev__interface__descr__t.html#a65aebee33eca7791ad41ac8347868221',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterfaceprotocol',['bInterfaceProtocol',['../structcy__stc__usbdev__interface__descr__t.html#a010297774bd7ae3f718ee98568748898',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterfacesubclass',['bInterfaceSubClass',['../structcy__stc__usbdev__interface__descr__t.html#ab41a710838240522c1860420f9924a67',1,'cy_stc_usbdev_interface_descr_t']]], + ['binterval',['bInterval',['../structcy__stc__usbdev__endpoint__descr__t.html#ae48eec6ba3bae7f7c1e6f3ed7de2cfdf',1,'cy_stc_usbdev_endpoint_descr_t']]], + ['blength',['bLength',['../structcy__stc__usbdev__device__descr__t.html#aecbd813046544b9250117a0566aadd14',1,'cy_stc_usbdev_device_descr_t::bLength()'],['../structcy__stc__usbdev__config__descr__t.html#a5e57a1c41471aabd2add6513974f0464',1,'cy_stc_usbdev_config_descr_t::bLength()'],['../structcy__stc__usbdev__interface__descr__t.html#ab011bb57b0b7abe3586579dd9172cf23',1,'cy_stc_usbdev_interface_descr_t::bLength()'],['../structcy__stc__usbdev__endpoint__descr__t.html#a443da99568684d1973b5424a0c89a29e',1,'cy_stc_usbdev_endpoint_descr_t::bLength()']]], + ['bmattributes',['bmAttributes',['../structcy__stc__usbdev__config__descr__t.html#afcb2b8c7eea77e13d12b25e34640bab8',1,'cy_stc_usbdev_config_descr_t::bmAttributes()'],['../structcy__stc__usbdev__endpoint__descr__t.html#a94505d0dbed1f7b18fb138aab0f55756',1,'cy_stc_usbdev_endpoint_descr_t::bmAttributes()']]], + ['bmaxpacketsize',['bMaxPacketSize',['../structcy__stc__usbdev__device__descr__t.html#acd3e640f123462bdead0e5df36723f5c',1,'cy_stc_usbdev_device_descr_t']]], + ['bmaxpower',['bMaxPower',['../structcy__stc__usbdev__config__descr__t.html#a66639e32037402566bf51b27936b1317',1,'cy_stc_usbdev_config_descr_t']]], + ['bmrequesttype',['bmRequestType',['../structcy__stc__usb__dev__setup__packet__t.html#ab9cb2efd5a3d00e9ac03300af3595495',1,'cy_stc_usb_dev_setup_packet_t']]], + ['bnumconfigurations',['bNumConfigurations',['../structcy__stc__usbdev__device__descr__t.html#ac31afb5eb41cec65609c2c290877b268',1,'cy_stc_usbdev_device_descr_t']]], + ['bnumendpoints',['bNumEndpoints',['../structcy__stc__usbdev__interface__descr__t.html#a75309a6a1b724a3a5c2bf57ab05a4e9c',1,'cy_stc_usbdev_interface_descr_t']]], + ['bnuminterfaces',['bNumInterfaces',['../structcy__stc__usbdev__config__descr__t.html#a8e0f1164631005d3ab62e9617bb47550',1,'cy_stc_usbdev_config_descr_t']]], + ['bosdescriptor',['bosDescriptor',['../structcy__stc__usb__dev__device__t.html#a5ca8d248ab89bb4cccdab2f15c3fb0c8',1,'cy_stc_usb_dev_device_t']]], + ['brequest',['bRequest',['../structcy__stc__usb__dev__setup__packet__t.html#a0842936f9d00ef0f75c28afe9827dda3',1,'cy_stc_usb_dev_setup_packet_t']]], + ['buffer',['buffer',['../structcy__stc__usb__dev__control__transfer__t.html#af228b416d7c0725c487a258074236880',1,'cy_stc_usb_dev_control_transfer_t::buffer()'],['../structcy__stc__usb__dev__cdc__config__t.html#ae96d5c2ad16b940ab4f9d1847754fc13',1,'cy_stc_usb_dev_cdc_config_t::buffer()']]], + ['buffersize',['bufferSize',['../structcy__stc__usb__dev__control__transfer__t.html#add72c6a43cd0be4fea770a6bf0555352',1,'cy_stc_usb_dev_control_transfer_t::bufferSize()'],['../structcy__stc__usb__dev__cdc__config__t.html#a846a7527e69e3b4e77f39bd0f7e2ac7b',1,'cy_stc_usb_dev_cdc_config_t::bufferSize()']]], + ['busreset',['busReset',['../structcy__stc__usb__dev__class__t.html#a503cd36eebb5c1e3b12d75028a2481ba',1,'cy_stc_usb_dev_class_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_2.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_2.html new file mode 100644 index 0000000..5c9de1a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_2.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_2.js new file mode 100644 index 0000000..5ddb36a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['classdata',['classData',['../structcy__stc__usb__dev__class__ll__item__t.html#af20af14f197b59640794d4eb6ccadbf2',1,'cy_stc_usb_dev_class_ll_item_t']]], + ['classobj',['classObj',['../structcy__stc__usb__dev__class__ll__item__t.html#ab664a4c86bee67eb0b4f995cdb63cdc3',1,'cy_stc_usb_dev_class_ll_item_t']]], + ['configdescriptor',['configDescriptor',['../structcy__stc__usb__dev__configuration__t.html#a6189ea5773ef735287936e3e7b05e539',1,'cy_stc_usb_dev_configuration_t']]], + ['configurations',['configurations',['../structcy__stc__usb__dev__device__t.html#a34f2a84a67e79a5eda6ce2205684070c',1,'cy_stc_usb_dev_device_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_3.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_3.html new file mode 100644 index 0000000..f95e34c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_3.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_3.js new file mode 100644 index 0000000..57bc5da --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['devicedescriptor',['deviceDescriptor',['../structcy__stc__usb__dev__device__t.html#a685c419bd8298dc6715cd133e975be5d',1,'cy_stc_usb_dev_device_t']]], + ['direction',['direction',['../structcy__stc__usb__dev__bm__request.html#a8cbda434a4858f6bcbc1afa2eda2f2cd',1,'cy_stc_usb_dev_bm_request::direction()'],['../structcy__stc__usb__dev__control__transfer__t.html#a9c8f84635ed0847187969f097179e85f',1,'cy_stc_usb_dev_control_transfer_t::direction()']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_4.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_4.html new file mode 100644 index 0000000..d7db285 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_4.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_4.js new file mode 100644 index 0000000..babc330 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_4.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['enablewindowsosdescriptor',['enableWindowsOsDescriptor',['../structcy__stc__usb__dev__string__t.html#a02e123dfb487a9e22fe716e374f3bc73',1,'cy_stc_usb_dev_string_t']]], + ['endpointdescriptor',['endpointDescriptor',['../structcy__stc__usb__dev__endpoint__t.html#ae9d4c2900e45fccbbe3eb56a7fcbf0f0',1,'cy_stc_usb_dev_endpoint_t']]], + ['endpoints',['endpoints',['../structcy__stc__usb__dev__alternate__t.html#a3fe8acef267c90b9071112b651f34ae1',1,'cy_stc_usb_dev_alternate_t']]], + ['endpointsmask',['endpointsMask',['../structcy__stc__usb__dev__interface__t.html#a8415563edb976c4ae2d7c93743182a10',1,'cy_stc_usb_dev_interface_t']]], + ['ep0buffer',['ep0Buffer',['../structcy__stc__usb__dev__config__t.html#a7adc52048bd8d3e28786b1d6348fc789',1,'cy_stc_usb_dev_config_t']]], + ['ep0buffersize',['ep0BufferSize',['../structcy__stc__usb__dev__config__t.html#a50c257d5b2319ed93596121084293db6',1,'cy_stc_usb_dev_config_t']]], + ['extcompatiddescriptor',['extCompatIdDescriptor',['../structcy__stc__usb__dev__ms__os__string__t.html#aa129d3d88701b9cbaf057be63ffc6a25',1,'cy_stc_usb_dev_ms_os_string_t']]], + ['extpropertiesdescriptor',['extPropertiesDescriptor',['../structcy__stc__usb__dev__ms__os__string__t.html#a4987b03af76a60ba4181fa6f0d393f2c',1,'cy_stc_usb_dev_ms_os_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_5.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_5.html new file mode 100644 index 0000000..7bbceeb --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_5.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_5.js new file mode 100644 index 0000000..c5c0499 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_5.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['hid',['hid',['../structcy__stc__usb__dev__alternate__t.html#a795a71c8dbc0452ad693edf2ea29a939',1,'cy_stc_usb_dev_alternate_t']]], + ['hiddescriptor',['hidDescriptor',['../structcy__stc__usb__dev__hid__t.html#a926e62d147abf63ad183d7892b051d78',1,'cy_stc_usb_dev_hid_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_6.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_6.html new file mode 100644 index 0000000..4eb162d --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_6.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_6.js new file mode 100644 index 0000000..148babd --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_6.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['iconfiguration',['iConfiguration',['../structcy__stc__usbdev__config__descr__t.html#ac2e058ba9bf10e7609d6ec7ad2acb338',1,'cy_stc_usbdev_config_descr_t']]], + ['idproduct',['idProduct',['../structcy__stc__usbdev__device__descr__t.html#afa761db25b797feb1aba98a02c5e27a3',1,'cy_stc_usbdev_device_descr_t']]], + ['idvendor',['idVendor',['../structcy__stc__usbdev__device__descr__t.html#abbc0f9e538526d6e3b1945275418d1cc',1,'cy_stc_usbdev_device_descr_t']]], + ['iinterface',['iInterface',['../structcy__stc__usbdev__interface__descr__t.html#a4776c5bec4daa50f11789c9879c8cb8a',1,'cy_stc_usbdev_interface_descr_t']]], + ['imanufacturer',['iManufacturer',['../structcy__stc__usbdev__device__descr__t.html#a61f92b9a09bc8729c445cd11a7c4951a',1,'cy_stc_usbdev_device_descr_t']]], + ['inputreportidx',['inputReportIdx',['../structcy__stc__usb__dev__hid__t.html#af5bacc172028ab6342ef2e7a24bbadb5',1,'cy_stc_usb_dev_hid_t']]], + ['inputreportidxsize',['inputReportIdxSize',['../structcy__stc__usb__dev__hid__t.html#aa1a4adec2e0033e4ac18683bd11c19bb',1,'cy_stc_usb_dev_hid_t']]], + ['inputreportpos',['inputReportPos',['../structcy__stc__usb__dev__hid__t.html#a67be9900d3911f977019e54b906ae8cb',1,'cy_stc_usb_dev_hid_t']]], + ['interfacedescriptor',['interfaceDescriptor',['../structcy__stc__usb__dev__alternate__t.html#ad9a20b7d91d73ee6a4cbaf72694a0ecc',1,'cy_stc_usb_dev_alternate_t']]], + ['interfaces',['interfaces',['../structcy__stc__usb__dev__configuration__t.html#a84e2ae881e023b0719437251db69ee3c',1,'cy_stc_usb_dev_configuration_t']]], + ['iproduct',['iProduct',['../structcy__stc__usbdev__device__descr__t.html#a0a48ffc9d33d53a530adef55bf139ee0',1,'cy_stc_usbdev_device_descr_t']]], + ['iserialnumber',['iSerialNumber',['../structcy__stc__usbdev__device__descr__t.html#a01e1fc974ba95d20cb473298ae976d3f',1,'cy_stc_usbdev_device_descr_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_7.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_7.html new file mode 100644 index 0000000..0408829 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_7.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_7.js new file mode 100644 index 0000000..647f01c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['msosdescriptor',['msOsDescriptor',['../structcy__stc__usb__dev__ms__os__string__t.html#a228033f20928ae1f1744757daf98ad14',1,'cy_stc_usb_dev_ms_os_string_t']]], + ['msvendorcode',['msVendorCode',['../structcy__stc__usb__dev__ms__os__string__t.html#a1a964ea38ee9a11d162ff44fcce0b6c7',1,'cy_stc_usb_dev_ms_os_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_8.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_8.html new file mode 100644 index 0000000..d54d096 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_8.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_8.js new file mode 100644 index 0000000..76fab55 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_8.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['next',['next',['../structcy__stc__usb__dev__class__ll__item__t.html#a466e1619be2ddc3d8349a22b54f750f6',1,'cy_stc_usb_dev_class_ll_item_t']]], + ['notify',['notify',['../structcy__stc__usb__dev__control__transfer__t.html#a504cb022673eaec9d7e05cd8783c916e',1,'cy_stc_usb_dev_control_transfer_t']]], + ['numalternates',['numAlternates',['../structcy__stc__usb__dev__interface__t.html#aa916744fe431cf674283079749baf38a',1,'cy_stc_usb_dev_interface_t']]], + ['numconfigurations',['numConfigurations',['../structcy__stc__usb__dev__device__t.html#ad49158f747f355b4ecaa2a5795fd89f5',1,'cy_stc_usb_dev_device_t']]], + ['numendpoints',['numEndpoints',['../structcy__stc__usb__dev__alternate__t.html#a8563b62feb70137fcb51627e72104e64',1,'cy_stc_usb_dev_alternate_t']]], + ['numinputreports',['numInputReports',['../structcy__stc__usb__dev__hid__t.html#a8dce054b73e15149cc2122f52a877f47',1,'cy_stc_usb_dev_hid_t']]], + ['numinterfaces',['numInterfaces',['../structcy__stc__usb__dev__configuration__t.html#a19e2848efee55af859e8c7de5e10e156',1,'cy_stc_usb_dev_configuration_t']]], + ['numstrings',['numStrings',['../structcy__stc__usb__dev__string__t.html#af614fbdb115198cdee79fa47bfc1f8e5',1,'cy_stc_usb_dev_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_9.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_9.html new file mode 100644 index 0000000..234dc60 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_9.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_9.js new file mode 100644 index 0000000..c2d3df9 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['osstringdescriptors',['osStringDescriptors',['../structcy__stc__usb__dev__string__t.html#abb5c17aa695bc35907fe957e9c6a0044',1,'cy_stc_usb_dev_string_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_a.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_a.html new file mode 100644 index 0000000..0892488 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_a.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_a.js new file mode 100644 index 0000000..ba1891e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ptr',['ptr',['../structcy__stc__usb__dev__control__transfer__t.html#a2d7d027a0888f204f958a9a71e11dafb',1,'cy_stc_usb_dev_control_transfer_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_b.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_b.html new file mode 100644 index 0000000..ea46965 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_b.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_b.js new file mode 100644 index 0000000..2a76bfa --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_b.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['recipient',['recipient',['../structcy__stc__usb__dev__bm__request.html#a089186e8e7b77af303b6a96d078f264a',1,'cy_stc_usb_dev_bm_request']]], + ['remaining',['remaining',['../structcy__stc__usb__dev__control__transfer__t.html#af7f3075f7c992d51b94012e82826a334',1,'cy_stc_usb_dev_control_transfer_t']]], + ['reportdescriptor',['reportDescriptor',['../structcy__stc__usb__dev__hid__t.html#a99129f9cbbd9a2ecdab10f490a85942c',1,'cy_stc_usb_dev_hid_t']]], + ['reportdescriptorsize',['reportDescriptorSize',['../structcy__stc__usb__dev__hid__t.html#a6e958dec1a35a4b54691572374adc217',1,'cy_stc_usb_dev_hid_t']]], + ['requestcompleted',['requestCompleted',['../structcy__stc__usb__dev__class__t.html#af498868795ad7fdc5da2cf4e2949b6bd',1,'cy_stc_usb_dev_class_t']]], + ['requestreceived',['requestReceived',['../structcy__stc__usb__dev__class__t.html#ab580b6b05e25a1fc43040c2b42540465',1,'cy_stc_usb_dev_class_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_c.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_c.html new file mode 100644 index 0000000..94bf1a6 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_c.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_c.js new file mode 100644 index 0000000..4e78dd1 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_c.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['setconfiguration',['setConfiguration',['../structcy__stc__usb__dev__class__t.html#ad460bded0f5dc7fab26727c9a4302137',1,'cy_stc_usb_dev_class_t']]], + ['setinterface',['setInterface',['../structcy__stc__usb__dev__class__t.html#a0f4844f6f51206be703add0ff1eaa2ac',1,'cy_stc_usb_dev_class_t']]], + ['setup',['setup',['../structcy__stc__usb__dev__control__transfer__t.html#af38eb6ea917b51d00f4840bc0a18f854',1,'cy_stc_usb_dev_control_transfer_t']]], + ['size',['size',['../structcy__stc__usb__dev__control__transfer__t.html#a80311bdcebd3f0e0f3508aee417f3a04',1,'cy_stc_usb_dev_control_transfer_t']]], + ['stringdescriptors',['stringDescriptors',['../structcy__stc__usb__dev__string__t.html#a3ecf7701b1b97b3a1f5bd859211e376d',1,'cy_stc_usb_dev_string_t']]], + ['strings',['strings',['../structcy__stc__usb__dev__device__t.html#a62bd21476cfd2035c8ce6e82c5b554ca',1,'cy_stc_usb_dev_device_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_d.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_d.html new file mode 100644 index 0000000..b9381e9 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_d.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_d.js new file mode 100644 index 0000000..957f281 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['timers',['timers',['../structcy__stc__usb__dev__hid__config__t.html#a5b7720207db9a5910233571b7ede35e6',1,'cy_stc_usb_dev_hid_config_t']]], + ['timersnum',['timersNum',['../structcy__stc__usb__dev__hid__config__t.html#a6fcb3f02d21b149099457fa2d74a9471',1,'cy_stc_usb_dev_hid_config_t']]], + ['type',['type',['../structcy__stc__usb__dev__bm__request.html#a0cc454375f0c545389782837320fb608',1,'cy_stc_usb_dev_bm_request']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_e.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_e.html new file mode 100644 index 0000000..375ad70 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_e.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_e.js new file mode 100644 index 0000000..6993e29 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_e.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['windex',['wIndex',['../structcy__stc__usb__dev__setup__packet__t.html#a03313abe6497667bddd0eece8046a4ae',1,'cy_stc_usb_dev_setup_packet_t']]], + ['wlength',['wLength',['../structcy__stc__usb__dev__setup__packet__t.html#af6b129674006959fcf0d9602dec9784c',1,'cy_stc_usb_dev_setup_packet_t']]], + ['wmaxpacketsize',['wMaxPacketSize',['../structcy__stc__usbdev__endpoint__descr__t.html#a788154a9655bed34e586df4c975639ca',1,'cy_stc_usbdev_endpoint_descr_t']]], + ['wtotallength',['wTotalLength',['../structcy__stc__usbdev__config__descr__t.html#a234eeb09dab42628e330b0d5eef3e8b0',1,'cy_stc_usbdev_config_descr_t']]], + ['wvalue',['wValue',['../structcy__stc__usb__dev__setup__packet__t.html#aecfaa2d162fee8bcbe8d1be67ee51224',1,'cy_stc_usb_dev_setup_packet_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_f.html b/docs/usbfs_dev_api_reference_manual/html/search/variables_f.html new file mode 100644 index 0000000..d371418 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/usbfs_dev_api_reference_manual/html/search/variables_f.js b/docs/usbfs_dev_api_reference_manual/html/search/variables_f.js new file mode 100644 index 0000000..0cb79fd --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/search/variables_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['zlp',['zlp',['../structcy__stc__usb__dev__control__transfer__t.html#a517e6d7516cd5f0373e8ed4efdf8ecf4',1,'cy_stc_usb_dev_control_transfer_t']]] +]; diff --git a/docs/usbfs_dev_api_reference_manual/html/splitbar.png b/docs/usbfs_dev_api_reference_manual/html/splitbar.png new file mode 100644 index 0000000..fe895f2 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/splitbar.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__alternate__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__alternate__t.html new file mode 100644 index 0000000..b212a6b --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__alternate__t.html @@ -0,0 +1,124 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_alternate_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_alternate_t Struct Reference
+
+
+

Description

+

USBFS Device Alternate Interface structure.

+
+ + + + + + + + + + + + + +

+Data Fields

+const uint8_t * interfaceDescriptor
 Pointer to the Interface Descriptor in the Configuration Descriptor.
 
+const cy_stc_usb_dev_endpoint_t ** endpoints
 Pointer to array of pointers to structure that stores Endpoints information.
 
+uint8_t numEndpoints
 Number of endpoints that belong to this interface alternates.
 
+const cy_stc_usb_dev_hid_thid
 Pointer to the HID information structure.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__audio__context__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__audio__context__t.html new file mode 100644 index 0000000..9511bcf --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__audio__context__t.html @@ -0,0 +1,103 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_audio_context_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cy_stc_usb_dev_audio_context_t Struct Reference
+
+
+

Description

+

Audio class context structure.

+

All fields for the Audio context structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the middleware in Audio function calls. Firmware must ensure that the defined instance of this structure remains in scope while the middleware is in use.

+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__bm__request.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__bm__request.html new file mode 100644 index 0000000..2525137 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__bm__request.html @@ -0,0 +1,120 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_bm_request Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_bm_request Struct Reference
+
+
+

Description

+

Parsed bmRequest.

+
+ + + + + + + + + + +

+Data Fields

+uint8_t direction
 Transfer direction.
 
+uint8_t type
 Transfer type.
 
+uint8_t recipient
 Transfer recipient.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__cdc__config__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__cdc__config__t.html new file mode 100644 index 0000000..1d5b85c --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__cdc__config__t.html @@ -0,0 +1,150 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_cdc_config_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_cdc_config_t Struct Reference
+
+
+

Description

+

CDC class configuration structure.

+
+ + + + + + + +

+Data Fields

uint8_t * buffer [CY_USB_DEV_CDC_COMPORT_NUMBER]
 The pointers to the buffers to store received data by COM port 0 and 1 appropriately. More...
 
uint32_t bufferSize [CY_USB_DEV_CDC_COMPORT_NUMBER]
 Size of provided buffers to for the COM port 0 and 1 appropriately. More...
 
+

Field Documentation

+ +

◆ buffer

+ +
+
+ + + + +
uint8_t* cy_stc_usb_dev_cdc_config_t::buffer[CY_USB_DEV_CDC_COMPORT_NUMBER]
+
+ +

The pointers to the buffers to store received data by COM port 0 and 1 appropriately.

+

The buffer is mandatory to for Cy_USB_Dev_CDC_GetData and Cy_USB_Dev_CDC_GetChar function operation. If these functions will not be used by the application pass NULL as a pointer.
+Allocate buffer using CY_USB_DEV_ALLOC_ENDPOINT_BUFFER macro to make it USBFS driver configuration independent (See Allocate Data Endpoint Buffer for more information).

+ +
+
+ +

◆ bufferSize

+ +
+
+ + + + +
uint32_t cy_stc_usb_dev_cdc_config_t::bufferSize[CY_USB_DEV_CDC_COMPORT_NUMBER]
+
+ +

Size of provided buffers to for the COM port 0 and 1 appropriately.

+

The buffer size must be equal to the maximum packet size of CDC Data interface IN endpoint that belongs to the COM port. Pass zero size if the pointer to the buffer is NULL.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__cdc__context__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__cdc__context__t.html new file mode 100644 index 0000000..9bb5bfe --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__cdc__context__t.html @@ -0,0 +1,103 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_cdc_context_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cy_stc_usb_dev_cdc_context_t Struct Reference
+
+
+

Description

+

CDC class context structure.

+

All fields for the CDC context structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the middleware in CDC function calls. Firmware must ensure that the defined instance of this structure remains in scope while the middleware is in use.

+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__class__ll__item__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__class__ll__item__t.html new file mode 100644 index 0000000..6394120 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__class__ll__item__t.html @@ -0,0 +1,121 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_class_ll_item_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_class_ll_item_t Struct Reference
+
+
+

Description

+

Class linked list element.

+

It includes class and class data pointers and pointer to the next class linked list element.

+
+ + + + + + + + + + +

+Data Fields

+struct cy_stc_usb_dev_class_ll_item * next
 Next item in the class driver linked list.
 
+cy_stc_usb_dev_class_tclassObj
 Pointer to the class structure.
 
+void * classData
 Pointer to the class data (context)
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__class__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__class__t.html new file mode 100644 index 0000000..6dbd096 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__class__t.html @@ -0,0 +1,209 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_class_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_class_t Struct Reference
+
+
+

Description

+

Class support definition - each class must provide this structure.

+
+ + + + + + + + + + + + + + + + +

+Data Fields

cy_cb_usb_dev_bus_reset_t busReset
 Called after bus reset is serviced. More...
 
cy_cb_usb_dev_set_config_t setConfiguration
 Called after Set Configuration request is received. More...
 
cy_cb_usb_dev_set_interface_t setInterface
 Called after Set Interface request is received. More...
 
cy_cb_usb_dev_request_received_t requestReceived
 This function is called when a setup packet was received from the USB Host but was not recognized. More...
 
cy_cb_usb_dev_request_cmplt_t requestCompleted
 This function is called when the USB Device received data from the USB Host as part of current request processing. More...
 
+

Field Documentation

+ +

◆ busReset

+ +
+
+ + + + +
cy_cb_usb_dev_bus_reset_t cy_stc_usb_dev_class_t::busReset
+
+ +

Called after bus reset is serviced.

+

Initialize Class here

+ +
+
+ +

◆ setConfiguration

+ +
+
+ + + + +
cy_cb_usb_dev_set_config_t cy_stc_usb_dev_class_t::setConfiguration
+
+ +

Called after Set Configuration request is received.

+

The endpoint available for this configuration must be configured here. Returns status of the event processing.

+ +
+
+ +

◆ setInterface

+ +
+
+ + + + +
cy_cb_usb_dev_set_interface_t cy_stc_usb_dev_class_t::setInterface
+
+ +

Called after Set Interface request is received.

+

Probably the endpoint configuration requires correction here. Returns status of the event processing.

+ +
+
+ +

◆ requestReceived

+ +
+
+ + + + +
cy_cb_usb_dev_request_received_t cy_stc_usb_dev_class_t::requestReceived
+
+ +

This function is called when a setup packet was received from the USB Host but was not recognized.

+

Therefore, it might require the user to do the class processing.

+ +
+
+ +

◆ requestCompleted

+ +
+
+ + + + +
cy_cb_usb_dev_request_cmplt_t cy_stc_usb_dev_class_t::requestCompleted
+
+ +

This function is called when the USB Device received data from the USB Host as part of current request processing.

+

The requestReceivedHandle function must enable notification to trigger this event. This makes sense only when CDC request processing requires a data stage.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__config__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__config__t.html new file mode 100644 index 0000000..3d32632 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__config__t.html @@ -0,0 +1,133 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_config_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_config_t Struct Reference
+
+
+

Description

+

USB Device configuration structure.

+
+ + + + + + + +

+Data Fields

uint8_t * ep0Buffer
 Pointer to the buffer to store data received from the USB Host through Endpoint 0. More...
 
+uint16_t ep0BufferSize
 Buffer size for Endpoint 0.
 
+

Field Documentation

+ +

◆ ep0Buffer

+ +
+
+ + + + +
uint8_t* cy_stc_usb_dev_config_t::ep0Buffer
+
+ +

Pointer to the buffer to store data received from the USB Host through Endpoint 0.

+

The buffer size must be large enough to store received data for all supported requests.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__configuration__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__configuration__t.html new file mode 100644 index 0000000..7fd1820 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__configuration__t.html @@ -0,0 +1,120 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_configuration_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_configuration_t Struct Reference
+
+
+

Description

+

USBFS Device Configuration structure.

+
+ + + + + + + + + + +

+Data Fields

+uint8_t numInterfaces
 Number of supported interfaces.
 
+const uint8_t * configDescriptor
 Pointer to uint8_t array that stores Configuration Descriptor.
 
+const cy_stc_usb_dev_interface_t ** interfaces
 Pointer to array of pointers to structure that store Interface information.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__context__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__context__t.html new file mode 100644 index 0000000..f42d588 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__context__t.html @@ -0,0 +1,103 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_context_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cy_stc_usb_dev_context_t Struct Reference
+
+
+

Description

+

USB Device context structure.

+

All fields for the USB Device context structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the middleware in function calls. Firmware must ensure that the defined instance of this structure remains in scope while the middleware is in use.

+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__control__transfer__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__control__transfer__t.html new file mode 100644 index 0000000..b62b538 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__control__transfer__t.html @@ -0,0 +1,144 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_control_transfer_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_control_transfer_t Struct Reference
+
+
+

Description

+

Execute transfer use this structure.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

+cy_stc_usb_dev_setup_packet_t setup
 Request packet.
 
+uint8_t * ptr
 Pointer to data to transfer or space to store data.
 
+uint8_t * buffer
 Pointer to buffer to store data send from host to device during control transfer.
 
+uint16_t remaining
 Number of bytes remaining to complete send or receive.
 
+uint16_t size
 Number of bytes to send or receive.
 
+uint16_t bufferSize
 Size of the buffer to store data.
 
+uint8_t direction
 Transfer direction.
 
+bool zlp
 Defines whether zero length packet is needed to complete data stage.
 
+bool notify
 Defines whether trigger callback that notifies end of data stage (device received data)
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__device__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__device__t.html new file mode 100644 index 0000000..00e1533 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__device__t.html @@ -0,0 +1,128 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_device_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_device_t Struct Reference
+
+
+

Description

+

USBFS Device structure.

+
+ + + + + + + + + + + + + + + + +

+Data Fields

+const uint8_t * deviceDescriptor
 Pointer to uint8_t array that stores Device Descriptor.
 
+const uint8_t * bosDescriptor
 Pointer to uint8_t array that stores BOS Descriptor.
 
+const cy_stc_usb_dev_string_tstrings
 Pointer to structure that stores Strings Descriptors information.
 
+uint8_t numConfigurations
 Number of supported configurations.
 
+const cy_stc_usb_dev_configuration_t ** configurations
 Pointer to array of pointers to structure that stores Configuration information.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__endpoint__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__endpoint__t.html new file mode 100644 index 0000000..296a582 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__endpoint__t.html @@ -0,0 +1,112 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_endpoint_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_endpoint_t Struct Reference
+
+
+

Description

+

USBFS Device endpointDescriptor structure.

+
+ + + + +

+Data Fields

+const uint8_t * endpointDescriptor
 Pointer to the endpointDescriptor Descriptor in the Configuration Descriptor.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__config__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__config__t.html new file mode 100644 index 0000000..38d6a1e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__config__t.html @@ -0,0 +1,133 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_hid_config_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_hid_config_t Struct Reference
+
+
+

Description

+

HID class configuration structure.

+
+ + + + + + + +

+Data Fields

uint8_t * timers
 The pointer to the HID idle rate timers array. More...
 
+uint8_t timersNum
 Number of HID idle rate timers (equal to number of report IDs, if report ID is not used report consumes 1 idle rate timer).
 
+

Field Documentation

+ +

◆ timers

+ +
+
+ + + + +
uint8_t* cy_stc_usb_dev_hid_config_t::timers
+
+ +

The pointer to the HID idle rate timers array.

+

The array size must be 2 times greater than number of HID idle rate timers.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__context__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__context__t.html new file mode 100644 index 0000000..0ac849a --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__context__t.html @@ -0,0 +1,103 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_hid_context_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
cy_stc_usb_dev_hid_context_t Struct Reference
+
+
+

Description

+

HID class context structure.

+

All fields for the HID context structure are internal. Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the middleware in HID function calls. Firmware must ensure that the defined instance of this structure remains in scope while the middleware is in use.

+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__t.html new file mode 100644 index 0000000..2c6acb3 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__hid__t.html @@ -0,0 +1,136 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_hid_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_hid_t Struct Reference
+
+
+

Description

+

USBFS Device HID structure.

+
+ + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

+const uint8_t * hidDescriptor
 Pointer to the HID Class Descriptor in the Configuration Descriptor.
 
+const uint8_t * reportDescriptor
 Pointer to uint8_t array that stores HID Report Descriptor.
 
+uint16_t reportDescriptorSize
 HID Report Descriptor size.
 
+uint8_t inputReportPos
 Start position of input report IDs in the array.
 
+uint8_t numInputReports
 Number of input report IDs.
 
+const uint8_t * inputReportIdx
 Array of indexes for input report IDs.
 
+uint8_t inputReportIdxSize
 Number of elements in the array of indexes.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__interface__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__interface__t.html new file mode 100644 index 0000000..a69ffac --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__interface__t.html @@ -0,0 +1,120 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_interface_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_interface_t Struct Reference
+
+
+

Description

+

USBFS Device Interface structure.

+
+ + + + + + + + + + +

+Data Fields

+uint8_t numAlternates
 Number of supported alternate settings.
 
+const cy_stc_usb_dev_alternate_t ** alternates
 Pointer to array of pointers to structure that stores Interface Alternates information.
 
+uint16_t endpointsMask
 Mask that represents endpoints that belong to Interface Alternates.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__ms__os__string__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__ms__os__string__t.html new file mode 100644 index 0000000..e0b715e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__ms__os__string__t.html @@ -0,0 +1,124 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_ms_os_string_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_ms_os_string_t Struct Reference
+
+
+

Description

+

USBFS Device MS OS String Descriptors structure.

+
+ + + + + + + + + + + + + +

+Data Fields

+const uint8_t * msOsDescriptor
 Pointer to MS OS String descriptor.
 
+uint8_t msVendorCode
 Vendor code to get Extended Compat ID and Properties OS Descriptors.
 
+const uint8_t * extCompatIdDescriptor
 Pointer to Extended Compat ID OS Descriptor.
 
+const uint8_t * extPropertiesDescriptor
 Pointer to Extended Properties OS Descriptor.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__setup__packet__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__setup__packet__t.html new file mode 100644 index 0000000..4ee1da7 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__setup__packet__t.html @@ -0,0 +1,128 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_setup_packet_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_setup_packet_t Struct Reference
+
+
+

Description

+

Store request.

+
+ + + + + + + + + + + + + + + + +

+Data Fields

+cy_stc_usb_dev_bm_request bmRequestType
 Request type.
 
+uint8_t bRequest
 Request value.
 
+uint16_t wValue
 Request value (2 bytes)
 
+uint16_t wIndex
 Request index (2 bytes)
 
+uint16_t wLength
 Request length (2 bytes)
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__string__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__string__t.html new file mode 100644 index 0000000..2e65b3e --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usb__dev__string__t.html @@ -0,0 +1,124 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usb_dev_string_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usb_dev_string_t Struct Reference
+
+
+

Description

+

USBFS Device String Descriptors structure.

+
+ + + + + + + + + + + + + +

+Data Fields

+uint8_t numStrings
 Number of String Descriptors.
 
+bool enableWindowsOsDescriptor
 Defines whether the MS OS String is enabled.
 
+const cy_stc_usb_dev_ms_os_string_tosStringDescriptors
 Defines MS OS Strings structures.
 
+const uint8_t ** stringDescriptors
 Pointer to array of pointers to String Descriptors.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__config__descr__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__config__descr__t.html new file mode 100644 index 0000000..13b3cf6 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__config__descr__t.html @@ -0,0 +1,157 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usbdev_config_descr_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usbdev_config_descr_t Struct Reference
+
+
+

Description

+

Configuration descriptor.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

+uint8_t bLength
 Size of Descriptor in Bytes.
 
+uint8_t bDescriptorType
 Configuration Descriptor.
 
+uint16_t wTotalLength
 Total length in bytes of data returned.
 
+uint8_t bNumInterfaces
 Number of Interfaces.
 
+uint8_t bConfigurationValue
 Value to use as an argument to select this configuration.
 
+uint8_t iConfiguration
 Index of String Descriptor describing this configuration.
 
uint8_t bmAttributes
 Bitmap: D7 Reserved, set to 1. More...
 
+uint8_t bMaxPower
 Maximum Power Consumption in 2 mA units.
 
+

Field Documentation

+ +

◆ bmAttributes

+ +
+
+ + + + +
uint8_t cy_stc_usbdev_config_descr_t::bmAttributes
+
+ +

Bitmap: D7 Reserved, set to 1.

+

(USB 1.0 Bus Powered) D6 Self Powered D5 Remote Wakeup D4..0 Reserved, set to 0.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__device__descr__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__device__descr__t.html new file mode 100644 index 0000000..a350913 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__device__descr__t.html @@ -0,0 +1,197 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usbdev_device_descr_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usbdev_device_descr_t Struct Reference
+
+
+

Description

+

Device descriptor.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

+uint8_t bLength
 Size of the Descriptor in Bytes.
 
+uint8_t bDescriptorType
 Constant Device Descriptor.
 
+uint16_t bcdUSB
 USB Specification Number to which the device complies.
 
uint8_t bDeviceClass
 Class Code (Assigned by USB Org): If equal to Zero, each interface specifies its own class code If equal to 0xFF, the class code is vendor specified. More...
 
+uint8_t bDeviceSubClass
 Subclass Code (Assigned by USB Org)
 
+uint8_t bDeviceProtocol
 Protocol Code (Assigned by USB Org)
 
uint8_t bMaxPacketSize
 Maximum Packet Size for Zero Endpoint. More...
 
+uint16_t idVendor
 Vendor ID (Assigned by USB Org)
 
+uint16_t idProduct
 Product ID (Assigned by Manufacturer)
 
+uint16_t bcdDevice
 Release Number.
 
+uint8_t iManufacturer
 Index of Manufacturer String Descriptor.
 
+uint8_t iProduct
 Index of Product String Descriptor.
 
+uint8_t iSerialNumber
 Index of Serial Number String Descriptor.
 
+uint8_t bNumConfigurations
 Number of Possible Configurations.
 
+

Field Documentation

+ +

◆ bDeviceClass

+ +
+
+ + + + +
uint8_t cy_stc_usbdev_device_descr_t::bDeviceClass
+
+ +

Class Code (Assigned by USB Org): If equal to Zero, each interface specifies its own class code If equal to 0xFF, the class code is vendor specified.

+

Otherwise, field is valid Class Code.

+ +
+
+ +

◆ bMaxPacketSize

+ +
+
+ + + + +
uint8_t cy_stc_usbdev_device_descr_t::bMaxPacketSize
+
+ +

Maximum Packet Size for Zero Endpoint.

+

Valid Sizes are 8, 16, 32, 64

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__endpoint__descr__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__endpoint__descr__t.html new file mode 100644 index 0000000..fbee02f --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__endpoint__descr__t.html @@ -0,0 +1,181 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usbdev_endpoint_descr_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usbdev_endpoint_descr_t Struct Reference
+
+
+

Description

+

Endpoint descriptor.

+
+ + + + + + + + + + + + + + + + + + + +

+Data Fields

+uint8_t bLength
 Size of Descriptor in Bytes.
 
+uint8_t bDescriptorType
 Endpoint Descriptor.
 
uint8_t bEndpointAddress
 Endpoint Address: Bits 0..3 Endpoint Number. More...
 
uint8_t bmAttributes
 Bitmap: Bits 0..1 Transfer Type: 00 = Control, 01 = Isochronous, 10 = Bulk, 11 = Interrupt Bits 2..7 are reserved. More...
 
+uint16_t wMaxPacketSize
 Maximum Packet Size this endpoint is capable of sending or receiving.
 
uint8_t bInterval
 Interval for polling endpoint data transfers. More...
 
+

Field Documentation

+ +

◆ bEndpointAddress

+ +
+
+ + + + +
uint8_t cy_stc_usbdev_endpoint_descr_t::bEndpointAddress
+
+ +

Endpoint Address: Bits 0..3 Endpoint Number.

+

Bits 4..6 Reserved. Set to Zero Bit 7 Direction 0 = Out, 1 = In (Ignored for Control Endpoints)

+ +
+
+ +

◆ bmAttributes

+ +
+
+ + + + +
uint8_t cy_stc_usbdev_endpoint_descr_t::bmAttributes
+
+ +

Bitmap: Bits 0..1 Transfer Type: 00 = Control, 01 = Isochronous, 10 = Bulk, 11 = Interrupt Bits 2..7 are reserved.

+

If Isochronous endpoint, Bits 3..2: Synchronization Type (Iso Mode): 00 = No Synchronization, 01 = Asynchronous, 10 = Adaptive, 11 = Synchronous Bits 5..4 = Usage Type (Iso Mode): 00 = Data Endpoint, 01 = Feedback Endpoint, 10 = Explicit Feedback Data Endpoint, 11 = Reserved

+ +
+
+ +

◆ bInterval

+ +
+
+ + + + +
uint8_t cy_stc_usbdev_endpoint_descr_t::bInterval
+
+ +

Interval for polling endpoint data transfers.

+

Value in frame counts. Ignored for Bulk & Control Endpoints. Isochronous must equal 1 and field may range from 1 to 255 for interrupt endpoints.

+ +
+
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__interface__descr__t.html b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__interface__descr__t.html new file mode 100644 index 0000000..864dba6 --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/structcy__stc__usbdev__interface__descr__t.html @@ -0,0 +1,144 @@ + + + + + + + + +Cypress USB Device Middleware Library 2.0: cy_stc_usbdev_interface_descr_t Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
Cypress USB Device Middleware Library 2.0
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
cy_stc_usbdev_interface_descr_t Struct Reference
+
+
+

Description

+

Interface descriptor.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

+uint8_t bLength
 Size of Descriptor in Bytes (9 Bytes)
 
+uint8_t bDescriptorType
 Interface Descriptor.
 
+uint8_t bInterfaceNumber
 Number of Interface.
 
+uint8_t bAlternateSetting
 Value used to select alternative setting.
 
+uint8_t bNumEndpoints
 Number of Endpoints used for this interface.
 
+uint8_t bInterfaceClass
 Class Code (Assigned by USB Org)
 
+uint8_t bInterfaceSubClass
 Subclass Code (Assigned by USB Org)
 
+uint8_t bInterfaceProtocol
 Protocol Code (Assigned by USB Org)
 
+uint8_t iInterface
 Index of String Descriptor describing this interface.
 
+
+
+ + + diff --git a/docs/usbfs_dev_api_reference_manual/html/sync_off.png b/docs/usbfs_dev_api_reference_manual/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/sync_off.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/sync_on.png b/docs/usbfs_dev_api_reference_manual/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/sync_on.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/tab_a.png b/docs/usbfs_dev_api_reference_manual/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/tab_a.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/tab_b.png b/docs/usbfs_dev_api_reference_manual/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/tab_b.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/tab_h.png b/docs/usbfs_dev_api_reference_manual/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/tab_h.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/tab_s.png b/docs/usbfs_dev_api_reference_manual/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/tab_s.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/tabs.css b/docs/usbfs_dev_api_reference_manual/html/tabs.css new file mode 100644 index 0000000..a28614b --- /dev/null +++ b/docs/usbfs_dev_api_reference_manual/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/docs/usbfs_dev_api_reference_manual/html/usb_dev_configurator.png b/docs/usbfs_dev_api_reference_manual/html/usb_dev_configurator.png new file mode 100644 index 0000000..230cf81 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/usb_dev_configurator.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/usb_dev_device_cfg.png b/docs/usbfs_dev_api_reference_manual/html/usb_dev_device_cfg.png new file mode 100644 index 0000000..ed6ff3d Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/usb_dev_device_cfg.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/usb_dev_solution_struct.png b/docs/usbfs_dev_api_reference_manual/html/usb_dev_solution_struct.png new file mode 100644 index 0000000..37335a9 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/usb_dev_solution_struct.png differ diff --git a/docs/usbfs_dev_api_reference_manual/html/usb_dev_system_cfg.png b/docs/usbfs_dev_api_reference_manual/html/usb_dev_system_cfg.png new file mode 100644 index 0000000..f7119b2 Binary files /dev/null and b/docs/usbfs_dev_api_reference_manual/html/usb_dev_system_cfg.png differ diff --git a/version.xml b/version.xml new file mode 100644 index 0000000..c61dfc6 --- /dev/null +++ b/version.xml @@ -0,0 +1 @@ +2.0.0.196