Federico Fuga

Engineering, Tech, Informatics & science

Enabling the Audio on Linux on an iMac Retina 18,2

13 Apr 2023 21:19 CEST
Introduction Recently I converted all my Apple Computer to Linux. I have been a Mac User since 2007, when I bought my first MacBookPro. At that time, using linux on office task like writing documents and performing dayly tasks was not very “user friendly” so I opted on a Apple + Linux solution (Linux on a Virtual Machine, or dual boot, or dual machine, whatever worked well for me). But since a few years, Apple became even more picky about what you can install on MacOS and ports/brew/whatever became difficult and error prone. Continue reading

Interrupts and Workqueues

28 Mar 2023 10:25 CEST
Introduction In this post I’ll show how to enable interrupts for a GPIO and how to use workqueues to handle code that must be triggered when the interrupt occurs. You should spend as less time as possible in the interrupt context, to ensure the OS is always responsive and that other interrupts are not delayed. In RTOS, indeed, you must always consider which tasks (meaning “things to do” and not tasks in the concurrency terms) must be completed ASAP and which may be delayed for later. Continue reading

Threads, threads everywhere (in Zephyr, and in C++)

21 Mar 2023 14:54 CET
In this tutorial I explain how to create threads in Zephyr. But first, let’s switch to C++, it’s easier and more clean. To enable C++ you need to specify one variable in the configuration: CPP=y. But since you may be instantiating your objects in the main() function, and C and C++ have different declarations of it (it’s void in C and int in C++), you may want to use the C++ version. Continue reading
Older posts Newer posts