camera.h 5.2 KB

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