STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
stm32f7xx_hal_dcmi.c
Go to the documentation of this file.
1 
93 /* Includes ------------------------------------------------------------------*/
94 #include "stm32f7xx_hal.h"
95 
104 #ifdef HAL_DCMI_MODULE_ENABLED
105 
106 /* Private typedef -----------------------------------------------------------*/
107 /* Private define ------------------------------------------------------------*/
108 #define HAL_TIMEOUT_DCMI_STOP ((uint32_t)1000) /* Set timeout to 1s */
109 
110 #define DCMI_POSITION_CWSIZE_VLINE (uint32_t)POSITION_VAL(DCMI_CWSIZE_VLINE)
111 #define DCMI_POSITION_CWSTRT_VST (uint32_t)POSITION_VAL(DCMI_CWSTRT_VST)
113 #define DCMI_POSITION_ESCR_LSC (uint32_t)POSITION_VAL(DCMI_ESCR_LSC)
114 #define DCMI_POSITION_ESCR_LEC (uint32_t)POSITION_VAL(DCMI_ESCR_LEC)
115 #define DCMI_POSITION_ESCR_FEC (uint32_t)POSITION_VAL(DCMI_ESCR_FEC)
117 /* Private macro -------------------------------------------------------------*/
118 /* Private variables ---------------------------------------------------------*/
119 /* Private function prototypes -----------------------------------------------*/
120 static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma);
121 static void DCMI_DMAError(DMA_HandleTypeDef *hdma);
122 
123 /* Exported functions --------------------------------------------------------*/
124 
152 {
153  /* Check the DCMI peripheral state */
154  if(hdcmi == NULL)
155  {
156  return HAL_ERROR;
157  }
158 
159  /* Check function parameters */
168 
173 
174  if(hdcmi->State == HAL_DCMI_STATE_RESET)
175  {
176  /* Init the low level hardware */
177  HAL_DCMI_MspInit(hdcmi);
178  }
179 
180  /* Change the DCMI state */
181  hdcmi->State = HAL_DCMI_STATE_BUSY;
182  /* Configures the HS, VS, DE and PC polarity */
184  DCMI_CR_EDM_1 | DCMI_CR_FCRC_0 | DCMI_CR_FCRC_1 | DCMI_CR_JPEG |\
185  DCMI_CR_ESS | DCMI_CR_BSM_0 | DCMI_CR_BSM_1 | DCMI_CR_OEBS |\
186  DCMI_CR_LSM | DCMI_CR_OELS);
187 
188  hdcmi->Instance->CR |= (uint32_t)(hdcmi->Init.SynchroMode | hdcmi->Init.CaptureRate |\
189  hdcmi->Init.VSPolarity | hdcmi->Init.HSPolarity |\
190  hdcmi->Init.PCKPolarity | hdcmi->Init.ExtendedDataMode |\
191  hdcmi->Init.JPEGMode | hdcmi->Init.ByteSelectMode |\
192  hdcmi->Init.ByteSelectStart | hdcmi->Init.LineSelectMode |\
193  hdcmi->Init.LineSelectStart);
194 
196  {
197  hdcmi->Instance->ESCR = (((uint32_t)hdcmi->Init.SyncroCode.FrameStartCode) |\
198  ((uint32_t)hdcmi->Init.SyncroCode.LineStartCode << DCMI_POSITION_ESCR_LSC)|\
199  ((uint32_t)hdcmi->Init.SyncroCode.LineEndCode << DCMI_POSITION_ESCR_LEC) |\
200  ((uint32_t)hdcmi->Init.SyncroCode.FrameEndCode << DCMI_POSITION_ESCR_FEC));
201 
202  }
203 
204  /* Enable the Line, Vsync, Error and Overrun interrupts */
206 
207  /* Update error code */
209 
210  /* Initialize the DCMI state*/
211  hdcmi->State = HAL_DCMI_STATE_READY;
212 
213  return HAL_OK;
214 }
215 
225 {
226  /* DeInit the low level hardware */
227  HAL_DCMI_MspDeInit(hdcmi);
228 
229  /* Update error code */
231 
232  /* Initialize the DCMI state*/
233  hdcmi->State = HAL_DCMI_STATE_RESET;
234 
235  /* Release Lock */
236  __HAL_UNLOCK(hdcmi);
237 
238  return HAL_OK;
239 }
240 
247 __weak void HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi)
248 {
249  /* Prevent unused argument(s) compilation warning */
250  UNUSED(hdcmi);
251 
252  /* NOTE : This function Should not be modified, when the callback is needed,
253  the HAL_DCMI_MspInit could be implemented in the user file
254  */
255 }
256 
263 __weak void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi)
264 {
265  /* Prevent unused argument(s) compilation warning */
266  UNUSED(hdcmi);
267 
268  /* NOTE : This function Should not be modified, when the callback is needed,
269  the HAL_DCMI_MspDeInit could be implemented in the user file
270  */
271 }
272 
302 HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length)
303 {
304  /* Initialize the second memory address */
305  uint32_t SecondMemAddress = 0;
306 
307  /* Check function parameters */
309 
310  /* Process Locked */
311  __HAL_LOCK(hdcmi);
312 
313  /* Lock the DCMI peripheral state */
314  hdcmi->State = HAL_DCMI_STATE_BUSY;
315 
316  /* Enable DCMI by setting DCMIEN bit */
317  __HAL_DCMI_ENABLE(hdcmi);
318 
319  /* Configure the DCMI Mode */
320  hdcmi->Instance->CR &= ~(DCMI_CR_CM);
321  hdcmi->Instance->CR |= (uint32_t)(DCMI_Mode);
322 
323  /* Set the DMA memory0 conversion complete callback */
324  hdcmi->DMA_Handle->XferCpltCallback = DCMI_DMAXferCplt;
325 
326  /* Set the DMA error callback */
327  hdcmi->DMA_Handle->XferErrorCallback = DCMI_DMAError;
328 
329  /* Set the dma abort callback */
331 
332  /* Reset transfer counters value */
333  hdcmi->XferCount = 0;
334  hdcmi->XferTransferNumber = 0;
335 
336  if(Length <= 0xFFFF)
337  {
338  /* Enable the DMA Stream */
339  HAL_DMA_Start_IT(hdcmi->DMA_Handle, (uint32_t)&hdcmi->Instance->DR, (uint32_t)pData, Length);
340  }
341  else /* DCMI_DOUBLE_BUFFER Mode */
342  {
343  /* Set the DMA memory1 conversion complete callback */
344  hdcmi->DMA_Handle->XferM1CpltCallback = DCMI_DMAXferCplt;
345 
346  /* Initialize transfer parameters */
347  hdcmi->XferCount = 1;
348  hdcmi->XferSize = Length;
349  hdcmi->pBuffPtr = pData;
350 
351  /* Get the number of buffer */
352  while(hdcmi->XferSize > 0xFFFF)
353  {
354  hdcmi->XferSize = (hdcmi->XferSize/2);
355  hdcmi->XferCount = hdcmi->XferCount*2;
356  }
357 
358  /* Update DCMI counter and transfer number*/
359  hdcmi->XferCount = (hdcmi->XferCount - 2);
360  hdcmi->XferTransferNumber = hdcmi->XferCount;
361 
362  /* Update second memory address */
363  SecondMemAddress = (uint32_t)(pData + (4*hdcmi->XferSize));
364 
365  /* Start DMA multi buffer transfer */
366  HAL_DMAEx_MultiBufferStart_IT(hdcmi->DMA_Handle, (uint32_t)&hdcmi->Instance->DR, (uint32_t)pData, SecondMemAddress, hdcmi->XferSize);
367  }
368 
369  /* Enable Capture */
370  hdcmi->Instance->CR |= DCMI_CR_CAPTURE;
371 
372  /* Release Lock */
373  __HAL_UNLOCK(hdcmi);
374 
375  /* Return function status */
376  return HAL_OK;
377 }
378 
386 {
387  register uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock /8/1000);
388  HAL_StatusTypeDef status = HAL_OK;
389 
390  /* Process locked */
391  __HAL_LOCK(hdcmi);
392 
393  /* Lock the DCMI peripheral state */
394  hdcmi->State = HAL_DCMI_STATE_BUSY;
395 
396  /* Disable Capture */
397  hdcmi->Instance->CR &= ~(DCMI_CR_CAPTURE);
398 
399  /* Check if the DCMI capture effectively disabled */
400  do
401  {
402  if (count-- == 0)
403  {
404  /* Update error code */
406 
407  status = HAL_TIMEOUT;
408  break;
409  }
410  }
411  while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0);
412 
413  /* Disable the DCMI */
414  __HAL_DCMI_DISABLE(hdcmi);
415 
416  /* Disable the DMA */
417  HAL_DMA_Abort(hdcmi->DMA_Handle);
418 
419  /* Update error code */
420  hdcmi->ErrorCode |= HAL_DCMI_ERROR_NONE;
421 
422  /* Change DCMI state */
423  hdcmi->State = HAL_DCMI_STATE_READY;
424 
425  /* Process Unlocked */
426  __HAL_UNLOCK(hdcmi);
427 
428  /* Return function status */
429  return status;
430 }
431 
439 {
440  register uint32_t count = HAL_TIMEOUT_DCMI_STOP * (SystemCoreClock /8/1000);
441  HAL_StatusTypeDef status = HAL_OK;
442 
443  /* Process locked */
444  __HAL_LOCK(hdcmi);
445 
446  if(hdcmi->State == HAL_DCMI_STATE_BUSY)
447  {
448  /* Change DCMI state */
450 
451  /* Disable Capture */
452  hdcmi->Instance->CR &= ~(DCMI_CR_CAPTURE);
453 
454  /* Check if the DCMI capture effectively disabled */
455  do
456  {
457  if (count-- == 0)
458  {
459  /* Update error code */
461 
462  /* Change DCMI state */
463  hdcmi->State = HAL_DCMI_STATE_READY;
464 
465  status = HAL_TIMEOUT;
466  break;
467  }
468  }
469  while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0);
470  }
471  /* Process Unlocked */
472  __HAL_UNLOCK(hdcmi);
473 
474  /* Return function status */
475  return status;
476 }
477 
485 {
486  /* Process locked */
487  __HAL_LOCK(hdcmi);
488 
489  if(hdcmi->State == HAL_DCMI_STATE_SUSPENDED)
490  {
491  /* Change DCMI state */
492  hdcmi->State = HAL_DCMI_STATE_BUSY;
493 
494  /* Disable Capture */
495  hdcmi->Instance->CR |= DCMI_CR_CAPTURE;
496  }
497  /* Process Unlocked */
498  __HAL_UNLOCK(hdcmi);
499 
500  /* Return function status */
501  return HAL_OK;
502 }
503 
511 {
512  uint32_t isr_value = READ_REG(hdcmi->Instance->MISR);
513 
514  /* Synchronization error interrupt management *******************************/
515  if((isr_value & DCMI_FLAG_ERRRI) == DCMI_FLAG_ERRRI)
516  {
517  /* Clear the Synchronization error flag */
518  __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_ERRRI);
519 
520  /* Update error code */
521  hdcmi->ErrorCode |= HAL_DCMI_ERROR_SYNC;
522 
523  /* Change DCMI state */
524  hdcmi->State = HAL_DCMI_STATE_ERROR;
525 
526  /* Set the synchronization error callback */
527  hdcmi->DMA_Handle->XferAbortCallback = DCMI_DMAError;
528 
529  /* Abort the DMA Transfer */
530  HAL_DMA_Abort_IT(hdcmi->DMA_Handle);
531  }
532  /* Overflow interrupt management ********************************************/
533  if((isr_value & DCMI_FLAG_OVRRI) == DCMI_FLAG_OVRRI)
534  {
535  /* Clear the Overflow flag */
536  __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_OVRRI);
537 
538  /* Update error code */
539  hdcmi->ErrorCode |= HAL_DCMI_ERROR_OVR;
540 
541  /* Change DCMI state */
542  hdcmi->State = HAL_DCMI_STATE_ERROR;
543 
544  /* Set the overflow callback */
545  hdcmi->DMA_Handle->XferAbortCallback = DCMI_DMAError;
546 
547  /* Abort the DMA Transfer */
549  }
550  /* Line Interrupt management ************************************************/
551  if((isr_value & DCMI_FLAG_LINERI) == DCMI_FLAG_LINERI)
552  {
553  /* Clear the Line interrupt flag */
554  __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_LINERI);
555 
556  /* Line interrupt Callback */
558  }
559  /* VSYNC interrupt management ***********************************************/
560  if((isr_value & DCMI_FLAG_VSYNCRI) == DCMI_FLAG_VSYNCRI)
561  {
562  /* Clear the VSYNC flag */
563  __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_VSYNCRI);
564 
565  /* VSYNC Callback */
567  }
568  /* FRAME interrupt management ***********************************************/
569  if((isr_value & DCMI_FLAG_FRAMERI) == DCMI_FLAG_FRAMERI)
570  {
571  /* When snapshot mode, disable Vsync, Error and Overrun interrupts */
572  if((hdcmi->Instance->CR & DCMI_CR_CM) == DCMI_MODE_SNAPSHOT)
573  {
574  /* Disable the Line, Vsync, Error and Overrun interrupts */
576  }
577 
578  /* Disable the Frame interrupt */
580 
581  /* Clear the End of Frame flag */
582  __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_FRAMERI);
583 
584  /* Frame Callback */
586  }
587 }
588 
595 __weak void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi)
596 {
597  /* Prevent unused argument(s) compilation warning */
598  UNUSED(hdcmi);
599 
600  /* NOTE : This function Should not be modified, when the callback is needed,
601  the HAL_DCMI_ErrorCallback could be implemented in the user file
602  */
603 }
604 
612 {
613  /* NOTE : This function Should not be modified, when the callback is needed,
614  the HAL_DCMI_LineEventCallback could be implemented in the user file
615  */
616 }
617 
625 {
626  /* Prevent unused argument(s) compilation warning */
627  UNUSED(hdcmi);
628 
629  /* NOTE : This function Should not be modified, when the callback is needed,
630  the HAL_DCMI_VsyncEventCallback could be implemented in the user file
631  */
632 }
633 
641 {
642  /* Prevent unused argument(s) compilation warning */
643  UNUSED(hdcmi);
644 
645  /* NOTE : This function Should not be modified, when the callback is needed,
646  the HAL_DCMI_FrameEventCallback could be implemented in the user file
647  */
648 }
649 
680 HAL_StatusTypeDef HAL_DCMI_ConfigCrop(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize)
681 {
682  /* Process Locked */
683  __HAL_LOCK(hdcmi);
684 
685  /* Lock the DCMI peripheral state */
686  hdcmi->State = HAL_DCMI_STATE_BUSY;
687 
688  /* Check the parameters */
693 
694  /* Configure CROP */
695  hdcmi->Instance->CWSIZER = (XSize | (YSize << DCMI_POSITION_CWSIZE_VLINE));
696  hdcmi->Instance->CWSTRTR = (X0 | (Y0 << DCMI_POSITION_CWSTRT_VST));
697 
698  /* Initialize the DCMI state*/
699  hdcmi->State = HAL_DCMI_STATE_READY;
700 
701  /* Process Unlocked */
702  __HAL_UNLOCK(hdcmi);
703 
704  return HAL_OK;
705 }
706 
714 {
715  /* Process Locked */
716  __HAL_LOCK(hdcmi);
717 
718  /* Lock the DCMI peripheral state */
719  hdcmi->State = HAL_DCMI_STATE_BUSY;
720 
721  /* Disable DCMI Crop feature */
722  hdcmi->Instance->CR &= ~(uint32_t)DCMI_CR_CROP;
723 
724  /* Change the DCMI state*/
725  hdcmi->State = HAL_DCMI_STATE_READY;
726 
727  /* Process Unlocked */
728  __HAL_UNLOCK(hdcmi);
729 
730  return HAL_OK;
731 }
732 
740 {
741  /* Process Locked */
742  __HAL_LOCK(hdcmi);
743 
744  /* Lock the DCMI peripheral state */
745  hdcmi->State = HAL_DCMI_STATE_BUSY;
746 
747  /* Enable DCMI Crop feature */
748  hdcmi->Instance->CR |= (uint32_t)DCMI_CR_CROP;
749 
750  /* Change the DCMI state*/
751  hdcmi->State = HAL_DCMI_STATE_READY;
752 
753  /* Process Unlocked */
754  __HAL_UNLOCK(hdcmi);
755 
756  return HAL_OK;
757 }
758 
786 {
787  return hdcmi->State;
788 }
789 
796 uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi)
797 {
798  return hdcmi->ErrorCode;
799 }
800 
804 /* Private functions ---------------------------------------------------------*/
814 static void DCMI_DMAXferCplt(DMA_HandleTypeDef *hdma)
815 {
816  uint32_t tmp = 0;
817 
818  DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
819 
820  if(hdcmi->XferCount != 0)
821  {
822  /* Update memory 0 address location */
823  tmp = ((hdcmi->DMA_Handle->Instance->CR) & DMA_SxCR_CT);
824  if(((hdcmi->XferCount % 2) == 0) && (tmp != 0))
825  {
826  tmp = hdcmi->DMA_Handle->Instance->M0AR;
827  HAL_DMAEx_ChangeMemory(hdcmi->DMA_Handle, (tmp + (8*hdcmi->XferSize)), MEMORY0);
828  hdcmi->XferCount--;
829  }
830  /* Update memory 1 address location */
831  else if((hdcmi->DMA_Handle->Instance->CR & DMA_SxCR_CT) == 0)
832  {
833  tmp = hdcmi->DMA_Handle->Instance->M1AR;
834  HAL_DMAEx_ChangeMemory(hdcmi->DMA_Handle, (tmp + (8*hdcmi->XferSize)), MEMORY1);
835  hdcmi->XferCount--;
836  }
837  }
838  /* Update memory 0 address location */
839  else if((hdcmi->DMA_Handle->Instance->CR & DMA_SxCR_CT) != 0)
840  {
841  hdcmi->DMA_Handle->Instance->M0AR = hdcmi->pBuffPtr;
842  }
843  /* Update memory 1 address location */
844  else if((hdcmi->DMA_Handle->Instance->CR & DMA_SxCR_CT) == 0)
845  {
846  tmp = hdcmi->pBuffPtr;
847  hdcmi->DMA_Handle->Instance->M1AR = (tmp + (4*hdcmi->XferSize));
848  hdcmi->XferCount = hdcmi->XferTransferNumber;
849  }
850 
851  /* Check if the frame is transferred */
852  if(hdcmi->XferCount == hdcmi->XferTransferNumber)
853  {
854  /* Enable the Frame interrupt */
856 
857  /* When snapshot mode, set dcmi state to ready */
858  if((hdcmi->Instance->CR & DCMI_CR_CM) == DCMI_MODE_SNAPSHOT)
859  {
860  hdcmi->State= HAL_DCMI_STATE_READY;
861  }
862  }
863 }
864 
871 static void DCMI_DMAError(DMA_HandleTypeDef *hdma)
872 {
873  DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent;
874 
875  if(hdcmi->DMA_Handle->ErrorCode != HAL_DMA_ERROR_FE)
876  {
877  /* Initialize the DCMI state*/
878  hdcmi->State = HAL_DCMI_STATE_READY;
879 
880  /* Set DCMI Error Code */
881  hdcmi->ErrorCode |= HAL_DCMI_ERROR_DMA;
882  }
883 
884  /* DCMI error Callback */
885  HAL_DCMI_ErrorCallback(hdcmi);
886 }
887 
895 #endif /* HAL_DCMI_MODULE_ENABLED */
896 
904 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi)
#define HAL_DCMI_ERROR_SYNC
#define HAL_DCMI_ERROR_NONE
void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
#define DCMI_FLAG_OVRRI
HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
#define DCMI_CR_OELS
Definition: stm32f745xx.h:3202
HAL_StatusTypeDef HAL_DCMI_ConfigCrop(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize)
#define assert_param(expr)
Include module&#39;s header file.
HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory)
uint32_t SystemCoreClock
#define __HAL_DCMI_DISABLE(__HANDLE__)
Disable the DCMI.
#define DCMI_FLAG_FRAMERI
DCMI RIS register.
#define DCMI_MODE_SNAPSHOT
HAL_StatusTypeDef HAL_DCMI_Resume(DCMI_HandleTypeDef *hdcmi)
#define DCMI_CR_CROP
Definition: stm32f745xx.h:3185
#define __HAL_UNLOCK(__HANDLE__)
DCMI handle Structure definition.
#define IS_DCMI_SYNCHRO(MODE)
#define DCMI_CR_EDM_0
Definition: stm32f745xx.h:3193
#define DCMI_IT_LINE
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
#define DCMI_CR_OEBS
Definition: stm32f745xx.h:3200
#define DCMI_CR_FCRC_1
Definition: stm32f745xx.h:3192
__IO uint32_t CWSTRTR
Definition: stm32f745xx.h:381
HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi)
#define IS_DCMI_MODE_JPEG(JPEG_MODE)
__IO uint32_t M1AR
Definition: stm32f745xx.h:396
#define IS_DCMI_BYTE_SELECT_START(POLARITY)
HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi)
#define HAL_DMA_ERROR_FE
#define __HAL_DCMI_DISABLE_IT(__HANDLE__, __INTERRUPT__)
Disable the specified DCMI interrupts.
#define DCMI_IT_OVR
DCMI_TypeDef * Instance
#define DCMI_IT_VSYNC
DMA_HandleTypeDef * DMA_Handle
void(* XferM1CpltCallback)(struct __DMA_HandleTypeDef *hdma)
#define IS_DCMI_PCKPOLARITY(POLARITY)
void(* XferCpltCallback)(struct __DMA_HandleTypeDef *hdma)
#define __HAL_LOCK(__HANDLE__)
#define DCMI_CR_CM
Definition: stm32f745xx.h:3184
__IO uint32_t MISR
Definition: stm32f745xx.h:377
#define __HAL_DCMI_ENABLE_IT(__HANDLE__, __INTERRUPT__)
Enable the specified DCMI interrupts.
__IO uint32_t M0AR
Definition: stm32f745xx.h:395
#define NULL
Definition: usbd_def.h:53
uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi)
#define HAL_DCMI_ERROR_OVR
#define DCMI_CR_VSPOL
Definition: stm32f745xx.h:3190
HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma)
#define DCMI_CR_BSM_1
Definition: stm32f745xx.h:3199
#define IS_DCMI_LINE_SELECT_START(POLARITY)
#define IS_DCMI_WINDOW_HEIGHT(HEIGHT)
This file contains all the functions prototypes for the HAL module driver.
DMA_Stream_TypeDef * Instance
__IO uint32_t CWSIZER
Definition: stm32f745xx.h:382
HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef *hdcmi)
HAL_StatusTypeDef HAL_DCMI_Suspend(DCMI_HandleTypeDef *hdcmi)
#define DCMI_IT_FRAME
__IO uint32_t DR
Definition: stm32f745xx.h:383
HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi)
void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi)
void HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi)
#define DCMI_FLAG_VSYNCRI
__IO uint32_t CR
Definition: stm32f745xx.h:373
__IO uint32_t ESCR
Definition: stm32f745xx.h:379
__IO uint32_t CR
Definition: stm32f745xx.h:392
#define DCMI_CR_HSPOL
Definition: stm32f745xx.h:3189
#define UNUSED(x)
#define IS_DCMI_HSPOLARITY(POLARITY)
#define DCMI_SYNCHRO_EMBEDDED
void(* XferAbortCallback)(struct __DMA_HandleTypeDef *hdma)
#define DCMI_CR_BSM_0
Definition: stm32f745xx.h:3198
#define __HAL_DCMI_ENABLE(__HANDLE__)
Enable the DCMI.
#define IS_DCMI_CAPTURE_MODE(MODE)
#define DCMI_CR_FCRC_0
Definition: stm32f745xx.h:3191
#define IS_DCMI_LINE_SELECT_MODE(MODE)
#define IS_DCMI_EXTENDED_DATA(DATA)
HAL_StatusTypeDef HAL_DCMI_DisableCrop(DCMI_HandleTypeDef *hdcmi)
HAL_DCMI_StateTypeDef
HAL DCMI State structures definition.
#define READ_REG(REG)
Definition: stm32f7xx.h:188
#define DCMI_CR_JPEG
Definition: stm32f745xx.h:3186
DMA handle Structure definition.
HAL_StatusTypeDef HAL_DCMI_EnableCrop(DCMI_HandleTypeDef *hdcmi)
__IO HAL_DCMI_StateTypeDef State
void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi)
#define HAL_DCMI_ERROR_TIMEOUT
DCMI_CodesInitTypeDef SyncroCode
DCMI_InitTypeDef Init
#define __HAL_DCMI_CLEAR_FLAG(__HANDLE__, __FLAG__)
Clear the DCMI pending flags.
#define IS_DCMI_BYTE_SELECT_MODE(MODE)
#define DCMI_IT_ERR
HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef *hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length)
#define DCMI_CR_PCKPOL
Definition: stm32f745xx.h:3188
void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef *hdcmi)
HAL_StatusTypeDef
HAL Status structures definition.
#define DCMI_FLAG_LINERI
void(* XferErrorCallback)(struct __DMA_HandleTypeDef *hdma)
#define DCMI_FLAG_ERRRI
HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength)
#define DCMI_CR_CAPTURE
Definition: stm32f745xx.h:3183
void HAL_DCMI_MspInit(DCMI_HandleTypeDef *hdcmi)
#define IS_DCMI_ALL_INSTANCE(__INSTANCE__)
Definition: stm32f745xx.h:8796
#define IS_DCMI_VSPOLARITY(POLARITY)
#define IS_DCMI_WINDOW_COORDINATE(COORDINATE)
#define IS_DCMI_CAPTURE_RATE(RATE)
#define HAL_DCMI_ERROR_DMA
#define DMA_SxCR_CT
Definition: stm32f745xx.h:3299