/**************************************************************************//** * @file nu_ccap.h * @version V3.00 * @brief M460 Series CCAP Driver Header File * * @copyright SPDX-License-Identifier: Apache-2.0 * @copyright Copyright (C) 2021 Nuvoton Technology Corp. All rights reserved. ******************************************************************************/ #ifndef __NU_CCAP_H__ #define __NU_CCAP_H__ #ifdef __cplusplus extern "C" { #endif /** @addtogroup Standard_Driver Standard Driver @{ */ /** @addtogroup CCAP_Driver CCAP Driver @{ */ /** @addtogroup CCAP_EXPORTED_CONSTANTS CCAP Exported Constants @{ */ /*---------------------------------------------------------------------------------------------------------*/ /* CTL constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define CCAP_CTL_CCAPEN (1ul<CTL & CCAP_CTL_CCAPEN_Msk)?0:1) /** * @brief Clear CCAP flag * * @param[in] u32IntMask interrupt flags settings. It could be * - \ref CCAP_INT_VINTF_Msk * - \ref CCAP_INT_MEINTF_Msk * - \ref CCAP_INT_ADDRMINTF_Msk * - \ref CCAP_INT_MDINTF_Msk * * @return None * * @details Clear Camera Capture Interface interrupt flag * \hideinitializer */ #define CCAP_CLR_INT_FLAG(ccap, u32IntMask) (ccap->INT |= (u32IntMask)) /** * @brief Get CCAP Interrupt status * * @param None * * @return CCAP Interrupt Register * * @details Get Camera Capture Interface interrupt status. * \hideinitializer */ #define CCAP_GET_INT_STS(ccap) (ccap->INT) void CCAP_Open(CCAP_T *ccap, uint32_t u32InFormat, uint32_t u32OutFormat); void CCAP_SetCroppingWindow(CCAP_T *ccap, uint32_t u32VStart, uint32_t u32HStart, uint32_t u32Height, uint32_t u32Width); void CCAP_SetPacketBuf(CCAP_T *ccap, uint32_t u32Address); void CCAP_Close(CCAP_T *ccap); void CCAP_EnableInt(CCAP_T *ccap, uint32_t u32IntMask); void CCAP_DisableInt(CCAP_T *ccap, uint32_t u32IntMask); void CCAP_Start(CCAP_T *ccap); void CCAP_Stop(CCAP_T *ccap, uint32_t u32FrameComplete); void CCAP_SetPacketScaling(CCAP_T *ccap, uint32_t u32VNumerator, uint32_t u32VDenominator, uint32_t u32HNumerator, uint32_t u32HDenominator); void CCAP_SetPacketStride(CCAP_T *ccap, uint32_t u32Stride); void CCAP_EnableMono(CCAP_T *ccap, uint32_t u32Interface); void CCAP_DisableMono(CCAP_T *ccap); void CCAP_EnableLumaYOne(CCAP_T *ccap, uint32_t u32th); void CCAP_DisableLumaYOne(CCAP_T *ccap); void CCAP_SetPlanarYBuf(CCAP_T *ccap, uint32_t u32Address); void CCAP_SetPlanarUBuf(CCAP_T *ccap, uint32_t u32Address); void CCAP_SetPlanarVBuf(CCAP_T *ccap, uint32_t u32Address); void CCAP_SetPlanarScaling(CCAP_T *ccap, uint32_t u32VNumerator, uint32_t u32VDenominator, uint32_t u32HNumerator, uint32_t u32HDenominator); void CCAP_SetPlanarStride(CCAP_T *ccap, uint32_t u32Stride); /*@}*/ /* end of group CCAP_EXPORTED_FUNCTIONS */ /*@}*/ /* end of group CCAP_Driver */ /*@}*/ /* end of group Standard_Driver */ #ifdef __cplusplus } #endif #endif //__NU_CCAP_H__