NUC472_NUC442_BSP
V3.03.004
The Board Support Package for NUC472/NUC442
UsbHostLib
INCLUDE
usbh_config.h
Go to the documentation of this file.
1
/**************************************************************************/
12
#ifndef _USB_CONFIG_H_
13
#define _USB_CONFIG_H_
14
15
30
31
#ifdef __ICCARM__
32
#define __inline inline
33
#endif
34
35
36
/*
37
* Debug messages...
38
*/
39
//#define USB_DEBUG /*!< Enable debug message \hideinitializer */
40
//#define USB_VERBOSE_DEBUG
41
//#define DUMP_DEV_DESCRIPTORS
42
44
45
/*
46
* Static Memory Settings...
47
*/
48
#define DEV_MAX_NUM 8
49
#define URB_MAX_NUM 12
50
#define ED_MAX_NUM 12
51
#define TD_MAX_NUM 64
53
#define MAX_ENDPOINTS 16
54
#define MAX_DRIVER_PER_DEV 3
55
#define MAX_TD_PER_OHCI_URB 8
56
#define MAX_HUB_DEVICE 2
59
#define ISO_FRAME_COUNT 1
60
#define OHCI_ISO_DELAY 8
62
/*
63
* Class driver support...
64
*/
65
#define SUPPORT_HUB_CLASS
69
70
/*
71
* Debug/Warning/Information to be printed on console or not
72
*/
73
#define USB_error printf
74
#ifdef USB_DEBUG
75
#define USB_debug printf
76
#else
77
#define USB_debug(...)
78
#endif
79
80
#ifdef USB_VERBOSE_DEBUG
81
#define USB_warning printf
82
#define USB_info printf
83
#else
84
#define USB_warning(...)
85
#define USB_info(...)
86
#endif
87
88
#define DISABLE_USB_INT() NVIC_DisableIRQ(USBH_IRQn);
89
#define ENABLE_USB_INT() NVIC_EnableIRQ(USBH_IRQn);
90
91
92
/*
93
* I/O
94
*/
95
#define OHCI_BASE_ADDR 0x40009000
96
97
#define USB_JIFFY (OHCI->FMNUM & 0xffff)
98
99
100
/*--- CPU clock speed ---*/
101
#define HZ (84)
102
103
#define USB_SWAP16(x) (((x>>8)&0xff)|((x&0xff)<<8))
104
#define USB_SWAP32(x) (((x>>24)&0xff)|((x>>8)&0xff00)|((x&0xff00)<<8)|((x&0xff)<<24))
105
107
108
/* end of group NUC472_442_USBH_EXPORTED_CONSTANTS USBH Exported Constants */
110
/* end of group NUC472_442_USBH_Driver */
112
/* end of group NUC472_442_Device_Driver */
114
115
/*** (C) COPYRIGHT 2014 Nuvoton Technology Corp. ***/
116
117
#endif
/* _USB_CONFIG_H_ */
118
119
Generated on Mon Mar 6 2023 17:01:53 for NUC472_NUC442_BSP by
1.9.3