IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


unsigned int spiRead ( BYTE  idx,
BYTE *  bufferPtr,
unsigned int  nbytes 
)

Use this function to input bytes from the SPI bus in master mode.

Parameters:
idx SPI bus index
     0 = dedicated SPI on PSC3 or GPT
     1 = CODEC1 in SPI mode on PSC1
     2 = CODEC2 in SPI mode on PSC2
     3 = CODEC3 in SPI mode on PSC3
     6 = CODEC6 in SPI mode on PSC6

[out] bufferPtr Output buffer that receives data bytes that are read from the SPI bus.

nbytes Number of data bytes to read.
Returns:
Zero on success
  • Bit0=1, wrong arguments (NULL pointer passed or wrong index)
  • Bit5=1, a collision has occured (MODF feature, not supported yet)
  • Bit6=1, an overrun was detected
Since:
SC2x3 V1.00 - CLIB V1.00
See also:
spiWrite() spiReadWrite()





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:37 2017 by Doxygen 1.6.1