I would like to control 10 different devices with SPI. As there is not enough ChipSelect outputs I use GPIO to toggle a MUX on the clock. Problem is I have to wait until the SPI is done transmitting before changing the GPIO to the next device. Is there a way to set a callback function that will execute once spi.xfer2 is done 'transmitting'? Waiting or sleeping is an accurate and would result in a waste of time.
10 devices, each transmission is 960 bytes long (or 7680 bits). I would like to do 60 transmissions to all the devices each second which means a total of 576kB or ~4Mb (4MHz should do it but I set the frequency it to 8Mhz). Python 3.5.3