IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page


Functions
SPI API

Detailed Description

SPI is a serial bus standard established by Motorola. The Serial Peripheral Interface (SPI) is a synchronous serial interface useful for communicating with other peripheral or microcontroller devices. These peripheral devices may be: Serial EEPROMs, Shift registers, Display drivers, A/D converters, etc.

Functions

int spiInit (BYTE idx, unsigned int mode, unsigned int div)
 Initialize the SPI bus (Master mode). More...
 
unsigned int spiReserveBus (BYTE idx, unsigned int mode, unsigned int div, long time_ms, unsigned int wait_priority)
 Wait on the SPI bus resource semaphore and set mode and divider (Master mode). More...
 
unsigned int spiReleaseBus (BYTE idx)
 Release the SPI bus resource semaphore (Master mode). More...
 
unsigned int spiWrite (BYTE idx, const BYTE *bufferPtr, unsigned int nbytes)
 Write bytes to the SPI bus (Master mode). More...
 
unsigned int spiRead (BYTE idx, BYTE *bufferPtr, unsigned int nbytes)
 Read bytes from the SPI bus (Master mode). More...
 
unsigned int spiReadWrite (BYTE idx, BYTE *rbufferPtr, const BYTE *wbufferPtr, unsigned int nbytes)
 Read/write bytes from/to the SPI bus (Master mode). More...
 





Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Fri Jun 8 2018 12:48:21 by Doxygen 1.8.13