1 /*
2  * Copyright 2017, 2020 NXP
3  * All rights reserved.
4  *
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef _FSL_CSI_CAMERA_ADAPTER_H_
10 #define _FSL_CSI_CAMERA_ADAPTER_H_
11 
12 #include "fsl_common.h"
13 #include "fsl_csi.h"
14 
15 /*
16  * Change log:
17  *
18  *   1.0.2
19  *     - Fixed MISRA-C 2012 issues.
20  *
21  *   1.0.1
22  *     - Add data bus width to csi_resource_t.
23  *
24  *   1.0.0
25  *     - Initial version
26  */
27 
28 /*******************************************************************************
29  * Definitions
30  ******************************************************************************/
31 /*! @brief The private data used by the CSI camera receiver. */
32 typedef struct _csi_private_data
33 {
34     csi_handle_t csiHandle;              /*!< CSI driver handle. */
35     camera_receiver_callback_t callback; /*!< Save the callback. */
36     void *userData;                      /*!< Parameter for the callback. */
37 } csi_private_data_t;
38 
39 /*!
40  * @brief The resources used by the CSI camera receiver.
41  *
42  * Don't need to initialize the resource before CSI initialization.
43  */
44 typedef struct _csi_resource
45 {
46     CSI_Type *csiBase;      /*!< CSI register base. */
47     csi_data_bus_t dataBus; /*!< Data bus width. */
48 } csi_resource_t;
49 
50 /*! @brief CSI camera receiver operations structure. */
51 extern const camera_receiver_operations_t csi_ops;
52 
53 /*******************************************************************************
54  * API
55  ******************************************************************************/
56 
57 #if defined(__cplusplus)
58 extern "C" {
59 #endif
60 
61 #if defined(__cplusplus)
62 }
63 #endif
64 
65 #endif /* _FSL_CSI_CAMERA_ADAPTER_H_ */
66