Skip to content
systemcoding.dev

Snippets

Short posts that solve one thing: the code, the output we got, and why it works.

Kernels

Get a GPIO descriptor with devm_gpiod_get

devm_gpiod_get() looks up a named GPIO from the device tree, sets its direction and initial level, and releases it on unbind; use it instead of gpio numbers.

1 min read
Embedded Linux

Choose the hardware target with MIX_TARGET

Set MIX_TARGET to a Nerves target such as rpi4 before running mix commands, so dependencies and the firmware are built for the board and not the host.

1 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.