Removed the hacky pointer way of writing to hardware, replaced with HAL provided macros.