USB drive for micro framework has also been developed for some time, with the development of in-depth, the USB understanding is gradually clear up.
From the system architecture for the micro Framework to develop a USB drive has three levels of work. One is for the USB chip drive porting (many arm CPUs are integrated USB function), to achieve MF HAL layer requirements of the USB interface; The second is to develop PC platform for MF device USB drive; The third is to write applications (not micro framework applications), Communicate directly with MF device via USB interface (this work is I add, in fact, the first two steps to complete the work, has made Mfdeploy and VS2008 and equipment normal communication).
Below I for these three levels, detailed said my development work.
USB-driven porting
This is the hardest step, especially for people who don't know anything about USB. The USB development interface for the Micro farmework is as follows (with the HAL layer and the PAL layer interface, where the PAL layer code has been provided without any programming required).
1. Cpu_usb_getinterruptstate Function
Determines whether there are currently interrupts for the USB port.
2. Cpu_usb_initialize Function
Initializes the client module at the driver layer.
3. Cpu_usb_protectpins Function
Puts USB pins into a known state to prevent spurious inputs.
4. Cpu_usb_rxenable Function
Enables a specified USB port to receive data.
5. Cpu_usb_startoutput Function
Begins sending output to a specified USB port.
6. Cpu_usb_uninitialize Function
Uninitializes (shuts down) USB communications at the driver layer.
7. Usb_clearevent Function
Clears one or more USB events.
8. Usb_flush Function
Flushes the buffers associated with USB ports.