The default value of S3C2440 is a usb device, a usb host, that is, a main port and a slave port. Let's take a look at the knowledge about USB Device and USB Host.
USB Host:
The bottom layer is the USB Host Controller, and the upper layer is the USB Host Controller Driver, which is responsible for communicating with hardware to transmit data. In WinCE, UHCI, OHCI, and EHCI are supported. Host Core Driver & Hub Driver is a hardware-independent USB protocol stack that supports the USB Host protocol and USB Hub functions. The upper layer is that the USB Host Class driver is the application protocol of the USB Host. Currently, in WinCE, four applications are supported: RNDIS, Print, Mass Storage, and HID.
USB Device:
The bottom layer is the USB Device controller, and the upper layer is the USB Device Driver responsible for communication with hardware. The Device Core Driver is the protocol stack of the USB Device. The top layer is the application layer of the USB Device. Currently, the RNDIS, Serial, and Mass Storage applications are supported in WinCE.
In Catalog Items View,
USB Function Driver: used to support USB Device drivers.
USB Host Support: used to Support USB Host Controller drivers.
To change the USB Device to a USB Host, both hardware and software must be modified.
For hardware, see the schematic diagram. It seems that two resistors need to be modified;
Software: First remove the USB Function driver. You can set BSP_NOUSBFN = 1, and then modify the miscr register value, miscr [3] SEL_USBPAD: USB1 Host/Device select register. 0 = Use USB1 as Device, 1 = USE USB1 as Host. change the 3rd-bit miscr value to 1. modify this value in the initialization function and add a line of code s2440IOP-> miscr |=( 1 <3 );
---------------------------------------------------------------------
Respect others' labor results, reprinted please indicate the source http://www.cnblogs.com/feishanm