Enable a PCI device with managed pcim_enable_device
pcim_enable_device() enables a PCI device and registers the disable for you, so a failing probe() or a remove() leaves the device off without extra code.
Short posts that solve one thing: the code, the output we got, and why it works.
pcim_enable_device() enables a PCI device and registers the disable for you, so a failing probe() or a remove() leaves the device off without extra code.
Set a GPIO output with gpioset from libgpiod 2.x, selecting the chip with -c, and keep the process alive because the line reverts when it exits.
USB_DEVICE(vendor, product) fills a usb_device_id entry that makes the USB core bind your driver to one device, and MODULE_DEVICE_TABLE lets udev autoload it.
FX33 splits V[X] into hundreds, tens and ones and stores them at I, I+1 and I+2. It leaves I unchanged, which is easy to get wrong in an emulator.
Decode a captured SPI bus in PulseView by adding the SPI decoder and mapping CLK, MOSI, MISO and CS#, then match CPOL and CPHA to the chip.
Stop speculative reads after a bounds check with _mm_lfence from immintrin.h, the barrier Intel recommends against Spectre variant 1.
Split a 16-bit CHIP-8 opcode into X, Y, N, NN and NNN with shifts and masks, after fetching it big-endian from two memory bytes.
Cut a long combinational path by putting one register stage in a valid/ready stream, without losing a transfer or reordering data.
Register an interrupt handler with devm_request_irq() so the driver core frees the IRQ on unbind, and see the registered name in /proc/interrupts.
Print a line whenever any watched signal changes with $monitor, set up once, and learn why a second call silently replaces the first.
Drive a 100 MHz testbench clock with a one-line always block, and see why the initial value and the timescale decide whether it works.
Turn on the Raspberry Pi I2C bus in a Yocto Scarthgap image with ENABLE_I2C in local.conf, which writes the dtparam line for you.
We send one email when a new post is published. No spam.