NUC472_NUC442_BSP V3.03.004
The Board Support Package for NUC472/NUC442
Macros | Functions
Collaboration diagram for CAP Exported Functions:

Macros

#define CAP_IS_STOPPED()
 Is CAP module Enable. More...
 
#define CAP_CLR_INT_FLAG(u32IntMask)
 Clear CAP flag. More...
 
#define CAP_GET_INT_STS()
 Get CAP Interrupt status. More...
 

Functions

void CAP_Open (uint32_t u32InFormat, uint32_t u32OutFormet)
 Open engine clock and sensor clock. More...
 
void CAP_SetCroppingWindow (uint32_t u32VStart, uint32_t u32HStart, uint32_t u32Height, uint32_t u32Width)
 Set Cropping Window Starting Address and Size. More...
 
void CAP_SetPacketBuf (uint32_t u32Address)
 Set System Memory Packet Base Address0 Register. More...
 
void CAP_SetPlanarBuf (uint32_t u32YAddr, uint32_t u32UAddr, uint32_t u32VAddr)
 Set System Memory Planar Y, U and V Base Address Registers. More...
 
void CAP_Close (void)
 Close Image Capture Interface. More...
 
void CAP_EnableInt (uint32_t u32IntMask)
 Set CAP Interrupt. More...
 
void CAP_DisableInt (uint32_t u32IntMask)
 Disable CAP Interrupt. More...
 
void CAP_Start (void)
 Start Image Capture Interface. More...
 
void CAP_Stop (uint32_t u32FrameComplete)
 Stop Image Capture Interface. More...
 
void CAP_SetPacketScaling (uint32_t u32VNumerator, uint32_t u32VDenominator, uint32_t u32HNumerator, uint32_t u32HDenominator)
 Set Packet Scaling Vertical and Horizontal Factor Register. More...
 
void CAP_SetPlanarScaling (uint32_t u32VNumerator, uint32_t u32VDenominator, uint32_t u32HNumerator, uint32_t u32HDenominator)
 Set Planar Scaling Vertical and Horizontal Factor Register. More...
 
void CAP_SetPacketStride (uint32_t u32Stride)
 Set Packet Frame Output Pixel Stride Width. More...
 
void CAP_SetPlanarStride (uint32_t u32Stride)
 Set Planar Frame Output Pixel Stride Width. More...
 
void CAP_EnableMotionDet (uint32_t u32Freq, uint32_t u32BlockSize, uint32_t u32Format, uint32_t u32Threshold, uint32_t u32YDetAddr, uint32_t u32DetAddr)
 Enable Motion Detection Function. More...
 
void CAP_DisableMotionDet (void)
 Enable Motion Detection Function. More...
 

Detailed Description

Macro Definition Documentation

◆ CAP_CLR_INT_FLAG

#define CAP_CLR_INT_FLAG (   u32IntMask)

Clear CAP flag.

Parameters
[in]u32IntMaskinterrupt flags settings. It could be
Returns
TRUE(Enable) or FALSE(Disable)

Clear Image Capture Interface interrupt flag

Definition at line 129 of file cap.h.

◆ CAP_GET_INT_STS

#define CAP_GET_INT_STS ( )

Get CAP Interrupt status.

Returns
TRUE(Enable) or FALSE(Disable)

Get Image Capture Interface interrupt status.

Definition at line 139 of file cap.h.

◆ CAP_IS_STOPPED

#define CAP_IS_STOPPED ( )

Is CAP module Enable.

Returns
FALSE(Enable) or TRUE(Disable)

Check Image Capture Interface module Enable or Disable

Definition at line 113 of file cap.h.

Function Documentation

◆ CAP_Close()

void CAP_Close ( void  )

Close Image Capture Interface.

Returns
None

Definition at line 136 of file cap.c.

◆ CAP_DisableInt()

void CAP_DisableInt ( uint32_t  u32IntMask)

Disable CAP Interrupt.

Parameters
[in]u32IntMaskInterrupt settings. It could be
Returns
None

Disable Video Frame End Interrupt , System Memory Error Interrupt , Address Match Interrupt and Motion Detection Output Finish Interrupt .

Definition at line 178 of file cap.c.

◆ CAP_DisableMotionDet()

void CAP_DisableMotionDet ( void  )

Enable Motion Detection Function.

Returns
None

Set Planar Frame Output Pixel Stride Width

Definition at line 370 of file cap.c.

◆ CAP_EnableInt()

void CAP_EnableInt ( uint32_t  u32IntMask)

Set CAP Interrupt.

Parameters
[in]u32IntMaskInterrupt settings. It could be
Returns
None

Set Video Frame End Interrupt Enable, System Memory Error Interrupt Enable, Address Match Interrupt Enable, Motion Detection Output Finish Interrupt Enable.

Definition at line 157 of file cap.c.

◆ CAP_EnableMotionDet()

void CAP_EnableMotionDet ( uint32_t  u32Freq,
uint32_t  u32BlockSize,
uint32_t  u32Format,
uint32_t  u32Threshold,
uint32_t  u32YDetAddr,
uint32_t  u32DetAddr 
)

Enable Motion Detection Function.

Parameters
[in]u32FreqMotion Detection Detect Frequency. It should be 0x0 ~ 0x3.
[in]u32BlockSizeMotion Detection Block Size FALSE : 16x16 TRUE : 8x8
[in]u32FormatMotion Detection Save Mode FALSE : 1 bit DIFF + 7 Y Differential TRUE : 1 bit DIFF only
[in]u32ThresholdMotion Detection Detect Threshold. It should be 0x0 ~ 0x1F.
[in]u32YDetAddr: Motion Detection Detect Temp Y Output Address
[in]u32DetAddrMotion Detection Detect Address
Returns
None

Set Planar Frame Output Pixel Stride Width

Definition at line 350 of file cap.c.

◆ CAP_Open()

void CAP_Open ( uint32_t  u32InFormat,
uint32_t  u32OutFormet 
)

Open engine clock and sensor clock.

Parameters
[in]u32InFormatThe bits corresponding VSP, HSP, PCLK, INFMT, SNRTYPE, OUTFMT, PDORD and PNFMT configurations.
[in]u32OutFormetCapture output format, should be one of following setting
Returns
None

Initialize the Image Capture Interface. Register a call back for driver internal using

Definition at line 63 of file cap.c.

◆ CAP_SetCroppingWindow()

void CAP_SetCroppingWindow ( uint32_t  u32VStart,
uint32_t  u32HStart,
uint32_t  u32Height,
uint32_t  u32Width 
)

Set Cropping Window Starting Address and Size.

Parameters
[in]u32VStartCropping Window Vertical Starting Address. It should be 0 ~ 0x7FF.
[in]u32HStartCropping Window Horizontal Starting Address. It should be 0 ~ 0x7FF.
[in]u32HeightCropping Window Height . It should be 0 ~ 0x7FF.
[in]u32WidthCropping Window Width. It should be 0 ~ 0x7FF.
Returns
None

Set Cropping Window Starting Address Register

Definition at line 84 of file cap.c.

◆ CAP_SetPacketBuf()

void CAP_SetPacketBuf ( uint32_t  u32Address)

Set System Memory Packet Base Address0 Register.

Parameters
[in]u32Address: set PKTBA0 register, It should be 0x0 ~ 0xFFFFFFFF
Returns
None

Set System Memory Packet Base Address Register

Definition at line 103 of file cap.c.

◆ CAP_SetPacketScaling()

void CAP_SetPacketScaling ( uint32_t  u32VNumerator,
uint32_t  u32VDenominator,
uint32_t  u32HNumerator,
uint32_t  u32HDenominator 
)

Set Packet Scaling Vertical and Horizontal Factor Register.

Parameters
[in]u32VNumeratorPacket Scaling Vertical Factor N. It should be 0 ~ FFFF.
[in]u32VDenominatorPacket Scaling Vertical Factor M. It should be 0 ~ FFFF.
[in]u32HNumeratorPacket Scaling Vertical Factor N. It should be 0 ~ FFFF.
[in]u32HDenominatorPacket Scaling Vertical Factor M. It should be 0 ~ FFFF.
Returns
None

Definition at line 236 of file cap.c.

◆ CAP_SetPacketStride()

void CAP_SetPacketStride ( uint32_t  u32Stride)

Set Packet Frame Output Pixel Stride Width.

Parameters
[in]u32Stride: set PKTSTRIDE register, It should be 0x0 ~ 0x3FFF
Returns
None

Set Packet Frame Output Pixel Stride Width

Definition at line 307 of file cap.c.

◆ CAP_SetPlanarBuf()

void CAP_SetPlanarBuf ( uint32_t  u32YAddr,
uint32_t  u32UAddr,
uint32_t  u32VAddr 
)

Set System Memory Planar Y, U and V Base Address Registers.

Parameters
[in]u32YAddr: set YBA register, It should be 0x0 ~ 0xFFFFFFFF
[in]u32UAddr: set UBA register, It should be 0x0 ~ 0xFFFFFFFF
[in]u32VAddr: set VBA register, It should be 0x0 ~ 0xFFFFFFFF
Returns
None

Set System Memory Planar Y,U and V Base Address Registers

Definition at line 122 of file cap.c.

◆ CAP_SetPlanarScaling()

void CAP_SetPlanarScaling ( uint32_t  u32VNumerator,
uint32_t  u32VDenominator,
uint32_t  u32HNumerator,
uint32_t  u32HDenominator 
)

Set Planar Scaling Vertical and Horizontal Factor Register.

Parameters
[in]u32VNumeratorPlanar Scaling Vertical Factor N. It should be 0 ~ FFFF.
[in]u32VDenominatorPlanar Scaling Vertical Factor M. It should be 0 ~ FFFF.
[in]u32HNumeratorPlanar Scaling Vertical Factor N. It should be 0 ~ FFFF.
[in]u32HDenominatorPlanar Scaling Vertical Factor M. It should be 0 ~ FFFF.
Returns
None

Definition at line 274 of file cap.c.

◆ CAP_SetPlanarStride()

void CAP_SetPlanarStride ( uint32_t  u32Stride)

Set Planar Frame Output Pixel Stride Width.

Parameters
[in]u32Stride: set PLNSTRIDE register, It should be 0x0 ~ 0x3FFF
Returns
None

Set Planar Frame Output Pixel Stride Width

Definition at line 321 of file cap.c.

◆ CAP_Start()

void CAP_Start ( void  )

Start Image Capture Interface.

Returns
None

Definition at line 188 of file cap.c.

◆ CAP_Stop()

void CAP_Stop ( uint32_t  u32FrameComplete)

Stop Image Capture Interface.

Parameters
[in]u32FrameComplete: TRUE: Capture module automatically disable the CAP module after a frame had been captured FALSE: Stop Capture module now
Returns
None

if u32FrameComplete is set to TRUE then get a new frame and disable CAP module

Definition at line 203 of file cap.c.