Click to download :IO Port Programming
Table of Contents
Linux I/O port programming mini?HOWTO
Introduction Using I/O ports in C programs
Interrupts (IRQs) and DMA access
High?resolution timing
Other programming languages
Some useful ports
Hints
Troubleshooting
Example code
Credits
Introduction
Using I/O ports in C programs
The normal method
Permissions
Accessing the ports
An alternate method: /dev/port
Interrupts (IRQs) and DMA access
High?resolution timing
Delays
Sleeping: sleep() and usleep()
nanosleep()
Delaying with port I/O
Delaying with assembler instructions
rdtsc for Pentiums
Measuring time
Other programming languages
Some useful ports
The parallel port
The game (joystick) port
The serial port
Hints
Troubleshooting
Example code
Credits
Showing posts with label I/O Programming. Show all posts
Showing posts with label I/O Programming. Show all posts
Monday, February 9, 2009
Accessing Hardware From Applications
0
comments
12:00 AM
Posted by
TechnALLogy
Labels: Device Drivers, Hardware Accessing, I/O Programming
Labels: Device Drivers, Hardware Accessing, I/O Programming
Click here to download:Accessing Hardware From Applications
Contents
Introduction Introduction to Accessing Hardware From Applications
Who Should Read This Document?
Organization of This Document
See Also
Chapter Hardware-Access Options
Other APIs That Provide Access to Hardware
Where to Go From Here
Chapter Device Access and the I/O Kit
I/O Kit Summary
I/O Kit Definitions
I/O Kit Driver-Stack Building
Device Interfaces and Device Files
Inside the Device-Interface Mechanism
Inside the Device-File Mechanism
Communicating With the I/O Kit
Chapter Finding and Accessing Devices
Finding Devices in the I/O Registry
Device Matching
Getting the I/O Kit Master Port
Getting Keys and Values for a Device-Matching Dictionary
Setting Up a Matching Dictionary to Find Devices
Setting Up a Matching Dictionary to Find Device Files
Looking Up Devices in the I/O Registry
Getting Notifications of Device Arrival and Departure
Examining Matching Objects
Putting It All Together: Accessing a Device
Getting a Device Interface
Getting a Device-File Path
Chapter The IOKitLib API
Object Reference-Counting and Introspection
Reference Counting
Introspection
Device Discovery and Notification
Creating Matching Dictionaries
Looking Up Devices
Setting Up and Receiving Notifications
Iterating Over Matching Devices
I/O Registry Access
Traversing the I/O Registry
Getting Information About I/O Registry Objects
Viewing Properties of I/O Registry Objects
Setting Properties of I/O Registry Objects
Determining Busy States
Device-Interface Development
Creating a User Space–Kernel Connection
Managing the User Space–Kernel Connection
Chapter Handling Errors
Interpreting I/O Kit Error Return Values
Handling Exclusive-Access Errors
Appendix A I/O Kit Family Device-Access Support
Contents
Introduction Introduction to Accessing Hardware From Applications
Who Should Read This Document?
Organization of This Document
See Also
Chapter Hardware-Access Options
Other APIs That Provide Access to Hardware
Where to Go From Here
Chapter Device Access and the I/O Kit
I/O Kit Summary
I/O Kit Definitions
I/O Kit Driver-Stack Building
Device Interfaces and Device Files
Inside the Device-Interface Mechanism
Inside the Device-File Mechanism
Communicating With the I/O Kit
Chapter Finding and Accessing Devices
Finding Devices in the I/O Registry
Device Matching
Getting the I/O Kit Master Port
Getting Keys and Values for a Device-Matching Dictionary
Setting Up a Matching Dictionary to Find Devices
Setting Up a Matching Dictionary to Find Device Files
Looking Up Devices in the I/O Registry
Getting Notifications of Device Arrival and Departure
Examining Matching Objects
Putting It All Together: Accessing a Device
Getting a Device Interface
Getting a Device-File Path
Chapter The IOKitLib API
Object Reference-Counting and Introspection
Reference Counting
Introspection
Device Discovery and Notification
Creating Matching Dictionaries
Looking Up Devices
Setting Up and Receiving Notifications
Iterating Over Matching Devices
I/O Registry Access
Traversing the I/O Registry
Getting Information About I/O Registry Objects
Viewing Properties of I/O Registry Objects
Setting Properties of I/O Registry Objects
Determining Busy States
Device-Interface Development
Creating a User Space–Kernel Connection
Managing the User Space–Kernel Connection
Chapter Handling Errors
Interpreting I/O Kit Error Return Values
Handling Exclusive-Access Errors
Appendix A I/O Kit Family Device-Access Support
Subscribe to:
Posts (Atom)