9#ifndef _FSL_MIPI_CSI2RX_H_
10#define _FSL_MIPI_CSI2RX_H_
12#include "fsl_common.h"
26#define FSL_CSI2RX_DRIVER_VERSION (MAKE_VERSION(2, 0, 4))
29#if (defined(FSL_FEATURE_CSI2RX_HAS_NO_REG_PREFIX) && FSL_FEATURE_CSI2RX_HAS_NO_REG_PREFIX)
31#define CSI2RX_REG_CFG_NUM_LANES(base) (base)->CFG_NUM_LANES
32#define CSI2RX_REG_CFG_DISABLE_DATA_LANES(base) (base)->CFG_DISABLE_DATA_LANES
33#define CSI2RX_REG_BIT_ERR(base) (base)->BIT_ERR
34#define CSI2RX_REG_IRQ_STATUS(base) (base)->IRQ_STATUS
35#define CSI2RX_REG_IRQ_MASK(base) (base)->IRQ_MASK
36#define CSI2RX_REG_ULPS_STATUS(base) (base)->ULPS_STATUS
37#define CSI2RX_REG_PPI_ERRSOT_HS(base) (base)->PPI_ERRSOT_HS
38#define CSI2RX_REG_PPI_ERRSOTSYNC_HS(base) (base)->PPI_ERRSOTSYNC_HS
39#define CSI2RX_REG_PPI_ERRESC(base) (base)->PPI_ERRESC
40#define CSI2RX_REG_PPI_ERRSYNCESC(base) (base)->PPI_ERRSYNCESC
41#define CSI2RX_REG_PPI_ERRCONTROL(base) (base)->PPI_ERRCONTROL
42#define CSI2RX_REG_CFG_DISABLE_PAYLOAD_0(base) (base)->CFG_DISABLE_PAYLOAD_0
43#define CSI2RX_REG_CFG_DISABLE_PAYLOAD_1(base) (base)->CFG_DISABLE_PAYLOAD_1
44#define CSI2RX_REG_CFG_IGNORE_VC(base) (base)->CFG_IGNORE_VC
45#define CSI2RX_REG_CFG_VID_VC(base) (base)->CFG_VID_VC
46#define CSI2RX_REG_CFG_VID_P_FIFO_SEND_LEVEL(base) (base)->CFG_VID_P_FIFO_SEND_LEVEL
47#define CSI2RX_REG_CFG_VID_VSYNC(base) (base)->CFG_VID_VSYNC
48#define CSI2RX_REG_CFG_VID_HSYNC_FP(base) (base)->CFG_VID_HSYNC_FP
49#define CSI2RX_REG_CFG_VID_HSYNC(base) (base)->CFG_VID_HSYNC
50#define CSI2RX_REG_CFG_VID_HSYNC_BP(base) (base)->CFG_VID_HSYNC_BP
54#define CSI2RX_REG_CFG_NUM_LANES(base) (base)->CSI2RX_CFG_NUM_LANES
55#define CSI2RX_REG_CFG_DISABLE_DATA_LANES(base) (base)->CSI2RX_CFG_DISABLE_DATA_LANES
56#define CSI2RX_REG_BIT_ERR(base) (base)->CSI2RX_BIT_ERR
57#define CSI2RX_REG_IRQ_STATUS(base) (base)->CSI2RX_IRQ_STATUS
58#define CSI2RX_REG_IRQ_MASK(base) (base)->CSI2RX_IRQ_MASK
59#define CSI2RX_REG_ULPS_STATUS(base) (base)->CSI2RX_ULPS_STATUS
60#define CSI2RX_REG_PPI_ERRSOT_HS(base) (base)->CSI2RX_PPI_ERRSOT_HS
61#define CSI2RX_REG_PPI_ERRSOTSYNC_HS(base) (base)->CSI2RX_PPI_ERRSOTSYNC_HS
62#define CSI2RX_REG_PPI_ERRESC(base) (base)->CSI2RX_PPI_ERRESC
63#define CSI2RX_REG_PPI_ERRSYNCESC(base) (base)->CSI2RX_PPI_ERRSYNCESC
64#define CSI2RX_REG_PPI_ERRCONTROL(base) (base)->CSI2RX_PPI_ERRCONTROL
65#define CSI2RX_REG_CFG_DISABLE_PAYLOAD_0(base) (base)->CSI2RX_CFG_DISABLE_PAYLOAD_0
66#define CSI2RX_REG_CFG_DISABLE_PAYLOAD_1(base) (base)->CSI2RX_CFG_DISABLE_PAYLOAD_1
67#define CSI2RX_REG_CFG_IGNORE_VC(base) (base)->CSI2RX_CFG_IGNORE_VC
68#define CSI2RX_REG_CFG_VID_VC(base) (base)->CSI2RX_CFG_VID_VC
69#define CSI2RX_REG_CFG_VID_P_FIFO_SEND_LEVEL(base) (base)->CSI2RX_CFG_VID_P_FIFO_SEND_LEVEL
70#define CSI2RX_REG_CFG_VID_VSYNC(base) (base)->CSI2RX_CFG_VID_VSYNC
71#define CSI2RX_REG_CFG_VID_HSYNC_FP(base) (base)->CSI2RX_CFG_VID_HSYNC_FP
72#define CSI2RX_REG_CFG_VID_HSYNC(base) (base)->CSI2RX_CFG_VID_HSYNC
73#define CSI2RX_REG_CFG_VID_HSYNC_BP(base) (base)->CSI2RX_CFG_VID_HSYNC_BP
77#ifndef MIPI_CSI2RX_CSI2RX_CFG_NUM_LANES_csi2rx_cfg_num_lanes_MASK
78#define MIPI_CSI2RX_CSI2RX_CFG_NUM_LANES_csi2rx_cfg_num_lanes_MASK MIPI_CSI2RX_CFG_NUM_LANES_CFG_NUM_LANES_MASK
81#ifndef MIPI_CSI2RX_CSI2RX_IRQ_MASK_csi2rx_irq_mask_MASK
82#define MIPI_CSI2RX_CSI2RX_IRQ_MASK_csi2rx_irq_mask_MASK MIPI_CSI2RX_IRQ_MASK_IRQ_MASK_MASK
153 kCSI2RX_InterruptCrcError = (1U << 0U),
154 kCSI2RX_InterruptEccOneBitError = (1U << 1U),
155 kCSI2RX_InterruptEccTwoBitError = (1U << 2U),
156 kCSI2RX_InterruptUlpsStatusChange = (1U << 3U),
157 kCSI2RX_InterruptErrorSotHs = (1U << 4U),
158 kCSI2RX_InterruptErrorSotSyncHs = (1U << 5U),
159 kCSI2RX_InterruptErrorEsc = (1U << 6U),
160 kCSI2RX_InterruptErrorSyncEsc = (1U << 7U),
161 kCSI2RX_InterruptErrorControl = (1U << 8U),
182#if defined(__cplusplus)
232 return CSI2RX_REG_BIT_ERR(base);
244static inline uint32_t CSI2RX_GetEccBitErrorPosition(uint32_t bitError)
246 return (bitError >> 2U) & 0x1FU;
267 return CSI2RX_REG_ULPS_STATUS(base);
301 errorLanes = CSI2RX_REG_PPI_ERRSOT_HS(base);
305 errorLanes = CSI2RX_REG_PPI_ERRSOTSYNC_HS(base);
309 errorLanes = CSI2RX_REG_PPI_ERRESC(base);
313 errorLanes = CSI2RX_REG_PPI_ERRSYNCESC(base);
317 errorLanes = CSI2RX_REG_PPI_ERRCONTROL(base);
337static inline void CSI2RX_EnableInterrupts(
MIPI_CSI2RX_Type *base, uint32_t mask)
339 CSI2RX_REG_IRQ_MASK(base) &= ~mask;
356static inline void CSI2RX_DisableInterrupts(
MIPI_CSI2RX_Type *base, uint32_t mask)
358 CSI2RX_REG_IRQ_MASK(base) |= mask;
372 return CSI2RX_REG_IRQ_STATUS(base);
375#if defined(__cplusplus)
_csi2rx_ulps_status
MIPI CSI2RX D-PHY ULPS state.
Definition: fsl_mipi_csi2rx.h:166
_csi2rx_ppi_error
MIPI CSI2RX PPI error types.
Definition: fsl_mipi_csi2rx.h:142
void CSI2RX_Init(MIPI_CSI2RX_Type *base, const csi2rx_config_t *config)
Enables and configures the CSI2RX peripheral module.
Definition: fsl_mipi_csi2rx.c:220
_csi2rx_interrupt
MIPI CSI2RX interrupt.
Definition: fsl_mipi_csi2rx.h:152
struct _csi2rx_config csi2rx_config_t
CSI2RX configuration.
enum _csi2rx_ppi_error csi2rx_ppi_error_t
MIPI CSI2RX PPI error types.
_csi2rx_data_lane
CSI2RX data lanes.
Definition: fsl_mipi_csi2rx.h:87
_csi2rx_payload
CSI2RX payload type.
Definition: fsl_mipi_csi2rx.h:96
_csi2rx_bit_error
MIPI CSI2RX bit errors.
Definition: fsl_mipi_csi2rx.h:135
void CSI2RX_Deinit(MIPI_CSI2RX_Type *base)
Disables the CSI2RX peripheral module.
Definition: fsl_mipi_csi2rx.c:250
uint8_t tHsSettle_EscClk
Definition: fsl_mipi_csi2rx.h:128
uint8_t laneNum
Definition: fsl_mipi_csi2rx.h:127
@ kCSI2RX_DataLane0Ulps
Definition: fsl_mipi_csi2rx.h:168
@ kCSI2RX_DataLane1Mark
Definition: fsl_mipi_csi2rx.h:174
@ kCSI2RX_DataLane2Mark
Definition: fsl_mipi_csi2rx.h:175
@ kCSI2RX_DataLane2Ulps
Definition: fsl_mipi_csi2rx.h:170
@ kCSI2RX_ClockLaneMark
Definition: fsl_mipi_csi2rx.h:172
@ kCSI2RX_ClockLaneUlps
Definition: fsl_mipi_csi2rx.h:167
@ kCSI2RX_DataLane3Ulps
Definition: fsl_mipi_csi2rx.h:171
@ kCSI2RX_DataLane1Ulps
Definition: fsl_mipi_csi2rx.h:169
@ kCSI2RX_DataLane0Mark
Definition: fsl_mipi_csi2rx.h:173
@ kCSI2RX_DataLane3Mark
Definition: fsl_mipi_csi2rx.h:176
@ kCSI2RX_PpiErrorSotSyncHs
Definition: fsl_mipi_csi2rx.h:144
@ kCSI2RX_PpiErrorEsc
Definition: fsl_mipi_csi2rx.h:145
@ kCSI2RX_PpiErrorControl
Definition: fsl_mipi_csi2rx.h:147
@ kCSI2RX_PpiErrorSotHs
Definition: fsl_mipi_csi2rx.h:143
@ kCSI2RX_PpiErrorSyncEsc
Definition: fsl_mipi_csi2rx.h:146
@ kCSI2RX_DataLane1
Definition: fsl_mipi_csi2rx.h:89
@ kCSI2RX_DataLane3
Definition: fsl_mipi_csi2rx.h:91
@ kCSI2RX_DataLane0
Definition: fsl_mipi_csi2rx.h:88
@ kCSI2RX_DataLane2
Definition: fsl_mipi_csi2rx.h:90
@ kCSI2RX_PayloadGroup1UserDefined1
Definition: fsl_mipi_csi2rx.h:114
@ kCSI2RX_PayloadGroup1UserDefined5
Definition: fsl_mipi_csi2rx.h:118
@ kCSI2RX_PayloadGroup1UserDefined2
Definition: fsl_mipi_csi2rx.h:115
@ kCSI2RX_PayloadGroup1UserDefined7
Definition: fsl_mipi_csi2rx.h:120
@ kCSI2RX_PayloadGroup0RGB666
Definition: fsl_mipi_csi2rx.h:106
@ kCSI2RX_PayloadGroup0RGB444
Definition: fsl_mipi_csi2rx.h:103
@ kCSI2RX_PayloadGroup1UserDefined4
Definition: fsl_mipi_csi2rx.h:117
@ kCSI2RX_PayloadGroup0Raw6
Definition: fsl_mipi_csi2rx.h:108
@ kCSI2RX_PayloadGroup0Raw14
Definition: fsl_mipi_csi2rx.h:113
@ kCSI2RX_PayloadGroup1UserDefined3
Definition: fsl_mipi_csi2rx.h:116
@ kCSI2RX_PayloadGroup0Null
Definition: fsl_mipi_csi2rx.h:97
@ kCSI2RX_PayloadGroup0Raw7
Definition: fsl_mipi_csi2rx.h:109
@ kCSI2RX_PayloadGroup0Raw8
Definition: fsl_mipi_csi2rx.h:110
@ kCSI2RX_PayloadGroup0RGB555
Definition: fsl_mipi_csi2rx.h:104
@ kCSI2RX_PayloadGroup0RGB888
Definition: fsl_mipi_csi2rx.h:107
@ kCSI2RX_PayloadGroup0Raw10
Definition: fsl_mipi_csi2rx.h:111
@ kCSI2RX_PayloadGroup1UserDefined6
Definition: fsl_mipi_csi2rx.h:119
@ kCSI2RX_PayloadGroup0RGB565
Definition: fsl_mipi_csi2rx.h:105
@ kCSI2RX_PayloadGroup0Blank
Definition: fsl_mipi_csi2rx.h:98
@ kCSI2RX_PayloadGroup0YUV422_10Bit
Definition: fsl_mipi_csi2rx.h:102
@ kCSI2RX_PayloadGroup0Embedded
Definition: fsl_mipi_csi2rx.h:99
@ kCSI2RX_PayloadGroup0YUV422_8Bit
Definition: fsl_mipi_csi2rx.h:101
@ kCSI2RX_PayloadGroup0Raw12
Definition: fsl_mipi_csi2rx.h:112
@ kCSI2RX_PayloadGroup1UserDefined8
Definition: fsl_mipi_csi2rx.h:121
@ kCSI2RX_PayloadGroup0YUV420_8Bit
Definition: fsl_mipi_csi2rx.h:100
@ kCSI2RX_BitErrorEccOneBit
Definition: fsl_mipi_csi2rx.h:137
@ kCSI2RX_BitErrorEccTwoBit
Definition: fsl_mipi_csi2rx.h:136
Definition: MIMXRT1166_cm4.h:63541
CSI2RX configuration.
Definition: fsl_mipi_csi2rx.h:126
Definition: deflate.c:114