1 /*
2  * Copyright 2017-2018, 2020 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _FSL_OV5640_H_
10 #define _FSL_OV5640_H_
11 
12 #include "fsl_common.h"
13 #include "fsl_sccb.h"
14 
15 /*
16  * Change log:
17  *
18  *   1.0.1
19  *     - Fix MISRA-C 2012 issues.
20  *
21  *   1.0.0
22  *     - Initial version
23  */
24 
25 /*******************************************************************************
26  * Definitions
27  ******************************************************************************/
28 
29 /*!
30  * @brief OV5640 resource.
31  *
32  * Before initialize the OV5640, the resource must be initialized that the SCCB
33  * I2C could start to work.
34  */
35 typedef struct _ov5640_resource
36 {
37     sccb_i2c_send_func_t i2cSendFunc;       /*!< I2C send function. */
38     sccb_i2c_receive_func_t i2cReceiveFunc; /*!< I2C receive function. */
39     void (*pullResetPin)(bool pullUp);      /*!< Function to pull reset pin high or low. */
40     void (*pullPowerDownPin)(bool pullUp);  /*!< Function to pull the power down pin high or low. */
41 } ov5640_resource_t;
42 
43 /*! @brief OV5640 operation functions. */
44 extern const camera_device_operations_t ov5640_ops;
45 
46 /*******************************************************************************
47  * API
48  ******************************************************************************/
49 
50 #if defined(__cplusplus)
51 extern "C" {
52 #endif
53 
54 #if defined(__cplusplus)
55 }
56 #endif
57 
58 #endif /* _FSL_OV5640_H_ */
59