本文整理汇总了C++中HAL_DMA_Abort函数的典型用法代码示例。如果您正苦于以下问题:C++ HAL_DMA_Abort函数的具体用法?C++ HAL_DMA_Abort怎么用?C++ HAL_DMA_Abort使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HAL_DMA_Abort函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HAL_DAC_Stop_DMA
/**
* @brief Disables DAC and stop conversion of channel.
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @param Channel: The selected DAC channel.
* This parameter can be one of the following values:
* @arg DAC_CHANNEL_1: DAC Channel1 selected
* @arg DAC_CHANNEL_2: DAC Channel2 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel) {
HAL_StatusTypeDef status = HAL_OK;
/* Check the parameters */
assert_param(IS_DAC_CHANNEL(Channel));
/* Disable the selected DAC channel DMA request */
hdac->Instance->CR &= ~(DAC_CR_DMAEN1 << Channel);
/* Disable the Peripheral */
__HAL_DAC_DISABLE(hdac, Channel);
/* Disable the DMA Channel */
/* Channel1 is used */
if (Channel == DAC_CHANNEL_1) {
status = HAL_DMA_Abort(hdac->DMA_Handle1);
} else /* Channel2 is used for */
{
status = HAL_DMA_Abort(hdac->DMA_Handle2);
}
/* Check if DMA Channel effectively disabled */
if (status != HAL_OK) {
/* Update DAC state machine to error */
hdac->State = HAL_DAC_STATE_ERROR;
} else {
/* Change DAC state */
hdac->State = HAL_DAC_STATE_READY;
}
/* Return function status */
return status;
}
示例2: HAL_IRDA_DMAStop
/**
* @brief Stops the DMA Transfer.
* @param hirda: pointer to a IRDA_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_IRDA_DMAStop(IRDA_HandleTypeDef *hirda)
{
/* The Lock is not implemented on this API to allow the user application
to call the HAL UART API under callbacks HAL_UART_TxCpltCallback() / HAL_UART_RxCpltCallback():
when calling HAL_DMA_Abort() API the DMA TX/RX Transfer complete interrupt is generated
and the correspond call back is executed HAL_UART_TxCpltCallback() / HAL_UART_RxCpltCallback()
*/
/* Disable the UART Tx/Rx DMA requests */
hirda->Instance->CR3 &= ~USART_CR3_DMAT;
hirda->Instance->CR3 &= ~USART_CR3_DMAR;
/* Abort the UART DMA tx channel */
if(hirda->hdmatx != NULL)
{
HAL_DMA_Abort(hirda->hdmatx);
}
/* Abort the UART DMA rx channel */
if(hirda->hdmarx != NULL)
{
HAL_DMA_Abort(hirda->hdmarx);
}
hirda->State = HAL_IRDA_STATE_READY;
return HAL_OK;
}
示例3: HAL_I2S_DMAStop
/**
* @brief Resumes the audio stream playing from the Media.
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
* the configuration information for I2S module
* @retval HAL status
*/
HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s)
{
/* Process Locked */
__HAL_LOCK(hi2s);
/* Disable the I2S Tx/Rx DMA requests */
CLEAR_BIT(hi2s->Instance->CR2, SPI_CR2_TXDMAEN);
CLEAR_BIT(hi2s->Instance->CR2, SPI_CR2_RXDMAEN);
/* Abort the I2S DMA Channel tx */
if(hi2s->hdmatx != NULL)
{
/* Disable the I2S DMA channel */
__HAL_DMA_DISABLE(hi2s->hdmatx);
HAL_DMA_Abort(hi2s->hdmatx);
}
/* Abort the I2S DMA Channel rx */
if(hi2s->hdmarx != NULL)
{
/* Disable the I2S DMA channel */
__HAL_DMA_DISABLE(hi2s->hdmarx);
HAL_DMA_Abort(hi2s->hdmarx);
}
/* Disable I2S peripheral */
__HAL_I2S_DISABLE(hi2s);
hi2s->State = HAL_I2S_STATE_READY;
/* Process Unlocked */
__HAL_UNLOCK(hi2s);
return HAL_OK;
}
示例4: HAL_I2S_DMAStop
/**
* @brief Resumes the audio stream playing from the Media.
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
* the configuration information for I2S module
* @retval HAL status
*/
__weak HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s)
{
/* Process Locked */
__HAL_LOCK(hi2s);
/* Disable the I2S Tx/Rx DMA requests */
hi2s->Instance->CR2 &= ~SPI_CR2_TXDMAEN;
hi2s->Instance->CR2 &= ~SPI_CR2_RXDMAEN;
/* Abort the I2S DMA Stream tx */
if(hi2s->hdmatx != NULL)
{
HAL_DMA_Abort(hi2s->hdmatx);
}
/* Abort the I2S DMA Stream rx */
if(hi2s->hdmarx != NULL)
{
HAL_DMA_Abort(hi2s->hdmarx);
}
/* Disable I2S peripheral */
__HAL_I2S_DISABLE(hi2s);
hi2s->State = HAL_I2S_STATE_READY;
/* Process Unlocked */
__HAL_UNLOCK(hi2s);
return HAL_OK;
}
示例5: HAL_IRDA_DMAStop
/**
* @brief Stops the DMA Transfer.
* @param hirda: pointer to a IRDA_HandleTypeDef structure that contains
* the configuration information for the specified UART module.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_IRDA_DMAStop(IRDA_HandleTypeDef *hirda)
{
/* The Lock is not implemented on this API to allow the user application
to call the HAL IRDA API under callbacks HAL_IRDA_TxCpltCallback() / HAL_IRDA_RxCpltCallback() /
HAL_IRDA_TxHalfCpltCallback / HAL_IRDA_RxHalfCpltCallback:
indeed, when HAL_DMA_Abort() API is called, the DMA TX/RX Transfer or Half Transfer complete
interrupt is generated if the DMA transfer interruption occurs at the middle or at the end of
the stream and the corresponding call back is executed. */
/* Disable the UART Tx/Rx DMA requests */
hirda->Instance->CR3 &= ~USART_CR3_DMAT;
hirda->Instance->CR3 &= ~USART_CR3_DMAR;
/* Abort the UART DMA tx channel */
if(hirda->hdmatx != NULL)
{
HAL_DMA_Abort(hirda->hdmatx);
}
/* Abort the UART DMA rx channel */
if(hirda->hdmarx != NULL)
{
HAL_DMA_Abort(hirda->hdmarx);
}
hirda->State = HAL_IRDA_STATE_READY;
return HAL_OK;
}
示例6: HAL_SWPMI_DMAStop
/**
* @brief Stop all DMA transfers.
* @param hswpmi: SWPMI handle
* @retval HAL_OK
*/
HAL_StatusTypeDef HAL_SWPMI_DMAStop(SWPMI_HandleTypeDef *hswpmi)
{
/* Process Locked */
__HAL_LOCK(hswpmi);
/* Disable the SWPMI Tx/Rx DMA requests */
CLEAR_BIT(hswpmi->Instance->CR, (SWPMI_CR_TXDMA | SWPMI_CR_RXDMA));
/* Abort the SWPMI DMA tx channel */
if(hswpmi->hdmatx != NULL)
{
HAL_DMA_Abort(hswpmi->hdmatx);
}
/* Abort the SWPMI DMA rx channel */
if(hswpmi->hdmarx != NULL)
{
HAL_DMA_Abort(hswpmi->hdmarx);
}
/* Disable SWPMI interface */
CLEAR_BIT(hswpmi->Instance->CR, SWPMI_CR_SWPACT);
hswpmi->State = HAL_SWPMI_STATE_READY;
/* Process Unlocked */
__HAL_UNLOCK(hswpmi);
return HAL_OK;
}
示例7: HAL_DAC_Stop_DMA
/**
* @brief Disables DAC and stop conversion of channel.
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @param Channel: The selected DAC channel.
* This parameter can be one of the following values:
* @arg DAC_CHANNEL_1: DAC Channel1 selected
* @arg DAC_CHANNEL_2: DAC Channel2 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel)
{
HAL_StatusTypeDef status = HAL_OK;
/* Check the parameters */
assert_param(IS_DAC_CHANNEL(Channel));
/* Disable the selected DAC channel DMA request */
hdac->Instance->CR &= ~(DAC_CR_DMAEN1 << Channel);
/* Disable the Peripheral */
__HAL_DAC_DISABLE(hdac, Channel);
/* Disable the DMA channel */
#if defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || \
defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx)
/* Channel1 is used */
if (Channel == DAC_CHANNEL_1)
{
/* Disable the DMA channel */
status = HAL_DMA_Abort(hdac->DMA_Handle1);
/* Disable the DAC DMA underrun interrupt */
__HAL_DAC_DISABLE_IT(hdac, DAC_IT_DMAUDR1);
}
else /* Channel2 is used for */
{
/* Disable the DMA channel */
status = HAL_DMA_Abort(hdac->DMA_Handle2);
/* Disable the DAC DMA underrun interrupt */
__HAL_DAC_DISABLE_IT(hdac, DAC_IT_DMAUDR2);
}
#endif /* STM32L431xx STM32L432xx STM32L433xx STM32L442xx STM32L443xx */
/* STM32L471xx STM32L475xx STM32L476xx STM32L485xx STM32L486xx STM32L496xx STM32L4A6xx */
#if defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx)
/* Disable the DMA channel */
status = HAL_DMA_Abort(hdac->DMA_Handle1);
/* Disable the DAC DMA underrun interrupt */
__HAL_DAC_DISABLE_IT(hdac, DAC_IT_DMAUDR1);
#endif /* STM32L451xx STM32L452xx STM32L462xx */
/* Check if DMA Channel effectively disabled */
if (status != HAL_OK)
{
/* Update DAC state machine to error */
hdac->State = HAL_DAC_STATE_ERROR;
}
else
{
/* Change DAC state */
hdac->State = HAL_DAC_STATE_READY;
}
/* Return function status */
return status;
}
示例8: HAL_DAC_Stop_DMA
/**
* @brief Disables DAC and stop conversion of channel.
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
* the configuration information for the specified DAC.
* @param Channel: The selected DAC channel.
* This parameter can be one of the following values:
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
* @arg DAC_CHANNEL_1: DAC2 Channel1 selected
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel)
{
HAL_StatusTypeDef status = HAL_OK;
/* Check the parameters */
assert_param(IS_DAC_CHANNEL_INSTANCE(hdac->Instance, Channel));
/* Disable the selected DAC channel DMA request */
hdac->Instance->CR &= ~(DAC_CR_DMAEN1 << Channel);
/* Disable the Peripheral */
__HAL_DAC_DISABLE(hdac, Channel);
/* Disable the DMA channel */
/* Channel1 is used */
if (Channel == DAC_CHANNEL_1)
{
/* Disable the DMA channel */
status = HAL_DMA_Abort(hdac->DMA_Handle1);
/* Disable the DAC DMA underrun interrupt */
__HAL_DAC_DISABLE_IT(hdac, DAC_IT_DMAUDR1);
}
#if defined(STM32F303xE) || defined(STM32F398xx) || \
defined(STM32F303xC) || defined(STM32F358xx) || \
defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) || \
defined(STM32F373xC) || defined(STM32F378xx)
/* For all products including channel 2 */
/* DAC channel 2 is available on top of DAC channel 1 */
else /* Channel2 is used for */
{
/* Disable the DMA channel */
status = HAL_DMA_Abort(hdac->DMA_Handle2);
/* Disable the DAC DMA underrun interrupt */
__HAL_DAC_DISABLE_IT(hdac, DAC_IT_DMAUDR2);
}
#endif
/* Check if DMA Channel effectively disabled */
if (status != HAL_OK)
{
/* Update DAC state machine to error */
hdac->State = HAL_DAC_STATE_ERROR;
}
else
{
/* Change DAC state */
hdac->State = HAL_DAC_STATE_READY;
}
/* Return function status */
return status;
}
示例9: SD_DMAConfigTx
/**
* @brief Configure the DMA to transmit data to the SD card
* @retval
* HAL_ERROR or HAL_OK
*/
static HAL_StatusTypeDef SD_DMAConfigTx(SD_HandleTypeDef *hsd)
{
static DMA_HandleTypeDef hdma_tx;
HAL_StatusTypeDef status;
/* Configure DMA Tx parameters */
hdma_tx.Init.Request = DMA_REQUEST_7;
hdma_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
hdma_tx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_tx.Init.MemInc = DMA_MINC_ENABLE;
hdma_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
hdma_tx.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
hdma_tx.Init.Priority = DMA_PRIORITY_VERY_HIGH;
hdma_tx.Instance = SD_DMAx_STREAM;
/* Associate the DMA handle */
__HAL_LINKDMA(hsd, hdmatx, hdma_tx);
/* Stop any ongoing transfer and reset the state*/
HAL_DMA_Abort(&hdma_tx);
/* Deinitialize the Channel for new transfer */
HAL_DMA_DeInit(&hdma_tx);
/* Configure the DMA Channel */
status = HAL_DMA_Init(&hdma_tx);
/* NVIC configuration for DMA transfer complete interrupt */
HAL_NVIC_SetPriority(SD_DMAx_IRQn, 6, 0);
HAL_NVIC_EnableIRQ(SD_DMAx_IRQn);
return (status);
}
示例10: SD_DMAConfigRx
/**
* @brief SD_DMAConfigRx
* @par Function Description
* This function configure the DMA to receive data from the SD card
* @retval
* SD_ERROR or SD_OK
*/
HAL_SD_ErrorTypedef SD_DMAConfigRx(SD_HandleTypeDef *hsd)
{
static DMA_HandleTypeDef hdma_rx;
HAL_StatusTypeDef status = HAL_ERROR;
/* Configure DMA Rx parameters */
hdma_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
hdma_rx.Init.PeriphInc = DMA_PINC_DISABLE;
hdma_rx.Init.MemInc = DMA_MINC_ENABLE;
hdma_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
hdma_rx.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
hdma_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH;
hdma_rx.Instance = DMA2_Channel4;
/* Associate the DMA handle */
__HAL_LINKDMA(hsd, hdmarx, hdma_rx);
/* Stop any ongoing transfer and reset the state*/
HAL_DMA_Abort(&hdma_rx);
/* Deinitialize the Channel for new transfer */
HAL_DMA_DeInit(&hdma_rx);
/* Configure the DMA Channel */
status = HAL_DMA_Init(&hdma_rx);
/* NVIC configuration for DMA transfer complete interrupt */
HAL_NVIC_SetPriority(DMA2_Channel4_IRQn, 1, 0);
HAL_NVIC_EnableIRQ(DMA2_Channel4_IRQn);
return (status != HAL_OK? SD_ERROR : SD_OK);
}
示例11: HAL_ADCEx_MultiModeStop_DMA
/**
* @brief Disables ADC DMA (multi-ADC mode) and disables ADC peripheral
* @param hadc: pointer to a ADC_HandleTypeDef structure that contains
* the configuration information for the specified ADC.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef* hadc)
{
/* Process locked */
__HAL_LOCK(hadc);
/* Enable the Peripheral */
__HAL_ADC_DISABLE(hadc);
/* Disable ADC overrun interrupt */
__HAL_ADC_DISABLE_IT(hadc, ADC_IT_OVR);
/* Disable the selected ADC DMA request after last transfer */
ADC->CCR &= ~ADC_CCR_DDS;
/* Disable the ADC DMA Stream */
HAL_DMA_Abort(hadc->DMA_Handle);
/* Change ADC state */
hadc->State = HAL_ADC_STATE_READY;
/* Process unlocked */
__HAL_UNLOCK(hadc);
/* Return function status */
return HAL_OK;
}
示例12: sensor_snapshot
int sensor_snapshot(struct image *image)
{
volatile uint32_t addr;
volatile uint16_t length;
addr = (uint32_t) fb->pixels;
if (sensor.pixformat==PIXFORMAT_JPEG) {
length = MAX_XFER_SIZE;
} else {
length =(fb->w * fb->h * 2)/4;
}
/* Lock framebuffer mutex */
mutex_lock(&fb->lock);
/* Start the DCMI */
HAL_DCMI_Start_DMA(&DCMIHandle,
DCMI_MODE_SNAPSHOT, addr, length);
/* Wait for frame */
while ((DCMI->CR & DCMI_CR_CAPTURE) != 0) {
}
if (sensor.pixformat == PIXFORMAT_GRAYSCALE) {
/* If GRAYSCALE extract Y channel from YUYV */
for (int i=0; i<(fb->w * fb->h); i++) {
fb->pixels[i] = fb->pixels[i*2];
}
} else if (sensor.pixformat == PIXFORMAT_JPEG) {
/* The frame is finished, but DMA still waiting
for data because we set max frame size
so we need to abort the DMA transfer here */
HAL_DMA_Abort(&DMAHandle);
/* Read the number of data items transferred */
fb->bpp = (MAX_XFER_SIZE - DMAHandle.Instance->NDTR)*4;
}
if (image != NULL) {
image->w = fb->w;
image->h = fb->h;
image->bpp = fb->bpp;
image->pixels = fb->pixels;
}
fb->ready = 1;
/* unlock framebuffer mutex */
mutex_unlock(&fb->lock);
while (fb->lock_tried) {
systick_sleep(2);
}
return 0;
}
示例13: StartTask_Uart1Reception
void StartTask_Uart1Reception (void const *argument)
{
extern osMessageQId Q_CmdReceptionHandle;
uint32_t reclen;
osStatus qretval; /*!< The return value which indicates the osMessagePut() implementation result */
uint8_t* ptrdata; /*!< Pointer to any byte in the uart buffer */
uint8_t (*ptr_bufhead)[1], /*!< Pointer to the head of the uart buffer */
(*ptr_buftail)[1]; /*!< Pointer to the tail of the uart buffer */
while (1)
{
osSignalWait (0x01, osWaitForever);
reclen = MAX_DEPTH_UART1_BUF - huart1.hdmarx->Instance->NDTR;
ptrdata = *uart_buf + reclen - 1; // point to the last char received
ptr_bufhead = (uint8_t(*)[1])uart1_buf[0];
ptr_buftail = (uint8_t(*)[1])uart1_buf[MAX_COUNT_UART1_BUF - 2];
if(*ptrdata == '\n')
{
/* Insert a terminal into the string */
*(ptrdata + 1) = 0x0;
if(*(--ptrdata) == '\r') // A command has been received
{
/*
* The current buffer has been used and post to the working thread
* switch to the next uart1 queue buffer to recevie the furture data
*/
qretval = osMessagePut(Q_CmdReceptionHandle, (uint32_t)(uart_buf), 0); // Put the pointer of the data container to the queue
if(qretval != osOK)
{
__breakpoint(0);
//printk(KERN_ERR "It's failed to put the command into the message queue!\r\n");
}
/* Move to the next row of the buffer */
uart_buf++;
if(uart_buf > (uint8_t(*)[50])ptr_buftail)
{
uart_buf = (uint8_t(*)[50])ptr_bufhead;
}
}
/* Reset DMA_EN bit can result in the TCIF interrupt.
The interrupt raises the HAL_UART_RxCpltCallback() event, the DMA_Rx will be restarted in it */
HAL_DMA_Abort(huart1.hdmarx);
USART_Start_Receive_DMA(&huart1);
}
else /* Continue recepition if the last char is not '\n' */
{
__HAL_UART_ENABLE_IT(&huart1, UART_IT_IDLE);
}
}
}
示例14: HAL_DCMI_Stop
/**
* @brief Disable DCMI DMA request and Disable DCMI capture
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
* the configuration information for DCMI.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi)
{
uint32_t tickstart = 0;
/* Lock the DCMI peripheral state */
hdcmi->State = HAL_DCMI_STATE_BUSY;
__HAL_DCMI_DISABLE(hdcmi);
/* Disable Capture */
DCMI->CR &= ~(DCMI_CR_CAPTURE);
/* Get tick */
tickstart = HAL_GetTick();
/* Check if the DCMI capture effectively disabled */
while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0)
{
if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DCMI_STOP)
{
/* Process Unlocked */
__HAL_UNLOCK(hdcmi);
/* Update error code */
hdcmi->ErrorCode |= HAL_DCMI_ERROR_TIMEOUT;
/* Change DCMI state */
hdcmi->State = HAL_DCMI_STATE_TIMEOUT;
return HAL_TIMEOUT;
}
}
/* Disable the DMA */
HAL_DMA_Abort(hdcmi->DMA_Handle);
/* Update error code */
hdcmi->ErrorCode |= HAL_DCMI_ERROR_NONE;
/* Change DCMI state */
hdcmi->State = HAL_DCMI_STATE_READY;
/* Process Unlocked */
__HAL_UNLOCK(hdcmi);
/* Return function status */
return HAL_OK;
}
示例15: HAL_DCMI_Stop
/**
* @brief Disable DCMI DMA request and Disable DCMI capture
* @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains
* the configuration information for DCMI.
* @retval HAL status
*/
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi)
{
register uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock /8/1000);
HAL_StatusTypeDef status = HAL_OK;
/* Process locked */
__HAL_LOCK(hdcmi);
/* Lock the DCMI peripheral state */
hdcmi->State = HAL_DCMI_STATE_BUSY;
/* Disable Capture */
hdcmi->Instance->CR &= ~(DCMI_CR_CAPTURE);
/* Check if the DCMI capture effectively disabled */
do
{
if (count-- == 0)
{
/* Update error code */
hdcmi->ErrorCode |= HAL_DCMI_ERROR_TIMEOUT;
status = HAL_TIMEOUT;
break;
}
}
while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0);
/* Disable the DCMI */
__HAL_DCMI_DISABLE(hdcmi);
/* Disable the DMA */
HAL_DMA_Abort(hdcmi->DMA_Handle);
/* Update error code */
hdcmi->ErrorCode |= HAL_DCMI_ERROR_NONE;
/* Change DCMI state */
hdcmi->State = HAL_DCMI_STATE_READY;
/* Process Unlocked */
__HAL_UNLOCK(hdcmi);
/* Return function status */
return status;
}