8
votes
Accepted
MemoryGraveyardDriver.sys - a kernel mode device driver managing a kilobyte of RAM for random reading/writing
Make more functions static
I think the functions MyCreateClose, MyRead, ...
4
votes
Accepted
Software drivers for the mcu peripherals in C++
Avoid the placement new
The placement new you are doing looks redundant. PeripheralRegs is a ...
4
votes
usart driver wrapper
Consider using enum class
Instead of having a regular enum inside its own namespace, use an ...
4
votes
Accepted
Software driver for digital inputs expander communicating over SPI
Add include guards
I am not seeing any include guards in your code. It is common practice to add those to header files; this allows them to depend on other header files without having to worry about ...
3
votes
Accepted
Usart Network driver
Weird enum values
Why does stmfrm_state start at 0x8000, and then goes down? Also, if the enum names all start with SMFRM_WAIT_AA...
3
votes
Software driver for analog to digital converter
const
You need more of it, in several places. Methods like these:
...
2
votes
Motor control PLC in Python
Naming
The class name Fn_Motor1D is not very descriptive. I recommend
spelling out whatever Fn stands for.
Some of the function ...
2
votes
Software driver for digital inputs expander communicating over SPI
Consistency
Starting with the enums - be consistent if you're going to number each one or not. Personally I prefer to not number them, and if I have constants (as returns from I2C, etc) then those are ...
2
votes
ROS node to control Dynamixel servo motors
General observation
Pack all your code into a personal namespace , you have no reason to don't do it.
Modify your includes directory to point also to ...
2
votes
Accepted
Windows: Programmatically uninstall the NumberPad from ASUS ZenBook
Low hanging fruits:
L"{4d36e96b-e325-11ce-bfc1-08002be10318}" looks like a magic number to me. If I understand correctly, it is a GUID of NumberPad; if ...
1
vote
Implementation of the driver for the speed sensor
Some questions about the FPGA interface
There are some questions that I have when I look at the interface you are using. You mention an FPGA that presumely is doing the quadrature decoding and ...
1
vote
Device driver abstraction layer in C++
The idea is good, but it can be improved. First, decouple the register types from their address. Consider for example that an MCU might have multiple instances of an UART, and you want to declare a <...
1
vote
Linux GPIO rotary encoder as volume control
As you say, the device matching doesn't work properly, and doesn't allow you to use more than one of these encoders at once.
What you need to do is to match against Device Tree entries. This is a ...
1
vote
Verilog UART Transmitter
I agree with the
suggestions in Greg's answer.
Here are some further considerations, mostly for coding style.
Large numbers like 100000000 are hard to read. Use ...
1
vote
VGA sync generator for 640x480@60Hz
If you had ran simulation or loaded onto FPGA, you would noticed you didn't get the expected behavior. Run simulation and look at waveforms before loading to FPGA.
You have ...
1
vote
De-bouncing a (Gray) Rotary Encoder Switch in C
I don't see why bother with clipping averages. If something was less than ROTSW_MIN, it is also less than ROTSW_LOWER.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
device-driver × 49embedded × 16
c++ × 15
c × 13
python × 9
arduino × 7
serial-port × 7
object-oriented × 5
linux × 5
beginner × 4
kernel × 4
c# × 3
python-3.x × 3
event-handling × 3
windows × 3
java × 2
performance × 2
algorithm × 2
python-2.x × 2
console × 2
memory-management × 2
asynchronous × 2
io × 2
bitwise × 2
wrapper × 2