Example of a kernal module for the Raspberry Pi. The module allows switching GPIO pin 4 high or low in userspace.