LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
usbd_hw.h
Go to the documentation of this file.
1
/*
2
* @brief USB ROM based hardware function prototypes
3
*
4
* @note
5
* Copyright(C) NXP Semiconductors, 2012
6
* All rights reserved.
7
*
8
* @par
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.
22
*
23
* @par
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
29
* this code.
30
*/
31
32
#include "
error.h
"
33
#include "
usbd.h
"
34
#include "
usbd_core.h
"
35
36
#ifndef __USBHW_H__
37
#define __USBHW_H__
38
39
50
enum
USBD_EVENT_T
{
51
USB_EVT_SETUP
=1,
52
USB_EVT_OUT
,
53
USB_EVT_IN
,
54
USB_EVT_OUT_NAK
,
55
USB_EVT_IN_NAK
,
56
USB_EVT_OUT_STALL
,
57
USB_EVT_IN_STALL
,
58
USB_EVT_OUT_DMA_EOT
,
59
USB_EVT_IN_DMA_EOT
,
60
USB_EVT_OUT_DMA_NDR
,
61
USB_EVT_IN_DMA_NDR
,
62
USB_EVT_OUT_DMA_ERR
,
63
USB_EVT_IN_DMA_ERR
,
64
USB_EVT_RESET
,
65
USB_EVT_SOF
,
66
USB_EVT_DEV_STATE
,
67
USB_EVT_DEV_ERROR
,
68
};
69
77
typedef
struct
USBD_HW_API
78
{
90
uint32_t
(*GetMemSize)(
USBD_API_INIT_PARAM_T
* param);
91
106
ErrorCode_t
(*Init)(
USBD_HANDLE_T
* phUsb,
USB_CORE_DESCS_T
* pDesc,
USBD_API_INIT_PARAM_T
* param);
107
121
void (*Connect)(
USBD_HANDLE_T
hUsb,
uint32_t
con);
122
134
void (*
ISR
)(
USBD_HANDLE_T
hUsb);
135
146
void (*Reset)(
USBD_HANDLE_T
hUsb);
147
159
void (*ForceFullSpeed )(
USBD_HANDLE_T
hUsb,
uint32_t
cfg);
160
178
void (*WakeUpCfg)(
USBD_HANDLE_T
hUsb,
uint32_t
cfg);
179
195
void (*SetAddress)(
USBD_HANDLE_T
hUsb,
uint32_t
adr);
196
211
void (*Configure)(
USBD_HANDLE_T
hUsb,
uint32_t
cfg);
212
228
void (*ConfigEP)(
USBD_HANDLE_T
hUsb, USB_ENDPOINT_DESCRIPTOR *pEPD);
229
244
void (*DirCtrlEP)(
USBD_HANDLE_T
hUsb,
uint32_t
dir);
245
256
void (*EnableEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum);
257
268
void (*DisableEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum);
269
280
void (*ResetEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum);
281
292
void (*SetStallEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum);
293
304
void (*ClrStallEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum);
305
322
ErrorCode_t
(*SetTestMode)(
USBD_HANDLE_T
hUsb, uint8_t
mode
);
323
336
uint32_t
(*ReadEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum, uint8_t *pData);
337
352
uint32_t
(*ReadReqEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum, uint8_t *pData,
uint32_t
len);
353
366
uint32_t
(*ReadSetupPkt)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum,
uint32_t
*pData);
367
381
uint32_t
(*WriteEP)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum, uint8_t *pData,
uint32_t
cnt);
382
396
void (*WakeUp)(
USBD_HANDLE_T
hUsb);
397
413
ErrorCode_t
(*EnableEvent)(
USBD_HANDLE_T
hUsb,
uint32_t
EPNum,
uint32_t
event_type,
414
uint32_t
enable);
415
416
}
USBD_HW_API_T
;
417
418
419
420
421
#endif
/* __USBHW_H__ */
software
LPCUSBLib
Drivers
USB
Core
LPC
DCD
USBRom
usbd_hw.h
Generated on Fri Nov 16 2012 13:36:47 for LPCOpen Platform by
1.8.2