Hardware Abstraction Layer is a thin layer of software that “abstract” your code away from the actual electronics. Actually one of the better implementations around is the Arduino library, so it is many good reasons to copy this as much as possible. But, not all of it as Arduino was implemented on a 8 bit…