GPIO SPI bus declarations. More...
#include <dev/spibus.h>
Go to the source code of this file.
Data Structures | |
struct | _GSPIREG |
Typedefs | |
typedef struct _GSPIREG | GSPIREG |
Functions | |
uint_fast32_t | GpioSpiBusSetRate (NUTSPINODE *node, uint_fast32_t rate) |
Set clock rate of a specified SPI device. | |
int | GpioSpiSetup (NUTSPINODE *node) |
Update SPI settings. | |
Variables | |
NUTSPIBUS | spiBus0Gpio |
AVR SPI bus driver implementation structure. |
GPIO SPI bus declarations.
* $Id: spibus_gpio.h 4470 2012-08-20 14:06:43Z haraldkipp $ *
uint_fast32_t GpioSpiBusSetRate | ( | NUTSPINODE * | node, |
uint_fast32_t | rate | ||
) |
Set clock rate of a specified SPI device.
The new clock rate will be used for the next transfer. If the given rate is beyond the capabilities of the bus controller, it will automatically adjusted before the transfer starts.
node | Specifies the SPI bus node. |
rate | New clock rate, given in bits per second. If the value is SPI_CURRENT_RATE, then the current rate is kept. |
References _GSPIREG::gspi_dly_rate, _NUTSPINODE::node_mode, _NUTSPINODE::node_rate, _NUTSPINODE::node_stat, NULL, NUTASSERT, rc, SPI_CURRENT_RATE, and SPI_MODE_UPDATE.
Referenced by GpioSpiSetup().
int GpioSpiSetup | ( | NUTSPINODE * | node | ) |
Update SPI settings.
References GpioSpiBusSetRate(), _NUTSPINODE::node_bits, _NUTSPINODE::node_mode, _NUTSPINODE::node_rate, and SPI_MODE_UPDATE.
Referenced by GpioSpiBus0NodeInit(), and GpioSpiBus0Select().
AVR SPI bus driver implementation structure.