GadgetSeed  0.9.6
sound.c ファイル

サウンドドライバ [詳解]

#include "sysconfig.h"
#include "device.h"
#include "device/buzzer_ioctl.h"
#include "timer.h"
#include "tkprintf.h"
#include "dkprintf.h"
sound.c の依存先関係図:

[ソースコード]

マクロ定義

#define TIMER_INTERVAL_TIME   GSC_KERNEL_TIMER_INTERVAL_MSEC
 

関数

static void sound_timer (void *sp, unsigned long long time)
 
static int sound_register (struct st_device *dev, char *param)
 
static int sound_unregister (struct st_device *dev)
 
static int sound_open (struct st_device *dev)
 
static int sound_close (struct st_device *dev)
 
static int sound_ioctl (struct st_device *dev, unsigned int com, unsigned int arg, void *param)
 

変数

static struct st_devicebuzzer_dev
 
static int sound_cnt
 
const struct st_device sound_device
 

詳解

サウンドドライバ

日付
2007.07.15
著者
Takashi SHUDO

下位ドライバに圧電ブザーデバイスドライバが必要

使用方法

ioctl(周波数(Hz), 再生時間(x1ms))

sound.c に定義があります。

変数詳解

◆ sound_device

const struct st_device sound_device
初期値:
= {
.name = "sound",
.explan = "Buzzer sound control",
.register_dev = sound_register,
.unregister_dev = sound_unregister,
.open = sound_open,
.close = sound_close,
.ioctl = sound_ioctl,
}

sound.c100 行目に定義があります。