Skip to content

A kernel-mode device driver to set a GPIO pin to toggle according to the kernel clock.

Notifications You must be signed in to change notification settings

strawlab/led_clock_linux_device_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

led_clock_linux_device_driver

A kernel-mode device driver to set a GPIO pin to toggle according to the kernel clock.

Developed on Raspberry PI 3B+, Raspbian GNU/Linux 11 (bullseye), Linux 6.1.21-v7+.

Install prerequisites

apt install raspberrypi-kernel-headers

Build and test run

make
insmod ./led_clock.ko

Install

make
xz led_clock.ko
cp led_clock.ko.xz "/lib/modules/$(uname -r)/"
depmod -a

Run

This inserts the module which has been installed as above.

modprobe led_clock

Automatically run upon boot

To insert the module on boot, add led_clock to the file /etc/modules.

Debug

dmesg --follow

Stop

rmmod led_clock

About

A kernel-mode device driver to set a GPIO pin to toggle according to the kernel clock.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published