| 
									
										
										
										
											2019-03-20 16:11:42 +07:00
										 |  |  | /* 
 | 
					
						
							|  |  |  |  * The MIT License (MIT) | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2019-05-14 11:48:05 +07:00
										 |  |  |  * Copyright (c) 2019 Ha Thach (tinyusb.org) | 
					
						
							| 
									
										
										
										
											2019-03-20 16:11:42 +07:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Permission is hereby granted, free of charge, to any person obtaining a copy | 
					
						
							|  |  |  |  * of this software and associated documentation files (the "Software"), to deal | 
					
						
							|  |  |  |  * in the Software without restriction, including without limitation the rights | 
					
						
							|  |  |  |  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | 
					
						
							|  |  |  |  * copies of the Software, and to permit persons to whom the Software is | 
					
						
							|  |  |  |  * furnished to do so, subject to the following conditions: | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * The above copyright notice and this permission notice shall be included in | 
					
						
							|  |  |  |  * all copies or substantial portions of the Software. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 
					
						
							|  |  |  |  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 
					
						
							|  |  |  |  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | 
					
						
							|  |  |  |  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 
					
						
							|  |  |  |  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 
					
						
							|  |  |  |  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 
					
						
							|  |  |  |  * THE SOFTWARE. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is part of the TinyUSB stack. | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** \file
 | 
					
						
							|  |  |  |  *  \brief TBD | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *  \note TBD | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** \ingroup TBD
 | 
					
						
							|  |  |  |  *  \defgroup TBD | 
					
						
							|  |  |  |  *  \brief TBD | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *  @{ | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef _TUSB_TEST_DESCRIPTOR_H_
 | 
					
						
							|  |  |  | #define _TUSB_TEST_DESCRIPTOR_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  |  extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "common/common.h"
 | 
					
						
							|  |  |  | #include "class/hid.h"
 | 
					
						
							| 
									
										
										
										
											2013-05-09 12:49:52 +07:00
										 |  |  | #include "class/msc.h"
 | 
					
						
							| 
									
										
										
										
											2013-09-24 15:05:11 +07:00
										 |  |  | #include "class/cdc.h"
 | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | typedef struct | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_configuration_t                configuration; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #if 0 //&& IAD_DESC_REQUIRED
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_assoc_t     CDC_IAD; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-12 13:23:52 +07:00
										 |  |  | #if 0 //&& CFG_TUD_CDC
 | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  |   //CDC - Serial
 | 
					
						
							|  |  |  |   //CDC Control Interface
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                 CDC_CCI_Interface; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  |   CDC_HEADER_DESCRIPTOR                       CDC_Header; | 
					
						
							|  |  |  |   CDC_ABSTRACT_CONTROL_MANAGEMENT_DESCRIPTOR  CDC_ACM; | 
					
						
							|  |  |  |   CDC_UNION_1SLAVE_DESCRIPTOR                 CDC_Union; | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_endpoint_t                  CDC_NotificationEndpoint; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   //CDC Data Interface
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                 CDC_DCI_Interface; | 
					
						
							|  |  |  |   tusb_desc_endpoint_t                  CDC_DataOutEndpoint; | 
					
						
							|  |  |  |   tusb_desc_endpoint_t                  CDC_DataInEndpoint; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-07 15:48:01 +07:00
										 |  |  |   //------------- HID Keyboard -------------//
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                    keyboard_interface; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  |   tusb_hid_descriptor_hid_t                      keyboard_hid; | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_endpoint_t                     keyboard_endpoint; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-07 15:48:01 +07:00
										 |  |  |   //------------- HID Mouse -------------//
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                    mouse_interface; | 
					
						
							| 
									
										
										
										
											2013-04-07 15:48:01 +07:00
										 |  |  |   tusb_hid_descriptor_hid_t                      mouse_hid; | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_endpoint_t                     mouse_endpoint; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-09 12:49:52 +07:00
										 |  |  |   //------------- Mass Storage -------------//
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                    msc_interface; | 
					
						
							|  |  |  |   tusb_desc_endpoint_t                     msc_endpoint_in; | 
					
						
							|  |  |  |   tusb_desc_endpoint_t                     msc_endpoint_out; | 
					
						
							| 
									
										
										
										
											2013-05-09 12:49:52 +07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-09-24 15:05:11 +07:00
										 |  |  |   //------------- CDC Serial -------------//
 | 
					
						
							|  |  |  |   //CDC Control Interface
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                  cdc_comm_interface; | 
					
						
							| 
									
										
										
										
											2013-09-24 15:05:11 +07:00
										 |  |  |   cdc_desc_func_header_t                       cdc_header; | 
					
						
							| 
									
										
										
										
											2018-03-23 12:42:30 +07:00
										 |  |  |   cdc_desc_func_acm_t  cdc_acm; | 
					
						
							| 
									
										
										
										
											2013-09-24 15:05:11 +07:00
										 |  |  |   cdc_desc_func_union_t                        cdc_union; | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_endpoint_t                   cdc_endpoint_notification; | 
					
						
							| 
									
										
										
										
											2013-09-24 15:05:11 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   //CDC Data Interface
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  |   tusb_desc_interface_t                  cdc_data_interface; | 
					
						
							|  |  |  |   tusb_desc_endpoint_t                   cdc_endpoint_out; | 
					
						
							|  |  |  |   tusb_desc_endpoint_t                   cdc_endpoint_in; | 
					
						
							| 
									
										
										
										
											2013-09-24 15:05:11 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  |   unsigned char                               ConfigDescTermination; | 
					
						
							|  |  |  | } app_configuration_desc_t; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-23 12:32:40 +07:00
										 |  |  | extern tusb_desc_device_t const desc_device; | 
					
						
							| 
									
										
										
										
											2013-02-06 12:03:01 +07:00
										 |  |  | extern app_configuration_desc_t const desc_configuration; | 
					
						
							| 
									
										
										
										
											2013-03-25 17:39:22 +07:00
										 |  |  | extern const uint8_t keyboard_report_descriptor[]; | 
					
						
							| 
									
										
										
										
											2013-02-05 13:57:06 +07:00
										 |  |  | 
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  |  } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* _TUSB_TEST_DESCRIPTOR_H_ */
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** @} */ |