BSP driver for DISCO_L496AG

Dependents:   DISCO_L496AG-LCD-prova_1 DISCO_L496AG-LCD-prova_2 DISCO_L496AG-LCD-demo DISCO_L496AG-SRAM-demo

Committer:
Jerome Coutant
Date:
Wed Nov 20 16:48:24 2019 +0100
Revision:
2:106c7b82e064
Parent:
0:d83f1c8ca282
Update BSP files with CubeL4 V1.14.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:d83f1c8ca282 1 /**
bcostm 0:d83f1c8ca282 2 ******************************************************************************
bcostm 0:d83f1c8ca282 3 * @file ov9655.h
bcostm 0:d83f1c8ca282 4 * @author MCD Application Team
bcostm 0:d83f1c8ca282 5 * @brief This file contains all the functions prototypes for the ov9655.c
bcostm 0:d83f1c8ca282 6 * driver.
bcostm 0:d83f1c8ca282 7 ******************************************************************************
bcostm 0:d83f1c8ca282 8 * @attention
bcostm 0:d83f1c8ca282 9 *
Jerome Coutant 2:106c7b82e064 10 * <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
Jerome Coutant 2:106c7b82e064 11 * All rights reserved.</center></h2>
bcostm 0:d83f1c8ca282 12 *
Jerome Coutant 2:106c7b82e064 13 * This software component is licensed by ST under BSD 3-Clause license,
Jerome Coutant 2:106c7b82e064 14 * the "License"; You may not use this file except in compliance with the
Jerome Coutant 2:106c7b82e064 15 * License. You may obtain a copy of the License at:
Jerome Coutant 2:106c7b82e064 16 * opensource.org/licenses/BSD-3-Clause
bcostm 0:d83f1c8ca282 17 *
bcostm 0:d83f1c8ca282 18 ******************************************************************************
bcostm 0:d83f1c8ca282 19 */
bcostm 0:d83f1c8ca282 20
bcostm 0:d83f1c8ca282 21 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 0:d83f1c8ca282 22 #ifndef __OV9655_H
bcostm 0:d83f1c8ca282 23 #define __OV9655_H
bcostm 0:d83f1c8ca282 24
bcostm 0:d83f1c8ca282 25 #ifdef __cplusplus
bcostm 0:d83f1c8ca282 26 extern "C" {
bcostm 0:d83f1c8ca282 27 #endif
bcostm 0:d83f1c8ca282 28
bcostm 0:d83f1c8ca282 29 /* Includes ------------------------------------------------------------------*/
bcostm 0:d83f1c8ca282 30 #include "../Common/camera.h"
bcostm 0:d83f1c8ca282 31
bcostm 0:d83f1c8ca282 32 /** @addtogroup BSP
bcostm 0:d83f1c8ca282 33 * @{
bcostm 0:d83f1c8ca282 34 */
bcostm 0:d83f1c8ca282 35
bcostm 0:d83f1c8ca282 36 /** @addtogroup Components
bcostm 0:d83f1c8ca282 37 * @{
bcostm 0:d83f1c8ca282 38 */
bcostm 0:d83f1c8ca282 39
bcostm 0:d83f1c8ca282 40 /** @addtogroup ov9655
bcostm 0:d83f1c8ca282 41 * @{
bcostm 0:d83f1c8ca282 42 */
bcostm 0:d83f1c8ca282 43
bcostm 0:d83f1c8ca282 44 /** @defgroup OV9655_Exported_Types
bcostm 0:d83f1c8ca282 45 * @{
bcostm 0:d83f1c8ca282 46 */
bcostm 0:d83f1c8ca282 47
bcostm 0:d83f1c8ca282 48 /**
bcostm 0:d83f1c8ca282 49 * @}
bcostm 0:d83f1c8ca282 50 */
bcostm 0:d83f1c8ca282 51
bcostm 0:d83f1c8ca282 52 /** @defgroup OV9655_Exported_Constants
bcostm 0:d83f1c8ca282 53 * @{
bcostm 0:d83f1c8ca282 54 */
bcostm 0:d83f1c8ca282 55 /**
bcostm 0:d83f1c8ca282 56 * @brief OV9655 ID
bcostm 0:d83f1c8ca282 57 */
bcostm 0:d83f1c8ca282 58 #define OV9655_ID 0x96
bcostm 0:d83f1c8ca282 59 /**
bcostm 0:d83f1c8ca282 60 * @brief OV9655 Registers
bcostm 0:d83f1c8ca282 61 */
bcostm 0:d83f1c8ca282 62
bcostm 0:d83f1c8ca282 63 /* OV9655 Registers definition */
bcostm 0:d83f1c8ca282 64 #define OV9655_SENSOR_PIDH 0x0A
bcostm 0:d83f1c8ca282 65 #define OV9655_SENSOR_PIDL 0x0B
bcostm 0:d83f1c8ca282 66 #define OV9655_SENSOR_COM7 0x12
bcostm 0:d83f1c8ca282 67 #define OV9655_SENSOR_TSLB 0x3A
bcostm 0:d83f1c8ca282 68 #define OV9655_SENSOR_MTX1 0x4F
bcostm 0:d83f1c8ca282 69 #define OV9655_SENSOR_MTX2 0x50
bcostm 0:d83f1c8ca282 70 #define OV9655_SENSOR_MTX3 0x51
bcostm 0:d83f1c8ca282 71 #define OV9655_SENSOR_MTX4 0x52
bcostm 0:d83f1c8ca282 72 #define OV9655_SENSOR_MTX5 0x53
bcostm 0:d83f1c8ca282 73 #define OV9655_SENSOR_MTX6 0x54
bcostm 0:d83f1c8ca282 74 #define OV9655_SENSOR_BRTN 0x55
bcostm 0:d83f1c8ca282 75 #define OV9655_SENSOR_CNST1 0x56
bcostm 0:d83f1c8ca282 76 #define OV9655_SENSOR_CNST2 0x57
bcostm 0:d83f1c8ca282 77
bcostm 0:d83f1c8ca282 78 /**
bcostm 0:d83f1c8ca282 79 * @brief OV9655 Features Parameters
bcostm 0:d83f1c8ca282 80 */
bcostm 0:d83f1c8ca282 81 #define OV9655_BRIGHTNESS_LEVEL0 0xB0 /* Brightness level -2 */
bcostm 0:d83f1c8ca282 82 #define OV9655_BRIGHTNESS_LEVEL1 0x98 /* Brightness level -1 */
bcostm 0:d83f1c8ca282 83 #define OV9655_BRIGHTNESS_LEVEL2 0x00 /* Brightness level 0 */
bcostm 0:d83f1c8ca282 84 #define OV9655_BRIGHTNESS_LEVEL3 0x18 /* Brightness level +1 */
bcostm 0:d83f1c8ca282 85 #define OV9655_BRIGHTNESS_LEVEL4 0x30 /* Brightness level +2 */
bcostm 0:d83f1c8ca282 86
bcostm 0:d83f1c8ca282 87 #define OV9655_BLACK_WHITE_BW 0xCC000000000000 /* Black and white effect */
bcostm 0:d83f1c8ca282 88 #define OV9655_BLACK_WHITE_NEGATIVE 0xEC808000008080 /* Negative effect */
bcostm 0:d83f1c8ca282 89 #define OV9655_BLACK_WHITE_BW_NEGATIVE 0xEC000000000000 /* BW and Negative effect */
bcostm 0:d83f1c8ca282 90 #define OV9655_BLACK_WHITE_NORMAL 0xCC808000008080 /* Normal effect */
bcostm 0:d83f1c8ca282 91
bcostm 0:d83f1c8ca282 92 #define OV9655_CONTRAST_LEVEL0 0x30 /* Contrast level -2 */
bcostm 0:d83f1c8ca282 93 #define OV9655_CONTRAST_LEVEL1 0x38 /* Contrast level -1 */
bcostm 0:d83f1c8ca282 94 #define OV9655_CONTRAST_LEVEL2 0x40 /* Contrast level 0 */
bcostm 0:d83f1c8ca282 95 #define OV9655_CONTRAST_LEVEL3 0x50 /* Contrast level +1 */
bcostm 0:d83f1c8ca282 96 #define OV9655_CONTRAST_LEVEL4 0x60 /* Contrast level +2 */
bcostm 0:d83f1c8ca282 97
bcostm 0:d83f1c8ca282 98 #define OV9655_COLOR_EFFECT_NONE 0xCC808000008080 /* No color effect */
bcostm 0:d83f1c8ca282 99 #define OV9655_COLOR_EFFECT_ANTIQUE 0xCC000020F00000 /* Antique effect */
bcostm 0:d83f1c8ca282 100 #define OV9655_COLOR_EFFECT_BLUE 0xCC000000000060 /* Blue effect */
bcostm 0:d83f1c8ca282 101 #define OV9655_COLOR_EFFECT_GREEN 0xCC000000008000 /* Green effect */
bcostm 0:d83f1c8ca282 102 #define OV9655_COLOR_EFFECT_RED 0xCC600000000000 /* Red effect */
bcostm 0:d83f1c8ca282 103 /**
bcostm 0:d83f1c8ca282 104 * @}
bcostm 0:d83f1c8ca282 105 */
bcostm 0:d83f1c8ca282 106
bcostm 0:d83f1c8ca282 107 /** @defgroup OV9655_Exported_Functions
bcostm 0:d83f1c8ca282 108 * @{
bcostm 0:d83f1c8ca282 109 */
bcostm 0:d83f1c8ca282 110 void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution);
bcostm 0:d83f1c8ca282 111 void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value);
bcostm 0:d83f1c8ca282 112 uint16_t ov9655_ReadID(uint16_t DeviceAddr);
bcostm 0:d83f1c8ca282 113
bcostm 0:d83f1c8ca282 114 void CAMERA_IO_Init(void);
bcostm 0:d83f1c8ca282 115 void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value);
bcostm 0:d83f1c8ca282 116 uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg);
bcostm 0:d83f1c8ca282 117 void CAMERA_Delay(uint32_t delay);
bcostm 0:d83f1c8ca282 118
bcostm 0:d83f1c8ca282 119 /* CAMERA driver structure */
bcostm 0:d83f1c8ca282 120 extern CAMERA_DrvTypeDef ov9655_drv;
bcostm 0:d83f1c8ca282 121 /**
bcostm 0:d83f1c8ca282 122 * @}
bcostm 0:d83f1c8ca282 123 */
bcostm 0:d83f1c8ca282 124 #ifdef __cplusplus
bcostm 0:d83f1c8ca282 125 }
bcostm 0:d83f1c8ca282 126 #endif
bcostm 0:d83f1c8ca282 127
bcostm 0:d83f1c8ca282 128 #endif /* __OV9655_H */
bcostm 0:d83f1c8ca282 129 /**
bcostm 0:d83f1c8ca282 130 * @}
bcostm 0:d83f1c8ca282 131 */
bcostm 0:d83f1c8ca282 132
bcostm 0:d83f1c8ca282 133 /**
bcostm 0:d83f1c8ca282 134 * @}
bcostm 0:d83f1c8ca282 135 */
bcostm 0:d83f1c8ca282 136
bcostm 0:d83f1c8ca282 137 /**
bcostm 0:d83f1c8ca282 138 * @}
bcostm 0:d83f1c8ca282 139 */
bcostm 0:d83f1c8ca282 140
bcostm 0:d83f1c8ca282 141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/