Browse Source

F4_HAL/dma: Expose DMA_CalcBaseAndBitshift as a public function.

Instead of calling DMA_Init to set up everything it's possible sometimes to
just call DMA_CalcBaseAndBitshift, so make the latter public.
work-f1-1.10.2
Damien George 7 years ago
committed by Damien George
parent
commit
bf7e46c1e0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c

+ 2
- 2
STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c View File

@@ -149,7 +149,7 @@ typedef struct
* @{
*/
static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
static uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma);
uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma);
static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma);

/**
@@ -1192,7 +1192,7 @@ static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t
* the configuration information for the specified DMA Stream.
* @retval Stream base address
*/
static uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma)
uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma)
{
uint32_t stream_number = (((uint32_t)hdma->Instance & 0xFFU) - 16U) / 24U;



Loading…
Cancel
Save