camera.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /**
  2. ******************************************************************************
  3. * @file camera.h
  4. * @author MCD Application Team
  5. * @brief This header file contains the common defines and functions prototypes
  6. * for the camera driver.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __CAMERA_H
  22. #define __CAMERA_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include <stdint.h>
  28. /** @addtogroup BSP
  29. * @{
  30. */
  31. /** @addtogroup Components
  32. * @{
  33. */
  34. /** @addtogroup CAMERA
  35. * @{
  36. */
  37. /** @defgroup CAMERA_Exported_Types
  38. * @{
  39. */
  40. /** @defgroup CAMERA_Driver_structure Camera Driver structure
  41. * @{
  42. */
  43. typedef struct
  44. {
  45. void (*Init)(uint16_t, uint32_t);
  46. uint16_t (*ReadID)(uint16_t);
  47. void (*Config)(uint16_t, uint32_t, uint32_t, uint32_t);
  48. }CAMERA_DrvTypeDef;
  49. /**
  50. * @}
  51. */
  52. /**
  53. * @}
  54. */
  55. /** @defgroup CAMERA_Exported_Constants
  56. * @{
  57. */
  58. #define CAMERA_R160x120 0x00 /* QQVGA Resolution */
  59. #define CAMERA_R320x240 0x01 /* QVGA Resolution */
  60. #define CAMERA_R480x272 0x02 /* 480x272 Resolution */
  61. #define CAMERA_R640x480 0x03 /* VGA Resolution */
  62. #define CAMERA_CONTRAST_BRIGHTNESS 0x00 /* Camera contrast brightness features */
  63. #define CAMERA_BLACK_WHITE 0x01 /* Camera black white feature */
  64. #define CAMERA_COLOR_EFFECT 0x03 /* Camera color effect feature */
  65. #define CAMERA_BRIGHTNESS_LEVEL0 0x00 /* Brightness level -2 */
  66. #define CAMERA_BRIGHTNESS_LEVEL1 0x01 /* Brightness level -1 */
  67. #define CAMERA_BRIGHTNESS_LEVEL2 0x02 /* Brightness level 0 */
  68. #define CAMERA_BRIGHTNESS_LEVEL3 0x03 /* Brightness level +1 */
  69. #define CAMERA_BRIGHTNESS_LEVEL4 0x04 /* Brightness level +2 */
  70. #define CAMERA_CONTRAST_LEVEL0 0x05 /* Contrast level -2 */
  71. #define CAMERA_CONTRAST_LEVEL1 0x06 /* Contrast level -1 */
  72. #define CAMERA_CONTRAST_LEVEL2 0x07 /* Contrast level 0 */
  73. #define CAMERA_CONTRAST_LEVEL3 0x08 /* Contrast level +1 */
  74. #define CAMERA_CONTRAST_LEVEL4 0x09 /* Contrast level +2 */
  75. #define CAMERA_BLACK_WHITE_BW 0x00 /* Black and white effect */
  76. #define CAMERA_BLACK_WHITE_NEGATIVE 0x01 /* Negative effect */
  77. #define CAMERA_BLACK_WHITE_BW_NEGATIVE 0x02 /* BW and Negative effect */
  78. #define CAMERA_BLACK_WHITE_NORMAL 0x03 /* Normal effect */
  79. #define CAMERA_COLOR_EFFECT_NONE 0x00 /* No effects */
  80. #define CAMERA_COLOR_EFFECT_BLUE 0x01 /* Blue effect */
  81. #define CAMERA_COLOR_EFFECT_GREEN 0x02 /* Green effect */
  82. #define CAMERA_COLOR_EFFECT_RED 0x03 /* Red effect */
  83. #define CAMERA_COLOR_EFFECT_ANTIQUE 0x04 /* Antique effect */
  84. /**
  85. * @}
  86. */
  87. /**
  88. * @}
  89. */
  90. /**
  91. * @}
  92. */
  93. /**
  94. * @}
  95. */
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif /* __CAMERA_H */
  100. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/