- 论坛徽章:
- 0
|
本帖最后由 testh 于 2013-03-28 18:53 编辑
- 29 struct snd_kcontrol;
- 30 typedef int (snd_kcontrol_info_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_info * uinfo);
- 31 typedef int (snd_kcontrol_get_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol);
- 32 typedef int (snd_kcontrol_put_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol);
- 33 typedef int (snd_kcontrol_tlv_rw_t)(struct snd_kcontrol *kcontrol,
- 34 int op_flag, /* 0=read,1=write,-1=command */
- 35 unsigned int size,
- 36 unsigned int __user *tlv);
- 37
复制代码- 39 struct snd_kcontrol_new {
- 40 snd_ctl_elem_iface_t iface; /* interface identifier */
- 41 unsigned int device; /* device/client number */
- 42 unsigned int subdevice; /* subdevice (substream) number */
- 43 unsigned char *name; /* ASCII name of item */
- 44 unsigned int index; /* index of item */
- 45 unsigned int access; /* access rights */
- 46 unsigned int count; /* count of same elements */
- 47 snd_kcontrol_info_t *info;
- 48 snd_kcontrol_get_t *get;
- 49 snd_kcontrol_put_t *put;
- 50 union {
- 51 snd_kcontrol_tlv_rw_t *c;
- 52 const unsigned int *p;
- 53 } tlv;
- 54 unsigned long private_value;
- 55 };
复制代码 常用的 typedef char s8 这样的简单用法了解,但是对于上面的
33 typedef int (snd_kcontrol_tlv_rw_t)(struct snd_kcontrol *kcontrol,
34 int op_flag, /* 0=read,1=write,-1=command */
35 unsigned int size,
36 unsigned int __user *tlv);
该怎么理解,粗看,typedef 后面有3个参数,分别是 int ,(snd_kcontrol_tlv_rw_t),和(struct snd_kcontrol *kcontrol,int op_flag,unsigned int size, unsigned int __user *tlv);
简写为typedef A B C,基本功不扎实了。。。。 |
|