Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

DMA transfers management functions

DMA transfers management functions
[SPI_Private_Functions]

DMA transfers management functions. More...

Functions

void SPI_I2S_DMACmd (SPI_TypeDef *SPIx, uint16_t SPI_I2S_DMAReq, FunctionalState NewState)
 Enables or disables the SPIx/I2Sx DMA interface.
void SPI_LastDMATransferCmd (SPI_TypeDef *SPIx, uint16_t SPI_LastDMATransfer)
 Configures the number of data to transfer type(Even/Odd) for the DMA last transfers and for the selected SPI.

Detailed Description

DMA transfers management functions.

 ===============================================================================
                  ##### DMA transfers management functions #####
 ===============================================================================


Function Documentation

void SPI_I2S_DMACmd ( SPI_TypeDef *  SPIx,
uint16_t  SPI_I2S_DMAReq,
FunctionalState  NewState 
)

Enables or disables the SPIx/I2Sx DMA interface.

Parameters:
SPIx:Toselect the SPIx/I2Sx peripheral, where x can be: 1, 2, 3 or 4 in SPI mode or 2 or 3 in I2S mode or I2Sxext for I2S full duplex mode.
SPI_I2S_DMAReq,:specifies the SPI DMA transfer request to be enabled or disabled. This parameter can be any combination of the following values:

  • SPI_I2S_DMAReq_Tx: Tx buffer DMA transfer request
  • SPI_I2S_DMAReq_Rx: Rx buffer DMA transfer request
NewState,:new state of the selected SPI DMA transfer request. This parameter can be: ENABLE or DISABLE.
Return values:
None

Definition at line 1095 of file stm32f30x_spi.c.

void SPI_LastDMATransferCmd ( SPI_TypeDef *  SPIx,
uint16_t  SPI_LastDMATransfer 
)

Configures the number of data to transfer type(Even/Odd) for the DMA last transfers and for the selected SPI.

Note:
This function have a meaning only if DMA mode is selected and if the packing mode is used (data length <= 8 and DMA transfer size halfword)
Parameters:
SPIx,:where x can be 1, 2, 3 or 4 to select the SPI peripheral.
SPI_LastDMATransfer,:specifies the SPI last DMA transfers state. This parameter can be one of the following values:

  • SPI_LastDMATransfer_TxEvenRxEven: Number of data for transmission Even and number of data for reception Even.
  • SPI_LastDMATransfer_TxOddRxEven: Number of data for transmission Odd and number of data for reception Even.
  • SPI_LastDMATransfer_TxEvenRxOdd: Number of data for transmission Even and number of data for reception Odd.
  • SPI_LastDMATransfer_TxOddRxOdd: RNumber of data for transmission Odd and number of data for reception Odd.
Return values:
None

Definition at line 1132 of file stm32f30x_spi.c.