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.

idxSPI bus index
     0 = SPI on SPI1
     1 = SPI on SPI2
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

Zero on success, else error code.
See also

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Fri Feb 9 2018 17:44:50 by Doxygen 1.8.13