This readme contains instructions to compile & execute User mode & Kernel mode C Codes.
- Compile & Insert Kernel Module:
$ make -C /lib/modules/$(uname -r)/build M=$PWD modules
$ sudo insmod assign1.ko- Compile & Insert Kernel Module:
$ make all
$ sudo insmod adc.ko- Compile User Code:
$ gcc adc_user.c -o adc_user- Read ADC Value:
$ sudo ./adc_user- Change ADC Channel:
$ sudo ./adc_user 3- Compile & Insert Kernel Module:
$ make all
$ sudo insmod prog.ko- Compile User Code:
$ make user- Read Timer Value:
$ sudo ./prog_user READ- Set Timer Mode (Write to 0x43 port):
$ sudo ./prog_user SETMODE
SETMODE $0- Set Timer Sleep (in milliseconds - for CH0_0x40 only):
$ sudo ./prog_user SLEEP
SLEEP $3000- This project is licensed under the GNU License - see the LICENSE file for details.