SPI driver header.
More...
#include "bcm2835.h"
Go to the source code of this file.
SPI driver header.
- Author
- D.Qendri
- Date
- 30 May 2015
Definition in file SPI.h.
Close SPI bus, should not be called if another SPI device is being used.
- Returns
- none
Definition at line 95 of file SPI.c.
void SPI_Initialize |
( |
void |
| ) |
|
Initializes the SPI peripheral.
- Returns
- none
Definition at line 35 of file SPI.c.
unsigned char SPI_Read |
( |
void |
| ) |
|
Reads a byte of data from the SPI bus.
- Returns
- result Result of data written on SPI bus.
Definition at line 62 of file SPI.c.
void SPI_Read_Array |
( |
char * |
sArray, |
|
|
char * |
rArray, |
|
|
char |
length |
|
) |
| |
Reads an array of data from the SPI bus.
- Parameters
-
sArray | Buffer of data to send |
rArray | Buffer of data to send |
length | Length of data buffer |
- Returns
- none
Definition at line 86 of file SPI.c.
unsigned char SPI_Write |
( |
unsigned char |
data | ) |
|
Writes a byte of data to the SPI bus.
- Parameters
-
data | Byte data to write on bus |
- Returns
- result Result of data written on SPI bus.
Definition at line 53 of file SPI.c.
void SPI_Write_Array |
( |
char * |
buff, |
|
|
unsigned int |
length |
|
) |
| |
Writes an array of bytes to the SPI bus.
- Parameters
-
buff | Pointer to array of char data. |
length | Length of data array. |
- Returns
- none
Definition at line 74 of file SPI.c.