zoukankan      html  css  js  c++  java
  • [国嵌攻略][170][摄像头驱动开发]

    摄像头系统架构

    V4L2 video for linux,专门为Linux系统定制的操作摄像头的规范。给应用程序提供访问摄像头统一的接口。相应的摄像头驱动也需要遵循V4L2规范。这样应用程序可以不根据硬件的不同而改变,提高应用程序的可移植性。

    使能和测试摄像头驱动

    make menuconfig ARCH=arm

    device drivers-><*>multimedia support-><*>video for linux and [*]enable video for linux api 1

    device drivers-><*>multimedia support->[*]video capture adapters->[*]v4l usb devices-><*>gspca based webcams-><*>zc3xx usb camera driver

    make uImage ARCH=arm CROSS_COMPILE=arm-linux-

    编译测试程序

    修改dev_name = "/dev/video%d"为对应的设备文件名

    arm-linux-gcc camera.c -o camera

    还需要配置uboot

    setenv bootargs noinitrd console=ttySAC0,115200 init=/linuxrc root=/dev/nfs rw nfsroot=192.168.1.101:.../rootfs,proto=tcp,nfsvers=3 ip=192.168.1.230:192.168.1.101:192.168.1.1:255.255.255.0::eth0:off
    saveenv

    vim board/samsung/mini2440/smdk2410.c

    /* configure MPLL */

         writel((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV,

                &clk_power->mpllcon);

         /* some delay between MPLL and UPLL */

         pll_delay(4000);

            pll_delay(4000);

       /* configure UPLL */

        writel((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV,

                &clk_power->upllcon);

         /* some delay between MPLL and UPLL */

         pll_delay(8000);

         /* set up the I/O ports */

    在MPLL和UPLL之间加了一个pll_delay(4000);

    还需要配置kernel

    [*]Networking support->Networking options->[*]IP: kernel level autoconfiguration and [*]IP: DHCP support and [*]IP:BOOTP support and [*]IP: RARP support

    运行程序如果遇到EHCI USB主控器问题,可以修改相关的USB控制器配置。device drivers->[*]usb support-><*>EHCI HCD (usb 2.0) support or <*>OHCI HCD support

  • 相关阅读:
    Xamarin studio配置问题
    安装moogodb
    什么是作用域, 什么是闭包, 什么是原型链,什么是递归, 什么是函数函数声明,什么是函数表达式,继承,this 指向
    前端框架Vue、angular、React的优点和缺
    判断终端是IOS 或 是Android
    VS code终端错位
    安装Flutter
    web直传OSS设置 头部信息【坑】
    从零创建react项目
    webpack报错vue-template-compiler 版本不对
  • 原文地址:https://www.cnblogs.com/d442130165/p/5338665.html
Copyright © 2011-2022 走看看