![](/media/cache/profiles/avatar_uWKoV5n.jpg.50x50_q85.jpg)
This demo reads a bitmap from a FAT formatted SD-card, copies it to flash and displays it on the screen. The demo is based on the following project: https://os.mbed.com/users/DieterGraef/code/DISCO-F746NG_SDFileSystem/
Dependencies: LCD_DISCO_F746NG TS_DISCO_F746NG mbed FATFileSystem
Fork of DISCO-F746NG_SDFileSystem by
BSP_DISCO_F746NG/ov9655.h@4:95e30a911d97, 2018-04-19 (annotated)
- Committer:
- Lightsource
- Date:
- Thu Apr 19 19:59:54 2018 +0000
- Revision:
- 4:95e30a911d97
Demo that reads a bitmap from SD-card, copies it to flash and displays it on the screen.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Lightsource | 4:95e30a911d97 | 1 | /** |
Lightsource | 4:95e30a911d97 | 2 | ****************************************************************************** |
Lightsource | 4:95e30a911d97 | 3 | * @file ov9655.h |
Lightsource | 4:95e30a911d97 | 4 | * @author MCD Application Team |
Lightsource | 4:95e30a911d97 | 5 | * @version V1.0.0 |
Lightsource | 4:95e30a911d97 | 6 | * @date 25-June-2015 |
Lightsource | 4:95e30a911d97 | 7 | * @brief This file contains all the functions prototypes for the ov9655.c |
Lightsource | 4:95e30a911d97 | 8 | * driver. |
Lightsource | 4:95e30a911d97 | 9 | ****************************************************************************** |
Lightsource | 4:95e30a911d97 | 10 | * @attention |
Lightsource | 4:95e30a911d97 | 11 | * |
Lightsource | 4:95e30a911d97 | 12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
Lightsource | 4:95e30a911d97 | 13 | * |
Lightsource | 4:95e30a911d97 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
Lightsource | 4:95e30a911d97 | 15 | * are permitted provided that the following conditions are met: |
Lightsource | 4:95e30a911d97 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
Lightsource | 4:95e30a911d97 | 17 | * this list of conditions and the following disclaimer. |
Lightsource | 4:95e30a911d97 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Lightsource | 4:95e30a911d97 | 19 | * this list of conditions and the following disclaimer in the documentation |
Lightsource | 4:95e30a911d97 | 20 | * and/or other materials provided with the distribution. |
Lightsource | 4:95e30a911d97 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Lightsource | 4:95e30a911d97 | 22 | * may be used to endorse or promote products derived from this software |
Lightsource | 4:95e30a911d97 | 23 | * without specific prior written permission. |
Lightsource | 4:95e30a911d97 | 24 | * |
Lightsource | 4:95e30a911d97 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Lightsource | 4:95e30a911d97 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Lightsource | 4:95e30a911d97 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Lightsource | 4:95e30a911d97 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Lightsource | 4:95e30a911d97 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Lightsource | 4:95e30a911d97 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Lightsource | 4:95e30a911d97 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Lightsource | 4:95e30a911d97 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Lightsource | 4:95e30a911d97 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Lightsource | 4:95e30a911d97 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Lightsource | 4:95e30a911d97 | 35 | * |
Lightsource | 4:95e30a911d97 | 36 | ****************************************************************************** |
Lightsource | 4:95e30a911d97 | 37 | */ |
Lightsource | 4:95e30a911d97 | 38 | |
Lightsource | 4:95e30a911d97 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Lightsource | 4:95e30a911d97 | 40 | #ifndef __OV9655_H |
Lightsource | 4:95e30a911d97 | 41 | #define __OV9655_H |
Lightsource | 4:95e30a911d97 | 42 | |
Lightsource | 4:95e30a911d97 | 43 | #ifdef __cplusplus |
Lightsource | 4:95e30a911d97 | 44 | extern "C" { |
Lightsource | 4:95e30a911d97 | 45 | #endif |
Lightsource | 4:95e30a911d97 | 46 | |
Lightsource | 4:95e30a911d97 | 47 | /* Includes ------------------------------------------------------------------*/ |
Lightsource | 4:95e30a911d97 | 48 | #include "camera.h" |
Lightsource | 4:95e30a911d97 | 49 | |
Lightsource | 4:95e30a911d97 | 50 | /** @addtogroup BSP |
Lightsource | 4:95e30a911d97 | 51 | * @{ |
Lightsource | 4:95e30a911d97 | 52 | */ |
Lightsource | 4:95e30a911d97 | 53 | |
Lightsource | 4:95e30a911d97 | 54 | /** @addtogroup Components |
Lightsource | 4:95e30a911d97 | 55 | * @{ |
Lightsource | 4:95e30a911d97 | 56 | */ |
Lightsource | 4:95e30a911d97 | 57 | |
Lightsource | 4:95e30a911d97 | 58 | /** @addtogroup ov9655 |
Lightsource | 4:95e30a911d97 | 59 | * @{ |
Lightsource | 4:95e30a911d97 | 60 | */ |
Lightsource | 4:95e30a911d97 | 61 | |
Lightsource | 4:95e30a911d97 | 62 | /** @defgroup OV9655_Exported_Types |
Lightsource | 4:95e30a911d97 | 63 | * @{ |
Lightsource | 4:95e30a911d97 | 64 | */ |
Lightsource | 4:95e30a911d97 | 65 | |
Lightsource | 4:95e30a911d97 | 66 | /** |
Lightsource | 4:95e30a911d97 | 67 | * @} |
Lightsource | 4:95e30a911d97 | 68 | */ |
Lightsource | 4:95e30a911d97 | 69 | |
Lightsource | 4:95e30a911d97 | 70 | /** @defgroup OV9655_Exported_Constants |
Lightsource | 4:95e30a911d97 | 71 | * @{ |
Lightsource | 4:95e30a911d97 | 72 | */ |
Lightsource | 4:95e30a911d97 | 73 | /** |
Lightsource | 4:95e30a911d97 | 74 | * @brief OV9655 ID |
Lightsource | 4:95e30a911d97 | 75 | */ |
Lightsource | 4:95e30a911d97 | 76 | #define OV9655_ID 0x96 |
Lightsource | 4:95e30a911d97 | 77 | /** |
Lightsource | 4:95e30a911d97 | 78 | * @brief OV9655 Registers |
Lightsource | 4:95e30a911d97 | 79 | */ |
Lightsource | 4:95e30a911d97 | 80 | |
Lightsource | 4:95e30a911d97 | 81 | /* OV9655 Registers definition */ |
Lightsource | 4:95e30a911d97 | 82 | #define OV9655_SENSOR_PIDH 0x0A |
Lightsource | 4:95e30a911d97 | 83 | #define OV9655_SENSOR_PIDL 0x0B |
Lightsource | 4:95e30a911d97 | 84 | #define OV9655_SENSOR_COM7 0x12 |
Lightsource | 4:95e30a911d97 | 85 | #define OV9655_SENSOR_TSLB 0x3A |
Lightsource | 4:95e30a911d97 | 86 | #define OV9655_SENSOR_MTX1 0x4F |
Lightsource | 4:95e30a911d97 | 87 | #define OV9655_SENSOR_MTX2 0x50 |
Lightsource | 4:95e30a911d97 | 88 | #define OV9655_SENSOR_MTX3 0x51 |
Lightsource | 4:95e30a911d97 | 89 | #define OV9655_SENSOR_MTX4 0x52 |
Lightsource | 4:95e30a911d97 | 90 | #define OV9655_SENSOR_MTX5 0x53 |
Lightsource | 4:95e30a911d97 | 91 | #define OV9655_SENSOR_MTX6 0x54 |
Lightsource | 4:95e30a911d97 | 92 | #define OV9655_SENSOR_BRTN 0x55 |
Lightsource | 4:95e30a911d97 | 93 | #define OV9655_SENSOR_CNST1 0x56 |
Lightsource | 4:95e30a911d97 | 94 | #define OV9655_SENSOR_CNST2 0x57 |
Lightsource | 4:95e30a911d97 | 95 | |
Lightsource | 4:95e30a911d97 | 96 | /** |
Lightsource | 4:95e30a911d97 | 97 | * @brief OV9655 Features Parameters |
Lightsource | 4:95e30a911d97 | 98 | */ |
Lightsource | 4:95e30a911d97 | 99 | #define OV9655_BRIGHTNESS_LEVEL0 0xB0 /* Brightness level -2 */ |
Lightsource | 4:95e30a911d97 | 100 | #define OV9655_BRIGHTNESS_LEVEL1 0x98 /* Brightness level -1 */ |
Lightsource | 4:95e30a911d97 | 101 | #define OV9655_BRIGHTNESS_LEVEL2 0x00 /* Brightness level 0 */ |
Lightsource | 4:95e30a911d97 | 102 | #define OV9655_BRIGHTNESS_LEVEL3 0x18 /* Brightness level +1 */ |
Lightsource | 4:95e30a911d97 | 103 | #define OV9655_BRIGHTNESS_LEVEL4 0x30 /* Brightness level +2 */ |
Lightsource | 4:95e30a911d97 | 104 | |
Lightsource | 4:95e30a911d97 | 105 | #define OV9655_BLACK_WHITE_BW 0xCC000000000000 /* Black and white effect */ |
Lightsource | 4:95e30a911d97 | 106 | #define OV9655_BLACK_WHITE_NEGATIVE 0xEC808000008080 /* Negative effect */ |
Lightsource | 4:95e30a911d97 | 107 | #define OV9655_BLACK_WHITE_BW_NEGATIVE 0xEC000000000000 /* BW and Negative effect */ |
Lightsource | 4:95e30a911d97 | 108 | #define OV9655_BLACK_WHITE_NORMAL 0xCC808000008080 /* Normal effect */ |
Lightsource | 4:95e30a911d97 | 109 | |
Lightsource | 4:95e30a911d97 | 110 | #define OV9655_CONTRAST_LEVEL0 0x30 /* Contrast level -2 */ |
Lightsource | 4:95e30a911d97 | 111 | #define OV9655_CONTRAST_LEVEL1 0x38 /* Contrast level -1 */ |
Lightsource | 4:95e30a911d97 | 112 | #define OV9655_CONTRAST_LEVEL2 0x40 /* Contrast level 0 */ |
Lightsource | 4:95e30a911d97 | 113 | #define OV9655_CONTRAST_LEVEL3 0x50 /* Contrast level +1 */ |
Lightsource | 4:95e30a911d97 | 114 | #define OV9655_CONTRAST_LEVEL4 0x60 /* Contrast level +2 */ |
Lightsource | 4:95e30a911d97 | 115 | |
Lightsource | 4:95e30a911d97 | 116 | #define OV9655_COLOR_EFFECT_NONE 0xCC808000008080 /* No color effect */ |
Lightsource | 4:95e30a911d97 | 117 | #define OV9655_COLOR_EFFECT_ANTIQUE 0xCC000020F00000 /* Antique effect */ |
Lightsource | 4:95e30a911d97 | 118 | #define OV9655_COLOR_EFFECT_BLUE 0xCC000000000060 /* Blue effect */ |
Lightsource | 4:95e30a911d97 | 119 | #define OV9655_COLOR_EFFECT_GREEN 0xCC000000008000 /* Green effect */ |
Lightsource | 4:95e30a911d97 | 120 | #define OV9655_COLOR_EFFECT_RED 0xCC600000000000 /* Red effect */ |
Lightsource | 4:95e30a911d97 | 121 | /** |
Lightsource | 4:95e30a911d97 | 122 | * @} |
Lightsource | 4:95e30a911d97 | 123 | */ |
Lightsource | 4:95e30a911d97 | 124 | |
Lightsource | 4:95e30a911d97 | 125 | /** @defgroup OV9655_Exported_Functions |
Lightsource | 4:95e30a911d97 | 126 | * @{ |
Lightsource | 4:95e30a911d97 | 127 | */ |
Lightsource | 4:95e30a911d97 | 128 | void ov9655_Init(uint16_t DeviceAddr, uint32_t resolution); |
Lightsource | 4:95e30a911d97 | 129 | void ov9655_Config(uint16_t DeviceAddr, uint32_t feature, uint32_t value, uint32_t BR_value); |
Lightsource | 4:95e30a911d97 | 130 | uint16_t ov9655_ReadID(uint16_t DeviceAddr); |
Lightsource | 4:95e30a911d97 | 131 | |
Lightsource | 4:95e30a911d97 | 132 | void CAMERA_IO_Init(void); |
Lightsource | 4:95e30a911d97 | 133 | void CAMERA_IO_Write(uint8_t addr, uint8_t reg, uint8_t value); |
Lightsource | 4:95e30a911d97 | 134 | uint8_t CAMERA_IO_Read(uint8_t addr, uint8_t reg); |
Lightsource | 4:95e30a911d97 | 135 | void CAMERA_Delay(uint32_t delay); |
Lightsource | 4:95e30a911d97 | 136 | |
Lightsource | 4:95e30a911d97 | 137 | /* CAMERA driver structure */ |
Lightsource | 4:95e30a911d97 | 138 | extern CAMERA_DrvTypeDef ov9655_drv; |
Lightsource | 4:95e30a911d97 | 139 | /** |
Lightsource | 4:95e30a911d97 | 140 | * @} |
Lightsource | 4:95e30a911d97 | 141 | */ |
Lightsource | 4:95e30a911d97 | 142 | #ifdef __cplusplus |
Lightsource | 4:95e30a911d97 | 143 | } |
Lightsource | 4:95e30a911d97 | 144 | #endif |
Lightsource | 4:95e30a911d97 | 145 | |
Lightsource | 4:95e30a911d97 | 146 | #endif /* __OV9655_H */ |
Lightsource | 4:95e30a911d97 | 147 | /** |
Lightsource | 4:95e30a911d97 | 148 | * @} |
Lightsource | 4:95e30a911d97 | 149 | */ |
Lightsource | 4:95e30a911d97 | 150 | |
Lightsource | 4:95e30a911d97 | 151 | /** |
Lightsource | 4:95e30a911d97 | 152 | * @} |
Lightsource | 4:95e30a911d97 | 153 | */ |
Lightsource | 4:95e30a911d97 | 154 | |
Lightsource | 4:95e30a911d97 | 155 | /** |
Lightsource | 4:95e30a911d97 | 156 | * @} |
Lightsource | 4:95e30a911d97 | 157 | */ |
Lightsource | 4:95e30a911d97 | 158 | |
Lightsource | 4:95e30a911d97 | 159 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |