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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
60 views

Windows: Programmatically uninstall the NumberPad from ASUS ZenBook

Now I have this funny program. I bought an ASUS ZenBook which includes NumberPad. The downside of it is that it turns on with a slightest touch on its upper right corner so that I start write numeric ...
coderodde's user avatar
  • 27k
1 vote
1 answer
133 views

Implementation of the driver for the speed sensor

I have been developing a C++ driver for the incremental rotary encoder (irc) based speed sensor. It is a part of my embedded software project. The driver is basically decomposed into two layers: The ...
L3sek's user avatar
  • 385
1 vote
0 answers
36 views

Managing TimeMachinesCorp POE clock via UDP

I've got a working implementation of a go program to talk UDP to TimeMachinesCorp POE clocks. This code is also in a github repo which notes things I know aren't implemented yet. I feel like there's ...
chicks's user avatar
  • 2,855
0 votes
0 answers
259 views

Modifying a Linux touch driver to poll I2C data instead of using interrupts

I managed to modify the st1232.c touch driver to poll I2C data from the touch controller, instead of using interrupts. This way I don't need an extra interrupt wire. On the other side I am now using ...
arminb's user avatar
  • 101
3 votes
1 answer
360 views

Device driver abstraction layer in C++

First of all, my knowledge in C++ are very limited but I have a good background in C. I'm currently writing firmware for an STM32 MCU using C++. I have to code a driver to communicate with an IC using ...
A.Lacasse's user avatar
4 votes
1 answer
112 views

Usart Network driver

I wrote a network driver and I would like a review of my code. The code generally works, albeit with some performance issues. The purpose of my code is to have a Network driver that uses the USART and ...
samann's user avatar
  • 43
2 votes
1 answer
194 views

Software driver for analog to digital converter

I have been developing a software driver for the internal a/d converter on this platform. The a/d converter peripheral is described in following document. The driver is written in C++ and is build ...
L3sek's user avatar
  • 385
2 votes
2 answers
95 views

Software driver for digital inputs expander communicating over SPI

On this platform I have been developing a software driver for two digital inputs expanders communicating over the SPI. My C++ code is based on the SPI driver which accompanies the SDK offered by the ...
L3sek's user avatar
  • 385
3 votes
1 answer
195 views

Software drivers for the mcu peripherals in C++

I have been developing software drivers for the mcu peripherals in C++. My approach how to implement the drivers is following. Each peripheral has its software driver modeled by C++ class with its ...
L3sek's user avatar
  • 385
2 votes
1 answer
125 views

usart driver wrapper

Could you review my usart driver wrapper please? It contains the C language Xilinx usart driver, but I write C++ programs and need to C++ usart driver. How it was designed correctly and what I have ...
Drakonof's user avatar
  • 403
2 votes
0 answers
140 views

Motor control PLC in Python

Project description We have different types of devices like sov, motor, analog, digital, control valves etc. Each type of device has 100 items. Now our software continuously monitors with the PLC to ...
Subrata Mitra's user avatar
6 votes
1 answer
707 views

VGA sync generator for 640x480@60Hz

I wrote my first module in Verilog. The purpose is to maintain two counters and emit signals corresponding to VGA's HSync and VSync, as well as HBlank and VBlank pulses to be used by a video ...
robbie's user avatar
  • 261
1 vote
0 answers
425 views

Arduino code to control motor speed based on MPU-6050 sensor

I have been trying to create arduino code where my MPU6050 reads its angle and based on that angle, change the motor speed. For example, 45° is the max motor speed, 22° is roughly half speed, and so ...
miles's user avatar
  • 11
2 votes
1 answer
61 views

De-bouncing a (Gray) Rotary Encoder Switch in C

I would like feedback on the correctness and performance of this code. My priorities are also are readability, simplicity and self-documenting code - but I'm happy with those as they are. I still ...
Jodes's user avatar
  • 340
4 votes
2 answers
688 views

ROS node to control Dynamixel servo motors

This code is for a ROS (http://www.ros.org/) node that controls a pair of servo motors (referred to in the code as grippers) that can be controlled individually or together. When they are controlled ...
Ben H's user avatar
  • 181
5 votes
1 answer
1k views

Linux GPIO rotary encoder as volume control

I've written a kernel module (tested on Raspberry Pi) to use a rotary encoder as a volume control. The Linux source tree already contains a driver for rotary encoders so I've just piggybacked off of ...
James Kent's user avatar
6 votes
1 answer
334 views

Sending instructions to an LCD display controlled by HD44780

My current embedded project uses a 16x2 LCD controlled by the HD44780 standard controller. My PIC18 speaks to the LCD via the Adafruit LCD serial backpack (schematic link). I chose the SPI interface. ...
saylor's user avatar
  • 61
4 votes
1 answer
764 views

4x4 Matrix Keypad on Arduino UNO

I recently bought a 4x4 keypad. It is one like this: http://www.learningaboutelectronics.com/images/4x4-matrix-keypad-pinout.png Now every code I found on the net was either using a highly overloaded ...
clockw0rk's user avatar
  • 171
1 vote
2 answers
549 views

Dual state button algorithm in C

I wrote code for determining the push button state whether it is long pressed or not. This function is called by timer interrupt routine every 1ms. But it seems really dumb. How can I make it shorter ...
ree's user avatar
  • 27
4 votes
1 answer
208 views

Attaching an interrupt to a member function

I am making my own optical encoders. Each of them follows the exact same structure, so I figured I'd lump all the encoder processing in a class, StepCounter. ...
Sanchises's user avatar
  • 141
7 votes
1 answer
230 views

Lightweight LED library

One of the projects that have been on my to-do list since years involves controlling a number of Inter-Integrated Circuit (\$I^2C\$) peripherals. Lately I've been turning everything into it's own ...
Mast's user avatar
  • 13.1k
2 votes
1 answer
701 views

7-segment 4-digit display

Is there a better way to organize the methods within this program without compromising the clarity? Running through digits 0-9 with separate functions seems very bulky. ...
user5866015's user avatar
2 votes
1 answer
996 views

Building thermostat state machine in Python

I used a Raspberry Pi and Adafruit LCD with buttons to build a small thermostat for my house. This is the hardware I used to you can imagine how the button and the code work: https://www.adafruit.com/...
Pitto's user avatar
  • 799
4 votes
2 answers
689 views

18 Motor, 6 Legged robot walking using Python / ROS

I have been using ROS alongside Python to enable my built robot to walk. I am aware that my code needs some improvement such as classes etc. This is my first Python / ROS program so any help and ...
Ben411916's user avatar
  • 131
8 votes
1 answer
7k views

Verilog UART Transmitter

This is one of the first Verilog programs I have written. I have a Xilinx Artix-7 FPGA card. Right now I just have it transmitting an "X" every second. It works and I can see the result in my serial ...
chasep255's user avatar
  • 225
5 votes
1 answer
598 views

Processing text messages from a GSM module

I have a Tiva TM4C ARM processor connected to a GSM modem (SIM900). When the GSM modem receives a new text message it sends a UART string to the MCU, where an interrupt routine increments a new ...
LShaver's user avatar
  • 419
7 votes
3 answers
179 views

Microgrid device driver controlling GSM modem, LCD, keypad, and relays

I have an MCU (TI Tiva TM4C) that operates a GSM modem, LCD display, keypad, ADC inputs, and four relays for microgrid control/operation. To date I have about 2000 lines of code, mostly for ...
LShaver's user avatar
  • 419
3 votes
5 answers
162 views

Toggle four relays on/off based on bitmap stored in uint8_t

I am using a one-byte bitmap to control four relays. I am writing a function which will take the bitmap stored as uint8_t, look to see which bits are set/cleared, ...
LShaver's user avatar
  • 419
1 vote
1 answer
777 views

Xbox controller wrapper

I spent far too much time trying to simply get data from an Xbox controller with Python. This is the cleaned up result, classified. This requires xinput1_3 or possibly 1_4 - I'm running Windows 7 and ...
computergorl's user avatar
8 votes
1 answer
493 views

Class that is used to run a 5x5x5 RGB cube

I had a hardware project for a 5x5x5 RGB cube which is driven by a 22118400Hz 8-bit AVR (1284p for those who like hardware). Basically, the class sets the bits in a huge array of 8-bit values (...
BennX's user avatar
  • 203
-2 votes
1 answer
942 views

Configurations and interrupt handler for a microcontroller using a singleton as a static instance

In my project I need to have one class as singleton which must be globally accessible: board.h: ...
vlk's user avatar
  • 107
11 votes
1 answer
2k views

Callback in Linux kernel driver in order to hide device's low-level protocol

I'm am writing a Linux kernel driver for HD44780 LCDs connected via I2C bus. In my last change I tried to decouple low-level code (which talks to the device via I2C) from device's logic (printing ...
m.g.'s user avatar
  • 111
2 votes
1 answer
4k views

Keyboard input class

I am looking for advice on my input component. There is no real problem with it yet, but I am just getting started on everything and want to know if there is any obvious problems with it, plus I was ...
Chemistpp's user avatar
  • 227
7 votes
1 answer
267 views

Detecting two keys pressed in quick succession

My computer has been having this issue where when I press a key, two key presses get registered. The goal of this program is to detect the time delta between the two keys so that I can set an ...
gvl's user avatar
  • 171
3 votes
0 answers
1k views

Defining a char device driver protocol over uart at kernel level [closed]

My aim is to write a blocking char driver that return to the user space a complete protocol message from the kernel uart driver. Protocol description I'm fighting with a very bad protocol, called ...
LPs's user avatar
  • 139
2 votes
1 answer
182 views

Decode an alarm keypad message

In my efforts to learn the Swift language, I am trying to mix in a pet project along with my learning of the basic language syntax. In essence, i'm trying to write an iOS keypad application to work ...
Jon's user avatar
  • 53
5 votes
2 answers
88 views

Automated test system

I am creating an automated test system (scope bloat - the original intent was a one-off bash automation of a particular test case that has turned into creating a system that will do many other things)....
Jiynx's user avatar
  • 151
3 votes
2 answers
224 views

Synchronous and asynchronous motor movement

I am working on an API that is mostly intended to be used interactively/little scripts. There are some classes with methods that could act slightly differently depending on the intention of the user, ...
agomcas's user avatar
  • 143
4 votes
2 answers
4k views

Interfacing with instruments using pyvisa

I'm new to Python, and after running through some introductory exercises I wrote a class definition for working with some hardware, specifically a Signal Recovery model 7230 lockin amplifier. In the ...
Jack B's user avatar
  • 143
0 votes
1 answer
838 views

Blinking LED code at a particular frequency [closed]

I wrote a function for interacting with my PIC16F1788. The code sends pulses out the RC4 port at a specific frequency, to make ...
sam brosteain's user avatar
2 votes
1 answer
4k views

Driving 7-segment displays

I made a little JavaScript app here that let people generate bitmap for generating characters. Currently it generate code of a dictionary. But I want to also generate a example that let them play like ...
Vitim.us's user avatar
  • 156
5 votes
6 answers
807 views

TCP communication with step motor

I have a class that I use to communicate with some hardware equipment (a step motor to be precise): ...
Yoav's user avatar
  • 319
10 votes
2 answers
290 views

Embedded C# bitpacked arrays to low-level STM32F4 driver for GE G35 RGB LED Christmas tree light

I'm going to be opensourcing some code I'm working on. I don't need help with the code, I just want to make sure my code is readable and my comments make sense. I have a knack for the esoteric. ...
Michael Rice's user avatar
3 votes
1 answer
2k views

Python lookup table

I'm trying to design a protocol for sending/receiving serial data. The basic plan is to allow for text data to be entered in the command prompt, translate that to a hex string and send it out over ...
user3817250's user avatar
5 votes
1 answer
4k views

Programming Principles - Reading/writing from/to a Mifare card

Consider the following class (I've stripped XML doc for the sake of simplicity), which does several and slightly different operations through a serial port to read/write from/to a Mifare card. It has ...
natenho's user avatar
  • 215
11 votes
1 answer
2k views

Door-opener program

I've been working on a little project on an Arduino and I need some help with making the code more efficient / cleaner. I really don't like the three for loops and ...
Bavilo's user avatar
  • 211
6 votes
1 answer
759 views

Blocking and async UDP communication with an IR camera

I'm writing a Java application to control a custom IR research camera that will be installed on an aircraft. The camera connects to the the computer using UDP sockets via a direct LAN cable. The ...
Nate Lockwood's user avatar
6 votes
2 answers
472 views

Keeping track of byte count in a binary protocol handler

I am putting together a fairly simple server that listens for a connection then creates this thread - textbook Java code - then accepts data on that connection. I am following a protocol that the ...
Joe Murray's user avatar
3 votes
1 answer
152 views

Servo commands based on serial port input

Straight to the point: Can you give me pointers on how to make this code more maintainable? In the future, I want to add more more things to this, but first it should be easy to maintain/read. Should ...
user2587674's user avatar