RTEMS: bsps/arm/raspberrypi/include/bsp/spi.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
spi.h File Reference

Raspberry Pi specific SPI definitions. More...

`#include <rtems/libi2c.h>`

Go to the source code of this file.

## Macros
SPI constants.
#define | GPU_CORE_CLOCK_RATE 250000000
| GPU processor core clock rate in Hz.

## Functions
SPI directives.
int | rpi_spi_init (bool bidirectional_mode)
| Setups the Raspberry Pi SPI bus (located on the GPIO header) on the "/dev/spi" device file, and registers the bus on the libi2c API.

## Detailed Description

Raspberry Pi specific SPI definitions.

## Macro Definition Documentation

## ◆ GPU_CORE_CLOCK_RATE

#define GPU_CORE_CLOCK_RATE 250000000

GPU processor core clock rate in Hz.

Unless configured otherwise on a "config.txt" file present on the SD card the GPU defaults to 250 MHz. Currently only 250 MHz is supported.

## Function Documentation

## ◆ rpi_spi_init()

int rpi_spi_init | ( | bool | bidirectional_mode | ) |

Setups the Raspberry Pi SPI bus (located on the GPIO header) on the "/dev/spi" device file, and registers the bus on the libi2c API.

Parameters

  [in] | bidirectional_mode | If TRUE sets the SPI bus to use 2-wire SPI, where the MOSI data line doubles as the slave out (SO) and slave in (SI) data lines. If FALSE the bus defaults to the usual 3-wire SPI, with 2 separate data lines (MOSI and MISO).

Return values

  Returns | libi2c bus number.
  <0 | Could not register the bus. See

See also
  rtems_libi2c_register_bus().