USRP Hardware Driver and USRP Manual: uhd::spi_config_t Struct Reference

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::spi_config_t Struct Reference

`#include <uhd/types/serial.hpp>`

## Public Types
enum | edge_t { EDGE_RISE = 'r' , EDGE_FALL = 'f' }

## Public Member Functions
| spi_config_t (edge_t edge=EDGE_RISE)
| spi_config_t (edge_t edge, size_t divider)

## Public Attributes
edge_t | mosi_edge
| on what edge is the mosi data valid?
edge_t | miso_edge
| on what edge is the miso data valid?
bool | use_custom_divider
| Set the clock speed for this transaction.
size_t | divider
| Optionally set the SPI clock divider for this transaction.

## Detailed Description

The SPI configuration struct: Used to configure a SPI transaction interface.

## Member Enumeration Documentation

## ◆ edge_t

enum uhd::spi_config_t::edge_t

The edge type specifies when data is valid relative to the edge of the serial clock.

Enumerator
EDGE_RISE |
EDGE_FALL |

## Constructor & Destructor Documentation

## ◆ spi_config_t() [1/2]

uhd::spi_config_t::spi_config_t | ( | edge_t | edge = EDGE_RISE | ) |

Create a new spi config.

Parameters

  edge | the default edge for mosi and miso

## ◆ spi_config_t() [2/2]

uhd::spi_config_t::spi_config_t | ( | edge_t | edge,
|  | size_t | divider )

Create a new spi config with custom divider.

Parameters

  edge | the default edge for mosi and miso
  divider | the divider setting to use

## Member Data Documentation

## ◆ divider

size_t uhd::spi_config_t::divider

Optionally set the SPI clock divider for this transaction.

## ◆ miso_edge

edge_t uhd::spi_config_t::miso_edge

on what edge is the miso data valid?

## ◆ mosi_edge

edge_t uhd::spi_config_t::mosi_edge

on what edge is the mosi data valid?

## ◆ use_custom_divider

bool uhd::spi_config_t::use_custom_divider

Set the clock speed for this transaction.

The documentation for this struct was generated from the following file:

- serial.hpp