Re-order placement of SPI functions to improve readability