Fix direction setting on gpio pins
Set CSN pin to output on initialization