Skip to content

Commit 4515bb0

Browse files
committed
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.
1 parent 76e53d2 commit 4515bb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ typedef struct
149149
* @{
150150
*/
151151
static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);
152-
static uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma);
152+
uint32_t DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma);
153153
static HAL_StatusTypeDef DMA_CheckFifoParam(DMA_HandleTypeDef *hdma);
154154

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

0 commit comments

Comments
 (0)