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
19
votes
2 answers

Storage & Network device drivers source code for Nexus 6 and Samsung Galaxy S6

For university research purposes, I am searching for a specific part of Nexus 6, and Samsung Galaxy S6 source code. Particularly, I am interested in "network" & "storage" driver source codes. I have visited developer resources for both Samsung…
Behnam
  • 6,510
  • 6
  • 35
  • 65
18
votes
1 answer

How to learn the structure of Linux wireless drivers (mac80211)?

There is so many structures in the Linux wireless driver mac80211. Things like struct net_device, struct ieee80211_hw, struct ieee80211_vif and struct ieee80211_local and so on. So many structures that I don't understand what information they…
user907124
  • 181
  • 1
  • 2
  • 4
15
votes
2 answers

Raw access to HID devices in OS X

What is the simplest way to get raw access to HID devices on OS X? I've been looking through the IOKit examples, but even opening a device seems needlessly complex, involving multiple callbacks and include things from half a dozen libraries. libusb…
Fake Name
  • 5,556
  • 5
  • 44
  • 66
15
votes
7 answers

c++ device driver development in linux

I wanted to get more details for writing Graphics device drivers and audio device drivers using c++ for Linux box. I am newbie at developing device drivers , Please provide me development/documentation details for the same. Thanks -Pravin
pravin
  • 2,155
  • 8
  • 37
  • 49
15
votes
4 answers

In Linux, how do you use device_create within an existing class?

Note: I'm listing this problem as it is today, I'm not opposed to changing the implementation (moving the creation of the class to a common area for example) if it makes things easier... I'm just not sure how to do it. :End Note I've got two linux…
Mike
  • 47,263
  • 29
  • 113
  • 177
14
votes
3 answers

How to set errno in Linux device driver?

I am designing a Linux character device driver. I want to set errno when error occurs in ioctl() system call. long my_own_ioctl(struct file *file, unsigned int req, unsigned long arg) { long ret = 0; BOOL isErr = FALSE; // some…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
14
votes
2 answers

Reverse Engineering an Apple Kext - Reconstructing the Class

Greetings! I am currently attempting to extend the functionality of the Magic Mouse. To do this, I am hoping to write a kext that intercepts events from the multitouch driver, AppleMultitouchDriver.kext, interprets them, and either dispatches new…
Tyler
  • 1,603
  • 13
  • 21
13
votes
3 answers

Cheap Windows driver signing for 64 bit Windows 7

I need to install the libusb-win32 driver on Windows 7 64 bit machines. This driver is open source so it is not digitally signed so I want to do this myself, but I wonder if this can be done WITHOUT paying lot of money. Is it possible to use a…
kayahr
  • 20,913
  • 29
  • 99
  • 147
12
votes
2 answers

How can I get a list of all the active kernel drivers on my Android system?

How can I get a list of all the active kernel drivers on my Android system?. What is the equivelant of Linux "lsmod" in Android? I used adb shell and also opened my Android Terminal emulator app and did an "lsmod". I get some kind of a lame list…
Joe C
  • 2,728
  • 4
  • 30
  • 38
12
votes
3 answers

USB-device driver for HTC OneVX (USB debugging)

I have a HTC One VX phone and I would like to develop an app for it. I got the SDK, IDE, JDK and everything I need. http://developer.android.com/sdk/index.html I tried to run my app on my phone from eclipse. But my device is not showing up in the…
Ricky Casavecchia
  • 560
  • 3
  • 9
  • 28
12
votes
2 answers

Writing a windows driver for an emulated input device

My application needs to behave as a virtual joystick (imagine dragging a square with the mouse and translating that to the output of an analog joystick) and send some keystrokes over the network to another computer where the driver would receive…
Charles
12
votes
2 answers

Emulating joystick programmatically

I want to emulate a joystick using keypresses and/or mouse input. So other programs/games will think that user is using a joystick while he is using a mouse. So the program will install kindof a driver for fake usb or fake an existing…
itsfrosty
  • 203
  • 2
  • 8
11
votes
2 answers

Linux Kernel: copy_from_user - struct with pointers

I've implemented some kind of character device and I need help with copy_ from_user function. I've a structure: struct my_struct{ int a; int *b; }; I initialize it in user space and pass pointer to my_struct to my char device using 'write'…
tracer
  • 111
  • 1
  • 3
11
votes
5 answers

Automating Win32 Driver Testing

Does anyone know ways of partially or fully automating driver test installation? I am new to driver development and am used to more of a test-driven approach in higher level languages, so moving to the kind of environment where I can't easily test…
Dale
  • 12,884
  • 8
  • 53
  • 83
11
votes
1 answer

where is device driver code executed? Kernel space or User space?

Part1: To the linux/unix experts out there, Could you please help me understanding about device drivers. As i understood, a driver is a piece of code that directly interacts with hardware and exposes some apis to access the device. My question is…
sujith
  • 2,421
  • 2
  • 17
  • 26
1
2
3
73 74