Remove leading double underscore from endianess function calls

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Remove redundancy in read and write register functions
if-statement shouldn't be time critical

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Change return type to something realistic 

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>