1 /***********************************************************************
\r
2 * $Id:: mw_usbd_rom_api.h 331 2012-08-09 18:54:34Z usb10131 $
\r
4 * Project: USB device ROM Stack
\r
7 * ROM API Module definitions.
\r
9 ***********************************************************************
\r
10 * Copyright(C) 2011, NXP Semiconductor
\r
11 * All rights reserved.
\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
27 * \brief ROM API for USB device stack.
\r
29 * Definition of functions exported by ROM based USB device stack.
\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
42 /** \brief Main USBD API functions structure.
\r
43 * \ingroup Group_USBD
\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
51 typedef struct USBD_API
\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
56 const USBD_CORE_API_T* core; /**< Pointer to function table which exposes functions
\r
57 which interact directly with USB device controller
\r
59 const USBD_MSC_API_T* msc; /**< Pointer to function table which exposes functions
\r
60 provided by MSC function driver module.
\r
62 const USBD_DFU_API_T* dfu; /**< Pointer to function table which exposes functions
\r
63 provided by DFU function driver module.
\r
65 const USBD_HID_API_T* hid; /**< Pointer to function table which exposes functions
\r
66 provided by HID function driver module.
\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
71 const uint32_t* reserved6; /**< Reserved for future function driver module.
\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
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
91 #endif /*__MW_USBD_ROM_API_H*/
\r