1 / 9

AT91SAM Linux Driver Hands-on Introduction

AT91SAM Linux Driver Hands-on Introduction. Helloworld driver Just print debug information when loaded Helloworld character driver Create a character driver when loaded Support file open, close, IOCTL operaiton. Hellokeys platform driver In board file, register a hellokeys platform device

mora
Télécharger la présentation

AT91SAM Linux Driver Hands-on Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AT91SAM Linux Driver Hands-on Introduction

  2. Helloworld driver Just print debug information when loaded Helloworld character driver Create a character driver when loaded Support file open, close, IOCTL operaiton. Hellokeys platform driver In board file, register a hellokeys platform device In driver, register a hellokeys platform driver When hellokeys platform device and driver is loaded, .probe() will be called In .probe() the a character driver is created Add Interrupt handling for platform driver Sam9m10g45-EK GPIO key Sam9x5-EK I2C for Qtouch button Overview

  3. Helloworld driver HelloWorld Driver Module (.ko) print Hello World! insmod Running Kernel

  4. Register a character device driver Open Close IOCTL Helloworld character driver Hello world Character Driver Module (.ko) insmod /dev/mydev Application Open Close IOCTL Created it by commands: mknod /dev/mydev c MAJOR MINOR Running Kernel

  5. Register character device driver Open Close IOCTL Hellokeys platform driver In Kernel board file, Register “hellokeys” platform device Hello keys Platform Driver Module (.ko) insmod Register “hellokeys” Platform driver Call platform driver’s .probe() function /dev/mydev Application Open Close IOCTL Created it by commands: mknod /dev/mydev c MAJOR MINOR Running Kernel

  6. Register character device driver Open Close IOCTL Hellokeys platform driver In Kernel board file, Register “hellokeys” platform device Hello keys Platform Driver Module (.ko) insmod Register “hellokeys” Platform driver Call platform driver’s .probe() function /dev/mydev Application Open Close IOCTL Created it by commands: mknod /dev/mydev c MAJOR MINOR Running Kernel

  7. Add Interrupt handling 9m10g45: GPIO interrupt Driver read() is called 9x5: QTouch interrupt ISR Check flag: wait_for_key Wake up the wait queue Set flag: wait_for_key Wait for a wait queue Driver read() return Copy key_name to User data Shared data Hello_keys_drvdata * my_data

  8. More information about AT91SAM OS Ecosystem AT91SAM Linux Ecosystem http://www.linux4sam.org AT91SAM Android Ecosystem http://www.at91.com/android4sam AT91SAM WinCE Ecosystem http://www.at91.com/windows4sam AT91SAM community forum http://www.at91.com

More Related