Questions tagged [device-driver]

A device driver is a specialized software component (usually considered "system software") which allows a system to interact with a particular type or class of hardware device, such as a keyboard, serial port, disk drive, video display, memory controller, or other peripheral.

A device driver performs translation between logical operations from the operating system or application and physical actions of a hardware device. If the hardware device supports interrupts, the device driver fields and processes its interrupts, possibly arranging for the requesting application to sleep as appropriate.

Device drivers developed since the 1980s are usually written in a high level language, most often C. They usually execute in the most trusted CPU context of the operating system (variously called "kernel mode", "ring 0", "executive mode", etc.) and so have significant restrictions on what actions they can perform. In particular, they usually lack access to a runtime library; often they cannot perform floating point operations within interrupt context.

A Virtual Device Driver is a special flavor where the driver emulates a hardware device, particularly in virtualization environments. There is also the which play a special role in the Linux kernel.

1100 questions
6
votes
1 answer

How come two devices share the same major-minor device number?

I am reading "Linux device drivers, 3rd edition", and found something i can't understand. in Chapter 3.2, the author said: Traditionally, the major number identifies the driver associated with the device. The minor number is used by the kernel to…
kumo
  • 227
  • 1
  • 10
6
votes
3 answers

Programming a USB transfer cable / talking to a USB device driver

How do I programmatically access a USB transfer cable (such as Belkin's Easy Transfer Cable) from Windows? I'm familiar with libusb-win32, but from what I can tell, using that with newer devices and with Windows Vista seems iffy. I know that Windows…
Josh Kelley
  • 56,064
  • 19
  • 146
  • 246
6
votes
2 answers

How to create a display for OS X?

I need to write what I think is a display driver for OS X. It's like those "Use your iPad as a second monitor!" apps, but I need to write the OS X software that will register another display with OS X, and give me the pixel data so I can use it for…
6
votes
3 answers

How to get RGB pixel values from Linux framebuffer?

I want to get RGB values of screen pixels in the most efficient way, using Linux. So I decided to use the framebuffer library in C (fb.h) to access the framebuffer device (/dev/fb0) and read from it directly. This is the code: #include…
Sergio
  • 844
  • 2
  • 9
  • 26
6
votes
4 answers

dpinst / DifX won't install signed driver silently

When installing a signed driver (i.e. with a properly signed .CAB) on Windows 7 through DpInst, unless it's a WHQL-signed driver, you cannot install it silently. If you run DpInst in the non-silent mode, it'll prompt you to trust the "publisher". If…
Ilya
  • 5,533
  • 2
  • 29
  • 57
6
votes
3 answers

how to get memory dump after blue screen

I'm getting a lovely BSOD on bootup (STOP: 0x0000007E) from a driver I'm writing, and would like to load up the memory dump for analysis. However, it's not getting dumped anywhere. Everything is setup correctly in the Startup and Recovery…
user464164
  • 169
  • 1
  • 8
6
votes
3 answers

Need to write driver for USB peripheral device?

I'm working on designing a USB peripheral which will occasionally connect to a Windows PC, and transfer a few KB of data in each direction. There will be a custom PC application that controls the data transfers, using a proprietary protocol (i.e.…
cp.engr
  • 2,291
  • 4
  • 28
  • 42
6
votes
2 answers

Seq-locks vs RCU vs Per-CPU use cases

I am trying to understand different use cases for some of the kernel synchronization mechanisms (sequential locks vs RCU (Read-Copy-Update) vs Per-CPU locks) are recommended to be used in writing your device driver or kernel module. Any examples…
Greg Petr
  • 1,099
  • 2
  • 11
  • 18
6
votes
3 answers

How to subtract one generic list from another in C#2.0

First of all, it very well could be that I'm approaching my problem the wrong way, in which case I'd gladly accept alternatives. What I'm trying to achieve is to detect which drive was created after a USB device has been connected to a…
Fueled
  • 8,776
  • 9
  • 29
  • 31
6
votes
2 answers

Explanation of fuzz and flat in input_absinfo struct in input.h

I'm trying to tweak the sensitivity of a joystick which does not work correctly with SDL, using the EVIOCSABS call from input.h. I think that the fuzz and flat members of the input_absinfo struct affect the sensitivity of the axes, but after not a…
jmm
  • 341
  • 1
  • 3
  • 5
6
votes
1 answer

Is there a way to programmatically find chipset's north bridge, south bridge names and other hardware info on windows?

Is there a way to programmatically find system chipset's north bridge, south bridge names and other hardware info on windows ? I don't think WMI provides this information. I'm trying to find out how tools like hwinfo and cpuinfo find this…
ivymike
  • 1,511
  • 2
  • 20
  • 27
6
votes
3 answers

C Linux Device Programming - Reading Straight from /Dev

I have been playing with creating sounds using mathematical wave functions in C. The next step in my project is getting user input from a MIDI keyboard controller in order to modulate the waves to different pitches. My first notion was that this…
Kokopelli
  • 371
  • 2
  • 8
6
votes
1 answer

Memory mapped registers in Python

Has anyone come up with a good solution for working with memory-mapped device registers under Python? Ideally, something that would allow me to work with named registers, and even named bitfields in those registers, in a way that's not entirely ad…
Rgaddi
  • 445
  • 1
  • 4
  • 11
5
votes
2 answers

How to directly write to the frame buffer in windows driver

I am writing the driver that can directly write data to the frame buffer, so that I can show the secret message on the screen while the applications in user space can't get it. Below is my code that trying to write the value to the frame buffer, but…
yorath
  • 199
  • 1
  • 7
5
votes
2 answers

virtual network interface for windows

I'm developing sort of VPN application and need virtual network interface (aka TUN/TAP). Is there any such driver available for windows ? The only one I know of is OpenVPN, but it is GPLed and thus AFAIK can't be used in closed-source app. If…
Sandman4
  • 2,673
  • 2
  • 22
  • 18