mikroC

mikroC - C Compiler for Microchip PIC microcontrollers

making it simple...

Spi_Read

Prototype

char Spi_Read(char buffer);

 

 

Returns

Returns the received data.

 

 

Description

Provides clock by sending buffer and receives data at the end of period.

 

 

Requires

SPI must be initialized and communication established before using this function. See

 

Spi_Init_Advanced or Spi_Init.

 

 

Example

short take, buffer;

 

...

 

take = Spi_Read(buffer);

 

 

Spi_Write

Prototype

void Spi_Write(char data);

 

 

Description

Writes byte data to SSPBUF, and immediately starts the transmission.

 

 

Requires

SPI must be initialized and communication established before using this function. See

 

Spi_Init_Advanced or Spi_Init.

 

 

Example

Spi_Write(1);

 

 

page

 

268

MikroElektronika: Development tools - Books - Compilers