user72796: I'm working on a driver for an SPI device that returns some data (device status) while the command byte is still being written.  Is there a way to read this status data using standard Arduino APIs or do I need to bit-bang to access it?
Here's what the SPI signals look like:

The 6 bits in red are the ones I'm interested in reading.

For context, the device in question is a Microchip MCP3561 ADC (MCP3X6X series).  It has a bug (erratum 2) where the new-data-ready flag (/DR_STATUS) is not always set correctly.  Part of the work-around involves reading the status bits mentioned above.

user7508: The SPI.transfer() method is designed to send a byte through
the SPI port and, at the same time receive an incoming byte.
Usage pattern:
uint8_t byte_to_send = ...;
uint8_t received_byte = SPI.transfer(byte_to_send);


72796: <p>I'm working on a driver for an SPI device that returns some data (device status) while the command byte is still being written.  Is there a way to read this status data using standard Arduino APIs or do I need to bit-bang to access it?</p>
<p>Here's what the SPI signals look like:</p>
<p><a href="https://i.stack.imgur.com/suhIi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/suhIi.png" alt="SPI timing diagram" /></a></p>
<p>The 6 bits in red are the ones I'm interested in reading.</p>
<hr />
<p>For context, the device in question is a Microchip <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/MCP3561-2-4-Two-Four-Eight-Channel-153.6-ksps-Low-Noise-24-Bit-Delta-Sigma-ADCs-DS20006181B.pdf" rel="nofollow noreferrer">MCP3561 ADC</a> (MCP3X6X series).  <a href="https://ww1.microchip.com/downloads/en/DeviceDoc/MCP3X5X-Family-Data-Sheet-Errata-DS80000845B.pdf" rel="nofollow noreferrer">It has a bug</a> (erratum 2) where the new-data-ready flag (<code>/DR_STATUS</code>) is not always set correctly.  Part of the work-around involves reading the status bits mentioned above.</p>
 7508: <p><a href="https://www.arduino.cc/en/Reference/SPITransfer" rel="nofollow noreferrer">The <code>SPI.transfer()</code> method</a> is designed to send a byte through
the SPI port and, <em>at the same time</em> receive an incoming byte.</p>
<p>Usage pattern:</p>
<pre class="lang-cpp prettyprint-override"><code>uint8_t byte_to_send = ...;
uint8_t received_byte = SPI.transfer(byte_to_send);
</code></pre>
