HPM SDK
HPMicro Software Development Kit
hpm_mipi_csi_drv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef HPM_MIPI_CSI_DRV_H
9 #define HPM_MIPI_CSI_DRV_H
10 
18 #include "hpm_common.h"
19 #include "hpm_soc.h"
20 #include "hpm_mipi_csi_regs.h"
21 
22 #define MIPI_CSI_PHY_STOP_MASK_CLK_LANE (0x01u<<16)
23 #define MIPI_CSI_PHY_STOP_MASK_DATA1_LANE (0x01u<<1)
24 #define MIPI_CSI_PHY_STOP_MASK_DATA0_LANE (0x01u<<0)
25 
26 
27 typedef enum mipi_csi_data_type {
34 
35 typedef struct mipi_csi_config {
36  uint8_t lanes; /* !< max: 2. number of lane*/
39 
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
51 
59 
66 
73 
81 {
83 }
84 
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
93 #endif /* HPM_MIPI_CSI_DRV_H */
mipi_csi_data_type
Definition: hpm_mipi_csi_drv.h:27
void mipi_csi_phy_poweron(MIPI_CSI_Type *ptr)
MIPI_CSI phy interface power on.
Definition: hpm_mipi_csi_drv.c:44
struct mipi_csi_config mipi_csi_config_t
void mipi_csi_init(MIPI_CSI_Type *ptr, mipi_csi_config_t *cfg)
MIPI_CSI init.
Definition: hpm_mipi_csi_drv.c:17
static bool mipi_csi_clklane_is_entry_hs(MIPI_CSI_Type *ptr)
MIPI_CSI check clklane whether on HS state.
Definition: hpm_mipi_csi_drv.h:80
void mipi_csi_get_defconfig(mipi_csi_config_t *cfg)
get MIPI_CSI default config
Definition: hpm_mipi_csi_drv.c:11
void mipi_csi_phy_powerdown(MIPI_CSI_Type *ptr)
MIPI_CSI phy interface power down.
Definition: hpm_mipi_csi_drv.c:56
enum mipi_csi_data_type mipi_csi_data_type_t
@ mipi_csi_data_type_rgb888
Definition: hpm_mipi_csi_drv.h:32
@ mipi_csi_data_type_rgb666
Definition: hpm_mipi_csi_drv.h:31
@ mipi_csi_data_type_rgb565
Definition: hpm_mipi_csi_drv.h:30
@ mipi_csi_data_type_yuv422_8bit
Definition: hpm_mipi_csi_drv.h:29
@ mipi_csi_data_type_yuv420_8bit
Definition: hpm_mipi_csi_drv.h:28
#define MIPI_CSI_PHY_RX_PHY_RXCLKACTIVEHS_MASK
Definition: hpm_mipi_csi_regs.h:448
Definition: hpm_mipi_csi_regs.h:12
__R uint32_t PHY_RX
Definition: hpm_mipi_csi_regs.h:24
Definition: hpm_mipi_csi_drv.h:35
mipi_csi_data_type_t data_type
Definition: hpm_mipi_csi_drv.h:37
uint8_t lanes
Definition: hpm_mipi_csi_drv.h:36