SPI bugfixes
Added utility macros header