]> git.sur5r.net Git - armstart-ibdap/blob - inc/usbd/usbd_rom_api.h
Fix build
[armstart-ibdap] / inc / usbd / usbd_rom_api.h
1 /***********************************************************************\r
2 * $Id:: mw_usbd_rom_api.h 331 2012-08-09 18:54:34Z usb10131                   $\r
3 *\r
4 * Project: USB device ROM Stack\r
5 *\r
6 * Description:\r
7 *     ROM API Module definitions.\r
8 *\r
9 ***********************************************************************\r
10 *   Copyright(C) 2011, NXP Semiconductor\r
11 *   All rights reserved.\r
12 *\r
13 * Software that is described herein is for illustrative purposes only\r
14 * which provides customers with programming information regarding the\r
15 * products. This software is supplied "AS IS" without any warranties.\r
16 * NXP Semiconductors assumes no responsibility or liability for the\r
17 * use of the software, conveys no license or title under any patent,\r
18 * copyright, or mask work right to the product. NXP Semiconductors\r
19 * reserves the right to make changes in the software without\r
20 * notification. NXP Semiconductors also make no representation or\r
21 * warranty that such application will be suitable for the specified\r
22 * use without further testing or modification.\r
23 **********************************************************************/\r
24 #ifndef __MW_USBD_ROM_API_H\r
25 #define __MW_USBD_ROM_API_H\r
26 /** \file\r
27  *  \brief ROM API for USB device stack.\r
28  *\r
29  *  Definition of functions exported by ROM based USB device stack.\r
30  *\r
31  */\r
32 \r
33 #include "error.h"\r
34 #include "usbd.h"\r
35 #include "usbd_hw.h"\r
36 #include "usbd_core.h"\r
37 #include "usbd_mscuser.h"\r
38 #include "usbd_dfuuser.h"\r
39 #include "usbd_hiduser.h"\r
40 #include "usbd_cdcuser.h"\r
41 \r
42 /** \brief Main USBD API functions structure.\r
43  *  \ingroup Group_USBD\r
44  *\r
45  *  This structure contains pointer to various USB Device stack's sub-module \r
46  *  function tables. This structure is used as main entry point to access\r
47  *  various methods (grouped in sub-modules) exposed by ROM based USB device \r
48  *  stack.\r
49  *\r
50  */\r
51 typedef struct USBD_API \r
52 {\r
53   const USBD_HW_API_T* hw; /**< Pointer to function table which exposes functions \r
54                            which interact directly with USB device stack's core \r
55                            layer.*/\r
56   const USBD_CORE_API_T* core; /**< Pointer to function table which exposes functions \r
57                            which interact directly with USB device controller \r
58                            hardware.*/\r
59   const USBD_MSC_API_T* msc; /**< Pointer to function table which exposes functions \r
60                            provided by MSC function driver module.\r
61                            */\r
62   const USBD_DFU_API_T* dfu; /**< Pointer to function table which exposes functions \r
63                            provided by DFU function driver module.\r
64                            */\r
65   const USBD_HID_API_T* hid; /**< Pointer to function table which exposes functions \r
66                            provided by HID function driver module.\r
67                            */\r
68   const USBD_CDC_API_T* cdc; /**< Pointer to function table which exposes functions \r
69                            provided by CDC-ACM function driver module.\r
70                            */\r
71   const uint32_t* reserved6; /**< Reserved for future function driver module.\r
72                            */\r
73   const uint32_t version; /**< Version identifier of USB ROM stack. The version is\r
74                           defined as 0x0CHDMhCC where each nibble represents version\r
75                           number of the corresponding component.\r
76                           CC -  7:0  - 8bit core version number\r
77                            h - 11:8  - 4bit hardware interface version number\r
78                            M - 15:12 - 4bit MSC class module version number\r
79                            D - 19:16 - 4bit DFU class module version number\r
80                            H - 23:20 - 4bit HID class module version number\r
81                            C - 27:24 - 4bit CDC class module version number\r
82                            H - 31:28 - 4bit reserved \r
83                            */\r
84 \r
85 } USBD_API_T;\r
86 \r
87 /* Applications using USBD ROM API should define this instance. The pointer should be assigned a value computed based on chip definitions. */ \r
88 extern const USBD_API_T* g_pUsbApi;\r
89 #define USBD_API g_pUsbApi\r
90 \r
91 #endif /*__MW_USBD_ROM_API_H*/\r
92 \r