Separated common functions into another C file, added a linux device
tree overlay so that pins can be configured.