📄 tvp5150a.h
字号:
#ifndef _TVP5150A_H_
#define _TVP5150A_H_
/** @example doTVIN.c */
/**
* @defgroup TVIN TVIN driver
*/
/**@{*/
/**
* @file saa7113h.h
*
* @brief Interface to MX21 TVIN/SAA7113H driver.
*
* Copyright (C) 2004, Freescale Semiconductor Suzhou Ltd. All Rights Reserved
*
* Descirption:
* This is the header file for TV-in driver and application programming usage.
*
* Modification History:
* Added SAA7113H_IOC_POWER_DOWN definition.
* Jan 20, 2005.
* Added VT_UNKNOWN video type to support video source detection.
* Dec 20, 2004.
* Added SAA7113H_IOC_READ_CONFIG ioctl.
* Nov 11, 2004.
* Document API.
* Aug 6, 2004.
* Initial version.
*/
/**
* @brief The SAA7113H_CFG data type are used to config SAA7113H processor.
* video type, width, height, format, fps are automatically detected and
* fill up by the SAA7113H driver. Video source is set by user input.
*/
typedef struct
{
int video_type; /**< PAL or NTSC. Please refer to Define_Video_Type. */
int width; /**< The width of the output image. */
int f1height; /**< The height of the field 1 image. */
int f2height; /**< The height of the field 2 image. */
int color_format; /**< RGB or YUV. Please refer to Define_Color_Format. */
int fps; /**< The frame rate (should be constant). */
int video_source; /**< Composite or s-video. Please refer to Define_Video_Source. */
} TVP5150A_CFG;
/**
* @name Define_Color_Format
* The color format of output data. The values are used by SAA7113H_CFG.color_format.
*/
/** @def RGB The RGB output */
/** @def YUV The YUV output */
/**@{*/
#ifndef RGB
#define RGB 0
#endif
#ifndef YUV
#define YUV 1
#endif
/**@}*/
/**
* @name Define_Video_Source
* The vidoe source input to SAA7113H processor. The values are used by SAA7113H.video_source.
*/
/** @def CVBS The video source is from composite port */
/** @def SVIDEO The video source is from s-video port */
/**@{*/
#ifndef CVBS
#define CVBS 0
#endif
#ifndef SVIDEO
#define SVIDEO 1
#endif
/**@}*/
/**
* @name Define_Video_Type
* The video type input to SAA7113H processor. The values are used by SAA7113H.video_type.
*/
/** @def VT_UNKNOWN Unknow video type: no video source detected */
/** @def PAL The video type is PAL */
/** @def NTSC The video type is NTSC */
/**@{*/
#define VT_UNKNOWN 0
#ifndef PAL
#define PAL 50 //val is chose to be field freq
#endif
#ifndef NTSC
#define NTSC 60
#endif
/**@}*/
/**
* @name Define_ioctl_Operation
* Define the ioctl operations for TV-in driver.
*/
/**@{*/
/** @def SAA7113H_IOC_CONFIG ioctl operation for configuring SAA7113H processor. */
/** @def SAA7113H_IOC_I2C_TEST ioctl operation for testing SAA7113H using I2C. */
/** @def SAA7113H_IOC_READ_CONFIG ioctl operation for getting current SAA7113H configurations. */
/** @def SAA7113H_IOC_POWER_DOWN ioctl operation for putting SAA7113H into lower power mode. */
#define TVP5150A_IOC_CONFIG 10
#define TVP5150A_IOC_I2C_TEST 11
#define TVP5150A_IOC_READ_CONFIG 12
#define TVP5150A_IOC_POWER_DOWN 13
#define TVP5150A_IOC_SELVIDEO 14
#define TVP5150A_SET_BRIGHT 15
#define TVP5150A_SET_SATURATION 16
#define TVP5150A_SET_CONTRAST 17
#define TVP5150A_SET_HUE 18
#define TVP5150A_SET_ACTIVE_LEFT 19
#define TVP5150A_SET_ACTIVE_RIGHT 20
#define TVP5150A_SET_ACTIVE_TOP 21
#define TVP5150A_SET_ACTIVE_DOWN 22
/**@}*/
/**@}*/
#endif //_TVP5150A_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -