Skip to content

h20170165/G547

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

G547 Assignments

This readme contains instructions to compile & execute User mode & Kernel mode C Codes.

Assignment1

  • Compile & Insert Kernel Module:
$ make -C /lib/modules/$(uname -r)/build M=$PWD modules
$ sudo insmod assign1.ko

Assignment1_ADC

  • 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

Assignment2_TIMER

  • 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

License

  • This project is licensed under the GNU License - see the LICENSE file for details.

About

Contains code of Linux device-drivers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published