added helper functionclass PYSPI to configure registers