Questions tagged [drivers]
29 questions
12
votes
2 answers
How exactly does a program talk to a device driver?
So I'm confused on how exactly we as the programmers talk to devices on the computer. Now I'm not talking the big ideas. I know that there are device drivers that sit atop the hardware so that different programs can use there features.
But in…

Jason
- 459
- 1
- 4
- 10
8
votes
8 answers
When is a device driver needed and when is it OK to read/write directly to the port?
I'm having a difficult time understanding when device drivers are needed, and when its fine to just talk directly to a port controller via the OS-provided serial/parallel/USB/etc. driver.
For instance, Example 1: let's take OpenBCI, an open source…

smeeb
- 4,820
- 10
- 30
- 49
5
votes
1 answer
How exactly are drivers developed, distributed, & utilized?
If operating systems use 'drivers' to communicate with external devices,
does that then mean that OS's (like windows, linux, & osx) have to come prepackaged with drivers for every single external device, ever created?
I ask this because I have…

Stavsen
- 81
- 4
5
votes
1 answer
Driving Linux input events from serial device
I'd like to build a RaspberryPi-based device that can communicate with my Linux laptop over USB (don't think it matters, but I'll be using a custom made USB dongle that has an FTDI chip on it, and my laptop will have the FTDI drivers installed on…

smeeb
- 4,820
- 10
- 30
- 49
4
votes
1 answer
How do you use use cases in a driver design with interrupts?
I'm writing driver-level code that runs on a microcontroller. I've described some of the design with use cases. The users in my use cases are the the other software components that use my driver. However, I also receive input from the hardware…

watkipet
- 218
- 2
- 6
4
votes
1 answer
Why do some embedded projects shun cross-compiling?
As I've been getting into embedded systems I've noticed that some projects (Arch Arm and OpenBSD for example) frown upon cross compiling. What is the reasoning for this? Is a cross-compiled binary somehow different from a natively compiled one?…

ellipse-of-uncertainty
- 153
- 6
3
votes
1 answer
Why non-mainstream OSes don't adopt Linux hardware drivers?
Non-mainstream OSes (Genode, BSD, Haiku, etc.) tend to have problems with drivers availability/support. Why don't they reuse Linux drivers? I would imagine they could provide some ABI compatibility layer, which would make reusing Linux drivers…

akavel
- 361
- 2
- 9
3
votes
2 answers
What are the benefits of a device driver when I can access the I/O registers directly?
I was interested in what modern, C-based, Linux device driver development looked like, and so I took a good gander at this excellent article.
I didn't read every single line, but perused the majority of it, and my take away is this: writing device…

smeeb
- 4,820
- 10
- 30
- 49
3
votes
0 answers
How would one implement communication between an input device and a PC?
I'm trying to get started on a side project using a mobile device (tablet or smartphone) as an input device to a PC. In its most simplest form, I envision using the mobile device touchscreen to control cursor movement and clicks on the PC. So far…

dshapiro
- 131
- 1
3
votes
2 answers
What format is the data going to Windows print drivers?
I have been tasked with writing a print driver. I have no experience with this and have been researching it for a few days. The goal of this is to essentially write the data coming to the driver to a file and then do some additional processing of…
user80760
2
votes
2 answers
Operating systems - whose responsibility is it to coordinate process I/O requests?
I am reading Tanenbaum's Modern Operating Systems. I want to understand a particular concept regarding processes and blocking system calls, specifically with regards to I/O. I assume threads might complicate the discussion somewhat, so please assume…

Stefan Rendevski
- 386
- 2
- 11
2
votes
0 answers
How to design software driver for the analog to digital converter?
I have been developing software driver for the analog to digital converter in C++. The a/d converter is primary intended for conversion of the temperature signals. The temperature signals are then used for the algorithms of temperature protections.…

L3sek
- 159
- 5
2
votes
1 answer
Audio driver which filters outgoing sound out of incoming
I'm sure this has been asked before but I can't seem to find anything about this, in theory, is it possible to write an audio driver which takes the incoming audio (from microphone), and compares it to outgoing audio (sound played through…

Yorrick
- 23
- 2
2
votes
2 answers
How does a user program access a device?
In Linux, from http://www.mulix.org/lectures/intro_to_linux_device_drivers/intro_linux_device_drivers.pdf
user programs talk with device drivers through device files
But if I understand correctly,
if the device driver is inside the OS kernel, a…

Tim
- 5,405
- 7
- 48
- 84
1
vote
0 answers
How to develop software drivers for the mcu peripherals in C++?
I have been developing a set of software drivers for the peripherals of a MCU. I need to implement those drivers in the C++ programming language. My idea was to model each driver by its own class.
Interface of a driver for the Peripheral01:
#include…

L3sek
- 159
- 5