Skip to content

TASK05: procfs blinking LED module#118

Open
sergiyus wants to merge 5 commits intoKernel-GL-HRK:mainfrom
sergiyus:05_Module_HomeWork
Open

TASK05: procfs blinking LED module#118
sergiyus wants to merge 5 commits intoKernel-GL-HRK:mainfrom
sergiyus:05_Module_HomeWork

Conversation

@sergiyus
Copy link
Copy Markdown

Implemented a Linux kernel driver module that blinks an LED using a timer. Reading from /proc/hello/led returns the state of the LED (1/0) and the blink period (in milliseconds). Writing to procfs changes the blink period. The module.c file is checked with checkpatch.pl. The Makefile used the -DDEBUG key to print debugging information to dmesg. Module.ko - compiled for Raspberry Pi Zero HW (Linux 5.15.84+, arm6l). Added a video of the LED blinking.

1. module.c is a simple Linux kernel driver that allows reading/writing
   to /proc/hello/dummy.
   The size of the buffer is 100 bytes.
   File checked by checkpatch.pl.
2. Added -DDEBUG key to Makefile - to print debug info in dmesg.
3. module.ko - compiled for Raspberry Pi Zero HW (Linux 5.15.84+,
   arm6l).
4. Added README file with task and .gitignore.

Signed-off-by: Sergiy Us <sergiy.us@gmail.com>
The creation of the directory and file for /proc is separated into a
separate function (proc_init()).

Signed-off-by: Sergiy Us <sergiy.us@gmail.com>
The timer interval is based on the TIMEOUT macro and is 1000ms.

Signed-off-by: Sergiy Us <sergiy.us@gmail.com>
Added flashing LED with 1000ms ON and 1000ms OFF.
Reading from /proc/hello/led - returns Led status (0/1) and timeout.

Signed-off-by: Sergiy Us <sergiy.us@gmail.com>
Added write timeout in /proc/hello/led.

Signed-off-by: Sergiy Us <sergiy.us@gmail.com>
@sergiyus sergiyus added the Ready for review Ready to be reviewed label Mar 17, 2023
@DmytroVozniuk DmytroVozniuk added the invalid This doesn't seem right label May 26, 2023
@DmytroVozniuk
Copy link
Copy Markdown

This hometask is correct, but brunch for pull request is incorrect. Therefore a new pull request will be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right Ready for review Ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants