16 #include "sysconfig.h" 26 #define TIMER_INTERVAL_TIME GSC_KERNEL_TIMER_INTERVAL_MSEC 31 static void sound_timer(
void *sp,
unsigned long long time)
35 sound_cnt -= TIMER_INTERVAL_TIME;
43 static int sound_register(
struct st_device *dev,
char *param)
50 SYSERR_PRINT(
"Cannot open device %s.\n", param);
55 SYSERR_PRINT(
"Cannot register buzzer timer func.\n");
64 static int sound_unregister(
struct st_device *dev)
71 static int sound_open(
struct st_device *dev)
76 static int sound_close(
struct st_device *dev)
81 static int sound_ioctl(
struct st_device *dev,
unsigned int com,
unsigned int arg,
void *param)
90 DKPRINTF(0x01,
"SND LEN : %d\n", (
int)arg);
102 .explan =
"Buzzer sound control",
103 .register_dev = sound_register,
104 .unregister_dev = sound_unregister,
106 .close = sound_close,
107 .ioctl = sound_ioctl,
struct st_device * open_device(char *name)
デバイスをオープンする
int register_timer_func(timer_func func, unsigned long interval)
周期処理を追加する
#define IOCMD_BUZZER_OFF
ブザー音声出力停止
int unregister_timer_func(timer_func func)
周期処理を削除する
#define IOCMD_BUZZER_ON
ブザー音声出力開始
unsigned long long get_kernel_time(void)
カーネル時間を取得する
int ioctl_device(struct st_device *dev, unsigned int com, unsigned int arg, void *param)
デバイスを制御する
char name[MAX_DEVNAMELRN]
デバイス名文字列