/* Clock out 80 cycles (10 bytes) before GO_IDLE command.  */
static void go_idle_clockout(int slot)
/* Clock out 80 cycles (10 bytes) before GO_IDLE command.  */
static void go_idle_clockout(int slot)
{
    uint8_t data[12];
    memset(data, 0xff, sizeof(data));
    spi_transaction_t t = {
        .length = 10*8,
        .tx_buffer = data,
        .rx_buffer = data,
    };
    spi_device_transmit(spi_handle(slot), &t);
}