+ ao_sleep(&ao_ads124s0x_drdy);
+
+ curchan = nextchan;
+ nextchan = (nextchan + 1) % AO_ADS124S0X_CHANNELS;
+
+ d[0] = AO_ADS124S0X_INPMUX | AO_ADS124S0X_WREG;
+ d[1] = 1;
+ d[2] = nextchan << 4 | 0x0c; ; /* relative to AINCOM */
+ ao_ads124s0x_start();
+ ao_spi_duplex(d, d, 3, AO_ADS124S0X_SPI_BUS);
+ ao_ads124s0x_stop();
+
+ ao_ads124s0x_current.ain[curchan] =
+ d[0] << 16 | d[1] << 8 | d[2];
+
+ // FIXME
+ // If nextchan == 0, we have a complete set of inputs
+ // and we need to log them somewhere
+