added functions to change mode, set frequency, change bit order and make cs high