Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Developing a WDF USB Kernel Mode Driver for the OSR USB FX2

, 30 Mar 2006
This article describes the process of developing a USB Kernel mode device driver using the WDF Kernel Mode Driver Foundation.
article_demo.zip
kmdf_usb_driver.zip
WDF_Usb_driver
makefile
sources
wdf_usb_man.inf

#ifndef __WDF_USB_DD_PUBLIC__
#define __WDF_USB_DD_PUBLIC__

/*WDF USB device GUID*/
// {C6B78DFF-B260-4161-84ED-09CA267F3E15}
DEFINE_GUID(GUID_DEVINTERFACE_FX2, 
0xc6b78dff, 0xb260, 0x4161, 0x84, 0xed, 0x9, 0xca, 0x26, 0x7f, 0x3e, 0x15);

/*device IO control codes for the WDF USB driver*/
#define IOCTL_INDEX             0x800
#define FILE_DEVICE_USB_FX2     0x65500

#define IOCTL_WDF_USB_GET_SWITCHSTATE CTL_CODE(FILE_DEVICE_USB_FX2,     \
                                                     IOCTL_INDEX,       \
                                                     METHOD_BUFFERED,   \
                                                     FILE_READ_ACCESS)

#define IOCTL_WDF_USB_SET_LIGHTBAR    CTL_CODE(FILE_DEVICE_USB_FX2,     \
                                                     IOCTL_INDEX + 1,   \
                                                     METHOD_BUFFERED,   \
                                                     FILE_WRITE_ACCESS)

#define IOCTL_WDF_USB_GET_LIGHTBAR    CTL_CODE(FILE_DEVICE_USB_FX2,     \
                                                     IOCTL_INDEX + 2,   \
                                                     METHOD_BUFFERED,   \
                                                     FILE_READ_ACCESS)

#define IOCTL_WDF_USB_GET_SWITCHSTATE_CHANGE CTL_CODE(FILE_DEVICE_USB_FX2,\
                                                     IOCTL_INDEX + 3,       \
                                                     METHOD_BUFFERED,   \
                                                     FILE_READ_ACCESS)
#endif //__WDF_USB_DD_PUBLIC__

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Bruno van Dooren
Web Developer
Belgium Belgium
I am a professional software developer with an interest in everything that is about making hardware work.
 
In the course of my work, I have programmed device drivers and services on Windows and linux.
 
I have written firmware for embedded devices in C and assembly language, and have designed and implemented real-time applications for testing of sattelite payload equipment.
 
Generally, finding out how to interface hardware with software is my hobby and job.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 30 Mar 2006
Article Copyright 2006 by Bruno van Dooren
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid