2 * @brief Configuration file needed for USB ROM stack based applications.
5 * Copyright(C) NXP Semiconductors, 2013
9 * Software that is described herein is for illustrative purposes only
10 * which provides customers with programming information regarding the
11 * LPC products. This software is supplied "AS IS" without any warranties of
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
13 * all warranties, express or implied, including all implied warranties of
14 * merchantability, fitness for a particular purpose and non-infringement of
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
16 * or liability for the use of the software, conveys no license or rights under any
17 * patent, copyright, mask work right, or any other intellectual property rights in
18 * or to any products. NXP Semiconductors reserves the right to make changes
19 * in the software without notification. NXP Semiconductors also makes no
20 * representation or warranty that such application will be suitable for the
21 * specified use without further testing or modification.
24 * Permission to use, copy, modify, and distribute this software and its
25 * documentation is hereby granted, under NXP Semiconductors' and its
26 * licensor's relevant copyrights in the software, without fee, provided that it
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
28 * copyright, permission, and disclaimer notice must appear in all copies of
31 #include "lpc_types.h"
33 #include "usbd_rom_api.h"
35 #ifndef __APP_USB_CFG_H_
36 #define __APP_USB_CFG_H_
43 /** @ingroup EXAMPLES_USBDROM_11UXX_HID_GENERIC
47 /* HID In/Out Endpoint Address */
48 #define HID_EP_IN 0x81
49 #define HID_EP_OUT 0x01
51 /* The following manifest constants are used to define this memory area to be used
54 #define USB_STACK_MEM_BASE 0x20004000
55 #define USB_STACK_MEM_SIZE 0x0800
57 /* Manifest constants used by USBD ROM stack. These values SHOULD NOT BE CHANGED
58 for advance features which require usage of USB_CORE_CTRL_T structure.
59 Since these are the values used for compiling USB stack.
61 #define USB_MAX_IF_NUM 8 /*!< Max interface number used for building USBDL_Lib. DON'T CHANGE. */
62 #define USB_MAX_EP_NUM 5 /*!< Max number of EP used for building USBD ROM. DON'T CHANGE. */
63 #define USB_MAX_PACKET0 64 /*!< Max EP0 packet size used for building USBD ROM. DON'T CHANGE. */
64 #define USB_FS_MAX_BULK_PACKET 64 /*!< MAXP for FS bulk EPs used for building USBD ROM. DON'T CHANGE. */
65 #define USB_HS_MAX_BULK_PACKET 512 /*!< MAXP for HS bulk EPs used for building USBD ROM. DON'T CHANGE. */
66 #define USB_DFU_XFER_SIZE 2048 /*!< Max DFU transfer size used for building USBD ROM. DON'T CHANGE. */
68 /* USB descriptor arrays defined *_desc.c file */
69 extern const uint8_t USB_DeviceDescriptor[];
70 extern uint8_t USB_FsConfigDescriptor[];
71 extern const uint8_t USB_StringDescriptor[];
72 extern const uint8_t USB_DeviceQualifier[];
75 extern const uint8_t HID_ReportDescriptor[];
76 extern const uint8_t hid_report_size;
79 * @brief Find the address of interface descriptor for given class type.
80 * @param pDesc : Pointer to configuration descriptor in which the desired class
81 * interface descriptor to be found.
82 * @param intfClass : Interface class type to be searched.
83 * @return If found returns the address of requested interface else returns NULL.
85 extern USB_INTERFACE_DESCRIPTOR *find_IntfDesc(const uint8_t *pDesc, uint32_t intfClass);
95 #endif /* __APP_USB_CFG_H_ */