Started writing functions in c to access registers in /dev/mem