Control GPIO using the new Linux user space GPIO API

From the version 4.8, the Linux kernel introduces a new user space API based on character devices for managing and controlling GPIOs ( General-Purpose Input/Output). This post presents the basic of the new interface as well as a simple tutorial/example to demonstrate how to use the new API to control GPIOs.

The hardware used in the tutorial is the Raspberry Pi 3B but the code is generic and can be used on any embedded hardware.

Linux Tips and Tricks

This post contains some tips and tricks that helps resolve problems that i've encountered when working with Linux, mostly Ubuntu.

Ubuntu: Install 32 bits libraries on 64 bits system

Some of my applications are 32 bits only which sometime depend on several 32 bits libraries. By default, ubuntu installed only the 64 bits version of these libraries. To installed the 32 bit ones, we need enable the i386 architecture using dpkg, these following commands should be executed as root:

Powered by antd server, (c) 2017 - 2021 Xuan Sang LE