Difference between revisions of "Gasync"
| Line 50: | Line 50: | ||
Notes: | Notes: | ||
* The libSDL events are processed synchronously. | * The libSDL events are processed synchronously. | ||
| + | |||
| + | =Porting to Darwin / MAC OS X= | ||
| + | {| class="wikitable" style="text-align: center;" | ||
| + | |- | ||
| + | |gpoll | ||
| + | |ginput | ||
| + | |gserial | ||
| + | |gtimer | ||
| + | |gusb | ||
| + | |ghid | ||
| + | |- | ||
| + | |[http://man7.org/linux/man-pages/man2/poll.2.html poll] | ||
| + | |[https://www.libsdl.org/ libSDL] | ||
| + | |[http://man7.org/linux/man-pages/man3/termios.3.html termios] | ||
| + | |TODO | ||
| + | |colspan="2"|[http://libusb.info/ libusb] | ||
| + | |- | ||
| + | |} | ||
| + | Notes: | ||
| + | * gtimer has to provide a file handle that can be provided to gpoll. | ||
Revision as of 07:17, 11 May 2016
The gasync (GIMX asynchronous) library is the evolution of the GE (GIMX events) library.
In addition to input devices, gasync also handles the following components:
- serial ports (DIY USB adapter)
- high-resolution timers (delayed or periodic tasks)
- USB devices (authentication sources)
- HID devices (Logitech Wheels, GPP/Cronus/Titan One)
It also provides a default waiting interface based on poll on GNU/Linux and MsgWaitForMultipleObject on Windows.
GNU/Linux implementation
| gpoll | ginput | gserial | gtimer | gusb | ghid | ||
| poll | evdev | jsdev | X.Org Xi2 | termios | timerfd | libusb | |
Notes:
- ghid is not based on hidraw because write() does not support non-blocking mode.
- Being based on libusb, ghid claims the HID interface and detaches the kernel driver. guhid is a uhid wrapper to allow connecting the device back with the kernel.
Windows implementation
| gpoll | ginput | gserial | gtimer | gusb | ghid | |
| MsgWaitForMultipleObject | Raw Input | libSDL | COM ports | Waitable Timers | libusb | HID API |
Notes:
- The libSDL events are processed synchronously.
Porting to Darwin / MAC OS X
| gpoll | ginput | gserial | gtimer | gusb | ghid |
| poll | libSDL | termios | TODO | libusb | |
Notes:
- gtimer has to provide a file handle that can be provided to gpoll.