11#include "fsl_common.h"
21#ifndef DCIC_REGION_COUNT
22#define DCIC_REGION_COUNT DCIC_DCICRCS_COUNT
26#define FSL_DCIC_DRIVER_VERSION (MAKE_VERSION(2, 0, 3))
29#define DCIC_CRC32_POLYNOMIAL 0x04C11DB7UL
32#define DCIC_CRC32_INIT_VALUE 0UL
35#define DCIC_REGION_MISMATCH_STATUS(region) (1UL << (DCIC_DCICS_ROI_MATCH_STAT_SHIFT + (region)))
116#if defined(__cplusplus)
174static inline void DCIC_Enable(
DCIC_Type *base,
bool enable)
178 base->DCICC |= DCIC_DCICC_IC_EN_MASK;
182 base->DCICC &= ~DCIC_DCICC_IC_EN_MASK;
202static inline uint32_t DCIC_GetStatusFlags(
DCIC_Type *base)
216static inline void DCIC_ClearStatusFlags(
DCIC_Type *base, uint32_t mask)
218 base->DCICS = (mask & (DCIC_DCICS_FI_STAT_MASK | DCIC_DCICS_ROI_MATCH_STAT_MASK));
236static inline void DCIC_LockInterruptEnabledStatus(
DCIC_Type *base)
238 base->DCICIC |= DCIC_DCICIC_FREEZE_MASK_MASK;
247static inline void DCIC_EnableInterrupts(
DCIC_Type *base, uint32_t mask)
249 base->DCICIC &= ~mask;
258static inline void DCIC_DisableInterrupts(
DCIC_Type *base, uint32_t mask)
260 base->DCICIC |= mask;
292static inline void DCIC_DisableRegion(
DCIC_Type *base, uint8_t regionIdx)
294 assert(regionIdx < DCIC_REGION_COUNT);
296 if (regionIdx < DCIC_REGION_COUNT)
298 base->REGION[regionIdx].DCICRC &= ~DCIC_DCICRC_ROI_EN_MASK;
309static inline void DCIC_SetRegionRefCrc(
DCIC_Type *base, uint8_t regionIdx, uint32_t crc)
311 assert(regionIdx < DCIC_REGION_COUNT);
313 if (regionIdx < DCIC_REGION_COUNT)
315 base->REGION[regionIdx].DCICRRS = crc;
326static inline uint32_t DCIC_GetRegionCalculatedCrc(
DCIC_Type *base, uint8_t regionIdx)
328 uint32_t localdcicrcs = 0U;
330 assert(regionIdx < DCIC_REGION_COUNT);
332 if (regionIdx < DCIC_REGION_COUNT)
334 localdcicrcs = base->REGION[regionIdx].DCICRCS;
360static inline void DCIC_EnableMismatchExternalSignal(
DCIC_Type *base,
bool enable)
364 base->DCICIC |= DCIC_DCICIC_EXT_SIG_EN_MASK;
368 base->DCICIC &= ~DCIC_DCICIC_EXT_SIG_EN_MASK;
374#if defined(__cplusplus)
struct _dcic_config dcic_config_t
DCIC configuration.
void DCIC_Deinit(DCIC_Type *base)
Deinitialize the DCIC.
Definition: fsl_dcic.c:112
void DCIC_EnableRegion(DCIC_Type *base, uint8_t regionIdx, const dcic_region_config_t *config)
Enable the region of interest (ROI) with configuration.
Definition: fsl_dcic.c:158
uint32_t enableInterrupts
Definition: fsl_dcic.h:100
#define DCIC_REGION_MISMATCH_STATUS(region)
ROI CRC32 value mismatch status.
Definition: fsl_dcic.h:35
_dcic_interrupt_enable
Interrupts. .
Definition: fsl_dcic.h:87
bool lock
Definition: fsl_dcic.h:108
_DCIC_status_flags
Status flags. .
Definition: fsl_dcic.h:61
uint8_t polarityFlags
Definition: fsl_dcic.h:99
uint16_t lowerRightX
Definition: fsl_dcic.h:111
_DCIC_polarity_flags
DCIC display signal polarity flags .
Definition: fsl_dcic.h:42
uint32_t refCrc
Definition: fsl_dcic.h:113
struct _dcic_region_config dcic_region_config_t
Region of interest (ROI) configuration.
bool enableExternalSignal
Definition: fsl_dcic.h:97
uint16_t lowerRightY
Definition: fsl_dcic.h:112
void DCIC_Init(DCIC_Type *base, const dcic_config_t *config)
Initializes the DCIC.
Definition: fsl_dcic.c:92
uint16_t upperLeftY
Definition: fsl_dcic.h:110
void DCIC_GetDefaultConfig(dcic_config_t *config)
Get the default configuration to initialize DCIC.
Definition: fsl_dcic.c:134
uint16_t upperLeftX
Definition: fsl_dcic.h:109
@ kDCIC_ErrorInterruptEnable
Definition: fsl_dcic.h:89
@ kDCIC_FunctionalInterruptEnable
Definition: fsl_dcic.h:88
@ kDCIC_Region5MismatchStatus
Definition: fsl_dcic.h:69
@ kDCIC_ErrorInterruptStatus
Definition: fsl_dcic.h:63
@ kDCIC_Region14MismatchStatus
Definition: fsl_dcic.h:78
@ kDCIC_Region15MismatchStatus
Definition: fsl_dcic.h:79
@ kDCIC_Region12MismatchStatus
Definition: fsl_dcic.h:76
@ kDCIC_Region13MismatchStatus
Definition: fsl_dcic.h:77
@ kDCIC_Region3MismatchStatus
Definition: fsl_dcic.h:67
@ kDCIC_Region10MismatchStatus
Definition: fsl_dcic.h:74
@ kDCIC_Region2MismatchStatus
Definition: fsl_dcic.h:66
@ kDCIC_Region8MismatchStatus
Definition: fsl_dcic.h:72
@ kDCIC_Region1MismatchStatus
Definition: fsl_dcic.h:65
@ kDCIC_Region4MismatchStatus
Definition: fsl_dcic.h:68
@ kDCIC_Region6MismatchStatus
Definition: fsl_dcic.h:70
@ kDCIC_Region9MismatchStatus
Definition: fsl_dcic.h:73
@ kDCIC_Region7MismatchStatus
Definition: fsl_dcic.h:71
@ kDCIC_FunctionalInterruptStatus
Definition: fsl_dcic.h:62
@ kDCIC_Region0MismatchStatus
Definition: fsl_dcic.h:64
@ kDCIC_Region11MismatchStatus
Definition: fsl_dcic.h:75
@ kDCIC_HsyncActiveHigh
Definition: fsl_dcic.h:44
@ kDCIC_DriveDataOnRisingClkEdge
Definition: fsl_dcic.h:52
@ kDCIC_VsyncActiveHigh
Definition: fsl_dcic.h:43
@ kDCIC_DataEnableActiveLow
Definition: fsl_dcic.h:51
@ kDCIC_VsyncActiveLow
Definition: fsl_dcic.h:49
@ kDCIC_DataEnableActiveHigh
Definition: fsl_dcic.h:45
@ kDCIC_DriveDataOnFallingClkEdge
Definition: fsl_dcic.h:46
@ kDCIC_HsyncActiveLow
Definition: fsl_dcic.h:50
Definition: MIMXRT1166_cm4.h:28925
DCIC configuration.
Definition: fsl_dcic.h:96
Region of interest (ROI) configuration.
Definition: fsl_dcic.h:107
Definition: deflate.c:114