Reimplemented spi master module