Bird
0
0

Which method is used to send and receive data simultaneously over SPI using spidev?

easy🧠 Conceptual Q2 of 15
Raspberry Pi - SPI Communication
Which method is used to send and receive data simultaneously over SPI using spidev?
Aspi.read()
Bspi.open()
Cspi.xfer2()
Dspi.write()
Step-by-Step Solution
Solution:
  1. Step 1: Identify the method for full-duplex SPI transfer

    spidev's xfer2() method sends data and receives response in one call.
  2. Step 2: Eliminate other options

    open() opens the device, read() and write() are not spidev methods for full-duplex transfer.
  3. Final Answer:

    spi.xfer2() -> Option C
  4. Quick Check:

    Full-duplex SPI transfer = spi.xfer2() [OK]
Quick Trick: Use spi.xfer2() to send and receive SPI data together [OK]
Common Mistakes:
MISTAKES
  • Using spi.open() to transfer data
  • Assuming spi.read() or spi.write() exist in spidev

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes