/Keyboard_Driver

Linux driver which uses the keyboard leds in order to do two games. The purpose of this project was to know how the Linux kernel works

Primary LanguageC

Keyboard Driver for Linux

How can I run this program?

Follow these steps to test the driver:

Compile "chardev_leds.c" file

You can use the makefile I provide you. In the directory where files are located, type:

make

Insert "chardev_leds.ko" in the Kernel

sudo insmod chardev_leds.ko

Create a new device file managed by the driver

sudo mknod -m 666 /dev/leds c 243 0

We can check if we did these steps well, typing:

cat /dev/leds

This command will print a message

Compile "leds_user.c" file

gcc -Wall -g leds_user.c -o leds_user

Run it

sudo ./leds_user

When you don't want to test this driver any more:

Remove "chardev_leds.ko" from the Kernel

sudo rmmod chardev_leds

Remove "/dev/leds"

sudo rm -r /dev/leds