hpet_example†

HPET (High Precision Event Timer) ドライバ /drivers/char/hpet.c の動作を理解するために、実際に動かすアプリケーション・プログラム filehpet_example.tar.gz を使います。このプログラムは /Documentation/timers/hpet_example.c を修正して作成してあります。/Documentation/timers/hpet.txt で hpet_example.c について概要が書かれています。情報量は多く有りません。ioctl() API の仕様詳細は書かれていません。

ioctl API†

HPET driver's API†

To use HPET device from user context (Linux Application). Include header files as follows.

#define _GNU_SOURCE
#include <features.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/hpet.h>

If you prefer to use poll() include optional header files as follows.

#include <poll.h>

If you prefer to use select() include optional header files as follows.

#include <sys/time.h>
#include <sys/select.h>

If you prefer to handle error include optional header files as follows.

#include <string.h>
#include <errno.h>

Interrupt On - HPET_IE_ON†

Interrupt Off - HPET_IE_OFF†

Get Information - HPET_INFO†

Enable hardware periodic interrupt - HPET_EPI†

Disable hardware periodic interrupt - HPET_DPI†

Set Interrupt Frequency in Hz - HPET_IRQFREQ†

File System API related to HPET†

To see more details refer to man 2 fcntl.

open HPET timer†

close HPET timer†

F_GETOWN†

F_GETOWN_EX†

F_SETOWN†

F_SETOWN_EX†

F_GETFL†

F_SETFL†

F_GETSIG†

F_SETSIG†


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS