Skip to content

medwards14/Custom-MCP23017-I2C-Driver

Repository files navigation

#README.md

build driver module: make clean make

verify device tree overlay is in the boot folder: ls /boot/overlays/mcp_overlay.dtbo if not: sudo cp mcp_overlay.dtbo /boot/overlays/

insert the compiled module into the kernel: sudo insmod /home/i2c_driver/mcp_i2c_driver.ko

play the game: echo start | sudo tee /sys/bus/i2c/devices/1-0027/command echo guess | sudo tee /sys/bus/i2c/devices/1-0027/command echo reset | sudo tee /sys/bus/i2c/devices/1-0027/command

remove module from the kernel: sudo rmmod /home/i2c_driver/mcp_i2c_driver.ko

About

I wrote an I2C driver from scratch for my MCP23017 I2C expander I used to connect my custom breadboard circuit to my Raspberry Pi 5. The driver uses threaded interrupts to handle button-press interrupts which allow the user to cycle through multiple LEDs and select one to see if it is the "winning LED". Provides sysfs interface for real-time logs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors