TASK05: procfs blinking LED module#118
Open
sergiyus wants to merge 5 commits intoKernel-GL-HRK:mainfrom
Open
Conversation
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>
|
This hometask is correct, but brunch for pull request is incorrect. Therefore a new pull request will be created. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.