Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
This tutorial video explores the process of writing a custom device driver in the Zephyr RTOS by building a simple "button" driver. Learn how drivers bridge hardware and operating systems, enabling reliable button state reading across different embedded platforms. Follow along as the instructor implements core driver components (button.c and button.h), explaining GPIO input initialization, state retrieval, and the importance of logging and error handling for troubleshooting. Discover how Devicetree macros automatically generate multiple driver instances for each "custom,button" node—particularly valuable when managing multiple buttons or sensors. Examine the file structure organization including CMakeLists.txt, Kconfig, and source files to understand Zephyr's modular build system integration. Test the driver using application-level structures with main.c, prj.conf, and overlay files for board-specific configurations. Whether new to embedded development or refining Zephyr skills, gain practical insights into building reliable device drivers with clear explanations of file structures, Devicetree implementation, and testing methodologies. The video includes links to written tutorials, GitHub repositories, and additional resources for further learning.
Syllabus
00:00 Intro
1:05 Hardware Overview
1:21 Custom Driver C Code
25:11 Custom Driver CMake Files
28:36 Custom Driver Kconfig Files
30:46 Custom Driver Binding File
35:10 Custom Driver Module File
37:40 Demo Application
55:08 Custom Driver Instancing Demo
56:27 Challenge: MCP9808 I2C Temperature Sensor Driver
58:33 Conclusion
Taught by
Digi-Key