| M480 BSP V3.05.001 The Board Support Package for M480 Series

Macros | Functions
CCAP Exported Functions
Standard Driver » CCAP Driver

## Macros
#define | CCAP_IS_STOPPED()
| Is CCAP module Enable. More...
#define | CCAP_CLR_INT_FLAG(u32IntMask)
| Clear CCAP flag. More...
#define | CCAP_GET_INT_STS()
| Get CCAP Interrupt status. More...

## Functions
void | CCAP_Open (uint32_t u32InFormat, uint32_t u32OutFormet)
| Open engine clock and sensor clock. More...
void | CCAP_SetCroppingWindow (uint32_t u32VStart, uint32_t u32HStart, uint32_t u32Height, uint32_t u32Width)
| Set Cropping Window Starting Address and Size. More...
void | CCAP_SetPacketBuf (uint32_t u32Address)
| Set System Memory Packet Base Address0 Register. More...
void | CCAP_Close (void)
| Close Camera Capture Interface. More...
void | CCAP_EnableInt (uint32_t u32IntMask)
| Set CCAP Interrupt. More...
void | CCAP_DisableInt (uint32_t u32IntMask)
| Disable CCAP Interrupt. More...
void | CCAP_Start (void)
| Start Camera Capture Interface. More...
void | CCAP_Stop (uint32_t u32FrameComplete)
| Stop Camera Capture Interface. More...
void | CCAP_SetPacketScaling (uint32_t u32VNumerator, uint32_t u32VDenominator, uint32_t u32HNumerator, uint32_t u32HDenominator)
| Set Packet Scaling Vertical and Horizontal Factor Register. More...
void | CCAP_SetPacketStride (uint32_t u32Stride)
| Set Packet Frame Output Pixel Stride Width. More...
void | CCAP_EnableMono (uint32_t u32Interface)
| Enable Monochrome CMOS Sensor. More...
void | CCAP_DisableMono (void)
| Disable Monochrome CMOS Sensor. More...
void | CCAP_EnableLumaYOne (uint32_t u32th)
| Enable Luminance 8-bit Y to 1-bit Y Conversion. More...
void | CCAP_DisableLumaYOne (void)
| Disable Luminance 8-bit Y to 1-bit Y Conversion. More...

## Detailed Description

## Macro Definition Documentation

## ◆ CCAP_CLR_INT_FLAG

#define CCAP_CLR_INT_FLAG | ( |  | u32IntMask | ) |

Clear CCAP flag.

Parameters

  [in] | u32IntMask | interrupt flags settings. It could be CCAP_INT_VINTF_Msk CCAP_INT_MEINTF_Msk CCAP_INT_ADDRMINTF_Msk CCAP_INT_MDINTF_Msk

Returns
  TRUE(Enable) or FALSE(Disable)

Clear Image Capture Interface interrupt flag

Definition at line 124 of file ccap.h.

## ◆ CCAP_GET_INT_STS

#define CCAP_GET_INT_STS | ( |  | ) |

Get CCAP Interrupt status.

Returns
  TRUE(Enable) or FALSE(Disable)

Get Image Capture Interface interrupt status.

Definition at line 134 of file ccap.h.

## ◆ CCAP_IS_STOPPED

#define CCAP_IS_STOPPED | ( |  | ) |

Is CCAP module Enable.

Returns
  FALSE(Enable) or TRUE(Disable)

Check Camera Capture Interface module Enable or Disable

Definition at line 108 of file ccap.h.

## Function Documentation

## ◆ CCAP_Close()

void CCAP_Close | ( | void |  | ) |

Close Camera Capture Interface.

Returns
  None

Definition at line 109 of file ccap.c.

## ◆ CCAP_DisableInt()

void CCAP_DisableInt | ( | uint32_t | u32IntMask | ) |

Disable CCAP Interrupt.

Parameters

  [in] | u32IntMask | Interrupt settings. It could be CCAP_INT_VINTF_Msk CCAP_INT_MEINTF_Msk CCAP_INT_ADDRMINTF_Msk

Returns
  None

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

Definition at line 150 of file ccap.c.

## ◆ CCAP_DisableLumaYOne()

void CCAP_DisableLumaYOne | ( | void |  | ) |

Disable Luminance 8-bit Y to 1-bit Y Conversion.

Returns
  None

Definition at line 201 of file ccap.c.

## ◆ CCAP_DisableMono()

void CCAP_DisableMono | ( | void |  | ) |

Disable Monochrome CMOS Sensor.

Returns
  None

Definition at line 176 of file ccap.c.

## ◆ CCAP_EnableInt()

void CCAP_EnableInt | ( | uint32_t | u32IntMask | ) |

Set CCAP Interrupt.

Parameters

  [in] | u32IntMask | Interrupt settings. It could be CCAP_INT_VIEN_Msk CCAP_INT_MEIEN_Msk CCAP_INT_ADDRMIEN_Msk

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 129 of file ccap.c.

## ◆ CCAP_EnableLumaYOne()

void CCAP_EnableLumaYOne | ( | uint32_t | u32th | ) |

Enable Luminance 8-bit Y to 1-bit Y Conversion.

Parameters

  [in] | u32th | Luminance Y8 to Y1 Threshold Value, It should be 0 ~ 255.

Returns
  None

Definition at line 189 of file ccap.c.

## ◆ CCAP_EnableMono()

void CCAP_EnableMono | ( | uint32_t | u32Interface | ) |

Enable Monochrome CMOS Sensor.

Parameters

  [in] | u32Interface | I/O interface settings. It could be CCAP_CTL_MY8_MY4 CCAP_CTL_MY8_MY8

Returns
  None

Definition at line 165 of file ccap.c.

## ◆ CCAP_Open()

void CCAP_Open | ( | uint32_t | u32InFormat,
|  | uint32_t | u32OutFormet
| ) |  |

Open engine clock and sensor clock.

Parameters

  [in] | u32InFormat | The bits corresponding VSP, HSP, PCLK, INFMT, SNRTYPE, OUTFMT, PDORD and PNFMT configurations. VSP should be ether CCAP_PAR_VSP_LOW or CCAP_PAR_VSP_HIGH HSP should be ether CCAP_PAR_HSP_LOW or CCAP_PAR_HSP_HIGH PCLK should be ether CCAP_PAR_PCLKP_LOW or CCAP_PAR_PCLKP_HIGH INFMT should be ether CCAP_PAR_INFMT_YUV422 or CCAP_PAR_INFMT_RGB565 SNRTYPE should be ether CCAP_PAR_SENTYPE_CCIR601 or CCAP_PAR_SENTYPE_CCIR656 OUTFMT should be one of the following setting CCAP_PAR_OUTFMT_YUV422 CCAP_PAR_OUTFMT_ONLY_Y CCAP_PAR_OUTFMT_RGB555 CCAP_PAR_OUTFMT_RGB565 PDORD should be one of the following setting CCAP_PAR_INDATORD_YUYV CCAP_PAR_INDATORD_YVYU CCAP_PAR_INDATORD_UYVY CCAP_PAR_INDATORD_VYUY CCAP_PAR_INDATORD_RGGB CCAP_PAR_INDATORD_BGGR CCAP_PAR_INDATORD_GBRG CCAP_PAR_INDATORD_GRBG PNFMT should be one of the following setting CCAP_PAR_PLNFMT_YUV422 CCAP_PAR_PLNFMT_YUV420
  [in] | u32OutFormet | Capture output format, should be one of following setting CCAP_CTL_PKTEN

Returns
  None

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

Definition at line 58 of file ccap.c.

## ◆ CCAP_SetCroppingWindow()

void CCAP_SetCroppingWindow | ( | uint32_t | u32VStart,
|  | uint32_t | u32HStart,
|  | uint32_t | u32Height,
|  | uint32_t | u32Width
| ) |  |

Set Cropping Window Starting Address and Size.

Parameters

  [in] | u32VStart | Cropping Window Vertical Starting Address. It should be 0 ~ 0x7FF.
  [in] | u32HStart | Cropping Window Horizontal Starting Address. It should be 0 ~ 0x7FF.
  [in] | u32Height | Cropping Window Height . It should be 0 ~ 0x7FF.
  [in] | u32Width | Cropping Window Width. It should be 0 ~ 0x7FF.

Returns
  None

Set Cropping Window Starting Address Register

Definition at line 79 of file ccap.c.

## ◆ CCAP_SetPacketBuf()

void CCAP_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 98 of file ccap.c.

## ◆ CCAP_SetPacketScaling()

void CCAP_SetPacketScaling | ( | uint32_t | u32VNumerator,
|  | uint32_t | u32VDenominator,
|  | uint32_t | u32HNumerator,
|  | uint32_t | u32HDenominator
| ) |  |

Set Packet Scaling Vertical and Horizontal Factor Register.

Parameters

  [in] | u32VNumerator | Packet Scaling Vertical Factor N. It should be 0 ~ FFFF.
  [in] | u32VDenominator | Packet Scaling Vertical Factor M. It should be 0 ~ FFFF.
  [in] | u32HNumerator | Packet Scaling Vertical Factor N. It should be 0 ~ FFFF.
  [in] | u32HDenominator | Packet Scaling Vertical Factor M. It should be 0 ~ FFFF.

Returns
  None

Definition at line 251 of file ccap.c.

## ◆ CCAP_SetPacketStride()

void CCAP_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 284 of file ccap.c.

## ◆ CCAP_Start()

void CCAP_Start | ( | void |  | ) |

Start Camera Capture Interface.

Returns
  None

Definition at line 211 of file ccap.c.

## ◆ CCAP_Stop()

void CCAP_Stop | ( | uint32_t | u32FrameComplete | ) |

Stop Camera Capture Interface.

Parameters

  [in] | u32FrameComplete | : TRUE: Capture module automatically disable the CCAP 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 CCAP module

Definition at line 226 of file ccap.c.