RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
spi.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2014-2015 Andre Marques <andre.lousa.marques at gmail.com>
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.rtems.org/license/LICENSE.
15 */
16
17#ifndef LIBBSP_ARM_RASPBERRYPI_SPI_H
18#define LIBBSP_ARM_RASPBERRYPI_SPI_H
19
20#include <rtems/libi2c.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif /* __cplusplus */
25
39/* TODO: It would be nice if this value could be probed at startup, probably
40 * using the Mailbox interface since the usual way of setting this on
41 * the hardware is through a "config.txt" text file on the SD card.
42 * Having this setup on the configure.ac script would require changing
43 * the same setting on two different places. */
44#define GPU_CORE_CLOCK_RATE 250000000
45
69extern int rpi_spi_init(bool bidirectional_mode);
70
73#ifdef __cplusplus
74}
75#endif /* __cplusplus */
76
77#endif /* LIBBSP_ARM_RASPBERRYPI_SPI_H */
int rpi_spi_init(bool bidirectional_mode)
Setups the Raspberry Pi SPI bus (located on the GPIO header) on the "/dev/spi" device file,...
Definition: spi.c:640
Legacy I2C Library.