Giter Club home page Giter Club logo

lnx's Introduction

lnx

Misc tests/projects/patches for linux.

gpio_test

Simple test driver for gpio. Allows manipulating gpio output value. Gpio number is set as driver parameter. To write 0 or 1 one needs to do echo 0 > /dev/gpio_test or echo 1 > /dev/gpio_test.

modinfo:

root@omapl138-lcdk:~# modinfo gpio_test.ko
  filename:       gpio_test.ko
  description:    Gpio test driver.
  author:         Michael Likholet <[email protected]>
  license:        GPL
  depends:        
  vermagic:       3.1.10 preempt mod_unload modversions ARMv5 
  parm:           gpio_num:ushort

how to use:

  1. Build driver

  ┌─(11:29:09)─(michael@host)─(~/Proj/free/linux/gpio_driver/lnx/gpio_test)
  └─► make
  Make module...                                                                                            
  make[1]: Entering directory `/home/michael/ti/linux-3.1.10'                                               
  CC [M]  /home/michael/Proj/free/linux/gpio_driver/lnx/gpio_test/gpio_test.o                             
  /home/michael/Proj/free/linux/gpio_driver/lnx/gpio_test/gpio_test.c: In function 'gpio_test_cdev_start':  
  /home/michael/Proj/free/linux/gpio_driver/lnx/gpio_test/gpio_test.c:99:2: warning: format not a string lit
  Building modules, stage 2.                                                                              
  MODPOST 1 modules                                                                                       
  CC      /home/michael/Proj/free/linux/gpio_driver/lnx/gpio_test/gpio_test.mod.o                         
  LD [M]  /home/michael/Proj/free/linux/gpio_driver/lnx/gpio_test/gpio_test.ko                            
  make[1]: Leaving directory `/home/michael/ti/linux-3.1.10'
  1. Copy it to filesystem and insert it.
  root@omapl138-lcdk:~# insmod gpio_test.ko gpio_num=43
  1. Have fun.
  root@omapl138-lcdk:~# while sleep 0.1; do echo 1 > /dev/gpio_test; sleep 0.1; echo 0 > /dev/gpio_test; done;
  1. Now you can take the probe and see result:

result

omap_l138

Patch for omap-l138 kernel (kernel with patches at gitorious.org, board description - TI LCDK module):

  • Enables CLKOUT (24MHz, internal clock) at TP10, which is used as clock source for external camera connected to J16.

  • Setup reset pin for camera.

  • Setup all the pins for camera (DIN0-DIN15).

  • Added driver for ov5642 to config.

  • ov5642 enumerated in i2c board info.

lnx's People

Contributors

yamike avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.