1
0
mirror of https://github.com/ioacademy-jikim/kernel synced 2025-06-07 07:56:14 +00:00
kernel/01_day/module_2.c
Your Name b09b250779 5
2017-11-13 15:14:08 +09:00

20 lines
352 B
C

#include <linux/module.h> // init_module, cleanup_module
#include <linux/kernel.h> // printk
#include <linux/gpio.h> // gpio_get_value
int init_module(void)
{
int ret;
printk("init_module\n");
ret = gpio_get_value( 170 );
printk("ret=%d\n", ret );
return 0;
}
void cleanup_module(void)
{
printk("cleanup_module\n");
}
MODULE_LICENSE("GPL");