2 * @brief Definition of functions exported by ROM based USB device stack
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __MW_USBD_ROM_API_H
\r
33 #define __MW_USBD_ROM_API_H
\r
37 #include "usbd_hw.h"
\r
38 #include "usbd_core.h"
\r
39 #include "usbd_mscuser.h"
\r
40 #include "usbd_dfuuser.h"
\r
41 #include "usbd_hiduser.h"
\r
42 #include "usbd_cdcuser.h"
\r
44 /** @brief Main USBD API functions structure.
\r
45 * @ingroup Group_USBD
\r
47 * This structure contains pointer to various USB Device stack's sub-module
\r
48 * function tables. This structure is used as main entry point to access
\r
49 * various methods (grouped in sub-modules) exposed by ROM based USB device
\r
53 typedef struct USBD_API
\r
55 const USBD_HW_API_T* hw; /**< Pointer to function table which exposes functions
\r
56 which interact directly with USB device stack's core
\r
58 const USBD_CORE_API_T* core; /**< Pointer to function table which exposes functions
\r
59 which interact directly with USB device controller
\r
61 const USBD_MSC_API_T* msc; /**< Pointer to function table which exposes functions
\r
62 provided by MSC function driver module.
\r
64 const USBD_DFU_API_T* dfu; /**< Pointer to function table which exposes functions
\r
65 provided by DFU function driver module.
\r
67 const USBD_HID_API_T* hid; /**< Pointer to function table which exposes functions
\r
68 provided by HID function driver module.
\r
70 const USBD_CDC_API_T* cdc; /**< Pointer to function table which exposes functions
\r
71 provided by CDC-ACM function driver module.
\r
73 const uint32_t* reserved6; /**< Reserved for future function driver module.
\r
75 const uint32_t version; /**< Version identifier of USB ROM stack. The version is
\r
76 defined as 0x0CHDMhCC where each nibble represnts version
\r
77 number of the corresponding component.
\r
78 CC - 7:0 - 8bit core version number
\r
79 h - 11:8 - 4bit hardware interface version number
\r
80 M - 15:12 - 4bit MSC class module version number
\r
81 D - 19:16 - 4bit DFU class module version number
\r
82 H - 23:20 - 4bit HID class module version number
\r
83 C - 27:24 - 4bit CDC class module version number
\r
84 H - 31:28 - 4bit reserved
\r
89 #define USBD_API (((USBD_API_T*)(ROM_USBD_PTR)))
\r
91 extern USBD_HANDLE_T UsbHandle;
\r
93 /* USBD core functions */
\r
94 void UsbdRom_Init(uint8_t corenum);
\r
95 void UsbdRom_IrqHandler(void);
\r
96 /* USBD MSC functions */
\r
97 void UsbdMsc_Init(void);
\r
98 /* USBD HID functions */
\r
99 void UsbdHid_Init(void);
\r
100 /* USBD CDC functions */
\r
101 void UsbdCdc_Init(void);
\r
102 #endif /*__MW_USBD_ROM_API_H*/
\r