Add hal.h from the prima driver

This pull requests adds hal.h from the prima driver. The benefit from this is that we use the same terms as the prima driver.

I did a lot of cleanup but there's still few pendings pending, for example endian support, few typedefs and structure field names. I'll clean those later.