Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO_L4R9I-LCD-demo
stm32l4r9i_discovery_camera.h
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l4r9i_discovery_camera.h 00004 * @author MCD Application Team 00005 * @brief This file contains the common defines and functions prototypes for 00006 * the stm32l4r9i_discovery_camera.c driver. 00007 ****************************************************************************** 00008 * @attention 00009 * 00010 * <h2><center>© Copyright (c) 2017 STMicroelectronics. 00011 * All rights reserved.</center></h2> 00012 * 00013 * This software component is licensed by ST under BSD 3-Clause license, 00014 * the "License"; You may not use this file except in compliance with the 00015 * License. You may obtain a copy of the License at: 00016 * opensource.org/licenses/BSD-3-Clause 00017 * 00018 ****************************************************************************** 00019 */ 00020 00021 /* Define to prevent recursive inclusion -------------------------------------*/ 00022 #ifndef __STM32L4R9I_DISCOVERY_CAMERA_H 00023 #define __STM32L4R9I_DISCOVERY_CAMERA_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 /* Includes ------------------------------------------------------------------*/ 00030 /* Include Camera component Driver */ 00031 #include "../Components/ov9655/ov9655.h" 00032 #include "stm32l4r9i_discovery.h" 00033 00034 /** @addtogroup BSP 00035 * @{ 00036 */ 00037 00038 /** @addtogroup STM32L4R9I_DISCOVERY 00039 * @{ 00040 */ 00041 00042 /** @addtogroup STM32L4R9I_DISCOVERY_CAMERA 00043 * @{ 00044 */ 00045 00046 /** @defgroup STM32L4R9I_DISCOVERY_CAMERA_Exported_Types STM32L4R9I_DISCOVERY_CAMERA Exported Types 00047 * @{ 00048 */ 00049 00050 /** 00051 * @brief Camera State structures definition 00052 */ 00053 typedef enum 00054 { 00055 CAMERA_OK = 0x00, 00056 CAMERA_ERROR = 0x01, 00057 CAMERA_TIMEOUT = 0x02, 00058 CAMERA_NOT_DETECTED = 0x03, 00059 CAMERA_NOT_SUPPORTED = 0x04 00060 00061 } Camera_StatusTypeDef; 00062 00063 #define RESOLUTION_R160x120 CAMERA_R160x120 /* QQVGA Resolution */ 00064 #define RESOLUTION_R320x240 CAMERA_R320x240 /* QVGA Resolution */ 00065 #define RESOLUTION_R480x272 CAMERA_R480x272 /* 480x272 Resolution */ 00066 #define RESOLUTION_R640x480 CAMERA_R640x480 /* VGA Resolution */ 00067 /** 00068 * @} 00069 */ 00070 00071 /** @defgroup STM32L4R9I_DISCOVERY_CAMERA_Exported_Constants STM32L4R9I_DISCOVERY_CAMERA Exported Constants 00072 * @{ 00073 */ 00074 #define BSP_CAMERA_IRQHandler DCMI_IRQHandler 00075 #define BSP_CAMERA_DMA_IRQHandler DMA2_Channel6_IRQHandler 00076 #define BSP_CAMERA_DMA_IRQn DMA2_Channel6_IRQn 00077 #define BSP_CAMERA_DMA_INSTANCE DMA2_Channel6 00078 00079 /** 00080 * @brief Camera special pins 00081 */ 00082 /* Camera power up pin */ 00083 #define CAMERA_PWR_EN_PIN IO_PIN_12 00084 00085 /** 00086 * @} 00087 */ 00088 00089 /** @defgroup STM32L4R9I_DISCOVERY_CAMERA_Exported_Variables STM32L4R9I_DISCOVERY_CAMERA Exported Variables 00090 * @{ 00091 */ 00092 extern DCMI_HandleTypeDef hDcmiHandler; 00093 00094 /** 00095 * @} 00096 */ 00097 00098 /** @addtogroup STM32L4R9I_DISCOVERY_CAMERA_Exported_Functions 00099 * @{ 00100 */ 00101 00102 uint8_t BSP_CAMERA_Init(uint32_t Resolution); 00103 uint8_t BSP_CAMERA_DeInit(void); 00104 void BSP_CAMERA_ContinuousStart(uint8_t *buff); 00105 void BSP_CAMERA_SnapshotStart(uint8_t *buff); 00106 void BSP_CAMERA_Suspend(void); 00107 void BSP_CAMERA_Resume(void); 00108 uint8_t BSP_CAMERA_Stop(void); 00109 void BSP_CAMERA_PwrUp(void); 00110 void BSP_CAMERA_PwrDown(void); 00111 00112 /* Camera features functions prototype */ 00113 void BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level); 00114 void BSP_CAMERA_BlackWhiteConfig(uint32_t Mode); 00115 void BSP_CAMERA_ColorEffectConfig(uint32_t Effect); 00116 00117 /* These __weak functions can be surcharged by application code in case the current settings 00118 (eg. interrupt priority, callbacks implementation) need to be changed for specific application needs */ 00119 void BSP_CAMERA_MspInit(DCMI_HandleTypeDef *hdcmi, void *Params); 00120 void BSP_CAMERA_MspDeInit(DCMI_HandleTypeDef *hdcmi, void *Params); 00121 void BSP_CAMERA_LineEventCallback(void); 00122 void BSP_CAMERA_VsyncEventCallback(void); 00123 void BSP_CAMERA_FrameEventCallback(void); 00124 void BSP_CAMERA_ErrorCallback(void); 00125 00126 /** 00127 * @} 00128 */ 00129 00130 /** 00131 * @} 00132 */ 00133 00134 /** 00135 * @} 00136 */ 00137 00138 /** 00139 * @} 00140 */ 00141 00142 #ifdef __cplusplus 00143 } 00144 #endif 00145 00146 #endif /* __STM32L4R9I_DISCOVERY_CAMERA_H */ 00147 00148 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Jul 13 2022 19:15:17 by
