SlideShare ist ein Scribd-Unternehmen logo
1 von 4
1. AndroidOS 에서 Event Handler Device Driver 와의 련결(HAL)
- WindowManagerService:
/frameworks/base/services/java/com/android/server/WindowManagerService.java
- mThread: InputDeviceRead :
/frameworks/base/services/java/com/android/server/KeyInputQueue.java
JNI 를통하여
staticJNINativeMethodgInputMethods[] ={
{ "readEvent", "(Landroid/view/RawInputEvent;)Z",
(void*) android_server_KeyInputQueue_readEvent},
………………… };
EventHub: /frameworks/base/libs/ui/Eventhub.cpp
bool EventHub::getEvent(int32_t*outDeviceId,int32_t*outType,
int32_t* outScancode,int32_t* outKeycode,uint32_t*outFlags,
int32_t* outValue,nsecs_t*outWhen)
{
…………………
mError = openPlatformInput()?NO_ERROR: UNKNOWN_ERROR; //장치파일열기
………………………..
while(1)
{
…………………………………
res= read(mFDs[i].fd,&iev,sizeof(iev)); 장치파일읽기
………………………………….
}
}
2. Input Device Driver 에 대한 료해(Ordroid –S Kernel)
1) driversinputinput.c: Input Driver
includelinuxinput.h 에structinput_dev 로표현된다.
input_init 함수에서문자장치드라이버”input”에 file_operationsinput_fops 를등록한다.
intinput_open_device(structinput_handle *handle)
input_handler 로부터호출되는함수로써주어진입력장치로부터event 을
받기시작하려고할때리용한다.
voidinput_close_device(structinput_handle *handle)
intinput_register_device(structinput_dev*dev)
Inputdevice(실제디바이스)를등록하고 input_dev_list 에추가하며 input_handler 와
련결한다.
voidinput_unregister_device(structinput_dev*dev)
intinput_register_handler(structinput_handler*handler)
input_handler 를등록하고 input_table[minor]와 input_handler_list 에추가하고input
device 와련결한다.
voidinput_unregister_handler(structinput_handler*handler)
intinput_register_handle(structinput_handle*handle)
input_handle 은device 와handler 를묶어놓은것이다.
voidinput_unregister_handle(structinput_handle *handle)
staticint input_open_file(structinode*inode,structfile *file)
input_table 로부터handler 를얻어hanlder->fops->open 을호출한다.
2) driversinputevdev.c: eventdevice driver(evdev,evdev_handler)
evdev_init(void)함수에서 input_register_handler 함수를호출하여
evdev_open_device 함수에서 input_open_device 함수를호출하여실지장치를구동한다.
3) driverscharkeyboard.c : keyboard device driver(kbd,kbd_handler)
4) driversinputkeyboardodroids_keypad.c: keypad inputdevice driver
hkc1xx_keypad_init 함수에서platform_device_register, platform_driver_unregister 를
호출한다.
probe 함수(hkc1xx_keypad_probe)에서 input_register_device 를호출한다.
5) driversinputtouchscreenodroids_touch.c: touchscreeninputdevice driver
6) driversinputmiscbma150.c, yas529.c, orientation.c: sensorinput device driver

Weitere ähnliche Inhalte

Andere mochten auch (19)

Aliran sajak
Aliran sajakAliran sajak
Aliran sajak
 
Powerpoint.alg.
Powerpoint.alg.Powerpoint.alg.
Powerpoint.alg.
 
L nielsen speaking notes rus
L nielsen speaking notes rusL nielsen speaking notes rus
L nielsen speaking notes rus
 
Ratonperez
RatonperezRatonperez
Ratonperez
 
Jeremiah power point proportions
Jeremiah power point proportionsJeremiah power point proportions
Jeremiah power point proportions
 
ฉันเหมือนใคร
ฉันเหมือนใครฉันเหมือนใคร
ฉันเหมือนใคร
 
Colegio
ColegioColegio
Colegio
 
Taller conceptos fundamentales de la web 2.0
Taller conceptos fundamentales de la web 2.0Taller conceptos fundamentales de la web 2.0
Taller conceptos fundamentales de la web 2.0
 
Sara lizeth galvis loaiza 903
Sara lizeth galvis loaiza 903Sara lizeth galvis loaiza 903
Sara lizeth galvis loaiza 903
 
The Hunger Project
The Hunger ProjectThe Hunger Project
The Hunger Project
 
Futuro digital[1][1]
Futuro digital[1][1]Futuro digital[1][1]
Futuro digital[1][1]
 
Mi futuro profesional
Mi futuro profesionalMi futuro profesional
Mi futuro profesional
 
Sam gilbert
Sam gilbertSam gilbert
Sam gilbert
 
My journey as a trainer
My journey as a trainerMy journey as a trainer
My journey as a trainer
 
Ipod nano
Ipod nanoIpod nano
Ipod nano
 
A llboutmebull
A llboutmebullA llboutmebull
A llboutmebull
 
Netiketti
NetikettiNetiketti
Netiketti
 
ฉันเหมือนใคร
ฉันเหมือนใครฉันเหมือนใคร
ฉันเหมือนใคร
 
Health & safety
Health & safetyHealth & safety
Health & safety
 

Ähnlich wie Linux Input device에 대한 료해(Odroid-S Kernel)

Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
Mahmoud Hamed Mahmoud
 
#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run
Frederik De Bruyne
 
Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development
Phuoc Nguyen
 
WebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsWebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.js
Robert Nyman
 
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArtArchitecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Alina Vilk
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
Utkarsh Mankad
 

Ähnlich wie Linux Input device에 대한 료해(Odroid-S Kernel) (20)

15 sensors and proximity nfc and bluetooth
15   sensors and proximity nfc and bluetooth15   sensors and proximity nfc and bluetooth
15 sensors and proximity nfc and bluetooth
 
Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development Windows Store app using XAML and C#: Enterprise Product Development
Windows Store app using XAML and C#: Enterprise Product Development
 
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
 
Gdg san diego android 11 meetups what's new in android - ui and dev tools
Gdg san diego android 11 meetups  what's new in android  - ui and dev toolsGdg san diego android 11 meetups  what's new in android  - ui and dev tools
Gdg san diego android 11 meetups what's new in android - ui and dev tools
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
JavaScript patterns chapter 8 of mine
JavaScript patterns chapter 8 of mineJavaScript patterns chapter 8 of mine
JavaScript patterns chapter 8 of mine
 
package org dev
package org devpackage org dev
package org dev
 
Package org dev
Package org devPackage org dev
Package org dev
 
Flutter Forward EXTENDED - Flutter로 앱 개발 입문하기
Flutter Forward EXTENDED -  Flutter로 앱 개발 입문하기Flutter Forward EXTENDED -  Flutter로 앱 개발 입문하기
Flutter Forward EXTENDED - Flutter로 앱 개발 입문하기
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run
 
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
"It's Time" - Android Wear codelab - GDG MeetsU - L'Aquila
 
Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development Android Nâng cao-Bài 9-Debug in Android Application Development
Android Nâng cao-Bài 9-Debug in Android Application Development
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介
 
WebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.jsWebAPIs & WebRTC - Spotify/sthlm.js
WebAPIs & WebRTC - Spotify/sthlm.js
 
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArtArchitecture components, Константин Марс, TeamLead, Senior Developer, DataArt
Architecture components, Константин Марс, TeamLead, Senior Developer, DataArt
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Intercept HTTPS Traffic on Windows 10
Intercept HTTPS Traffic on Windows 10Intercept HTTPS Traffic on Windows 10
Intercept HTTPS Traffic on Windows 10
 
Android dev
Android devAndroid dev
Android dev
 
Introducing Middy, Node.js middleware engine for AWS Lambda (FrontConf Munich...
Introducing Middy, Node.js middleware engine for AWS Lambda (FrontConf Munich...Introducing Middy, Node.js middleware engine for AWS Lambda (FrontConf Munich...
Introducing Middy, Node.js middleware engine for AWS Lambda (FrontConf Munich...
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Linux Input device에 대한 료해(Odroid-S Kernel)

  • 1. 1. AndroidOS 에서 Event Handler Device Driver 와의 련결(HAL) - WindowManagerService: /frameworks/base/services/java/com/android/server/WindowManagerService.java - mThread: InputDeviceRead : /frameworks/base/services/java/com/android/server/KeyInputQueue.java JNI 를통하여 staticJNINativeMethodgInputMethods[] ={ { "readEvent", "(Landroid/view/RawInputEvent;)Z", (void*) android_server_KeyInputQueue_readEvent},
  • 2. ………………… }; EventHub: /frameworks/base/libs/ui/Eventhub.cpp bool EventHub::getEvent(int32_t*outDeviceId,int32_t*outType, int32_t* outScancode,int32_t* outKeycode,uint32_t*outFlags, int32_t* outValue,nsecs_t*outWhen) { ………………… mError = openPlatformInput()?NO_ERROR: UNKNOWN_ERROR; //장치파일열기 ……………………….. while(1) { ………………………………… res= read(mFDs[i].fd,&iev,sizeof(iev)); 장치파일읽기 …………………………………. } } 2. Input Device Driver 에 대한 료해(Ordroid –S Kernel)
  • 3. 1) driversinputinput.c: Input Driver includelinuxinput.h 에structinput_dev 로표현된다. input_init 함수에서문자장치드라이버”input”에 file_operationsinput_fops 를등록한다. intinput_open_device(structinput_handle *handle) input_handler 로부터호출되는함수로써주어진입력장치로부터event 을 받기시작하려고할때리용한다. voidinput_close_device(structinput_handle *handle) intinput_register_device(structinput_dev*dev) Inputdevice(실제디바이스)를등록하고 input_dev_list 에추가하며 input_handler 와 련결한다. voidinput_unregister_device(structinput_dev*dev) intinput_register_handler(structinput_handler*handler)
  • 4. input_handler 를등록하고 input_table[minor]와 input_handler_list 에추가하고input device 와련결한다. voidinput_unregister_handler(structinput_handler*handler) intinput_register_handle(structinput_handle*handle) input_handle 은device 와handler 를묶어놓은것이다. voidinput_unregister_handle(structinput_handle *handle) staticint input_open_file(structinode*inode,structfile *file) input_table 로부터handler 를얻어hanlder->fops->open 을호출한다. 2) driversinputevdev.c: eventdevice driver(evdev,evdev_handler) evdev_init(void)함수에서 input_register_handler 함수를호출하여 evdev_open_device 함수에서 input_open_device 함수를호출하여실지장치를구동한다. 3) driverscharkeyboard.c : keyboard device driver(kbd,kbd_handler) 4) driversinputkeyboardodroids_keypad.c: keypad inputdevice driver hkc1xx_keypad_init 함수에서platform_device_register, platform_driver_unregister 를 호출한다. probe 함수(hkc1xx_keypad_probe)에서 input_register_device 를호출한다. 5) driversinputtouchscreenodroids_touch.c: touchscreeninputdevice driver 6) driversinputmiscbma150.c, yas529.c, orientation.c: sensorinput device driver