RTEMS 6.1-rc5
|
Support for the SPI bus on the Raspberry Pi GPIO P1 header (model A/B) and GPIO J8 header on model B+. More...
#include <bsp.h>
#include <bsp/raspberrypi.h>
#include <bsp/gpio.h>
#include <bsp/rpi-gpio.h>
#include <bsp/irq.h>
#include <bsp/spi.h>
#include <assert.h>
Data Structures | |
struct | rpi_spi_softc_t |
Object containing the SPI bus configuration settings. More... | |
struct | rpi_spi_desc_t |
Object containing the SPI bus description. More... | |
Macros | |
#define | SPI_POLLING(condition) |
Functions | |
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. | |
Support for the SPI bus on the Raspberry Pi GPIO P1 header (model A/B) and GPIO J8 header on model B+.
#define SPI_POLLING | ( | condition | ) |
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.
[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). |
Returns | libi2c bus number. |
<0 | Could not register the bus. See |