色哟哟视频在线观看-色哟哟视频在线-色哟哟欧美15最新在线-色哟哟免费在线观看-国产l精品国产亚洲区在线观看-国产l精品国产亚洲区久久

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
創作
電子發燒友網>電子資料下載>類型>參考設計>ADP5588輸入鍵盤和GPIO Linux驅動程序

ADP5588輸入鍵盤和GPIO Linux驅動程序

2021-04-21 | pdf | 224.72KB | 次下載 | 免費

資料介紹

This version (11 Feb 2016 21:09) was approved by Lars-Peter Clausen.The Previously approved version (05 Sep 2012 14:08) is available.Diff

ADP5588 Input Keyboard and GPIO Linux Driver

Supported Devices

Evaluation Boards

Description

The driver supports multiple key press detection and resolution.
It independently delivers key press and key release events in
chronological order to the Linux input device system.

This allows SHIFT + ANYKEY, ALT + F1 or CTRL + ALT + DEL sequences.

Since the ADP5588 buffers events in its internal FIFO,
it’s unlikely that events are lost due to heavy system
load and interrupt latencies.

Configuration

Software configurable features

  • Configurable keypad size matrix (rows, columns).
  • Support for switch events.
  • Enabling and disabling automatic key repeat feature.
  • Lock/Unlock key feature.
  • Unused row and column pins are exported general-purpose inputs/outputs to GPIOLIB

Source Code

Status

Source Mainlined?
git Yes

Files

Example platform device initialization

For compile time configuration, it’s common Linux practice to keep board- and application-specific configuration out of the main driver file, instead putting it into the board support file.

For devices on custom boards, as typical of embedded and SoC-(system-on-chip) based hardware, Linux uses platform_data to point to board-specific structures describing devices and how they are connected to the SoC. This can include available ports, chip variants, preferred modes, default initialization, additional pin roles, and so on. This shrinks the board-support packages (BSPs) and minimizes board and application specific #ifdefs in drivers.

21 Oct 2010 16:10

EOF c linux-kernel>

Declaring I2C devices

Unlike PCI or USB devices, I2C devices are not enumerated at the hardware level. Instead, the software must know which devices are connected on each I2C bus segment, and what address these devices are using. For this reason, the kernel code must instantiate I2C devices explicitly. There are different ways to achieve this, depending on the context and requirements. However the most common method is to declare the I2C devices by bus number.

This method is appropriate when the I2C bus is a system bus, as in many embedded systems, wherein each I2C bus has a number which is known in advance. It is thus possible to pre-declare the I2C devices that inhabit this bus. This is done with an array of struct i2c_board_info, which is registered by calling i2c_register_board_info().

So, to enable such a driver one need only edit the board support file by adding an appropriate entry to i2c_board_info.

For more information see: Documentation/i2c/instantiating-devices

21 Oct 2010 16:10
static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
#if defined(CONFIG_KEYBOARD_ADP5585) || defined(CONFIG_KEYBOARD_ADP5585_MODULE)
	{
		I2C_BOARD_INFO("adp5585-keys", 0x34),
		.irq = IRQ_PG0,
		.platform_data = (void *)&adp5585_kpad_data,
	},
#endif
}

Adding Linux driver support

Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)

The ADP5588 Driver depends on CONFIG_I2C

  --- Input Device Support
  <*> Generic input layer (needed for keyboard, mouse, ...)
  < >   Support for memoryless force-feedback devices
  ---   Userland interfaces
  < >   Mouse interface
  < >   Joystick interface
  < >   Touchscreen interface
     Event interface
  < >   Event debugging
  ---   Input Device Drivers
  [*]   Keyboards  —>

	  --- Keyboards
	  < >   AT keyboard
	  < >   Sun Type 4 and Type 5 keyboard
	  < >   DECstation/VAXstation LK201/LK401 keyboard
	  < >   XT keyboard
	  < >   Newton keyboard
	  < >   Stowaway keyboard
	  < >   GPIO Buttons
	  < >   OpenCores Keyboard Controller
	  <M>   ADP5588 I2C QWERTY Keypad and IO Expander

  [ ]   Mouse  --->
  [ ]   Joysticks  --->
  [ ]   Touchscreens  --->
  [ ]   Miscellaneous devices  --->
      Hardware I/O ports  --->

Make sure the I2C SCL Clock is in the range of 60-400 kHz!

Hardware configuration

There is no dedicated Blackfin STAMP evaluation board for the ADP5588. During test and driver development we used the ADP5588 Demo Mother/Daughter Board.

It can be easily wired to the Blackfin STAMP TWI/I2C header.

BF537-STAMP (P10) TWI/I2C header ADP5588 Daughter Board
PIN Function PIN/Function
2 (+3.3V) VCC
5 SCL SCL
6 SDA SDA
10 PORTG0 INTB
20 GND GND

On the ADP5588 Demo Mother Board replace R30 (10kOhm PULL-UP resistor on /INTB strobe) with a 1-3kOhm resistor. The 10kOhm resistor is too weak - Blackfin might see an additional falling edge interrupt on the rising edge of /INTB.

Driver testing

When the driver is loaded, you should see positive output that it found the ADP5588 device.

root:/> modprobe adp5588_keys
input: adp5588-keys as /class/input/input0
adp5588-keys 0-0034: Rev.2 keypad, irq 66
root:/> modprobe evdev
root:/> event_test /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x18 vendor 0x1 product 0x1 version 0x2
Input device name: "adp5588-keys"
Supported events:
  Event type 0 (Reset)
    Event code 0 (Reset)
    Event code 1 (Key)
  Event type 1 (Key)
    Event code 1 (Esc)
    Event code 2 (1)
    Event code 3 (2)
    Event code 4 (3)
    Event code 5 (4)
    Event code 6 (5)
    Event code 7 (6)
    Event code 8 (7)
    Event code 9 (8)
    Event code 10 (9)
    Event code 11 (0)
    Event code 12 (Minus)
    Event code 13 (Equal)
    Event code 14 (Backspace)
    Event code 15 (Tab)
    Event code 16 (Q)
    Event code 17 (W)
    Event code 18 (E)
    Event code 19 (R)
    Event code 20 (T)
    Event code 21 (Y)
    Event code 22 (U)
    Event code 23 (I)
    Event code 24 (O)
    Event code 25 (P)
    Event code 26 (LeftBrace)
    Event code 27 (RightBrace)
    Event code 28 (Enter)
    Event code 30 (A)
    Event code 31 (S)
    Event code 32 (D)
    Event code 33 (F)
    Event code 34 (G)
    Event code 35 (H)
    Event code 36 (J)
    Event code 37 (K)
    Event code 38 (L)
    Event code 39 (Semicolon)
    Event code 40 (Apostrophe)
    Event code 41 (Grave)
    Event code 43 (BackSlash)
    Event code 44 (Z)
    Event code 45 (X)
    Event code 46 (C)
    Event code 47 (V)
    Event code 48 (B)
    Event code 49 (N)
    Event code 50 (M)
    Event code 51 (Comma)
    Event code 52 (Dot)
    Event code 53 (Slash)
    Event code 57 (Space)
    Event code 71 (KP7)
    Event code 72 (KP8)
    Event code 73 (KP9)
    Event code 74 (KPMinus)
    Event code 75 (KP4)
    Event code 76 (KP5)
    Event code 77 (KP6)
    Event code 79 (KP1)
    Event code 80 (KP2)
    Event code 81 (KP3)
    Event code 82 (KP0)
    Event code 83 (KPDot)
    Event code 86 (102nd)
    Event code 96 (KPEnter)
    Event code 103 (Up)
    Event code 105 (Left)
    Event code 106 (Right)
    Event code 108 (Down)
    Event code 111 (Delete)
Testing ... (interrupt to exit)
Event: time 219561.256000, type 1 (Key), code 41 (Grave), value 1
Event: time 219561.256000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219561.464000, type 1 (Key), code 41 (Grave), value 0
Event: time 219561.464000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219561.968000, type 1 (Key), code 2 (1), value 1
Event: time 219561.968000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219562.176000, type 1 (Key), code 2 (1), value 0
Event: time 219562.176000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219562.608000, type 1 (Key), code 3 (2), value 1
Event: time 219562.608000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219562.868000, type 1 (Key), code 3 (2), value 0
Event: time 219562.868000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219563.628000, type 1 (Key), code 4 (3), value 1
Event: time 219563.628000, type 0 (Reset), code 0 (Reset), value 0
Event: time 219563.888000, type 1 (Key), code 4 (3), value 0
Event: time 219563.888000, type 0 (Reset), code 0 (Reset), value 0

More Information

下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1電子電路原理第七版PDF電子教材免費下載
  2. 0.00 MB  |  1491次下載  |  免費
  3. 2單片機典型實例介紹
  4. 18.19 MB  |  95次下載  |  1 積分
  5. 3S7-200PLC編程實例詳細資料
  6. 1.17 MB  |  27次下載  |  1 積分
  7. 4筆記本電腦主板的元件識別和講解說明
  8. 4.28 MB  |  18次下載  |  4 積分
  9. 5開關電源原理及各功能電路詳解
  10. 0.38 MB  |  11次下載  |  免費
  11. 6100W短波放大電路圖
  12. 0.05 MB  |  4次下載  |  3 積分
  13. 7基于單片機和 SG3525的程控開關電源設計
  14. 0.23 MB  |  4次下載  |  免費
  15. 8基于AT89C2051/4051單片機編程器的實驗
  16. 0.11 MB  |  4次下載  |  免費

本月

  1. 1OrCAD10.5下載OrCAD10.5中文版軟件
  2. 0.00 MB  |  234313次下載  |  免費
  3. 2PADS 9.0 2009最新版 -下載
  4. 0.00 MB  |  66304次下載  |  免費
  5. 3protel99下載protel99軟件下載(中文版)
  6. 0.00 MB  |  51209次下載  |  免費
  7. 4LabView 8.0 專業版下載 (3CD完整版)
  8. 0.00 MB  |  51043次下載  |  免費
  9. 5555集成電路應用800例(新編版)
  10. 0.00 MB  |  33562次下載  |  免費
  11. 6接口電路圖大全
  12. 未知  |  30320次下載  |  免費
  13. 7Multisim 10下載Multisim 10 中文版
  14. 0.00 MB  |  28588次下載  |  免費
  15. 8開關電源設計實例指南
  16. 未知  |  21539次下載  |  免費

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935053次下載  |  免費
  3. 2protel99se軟件下載(可英文版轉中文版)
  4. 78.1 MB  |  537793次下載  |  免費
  5. 3MATLAB 7.1 下載 (含軟件介紹)
  6. 未知  |  420026次下載  |  免費
  7. 4OrCAD10.5下載OrCAD10.5中文版軟件
  8. 0.00 MB  |  234313次下載  |  免費
  9. 5Altium DXP2002下載入口
  10. 未知  |  233046次下載  |  免費
  11. 6電路仿真軟件multisim 10.0免費下載
  12. 340992  |  191183次下載  |  免費
  13. 7十天學會AVR單片機與C語言視頻教程 下載
  14. 158M  |  183277次下載  |  免費
  15. 8proe5.0野火版下載(中文版免費下載)
  16. 未知  |  138039次下載  |  免費
主站蜘蛛池模板: 岳扒开让我添| adc网址在线观看| CHINA篮球体育飞机2023| 国产97精品久久久天天A片| 久久精品电影| 色久久久综合88一本道| 中文国产成人精品久久免费| 高h肉肉乳共妻| 久久热r在线视频精品| 涩涩999| 伊人久99久女女视频精品免| 大陆老太交xxxxxhd在线| 久久精品亚洲AV无码三区观看 | 607080老太太AW| 国产 亚洲 另类 欧美 在线 | 免费在线a| 亚洲AV综合99一二三四区| 99日精品欧美国产| 国内精品久久人妻无码HD浪潮| 欧美色偷偷亚洲天堂bt| 亚洲乱码AV久久久久久久| 成人在线观看免费视频| 久久这里都是精品| 无码99久热只有精品视频在线| 97国产精品久久精品国产| 狠很橹快播| 色悠久久综合| 99re8久久热在线视频| 好姑娘社区在线视频| JLZZJLZZJLZ老师好多的水| 国产一区二区三区国产精品| 亚洲精品久久午夜麻豆| 亚洲国产精品日本无码网站| 亚洲中文字幕日本在线观看 | 国产人妻777人伦精品HD| 男人一进一出桶女人视频| 亚洲免费视频网站| 国产高清精品国语特黄A片 | 日本韩国欧美一区| 最近免费中文MV在线字幕| 国内精品日本久久久久影院|