IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page


◆ spiReserveBus()

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
idxSPI bus index
     0 = SPI on SPI1
     1 = SPI on SPI2
     etc.
modeSPI mode bits, set spiInit().
If the value -1 is given here, the SPI mode and clock divider is not changed.

divClock divider, see spiInit().

time_msSee RTX_Sem_Timeout()

wait_priorityCurrently RTX_Wait_Sem_Priority() is not implemented, so this parameter is currently ignored

Returns
Zero on success, else error code.
Since
V0.86
See also
spiReleaseBus()





Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Tue Jul 10 2018 14:54:15 by Doxygen 1.8.13