NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SPI Slave Access

Detailed Description

Declares the APIs for Quickboot accessing SPI slave devices.

Data Structures

struct  QbSpiSlaveControllerInfo
 Holds the SPI controller specific information. More...
 
struct  QbSpiSlaveDriverPrivInfo
 Holds private information for SPI slave driver. More...
 
struct  QbSpiSlaveTransfer
 Holds data for SPI slave transfers. More...
 

Macros

#define QB_SPI_SLAVE_ARM   0
 Defines the arm SPI slave operation. More...
 
#define QB_SPI_SLAVE_XFER_COMPLETE   1
 Defines the transfer complete slave operation. More...
 
#define QB_SPI_SLAVE_UNARM   2
 Defines the unarm SPI slave operation. More...
 
#define QB_SPI_SLAVE_REG_DUMP   3
 Defines the register dump SPI slave operation. More...
 
#define QB_SPI_SLAVE_RESET   4
 Defines the spi slave controller reset operation. More...
 
#define QB_PIO_DMA_TRANSFER_LIMIT_RX   32
 Defines the maximum number of bytes for which PIO mode can be used for a transfer. More...
 
#define QB_PIO_DMA_TRANSFER_LIMIT_TX   8
 
#define MAX_SPI_SLAVE_XFERSIZE   65536
 Defines the maximum transfer length. More...
 
#define QB_SPI_SLAVE_MAX_INSTANCES   4
 Defines the maximum number of SPI instances. More...
 
#define FLUSH_FIFO_TIMEOUT   1000
 Defines timeout for Rx FIFO flush. More...
 
#define DATA_DIR_TX   0
 
#define DATA_DIR_RX   1
 

Typedefs

typedef enum QbSpiSlaveInstanceRec QbSpiSlaveInstance
 Defines the SPI controller instance. More...
 
typedef enum
QbSpiSlaveChipSelectRec 
QbSpiSlaveChipSelect
 Defines the SPI chip select. More...
 
typedef enum
QbSpiSlaveCSPolarityRec 
QbSpiSlaveCSPolarity
 Defines the polarity for SPI chip select. More...
 
typedef enum QbSpiSlaveModeRec QbSpiSlaveMode
 Defines the SPI modes. More...
 

Enumerations

enum  QbSpiSlaveInstanceRec {
  QbSpiSlaveInstance_1 = 0,
  QbSpiSlaveInstance_2,
  QbSpiSlaveInstance_3,
  QbSpiSlaveInstance_4,
  QbSpiSlaveInstance_Num,
  QbSpiSlaveInstance_Force32 = 0x7fffffff
}
 Defines the SPI controller instance. More...
 
enum  QbSpiSlaveChipSelectRec {
  QbSpiSlaveCS_0 = 0,
  QbSpiSlaveCS_1,
  QbSpiSlaveCS_2,
  QbSpiSlaveCS_3,
  QbSpiSlaveCS_Num,
  QbSpiSlaveCS_Force32 = 0x7fffffff
}
 Defines the SPI chip select. More...
 
enum  QbSpiSlaveCSPolarityRec {
  QbSpiSlaveCSPol_LOW = 0,
  QbSpiSlaveCSPol_HIGH,
  QbSpiSlaveCSPol_Num,
  QbSpiSlaveCSPol_Force32 = 0x7fffffff
}
 Defines the polarity for SPI chip select. More...
 
enum  QbSpiSlaveModeRec {
  QbSpiSlaveMode_0 = 0,
  QbSpiSlaveMode_1,
  QbSpiSlaveMode_2,
  QbSpiSlaveMode_3,
  QbSpiSlaveMode_Num,
  QbSpiSlaveMode_Force32 = 0x7fffffff
}
 Defines the SPI modes. More...
 

Functions

NvError QbSpiSlaveInit (void)
 Registers the SPI slave driver to the driver framework. More...
 

Macro Definition Documentation

#define DATA_DIR_RX   1

Definition at line 56 of file spi_slave.h.

#define DATA_DIR_TX   0

Definition at line 55 of file spi_slave.h.

#define FLUSH_FIFO_TIMEOUT   1000

Defines timeout for Rx FIFO flush.

Definition at line 53 of file spi_slave.h.

#define MAX_SPI_SLAVE_XFERSIZE   65536

Defines the maximum transfer length.

Definition at line 48 of file spi_slave.h.

#define QB_PIO_DMA_TRANSFER_LIMIT_RX   32

Defines the maximum number of bytes for which PIO mode can be used for a transfer.

For a larger number of bytes, DMA mode is used.

Definition at line 45 of file spi_slave.h.

#define QB_PIO_DMA_TRANSFER_LIMIT_TX   8

Definition at line 46 of file spi_slave.h.

#define QB_SPI_SLAVE_ARM   0

Defines the arm SPI slave operation.

Definition at line 33 of file spi_slave.h.

#define QB_SPI_SLAVE_MAX_INSTANCES   4

Defines the maximum number of SPI instances.

Definition at line 50 of file spi_slave.h.

#define QB_SPI_SLAVE_REG_DUMP   3

Defines the register dump SPI slave operation.

Definition at line 39 of file spi_slave.h.

#define QB_SPI_SLAVE_RESET   4

Defines the spi slave controller reset operation.

Definition at line 41 of file spi_slave.h.

#define QB_SPI_SLAVE_UNARM   2

Defines the unarm SPI slave operation.

Definition at line 37 of file spi_slave.h.

#define QB_SPI_SLAVE_XFER_COMPLETE   1

Defines the transfer complete slave operation.

Definition at line 35 of file spi_slave.h.

Typedef Documentation

Defines the SPI chip select.

Defines the polarity for SPI chip select.

Defines the SPI controller instance.

Defines the SPI modes.

Enumeration Type Documentation

Defines the SPI chip select.

Enumerator
QbSpiSlaveCS_0 
QbSpiSlaveCS_1 
QbSpiSlaveCS_2 
QbSpiSlaveCS_3 
QbSpiSlaveCS_Num 
QbSpiSlaveCS_Force32 

Definition at line 74 of file spi_slave.h.

Defines the polarity for SPI chip select.

Enumerator
QbSpiSlaveCSPol_LOW 
QbSpiSlaveCSPol_HIGH 
QbSpiSlaveCSPol_Num 
QbSpiSlaveCSPol_Force32 

Definition at line 87 of file spi_slave.h.

Defines the SPI controller instance.

Enumerator
QbSpiSlaveInstance_1 
QbSpiSlaveInstance_2 
QbSpiSlaveInstance_3 
QbSpiSlaveInstance_4 
QbSpiSlaveInstance_Num 
QbSpiSlaveInstance_Force32 

Definition at line 61 of file spi_slave.h.

Defines the SPI modes.

Enumerator
QbSpiSlaveMode_0 
QbSpiSlaveMode_1 
QbSpiSlaveMode_2 
QbSpiSlaveMode_3 
QbSpiSlaveMode_Num 
QbSpiSlaveMode_Force32 

Definition at line 98 of file spi_slave.h.

Function Documentation

NvError QbSpiSlaveInit ( void  )

Registers the SPI slave driver to the driver framework.