Development of Micro Framework USB driver

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.