drv_ov5640.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright 2018 Canaan Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. #ifndef _OV5640_H
  16. #define _OV5640_H
  17. #include <stdint.h>
  18. #define OV5640_ID 0X5640
  19. #define OV5640_ADDR 0X78
  20. #define OV5640_CHIPIDH 0X300A
  21. #define OV5640_CHIPIDL 0X300B
  22. #define XSIZE 320
  23. #define YSIZE 240
  24. #define LCD_GRAM_ADDRESS 0x60020000
  25. #define QQVGA_160_120 0
  26. #define QCIF_176_144 1
  27. #define QVGA_320_240 2
  28. #define WQVGA_400_240 3
  29. #define CIF_352_288 4
  30. #define jpeg_buf_size (30*1024)
  31. uint8_t ov5640_init(void);
  32. void ov5640_flash_lamp(uint8_t sw);
  33. void OV5640_Brightness(uint8_t bright);
  34. void OV5640_Exposure(uint8_t exposure);
  35. void OV5640_Light_Mode(uint8_t mode);
  36. void OV5640_Color_Saturation(uint8_t sat);
  37. void OV5640_Brightness(uint8_t bright);
  38. void OV5640_Contrast(uint8_t contrast);
  39. void OV5640_Sharpness(uint8_t sharp);
  40. void OV5640_Special_Effects(uint8_t eft);
  41. uint8_t OV5640_Focus_Init(void);
  42. uint8_t OV5640_Auto_Focus(void);
  43. #endif