added helper function to SPITXRX