Macros
Collaboration diagram for Command Codes:

Macros

#define SPICC26X2DMA_CMD_RETURN_PARTIAL_ENABLE   (SPI_CMD_RESERVED + 0)
 Command used by SPI_control() to enable partial return. More...
 
#define SPICC26X2DMA_CMD_RETURN_PARTIAL_DISABLE   (SPI_CMD_RESERVED + 1)
 Command used by SPI_control() to disable partial return. More...
 
#define SPICC26X2DMA_CMD_SET_CSN_PIN   (SPI_CMD_RESERVED + 2)
 Command used by SPI_control() to re-configure chip select pin. More...
 
#define SPICC26X2DMA_CMD_CLEAR_CSN_PIN   (SPI_CMD_RESERVED + 3)
 Command used by SPI_control() to disable the hardware chip select pin. More...
 
#define SPICC26X2DMA_CMD_SET_MANUAL   (SPI_CMD_RESERVED + 4)
 Command used by SPI_control() to enable manual start mode. More...
 
#define SPICC26X2DMA_CMD_CLR_MANUAL   (SPI_CMD_RESERVED + 5)
 Command used by SPI_control() to disable manual start mode. More...
 
#define SPICC26X2DMA_CMD_MANUAL_START   (SPI_CMD_RESERVED + 6)
 Command used by SPI_control() to enable manual start mode. More...
 
#define SPICC26X4DMA_CMD_RETURN_PARTIAL_ENABLE   (SPI_CMD_RESERVED + 0)
 Command used by SPI_control() to enable partial return. More...
 
#define SPICC26X4DMA_CMD_RETURN_PARTIAL_DISABLE   (SPI_CMD_RESERVED + 1)
 Command used by SPI_control() to disable partial return. More...
 
#define SPICC26X4DMA_CMD_SET_CSN_PIN   (SPI_CMD_RESERVED + 2)
 Command used by SPI_control() to re-configure chip select pin. More...
 
#define SPICC26X4DMA_CMD_CLEAR_CSN_PIN   (SPI_CMD_RESERVED + 3)
 Command used by SPI_control() to clear the chip select pin. More...
 
#define SPICC26X4DMA_CMD_SET_MANUAL   (SPI_CMD_RESERVED + 4)
 Command used by SPI_control() to enable manual start mode. More...
 
#define SPICC26X4DMA_CMD_CLR_MANUAL   (SPI_CMD_RESERVED + 5)
 Command used by SPI_control() to disable manual start mode. More...
 
#define SPICC26X4DMA_CMD_MANUAL_START   (SPI_CMD_RESERVED + 6)
 Command used by SPI_control() to enable manual start mode. More...
 
#define SPICC26X4DMA_CMD_SET_SAMPLE_DELAY   (SPI_CMD_RESERVED + 7)
 Command used by SPI_control() to set the sample delay in master mode. More...
 
#define SPICC26XXDMA_CMD_RETURN_PARTIAL_ENABLE   (SPI_CMD_RESERVED + 0)
 Command used by SPI_control to enable partial return. More...
 
#define SPICC26XXDMA_CMD_RETURN_PARTIAL_DISABLE   (SPI_CMD_RESERVED + 1)
 Command used by SPI_control to disable partial return. More...
 
#define SPICC26XXDMA_CMD_SET_CSN_PIN   (SPI_CMD_RESERVED + 2)
 Command used by SPI_control to re-configure chip select pin. More...
 

Detailed Description

SPI_CMD_* macros are general command codes for SPI_control(). Not all SPI driver implementations support these command codes.

SPICC26X2DMA_CMD_* macros are command codes only defined in the SPICC26X2DMA.h driver implementation and need to:

SPICC26X4DMA_CMD_* macros are command codes only defined in the SPICC26X4DMA.h driver implementation and need to:

SPICC26XXDMA_CMD_* macros are command codes only defined in the SPICC26XXDMA.h driver implementation and need to:

Macro Definition Documentation

§ SPICC26X2DMA_CMD_RETURN_PARTIAL_ENABLE

#define SPICC26X2DMA_CMD_RETURN_PARTIAL_ENABLE   (SPI_CMD_RESERVED + 0)

Command used by SPI_control() to enable partial return.

Enabling this command allows SPI_transfer to return partial data if the master de-asserts the CS line before the expected number of frames were received. This command arg is of type don't care and it returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X2DMA_CMD_RETURN_PARTIAL_DISABLE

#define SPICC26X2DMA_CMD_RETURN_PARTIAL_DISABLE   (SPI_CMD_RESERVED + 1)

Command used by SPI_control() to disable partial return.

Disabling this command returns the SPICC26X2DMA to the default blocking behavior where SPI_transfer blocks until all data bytes were received. With this command arg is don't care and it returns SPI_STATUS_SUCCESS.

§ SPICC26X2DMA_CMD_SET_CSN_PIN

#define SPICC26X2DMA_CMD_SET_CSN_PIN   (SPI_CMD_RESERVED + 2)

Command used by SPI_control() to re-configure chip select pin.

Enables hardware control of the chip select pin arg should be a uint_least8_t indicating the device DIO to be used as the hardware CS pin.

Passing GPIO_INVALID_INDEX or PIN_UNASSIGNED to this command is equivalent to calling SPICC26X2DMA_CMD_CLEAR_CSN_PIN.

Always returns SPI_STATUS_SUCCESS.

§ SPICC26X2DMA_CMD_CLEAR_CSN_PIN

#define SPICC26X2DMA_CMD_CLEAR_CSN_PIN   (SPI_CMD_RESERVED + 3)

Command used by SPI_control() to disable the hardware chip select pin.

arg should be NULL. This command will disable all hardware control and muxing of the csPin. It can then be controlled by user software using the GPIO driver, or configured later using SPICC26X2DMA_CMD_SET_CSN_PIN.

Always returns SPI_STATUS_SUCCESS.

§ SPICC26X2DMA_CMD_SET_MANUAL

#define SPICC26X2DMA_CMD_SET_MANUAL   (SPI_CMD_RESERVED + 4)

Command used by SPI_control() to enable manual start mode.

Manual start mode can only be used when in callback mode. In manual start mode, calls to SPI_transfer() queue the transaction but does not start the transfer until another control call is made with SPICC26X2DMA_CMD_MANUAL_START. This allows multiple transactions to be queued and executed seamlessly using the DMA's ping pong mechanism. This mode is MANDATORY for slaves queueing multiple short transactions. Manual start mode can only be enabled or disabled when no transactions are queued.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X2DMA_CMD_CLR_MANUAL

#define SPICC26X2DMA_CMD_CLR_MANUAL   (SPI_CMD_RESERVED + 5)

Command used by SPI_control() to disable manual start mode.

Manual start mode is disabled by default. Enabling and disabling manual mode can only be done if no transactions are currently queued.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X2DMA_CMD_MANUAL_START

#define SPICC26X2DMA_CMD_MANUAL_START   (SPI_CMD_RESERVED + 6)

Command used by SPI_control() to enable manual start mode.

This command is used with manual start mode enabled. If transactions have been queued and the driver is in manual mode, this command will enable the SSI and DMA. For master devices, the transfer will start. For slave devices, the transfer will start when the master initiates.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X4DMA_CMD_RETURN_PARTIAL_ENABLE

#define SPICC26X4DMA_CMD_RETURN_PARTIAL_ENABLE   (SPI_CMD_RESERVED + 0)

Command used by SPI_control() to enable partial return.

Enabling this command allows SPI_transfer to return partial data if the master de-asserts the CS line before the expected number of frames were received. This command arg is of type don't care and it returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X4DMA_CMD_RETURN_PARTIAL_DISABLE

#define SPICC26X4DMA_CMD_RETURN_PARTIAL_DISABLE   (SPI_CMD_RESERVED + 1)

Command used by SPI_control() to disable partial return.

Disabling this command returns the SPICC26X4DMA to the default blocking behavior where SPI_transfer blocks until all data bytes were received. With this command arg is don't care and it returns SPI_STATUS_SUCCESS.

§ SPICC26X4DMA_CMD_SET_CSN_PIN

#define SPICC26X4DMA_CMD_SET_CSN_PIN   (SPI_CMD_RESERVED + 2)

Command used by SPI_control() to re-configure chip select pin.

This command specifies a chip select pin in arg with type uint_least8_t. It always returns SPI_STATUS_SUCCESS.

§ SPICC26X4DMA_CMD_CLEAR_CSN_PIN

#define SPICC26X4DMA_CMD_CLEAR_CSN_PIN   (SPI_CMD_RESERVED + 3)

Command used by SPI_control() to clear the chip select pin.

This command arg should be NULL. It always returns SPI_STATUS_SUCCESS.

§ SPICC26X4DMA_CMD_SET_MANUAL

#define SPICC26X4DMA_CMD_SET_MANUAL   (SPI_CMD_RESERVED + 4)

Command used by SPI_control() to enable manual start mode.

Manual start mode can only be used when in callback mode. In manual start mode, calls to SPI_transfer() queue the transaction but does not start the transfer until another control call is made with SPICC26X4DMA_CMD_MANUAL_START. This allows multiple transactions to be queued and executed seamlessly using the DMA's ping pong mechanism. This mode is MANDATORY for slaves queueing multiple short transactions. Manual start mode can only be enabled or disabled when no transactions are queued.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X4DMA_CMD_CLR_MANUAL

#define SPICC26X4DMA_CMD_CLR_MANUAL   (SPI_CMD_RESERVED + 5)

Command used by SPI_control() to disable manual start mode.

Manual start mode is disabled by default. Enabling and disabling manual mode can only be done if no transactions are currently queued.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X4DMA_CMD_MANUAL_START

#define SPICC26X4DMA_CMD_MANUAL_START   (SPI_CMD_RESERVED + 6)

Command used by SPI_control() to enable manual start mode.

This command is used with manual start mode enabled. If transactions have been queued and the driver is in manual mode, this command will enable the SSI and DMA. For master devices, the transfer will start. For slave devices, the transfer will start when the master initiates.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26X4DMA_CMD_SET_SAMPLE_DELAY

#define SPICC26X4DMA_CMD_SET_SAMPLE_DELAY   (SPI_CMD_RESERVED + 7)

Command used by SPI_control() to set the sample delay in master mode.

This command is only used when in master mode. After SPI_open() is called, the default DSAMPLE value is set as follows.

  • (bitRate < 4MHz) -> delay = 0
  • (bitRate >= 4MHz) -> delay = 1
  • (bitRate >= 8MHz) -> delay = 2

The sample delay is a measurement of clock cycles. In master mode the data on the input pin will delay sampling by the defined clock cycles. At lower bitRates a delay is usually not necessary. At higher bitRates a delay may become necessary if the slave device is not keeping pace with the master device. In this case, the delay can be used to ensure the master device captures the data on the input pin. This command arg is of type uint8_t.

Returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26XXDMA_CMD_RETURN_PARTIAL_ENABLE

#define SPICC26XXDMA_CMD_RETURN_PARTIAL_ENABLE   (SPI_CMD_RESERVED + 0)

Command used by SPI_control to enable partial return.

Enabling this command allows SPI_transfer to return partial data if the master de-asserts the CS line before the expected number of frames were received. This command arg is of type don't care and it returns SPI_STATUS_SUCCESS or SPI_STATUS_ERROR.

§ SPICC26XXDMA_CMD_RETURN_PARTIAL_DISABLE

#define SPICC26XXDMA_CMD_RETURN_PARTIAL_DISABLE   (SPI_CMD_RESERVED + 1)

Command used by SPI_control to disable partial return.

Disabling this command returns the SPICC26XXDMA to the default blocking behavior where SPI_transfer blocks until all data bytes were received. With this command arg is don't care and it returns SPI_STATUS_SUCCESS.

§ SPICC26XXDMA_CMD_SET_CSN_PIN

#define SPICC26XXDMA_CMD_SET_CSN_PIN   (SPI_CMD_RESERVED + 2)

Command used by SPI_control to re-configure chip select pin.

This command specifies a chip select pin With this command arg is of type PIN_Id and it return SPI_STATUS_SUCCESS

© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale