Suppose I've a custom made hardware which is connected to the computer. I've my drivers installed to communicate with the hardware.Then how can I write an API through which i can access my hardware programmatically(As an example consider accessing oculus rift head mounted device using OculusSDK).Specifically how do i make my API communicate with device drivers to access the hardware using system call interface? If possible explain with an example.
Asked
Active
Viewed 305 times
1 Answers
1
Your hardware driver should implement a way of interracting with user.
E.g., it can be special file(s), which user can open (using standard open(2)
) and then call read
/write
/mmap
/ioctl
for it. Each such operation actually triggers some driver code, which in case triggers some hardware request.

Tsyvarev
- 60,011
- 17
- 110
- 153