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 Dieter Graef

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?

UserRevisionLine numberNew contents of line
Lightsource 4:95e30a911d97 1 /**
Lightsource 4:95e30a911d97 2 ******************************************************************************
Lightsource 4:95e30a911d97 3 * @file camera.h
Lightsource 4:95e30a911d97 4 * @author MCD Application Team
Lightsource 4:95e30a911d97 5 * @version V4.0.0
Lightsource 4:95e30a911d97 6 * @date 22-June-2015
Lightsource 4:95e30a911d97 7 * @brief This header file contains the common defines and functions prototypes
Lightsource 4:95e30a911d97 8 * for the camera driver.
Lightsource 4:95e30a911d97 9 ******************************************************************************
Lightsource 4:95e30a911d97 10 * @attention
Lightsource 4:95e30a911d97 11 *
Lightsource 4:95e30a911d97 12 * <h2><center>&copy; 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 __CAMERA_H
Lightsource 4:95e30a911d97 41 #define __CAMERA_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 <stdint.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 CAMERA
Lightsource 4:95e30a911d97 59 * @{
Lightsource 4:95e30a911d97 60 */
Lightsource 4:95e30a911d97 61
Lightsource 4:95e30a911d97 62
Lightsource 4:95e30a911d97 63 /** @defgroup CAMERA_Exported_Types
Lightsource 4:95e30a911d97 64 * @{
Lightsource 4:95e30a911d97 65 */
Lightsource 4:95e30a911d97 66
Lightsource 4:95e30a911d97 67 /** @defgroup CAMERA_Driver_structure Camera Driver structure
Lightsource 4:95e30a911d97 68 * @{
Lightsource 4:95e30a911d97 69 */
Lightsource 4:95e30a911d97 70 typedef struct
Lightsource 4:95e30a911d97 71 {
Lightsource 4:95e30a911d97 72 void (*Init)(uint16_t, uint32_t);
Lightsource 4:95e30a911d97 73 uint16_t (*ReadID)(uint16_t);
Lightsource 4:95e30a911d97 74 void (*Config)(uint16_t, uint32_t, uint32_t, uint32_t);
Lightsource 4:95e30a911d97 75 }CAMERA_DrvTypeDef;
Lightsource 4:95e30a911d97 76 /**
Lightsource 4:95e30a911d97 77 * @}
Lightsource 4:95e30a911d97 78 */
Lightsource 4:95e30a911d97 79
Lightsource 4:95e30a911d97 80 /**
Lightsource 4:95e30a911d97 81 * @}
Lightsource 4:95e30a911d97 82 */
Lightsource 4:95e30a911d97 83
Lightsource 4:95e30a911d97 84 /** @defgroup CAMERA_Exported_Constants
Lightsource 4:95e30a911d97 85 * @{
Lightsource 4:95e30a911d97 86 */
Lightsource 4:95e30a911d97 87 #define CAMERA_R160x120 0x00 /* QQVGA Resolution */
Lightsource 4:95e30a911d97 88 #define CAMERA_R320x240 0x01 /* QVGA Resolution */
Lightsource 4:95e30a911d97 89 #define CAMERA_R480x272 0x02 /* 480x272 Resolution */
Lightsource 4:95e30a911d97 90 #define CAMERA_R640x480 0x03 /* VGA Resolution */
Lightsource 4:95e30a911d97 91
Lightsource 4:95e30a911d97 92 #define CAMERA_CONTRAST_BRIGHTNESS 0x00 /* Camera contrast brightness features */
Lightsource 4:95e30a911d97 93 #define CAMERA_BLACK_WHITE 0x01 /* Camera black white feature */
Lightsource 4:95e30a911d97 94 #define CAMERA_COLOR_EFFECT 0x03 /* Camera color effect feature */
Lightsource 4:95e30a911d97 95
Lightsource 4:95e30a911d97 96 #define CAMERA_BRIGHTNESS_LEVEL0 0x00 /* Brightness level -2 */
Lightsource 4:95e30a911d97 97 #define CAMERA_BRIGHTNESS_LEVEL1 0x01 /* Brightness level -1 */
Lightsource 4:95e30a911d97 98 #define CAMERA_BRIGHTNESS_LEVEL2 0x02 /* Brightness level 0 */
Lightsource 4:95e30a911d97 99 #define CAMERA_BRIGHTNESS_LEVEL3 0x03 /* Brightness level +1 */
Lightsource 4:95e30a911d97 100 #define CAMERA_BRIGHTNESS_LEVEL4 0x04 /* Brightness level +2 */
Lightsource 4:95e30a911d97 101
Lightsource 4:95e30a911d97 102 #define CAMERA_CONTRAST_LEVEL0 0x05 /* Contrast level -2 */
Lightsource 4:95e30a911d97 103 #define CAMERA_CONTRAST_LEVEL1 0x06 /* Contrast level -1 */
Lightsource 4:95e30a911d97 104 #define CAMERA_CONTRAST_LEVEL2 0x07 /* Contrast level 0 */
Lightsource 4:95e30a911d97 105 #define CAMERA_CONTRAST_LEVEL3 0x08 /* Contrast level +1 */
Lightsource 4:95e30a911d97 106 #define CAMERA_CONTRAST_LEVEL4 0x09 /* Contrast level +2 */
Lightsource 4:95e30a911d97 107
Lightsource 4:95e30a911d97 108 #define CAMERA_BLACK_WHITE_BW 0x00 /* Black and white effect */
Lightsource 4:95e30a911d97 109 #define CAMERA_BLACK_WHITE_NEGATIVE 0x01 /* Negative effect */
Lightsource 4:95e30a911d97 110 #define CAMERA_BLACK_WHITE_BW_NEGATIVE 0x02 /* BW and Negative effect */
Lightsource 4:95e30a911d97 111 #define CAMERA_BLACK_WHITE_NORMAL 0x03 /* Normal effect */
Lightsource 4:95e30a911d97 112
Lightsource 4:95e30a911d97 113 #define CAMERA_COLOR_EFFECT_NONE 0x00 /* No effects */
Lightsource 4:95e30a911d97 114 #define CAMERA_COLOR_EFFECT_BLUE 0x01 /* Blue effect */
Lightsource 4:95e30a911d97 115 #define CAMERA_COLOR_EFFECT_GREEN 0x02 /* Green effect */
Lightsource 4:95e30a911d97 116 #define CAMERA_COLOR_EFFECT_RED 0x03 /* Red effect */
Lightsource 4:95e30a911d97 117 #define CAMERA_COLOR_EFFECT_ANTIQUE 0x04 /* Antique effect */
Lightsource 4:95e30a911d97 118
Lightsource 4:95e30a911d97 119 /**
Lightsource 4:95e30a911d97 120 * @}
Lightsource 4:95e30a911d97 121 */
Lightsource 4:95e30a911d97 122
Lightsource 4:95e30a911d97 123 /**
Lightsource 4:95e30a911d97 124 * @}
Lightsource 4:95e30a911d97 125 */
Lightsource 4:95e30a911d97 126
Lightsource 4:95e30a911d97 127 /**
Lightsource 4:95e30a911d97 128 * @}
Lightsource 4:95e30a911d97 129 */
Lightsource 4:95e30a911d97 130
Lightsource 4:95e30a911d97 131 /**
Lightsource 4:95e30a911d97 132 * @}
Lightsource 4:95e30a911d97 133 */
Lightsource 4:95e30a911d97 134
Lightsource 4:95e30a911d97 135 #ifdef __cplusplus
Lightsource 4:95e30a911d97 136 }
Lightsource 4:95e30a911d97 137 #endif
Lightsource 4:95e30a911d97 138
Lightsource 4:95e30a911d97 139 #endif /* __CAMERA_H */
Lightsource 4:95e30a911d97 140
Lightsource 4:95e30a911d97 141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/