BSP Drivers

Dependencies:   CMSIS_STM32L4xx CMSIS_DSP_401 STM32L4xx_HAL_Driver

Dependents:   DiscoAudioRecord

Committer:
EricLew
Date:
Mon Nov 02 19:38:36 2015 +0000
Revision:
0:ad9dfc0179dc
commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
EricLew 0:ad9dfc0179dc 1 /**
EricLew 0:ad9dfc0179dc 2 ******************************************************************************
EricLew 0:ad9dfc0179dc 3 * @file camera.h
EricLew 0:ad9dfc0179dc 4 * @author MCD Application Team
EricLew 0:ad9dfc0179dc 5 * @version V4.0.1
EricLew 0:ad9dfc0179dc 6 * @date 21-July-2015
EricLew 0:ad9dfc0179dc 7 * @brief This header file contains the common defines and functions prototypes
EricLew 0:ad9dfc0179dc 8 * for the camera driver.
EricLew 0:ad9dfc0179dc 9 ******************************************************************************
EricLew 0:ad9dfc0179dc 10 * @attention
EricLew 0:ad9dfc0179dc 11 *
EricLew 0:ad9dfc0179dc 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
EricLew 0:ad9dfc0179dc 13 *
EricLew 0:ad9dfc0179dc 14 * Redistribution and use in source and binary forms, with or without modification,
EricLew 0:ad9dfc0179dc 15 * are permitted provided that the following conditions are met:
EricLew 0:ad9dfc0179dc 16 * 1. Redistributions of source code must retain the above copyright notice,
EricLew 0:ad9dfc0179dc 17 * this list of conditions and the following disclaimer.
EricLew 0:ad9dfc0179dc 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
EricLew 0:ad9dfc0179dc 19 * this list of conditions and the following disclaimer in the documentation
EricLew 0:ad9dfc0179dc 20 * and/or other materials provided with the distribution.
EricLew 0:ad9dfc0179dc 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
EricLew 0:ad9dfc0179dc 22 * may be used to endorse or promote products derived from this software
EricLew 0:ad9dfc0179dc 23 * without specific prior written permission.
EricLew 0:ad9dfc0179dc 24 *
EricLew 0:ad9dfc0179dc 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
EricLew 0:ad9dfc0179dc 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
EricLew 0:ad9dfc0179dc 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
EricLew 0:ad9dfc0179dc 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
EricLew 0:ad9dfc0179dc 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
EricLew 0:ad9dfc0179dc 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
EricLew 0:ad9dfc0179dc 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
EricLew 0:ad9dfc0179dc 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
EricLew 0:ad9dfc0179dc 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
EricLew 0:ad9dfc0179dc 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
EricLew 0:ad9dfc0179dc 35 *
EricLew 0:ad9dfc0179dc 36 ******************************************************************************
EricLew 0:ad9dfc0179dc 37 */
EricLew 0:ad9dfc0179dc 38
EricLew 0:ad9dfc0179dc 39 /* Define to prevent recursive inclusion -------------------------------------*/
EricLew 0:ad9dfc0179dc 40 #ifndef __CAMERA_H
EricLew 0:ad9dfc0179dc 41 #define __CAMERA_H
EricLew 0:ad9dfc0179dc 42
EricLew 0:ad9dfc0179dc 43 #ifdef __cplusplus
EricLew 0:ad9dfc0179dc 44 extern "C" {
EricLew 0:ad9dfc0179dc 45 #endif
EricLew 0:ad9dfc0179dc 46
EricLew 0:ad9dfc0179dc 47 /* Includes ------------------------------------------------------------------*/
EricLew 0:ad9dfc0179dc 48 #include <stdint.h>
EricLew 0:ad9dfc0179dc 49
EricLew 0:ad9dfc0179dc 50 /** @addtogroup BSP
EricLew 0:ad9dfc0179dc 51 * @{
EricLew 0:ad9dfc0179dc 52 */
EricLew 0:ad9dfc0179dc 53
EricLew 0:ad9dfc0179dc 54 /** @addtogroup Components
EricLew 0:ad9dfc0179dc 55 * @{
EricLew 0:ad9dfc0179dc 56 */
EricLew 0:ad9dfc0179dc 57
EricLew 0:ad9dfc0179dc 58 /** @addtogroup CAMERA
EricLew 0:ad9dfc0179dc 59 * @{
EricLew 0:ad9dfc0179dc 60 */
EricLew 0:ad9dfc0179dc 61
EricLew 0:ad9dfc0179dc 62
EricLew 0:ad9dfc0179dc 63 /** @defgroup CAMERA_Exported_Types
EricLew 0:ad9dfc0179dc 64 * @{
EricLew 0:ad9dfc0179dc 65 */
EricLew 0:ad9dfc0179dc 66
EricLew 0:ad9dfc0179dc 67 /** @defgroup CAMERA_Driver_structure Camera Driver structure
EricLew 0:ad9dfc0179dc 68 * @{
EricLew 0:ad9dfc0179dc 69 */
EricLew 0:ad9dfc0179dc 70 typedef struct
EricLew 0:ad9dfc0179dc 71 {
EricLew 0:ad9dfc0179dc 72 void (*Init)(uint16_t, uint32_t);
EricLew 0:ad9dfc0179dc 73 uint16_t (*ReadID)(uint16_t);
EricLew 0:ad9dfc0179dc 74 void (*Config)(uint16_t, uint32_t, uint32_t, uint32_t);
EricLew 0:ad9dfc0179dc 75 }CAMERA_DrvTypeDef;
EricLew 0:ad9dfc0179dc 76 /**
EricLew 0:ad9dfc0179dc 77 * @}
EricLew 0:ad9dfc0179dc 78 */
EricLew 0:ad9dfc0179dc 79
EricLew 0:ad9dfc0179dc 80 /**
EricLew 0:ad9dfc0179dc 81 * @}
EricLew 0:ad9dfc0179dc 82 */
EricLew 0:ad9dfc0179dc 83
EricLew 0:ad9dfc0179dc 84 /** @defgroup CAMERA_Exported_Constants
EricLew 0:ad9dfc0179dc 85 * @{
EricLew 0:ad9dfc0179dc 86 */
EricLew 0:ad9dfc0179dc 87 #define CAMERA_R160x120 0x00 /* QQVGA Resolution */
EricLew 0:ad9dfc0179dc 88 #define CAMERA_R320x240 0x01 /* QVGA Resolution */
EricLew 0:ad9dfc0179dc 89 #define CAMERA_R480x272 0x02 /* 480x272 Resolution */
EricLew 0:ad9dfc0179dc 90 #define CAMERA_R640x480 0x03 /* VGA Resolution */
EricLew 0:ad9dfc0179dc 91
EricLew 0:ad9dfc0179dc 92 #define CAMERA_CONTRAST_BRIGHTNESS 0x00 /* Camera contrast brightness features */
EricLew 0:ad9dfc0179dc 93 #define CAMERA_BLACK_WHITE 0x01 /* Camera black white feature */
EricLew 0:ad9dfc0179dc 94 #define CAMERA_COLOR_EFFECT 0x03 /* Camera color effect feature */
EricLew 0:ad9dfc0179dc 95
EricLew 0:ad9dfc0179dc 96 #define CAMERA_BRIGHTNESS_LEVEL0 0x00 /* Brightness level -2 */
EricLew 0:ad9dfc0179dc 97 #define CAMERA_BRIGHTNESS_LEVEL1 0x01 /* Brightness level -1 */
EricLew 0:ad9dfc0179dc 98 #define CAMERA_BRIGHTNESS_LEVEL2 0x02 /* Brightness level 0 */
EricLew 0:ad9dfc0179dc 99 #define CAMERA_BRIGHTNESS_LEVEL3 0x03 /* Brightness level +1 */
EricLew 0:ad9dfc0179dc 100 #define CAMERA_BRIGHTNESS_LEVEL4 0x04 /* Brightness level +2 */
EricLew 0:ad9dfc0179dc 101
EricLew 0:ad9dfc0179dc 102 #define CAMERA_CONTRAST_LEVEL0 0x05 /* Contrast level -2 */
EricLew 0:ad9dfc0179dc 103 #define CAMERA_CONTRAST_LEVEL1 0x06 /* Contrast level -1 */
EricLew 0:ad9dfc0179dc 104 #define CAMERA_CONTRAST_LEVEL2 0x07 /* Contrast level 0 */
EricLew 0:ad9dfc0179dc 105 #define CAMERA_CONTRAST_LEVEL3 0x08 /* Contrast level +1 */
EricLew 0:ad9dfc0179dc 106 #define CAMERA_CONTRAST_LEVEL4 0x09 /* Contrast level +2 */
EricLew 0:ad9dfc0179dc 107
EricLew 0:ad9dfc0179dc 108 #define CAMERA_BLACK_WHITE_BW 0x00 /* Black and white effect */
EricLew 0:ad9dfc0179dc 109 #define CAMERA_BLACK_WHITE_NEGATIVE 0x01 /* Negative effect */
EricLew 0:ad9dfc0179dc 110 #define CAMERA_BLACK_WHITE_BW_NEGATIVE 0x02 /* BW and Negative effect */
EricLew 0:ad9dfc0179dc 111 #define CAMERA_BLACK_WHITE_NORMAL 0x03 /* Normal effect */
EricLew 0:ad9dfc0179dc 112
EricLew 0:ad9dfc0179dc 113 #define CAMERA_COLOR_EFFECT_NONE 0x00 /* No effects */
EricLew 0:ad9dfc0179dc 114 #define CAMERA_COLOR_EFFECT_BLUE 0x01 /* Blue effect */
EricLew 0:ad9dfc0179dc 115 #define CAMERA_COLOR_EFFECT_GREEN 0x02 /* Green effect */
EricLew 0:ad9dfc0179dc 116 #define CAMERA_COLOR_EFFECT_RED 0x03 /* Red effect */
EricLew 0:ad9dfc0179dc 117 #define CAMERA_COLOR_EFFECT_ANTIQUE 0x04 /* Antique effect */
EricLew 0:ad9dfc0179dc 118
EricLew 0:ad9dfc0179dc 119 /**
EricLew 0:ad9dfc0179dc 120 * @}
EricLew 0:ad9dfc0179dc 121 */
EricLew 0:ad9dfc0179dc 122
EricLew 0:ad9dfc0179dc 123 /**
EricLew 0:ad9dfc0179dc 124 * @}
EricLew 0:ad9dfc0179dc 125 */
EricLew 0:ad9dfc0179dc 126
EricLew 0:ad9dfc0179dc 127 /**
EricLew 0:ad9dfc0179dc 128 * @}
EricLew 0:ad9dfc0179dc 129 */
EricLew 0:ad9dfc0179dc 130
EricLew 0:ad9dfc0179dc 131 /**
EricLew 0:ad9dfc0179dc 132 * @}
EricLew 0:ad9dfc0179dc 133 */
EricLew 0:ad9dfc0179dc 134
EricLew 0:ad9dfc0179dc 135 #ifdef __cplusplus
EricLew 0:ad9dfc0179dc 136 }
EricLew 0:ad9dfc0179dc 137 #endif
EricLew 0:ad9dfc0179dc 138
EricLew 0:ad9dfc0179dc 139 #endif /* __CAMERA_H */
EricLew 0:ad9dfc0179dc 140
EricLew 0:ad9dfc0179dc 141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
EricLew 0:ad9dfc0179dc 142