• 嵌入式驱动开发之解码器tvp5150---tvp5150am1基于8148vpss的添加调试


    (1)i2c

    (2)注册设备

    (3)寄存器

    --------------author:pkf

    ------------------------time:2015-4-5

    -------------------------------qq:1327706646

    (1)i2c

    #define I2C_READ_REG_BYTE(reg) (*(volatile unsigned char *)(reg))
    #define I2C_READ_REG_WORD(reg) (*(volatile unsigned short *)(reg))
    #define I2C_READ_REG_LONG(reg) (*(volatile unsigned int *)(reg))

    #define I2C_WRITE_REG_BYTE(val, reg) (*(volatile unsigned char *)(reg) = (val))
    #define I2C_WRITE_REG_WORD(val, reg) (*(volatile unsigned short *)(reg) = (val))
    #define I2C_WRITE_REG_LONG(val, reg) (*(volatile unsigned int *)(reg) = (val))

    #define是预处理命令, 用来对关键字进行文本替换, 这里是不带参数的简单替换
    把代码中I2C0CONSET替换为(*((volatile unsigned char *) 0xE001C000))

    (volatile unsigned char *)括号里是类型, 是强制类型转换
    把0xE001C000转换为这个类型的指针
    指针除了要有地址,还要有地址里数据的类型, 没有类型的话计算机不知道是要读2个字节还是4个字节,也不知道是无符号还是有符号等等

    volatile 是告诉编译器变量的值可能在不知道的情况下改变,防止编译器自动优化

    再前面的*是指针解引用, 指针是unsigned char*的, 地址是0xE001C000, 解引用后就是0xE001C000里存的unsigned char值

    (2)注册设备

    gVps_tvp5150CommonObj.fvidDrvOps.create
    = (FVID2_DrvCreate)Vps_tvp5150Create;
    gVps_tvp5150CommonObj.fvidDrvOps.delete = Vps_tvp5150Delete;
    gVps_tvp5150CommonObj.fvidDrvOps.control = Vps_tvp5150Control;
    gVps_tvp5150CommonObj.fvidDrvOps.queue = NULL;
    gVps_tvp5150CommonObj.fvidDrvOps.dequeue = NULL;
    gVps_tvp5150CommonObj.fvidDrvOps.processFrames = NULL;
    gVps_tvp5150CommonObj.fvidDrvOps.getProcessedFrames = NULL;
    gVps_tvp5150CommonObj.fvidDrvOps.drvId = FVID2_VPS_VID_DEC_TVP5150_DRV;

    status = FVID2_registerDriver ( &gVps_tvp5150CommonObj.fvidDrvOps );//registerDriver !!!!

    (3)寄存器

    static const UInt8 gTvp5150DefAddrList[] =
    {

    /* 0x00 */
    TVP5150_VD_IN_SRC_SEL_1,
    /* 0x01 */
    TVP5150_ANAL_CHL_CTL,

    /* 0x02 */
    TVP5150_OP_MODE_CTL,
    /* 0x03 */
    TVP5150_MISC_CTL,
    /* 0x06 */
    TVP5150_COLOR_KIL_THSH_CTL,
    /* 0x07 */
    TVP5150_LUMA_PROC_CTL_1,
    /* 0x08 */
    TVP5150_LUMA_PROC_CTL_2,
    /* 0x09 */
    TVP5150_BRIGHT_CTL,
    /* 0x0a */
    TVP5150_SATURATION_CTL,
    /* 0x0b */
    TVP5150_HUE_CTL,
    /* 0x0c */
    TVP5150_CONTRAST_CTL,
    /* 0x0d */
    TVP5150_DATA_RATE_SEL,
    /* 0x0e */
    TVP5150_LUMA_PROC_CTL_3,
    /* 0x0f */
    TVP5150_CONF_SHARED_PIN,
    /* 0x11 */
    TVP5150_ACT_VD_CROP_ST_MSB,
    /* 0x12 */
    TVP5150_ACT_VD_CROP_ST_LSB,
    /* 0x13 */
    TVP5150_ACT_VD_CROP_STP_MSB,
    /* 0x14 */
    TVP5150_ACT_VD_CROP_STP_LSB,
    /* 0x15 */
    TVP5150_GENLOCK,
    /* 0x16 */
    TVP5150_HORIZ_SYNC_START,
    /* 0x18 */
    TVP5150_VERT_BLANKING_START,
    /* 0x19 */
    TVP5150_VERT_BLANKING_STOP,
    /* 0x1a */
    TVP5150_CHROMA_PROC_CTL_1,
    /* 0x1b */
    TVP5150_CHROMA_PROC_CTL_2,
    /* 0x1c */
    TVP5150_INT_RESET_REG_B,
    /* 0x1d */
    TVP5150_INT_ENABLE_REG_B,
    /* 0x1e */
    TVP5150_INTT_CONFIG_REG_B,
    /* 0x28 */
    TVP5150_VIDEO_STD,
    /* 0x2e */
    TVP5150_MACROVISION_ON_CTR,
    /* 0x2f */
    TVP5150_MACROVISION_OFF_CTR,
    /* 0xbb */
    TVP5150_TELETEXT_FIL_ENA,
    /* 0xc0 */
    TVP5150_INT_STATUS_REG_A,
    /* 0xc1 */
    TVP5150_INT_ENABLE_REG_A,
    /* 0xc2 */
    TVP5150_INT_CONF,
    /* 0xc8 */
    TVP5150_FIFO_INT_THRESHOLD,
    /* 0xc9 */
    TVP5150_FIFO_RESET,
    /* 0xca */
    TVP5150_LINE_NUMBER_INT,
    /* 0xcb */
    TVP5150_PIX_ALIGN_REG_LOW,
    /* 0xcc */
    TVP5150_PIX_ALIGN_REG_HIGH,
    /* 0xcd */
    TVP5150_FIFO_OUT_CTRL,
    /* 0xcf */
    TVP5150_FULL_FIELD_ENA,
    /* 0xd0 */
    TVP5150_LINE_MODE_INI,
    /* 0xfc */
    TVP5150_FULL_FIELD_MODE_REG,
    /* end of data */

    };

     bug:

    两边黑边条

    http://www.deyisupport.com/question_answer/dsp_arm/f/22/t/78878.aspx

    http://wenku.baidu.com/link?url=YLPPzB8Oi8HyhJ18SatBVb-KKaZhvMZfa6-sJEVLeXS49ke73jKWnTO-NbNZMCZ-oH21XslAwKICrEOF-vzUbP6XbrP20d6jW6COdDC8_9W

    http://wenku.baidu.com/link?url=x4DUS1hsOaIRCWPAVEmJiPDWcLRjhVR-KQS3miT43B8LoiiRRQFkvEkwOICDwDgGHzB25yK8slMtCjwd9-cqWUTFhkhUxNAYH9tPjbnmEdG

    http://wenku.baidu.com/view/d7e6b81810a6f524ccbf8508.html?re=view

    http://wenku.baidu.com/view/4a5a957502768e9951e7385b.html?re=view

    http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/69596.aspx 

    http://www.ti.com/product/tvp5150am1 ti官网文档

    http://www.ti.com/product/TVP5150AM1/technicaldocuments

    http://www.deyisupport.com/question_answer/dsp_arm/f/22/t/17389.aspx?pi2132219853=2

    http://www.deyisupport.com/question_answer/dsp_arm/f/22/t/22508.aspx

    http://www.deyisupport.com/question_answer/dsp_arm/f/22/p/17389/96069.aspx#96069

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/p/314811/1095670#1095670

    http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/52747.aspx?pi2132219853=3 集成

    http://blog.csdn.net/duloveding/article/details/7756328 问题

    http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/13981.aspx 移植

    http://blog.chinaunix.net/uid-21354120-id-1827536.html  i2c

    http://www.deyisupport.com/blog/b/av_tech/archive/2011/07/20/tvp5150xxx-tvp5151.aspx ti 官网提供

    http://e2e.ti.com/support/data_converters/videoconverters/f/918/t/319432 am1

    http://e2e.ti.com/support/data_converters/videoconverters/f/918/tags/TVP5150

    http://www.ti.com/lit/ug/sleu044/sleu044.pdf 手册

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/p/314811/1095670#1095670 grey

    http://www.cnblogs.com/syfwhu/p/4432736.html 腾讯前端

    http://www.cnblogs.com/tracyone/p/4431698.html ipnc web dba

    http://www.ti.com/lit/sg/slyb112a/slyb112a.pdf 手册

    http://www.ti.com/lit/ug/sleu044/sleu044.pdf

    http://www.ti.com/lit/ug/sleu044/sleu044.pdf

    http://blog.csdn.net/linglongyouzhi/article/details/4284581 赛灵思fpga 处理

    http://www.ic37.com/TI/TVP51_datasheet_9586173/TVP51_35.html

    http://www.ti.com.cn/cn/lit/ml/sprt552/sprt552.pdf

    http://wenku.baidu.com/link?url=x4DUS1hsOaIRCWPAVEmJiPDWcLRjhVR-KQS3miT43B8LoiiRRQFkvEkwOICDwDgGHzB25yK8slMtCjwd9-cqWUTFhkhUxNAYH9tPjbnmEdG 5150a 中文手册

    http://blog.163.com/laorenyuhai126@126/blog/static/19350779201111223328406/

  • 相关阅读:
    SAP程序代码中RANGE表的用法注意点
    代码审计学习-1
    应用层隧道之HTTP/HTTPS和DNS
    应用层隧道技术之SSH
    横向移动-常用windows连接和相关命令
    基于MSF的路由转发
    渗透过程中的边界突破(内部分享笔记)
    网络层隧道之PowerCat
    网络层隧道之lcx和nc的使用
    网络层隧道构建之PingTunnel
  • 原文地址:https://www.cnblogs.com/pengkunfan/p/4421975.html
Copyright © 2020-2023  润新知