# USB driver



## newhost (Jan 21, 2016)

Good evening tell me code if you can code simple usb driver in C++, I need the mouse to read the data.


----------



## Maelstorm (Jan 22, 2016)

I am not entirely sure of what you are asking.

I'm quite sure that several of us on here can write a USB driver.  But why C++ instead of C?  The kernel doesn't really use C++.  I'm sure it's possible, but kernel code needs to be correct for security concerns and tight for performance reasons.  It's hard to get that with C++, especially in a kernel environment where one coding mistake can lead to a system panic.

You need the mouse to *read* data?  I am assuming that you are talking about a USB mouse.  In that case, there is bidirectional data transfer, but sending stuff to the mouse is somewhat counter productive.  Unless of course you are trying to set control parameters for the mouse, which would be the only thing that the mouse can "read."


----------

