BigW Consortium Gitlab

Commit a11412d3 by Forest Godfrey

Initial commit

parents
obj-m := arduino_i2c.o
KSRC ?= /lib/modules/$(shell uname -r)/build
all:
make -C $(KSRC) M=$(PWD) modules
clean:
make -C $(KSRC) M=$(PWD) clean
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/gpio.h>
int
ai2c_init(void) {
int i;
printk(KERN_INFO "Arduino I2C Keyboard Starting\n");
for (i = 20; i < 35; i++) {
int g;
g = gpio_to_irq(i);
printk(KERN_INFO "ai2c: gpio[%d]: irq = %d\n", i, g);
}
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}
void
ai2c_shutdown(void) {
printk(KERN_INFO "Arduino I2C Keyboard Shutting Down\n");
}
module_init(ai2c_init);
module_exit(ai2c_shutdown);
MODULE_ALIAS("arduino_i2c");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Forest Godfrey <fgodfrey@bigw.org>");
MODULE_DESCRIPTION("evdev driver for i2c keyboard based on Arduino");
MODULE_VERSION("0.1");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment