firmware/br-ext-chip-xiongmai/package/xiongmai-osdrv2/files/include/xm/BlindDetect.h

99 lines
2.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//
// "$Id: BlindDetect.h 4 2009-06-11 13:01:43Z liwj $"
//
// Copyright (c)2008-2008, ZheJiang JuFeng Technology Stock CO.LTD.
// All Rights Reserved.
//
// Description:
// Revisions: Year-Month-Day SVN-Author Modification
//
#ifndef __PAL_BLINDDETECT_H__
#define __PAL_BLINDDETECT_H__
#ifdef __cplusplus
extern "C" {
#endif
/// \defgroup BlindDetectAPI API Blind Detect
/// 全屏范围按灵敏度的遮挡检测接口。
/// \n 调用流程图:
/// \code
/// ===========================
/// |
/// *BlindDetectGetCaps
/// |
/// BlindDetectCreate
/// +-----------|
/// | BlindDetectGetState
/// | BlindDetectSetParameter
/// +-----------|
/// BlindDetectDestory
/// |
/// ===========================
/// \endcode
/// @{
/// 黑屏检测设备特性结构
typedef struct BLIND_DETECT_CAPS
{
unsigned int Enabled; ///< 置1表示支持黑屏检测置0表示不支持黑屏检测。
}BLIND_DETECT_CAPS;
/// 黑屏检测参数
typedef struct BLIND_DETECT_PARAM
{
unsigned char Level; ///< 等级 0 - 3 // 0 - 30
int Enable; ///< 为1表示使能为0时表示禁用
}BLIND_DETECT_PARAM;
/// 创建黑屏检测设备
///
/// \param 无
/// \retval <0 创建失败
/// \retval 0 创建成功
int BlindDetectCreate(void);
/// 销毁黑屏检测设备
///
/// \param 无
/// \retval <0 销毁失败
/// \retval 0 销毁成功
int BlindDetectDestory(void);
/// 执行黑屏检测。立即返回。
///
/// \param [out] pData 指向一个unsigned int值的指针unsigned int值是各个报警输入通道电平状态的
/// 掩码。低通道在低位高通道在高位。高电平置1低电平置0不存在的通道置0。
/// \retval 0 检测成功
/// \retval <0 检测失败
int BlindDetectGetState(unsigned int* pData);
/// 设置黑屏检测捕获的参数。
///
/// \param [in] channel 通道号。
/// \param [in] pParam 指向黑屏检测参数结构BLIND_DETECT_ Param的指针。
/// \retval 0 设置成功
/// \retval <0 设置失败
int BlindDetectSetParameter(int channel, BLIND_DETECT_PARAM *pParam);
/// 得到黑屏支持的特性。
///
/// \param [out] pCaps 指向黑屏特性结构BLIND_DETECT _CAPS的指针。
/// \retval 0 获取成功。
/// \retval <0 获取失败。
int BlindDetectGetCaps(BLIND_DETECT_CAPS * pCaps);
/// @} end of group
#ifdef __cplusplus
}
#endif
#endif