IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


unsigned int spiReserveBus ( BYTE  idx,
unsigned int  mode,
unsigned int  div,
long  time_ms,
unsigned int  wait_priority 
)

If multiple tasks use the SPI master interface to access different slaves through different slave chip select GPIO pins, this call should be used to synchronise the SPI activity on the bus.

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

mode SPI mode bits, set spiInit().
If the value -1 is given here, the SPI mode and clock divider is not changed.

div Clock divider, see spiInit().

time_ms See RTX_Wait_Sem_Priority()

wait_priority See RTX_Wait_Sem_Priority()

Returns:
Zero on success, else error code.
Since:
SC2x3 V1.00 - CLIB V1.00
See also:
spiReleaseBus()





Top of page | Main page

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