add dir parameter to spi_* procedures to configure direction of data transmission (MSB->LSB and vice versa)
add tests for new direction generics/parameters