• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ KOBJMETHOD函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中KOBJMETHOD函数的典型用法代码示例。如果您正苦于以下问题:C++ KOBJMETHOD函数的具体用法?C++ KOBJMETHOD怎么用?C++ KOBJMETHOD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了KOBJMETHOD函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: return

	return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH));
}

static int exynos4210_bus_probe(struct uart_softc *sc);
static int exynos4210_bus_attach(struct uart_softc *sc);
static int exynos4210_bus_flush(struct uart_softc *, int);
static int exynos4210_bus_getsig(struct uart_softc *);
static int exynos4210_bus_ioctl(struct uart_softc *, int, intptr_t);
static int exynos4210_bus_ipend(struct uart_softc *);
static int exynos4210_bus_param(struct uart_softc *, int, int, int, int);
static int exynos4210_bus_receive(struct uart_softc *);
static int exynos4210_bus_setsig(struct uart_softc *, int);
static int exynos4210_bus_transmit(struct uart_softc *);

static kobj_method_t exynos4210_methods[] = {
	KOBJMETHOD(uart_probe,		exynos4210_bus_probe),
	KOBJMETHOD(uart_attach, 	exynos4210_bus_attach),
	KOBJMETHOD(uart_flush,		exynos4210_bus_flush),
	KOBJMETHOD(uart_getsig,		exynos4210_bus_getsig),
	KOBJMETHOD(uart_ioctl,		exynos4210_bus_ioctl),
	KOBJMETHOD(uart_ipend,		exynos4210_bus_ipend),
	KOBJMETHOD(uart_param,		exynos4210_bus_param),
	KOBJMETHOD(uart_receive,	exynos4210_bus_receive),
	KOBJMETHOD(uart_setsig,		exynos4210_bus_setsig),
	KOBJMETHOD(uart_transmit,	exynos4210_bus_transmit),

	{0, 0 }
};

int
exynos4210_bus_probe(struct uart_softc *sc)
开发者ID:2asoft,项目名称:freebsd,代码行数:31,代码来源:exynos_uart.c


示例2: cs4281_wr

    regno &= 0xff;

    cs4281_wr(sc, CS4281PCI_ACCAD, regno);
    cs4281_wr(sc, CS4281PCI_ACCDA, data);
    cs4281_wr(sc, CS4281PCI_ACCTL, CS4281PCI_ACCTL_ESYN |
	      CS4281PCI_ACCTL_VFRM | CS4281PCI_ACCTL_DCV);

    if (cs4281_waitclr(sc, CS4281PCI_ACCTL, CS4281PCI_ACCTL_DCV, 250) == 0) {
	device_printf(sc->dev,"cs4281_wrcd: DCV did not go\n");
    }

    return 0;
}

static kobj_method_t cs4281_ac97_methods[] = {
        KOBJMETHOD(ac97_read,           cs4281_rdcd),
        KOBJMETHOD(ac97_write,          cs4281_wrcd),
	KOBJMETHOD_END
};
AC97_DECLARE(cs4281_ac97);

/* ------------------------------------------------------------------------- */
/* shared rec/play channel interface */

static void *
cs4281chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
{
    struct sc_info *sc = devinfo;
    struct sc_chinfo *ch = (dir == PCMDIR_PLAY) ? &sc->pch : &sc->rch;

    ch->buffer = b;
开发者ID:dcui,项目名称:FreeBSD-9.3_kernel,代码行数:31,代码来源:cs4281.c


示例3: ad1816_lock

    case SOUND_MASK_MIC:
    default:
        dev = 0x50;
        src = SOUND_MASK_MIC;
    }

    dev |= dev << 8;
    ad1816_lock(ad1816);
    ad1816_write(ad1816, 20, (ad1816_read(ad1816, 20) & ~0x7070) | dev);
    ad1816_unlock(ad1816);
    return src;
}

static kobj_method_t ad1816mixer_methods[] = {
    KOBJMETHOD(mixer_init,		ad1816mix_init),
    KOBJMETHOD(mixer_set,		ad1816mix_set),
    KOBJMETHOD(mixer_setrecsrc,	ad1816mix_setrecsrc),
    KOBJMETHOD_END
};
MIXER_DECLARE(ad1816mixer);

/* -------------------------------------------------------------------- */
/* channel interface */
static void *
ad1816chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
{
    struct ad1816_info *ad1816 = devinfo;
    struct ad1816_chinfo *ch = (dir == PCMDIR_PLAY)? &ad1816->pch : &ad1816->rch;

    ch->dir = dir;
开发者ID:DangerDexter,项目名称:FreeBSD-8.0-dyntick,代码行数:30,代码来源:ad1816.c


示例4: while

    src = *inbuf;
    dst = *outbuf;
    while(r--)
        *dst++ = dp->d_table[(u_char)*src++];
    *inbuf += n;
    *outbuf += n;
    *inbytesleft -= n;
    *outbytesleft -= n;
    return 0;
}

static const char *
iconv_xlat_name(struct iconv_converter_class *dcp)
{
    return "xlat";
}

static kobj_method_t iconv_xlat_methods[] = {
    KOBJMETHOD(iconv_converter_open,	iconv_xlat_open),
    KOBJMETHOD(iconv_converter_close,	iconv_xlat_close),
    KOBJMETHOD(iconv_converter_conv,	iconv_xlat_conv),
#if 0
    KOBJMETHOD(iconv_converter_init,	iconv_xlat_init),
    KOBJMETHOD(iconv_converter_done,	iconv_xlat_done),
#endif
    KOBJMETHOD(iconv_converter_name,	iconv_xlat_name),
    {0, 0}
};

KICONV_CONVERTER(xlat, sizeof(struct iconv_xlat));
开发者ID:hmatyschok,项目名称:MeshBSD,代码行数:30,代码来源:iconv_xlat.c


示例5: msm_bus_probe

static int	msm_bus_probe(struct uart_softc *sc);
static int	msm_bus_attach(struct uart_softc *sc);
static int	msm_bus_flush(struct uart_softc *, int);
static int	msm_bus_getsig(struct uart_softc *);
static int	msm_bus_ioctl(struct uart_softc *, int, intptr_t);
static int	msm_bus_ipend(struct uart_softc *);
static int	msm_bus_param(struct uart_softc *, int, int, int, int);
static int	msm_bus_receive(struct uart_softc *);
static int	msm_bus_setsig(struct uart_softc *, int);
static int	msm_bus_transmit(struct uart_softc *);
static void	msm_bus_grab(struct uart_softc *);
static void	msm_bus_ungrab(struct uart_softc *);

static kobj_method_t msm_methods[] = {
	KOBJMETHOD(uart_probe,		msm_bus_probe),
	KOBJMETHOD(uart_attach, 	msm_bus_attach),
	KOBJMETHOD(uart_flush,		msm_bus_flush),
	KOBJMETHOD(uart_getsig,		msm_bus_getsig),
	KOBJMETHOD(uart_ioctl,		msm_bus_ioctl),
	KOBJMETHOD(uart_ipend,		msm_bus_ipend),
	KOBJMETHOD(uart_param,		msm_bus_param),
	KOBJMETHOD(uart_receive,	msm_bus_receive),
	KOBJMETHOD(uart_setsig,		msm_bus_setsig),
	KOBJMETHOD(uart_transmit,	msm_bus_transmit),
	KOBJMETHOD(uart_grab,		msm_bus_grab),
	KOBJMETHOD(uart_ungrab,		msm_bus_ungrab),
	{0, 0 }
};

int
开发者ID:coyizumi,项目名称:cs111,代码行数:30,代码来源:uart_dev_msm.c


示例6: return

			    out[j].device == out[i].device)
				out[i].unit++;
		}
	}

	return (0);
}

/* BHND_EROM_FREE_CORE_TABLE() */
static void
siba_erom_free_core_table(bhnd_erom_t *erom, struct bhnd_core_info *cores)
{
	free(cores, M_BHND);
}

static kobj_method_t siba_erom_methods[] = {
	KOBJMETHOD(bhnd_erom_probe,		siba_erom_probe),
	KOBJMETHOD(bhnd_erom_probe_static,	siba_erom_probe_static),
	KOBJMETHOD(bhnd_erom_init,		siba_erom_init),
	KOBJMETHOD(bhnd_erom_init_static,	siba_erom_init_static),
	KOBJMETHOD(bhnd_erom_fini,		siba_erom_fini),
	KOBJMETHOD(bhnd_erom_get_core_table,	siba_erom_get_core_table),
	KOBJMETHOD(bhnd_erom_free_core_table,	siba_erom_free_core_table),
	KOBJMETHOD(bhnd_erom_lookup_core,	siba_erom_lookup_core),
	KOBJMETHOD(bhnd_erom_lookup_core_addr,	siba_erom_lookup_core_addr),

	KOBJMETHOD_END
};

BHND_EROM_DEFINE_CLASS(siba_erom, siba_erom_parser, siba_erom_methods, sizeof(struct siba_erom));
开发者ID:jaredmcneill,项目名称:freebsd,代码行数:30,代码来源:siba_erom.c


示例7: z8530_bfe_attach

#include <sys/serial.h>

#include <dev/scc/scc_bfe.h>
#include <dev/scc/scc_bus.h>

#include <dev/ic/z8530.h>

#include "scc_if.h"

static int z8530_bfe_attach(struct scc_softc *, int);
static int z8530_bfe_iclear(struct scc_softc *, struct scc_chan *);
static int z8530_bfe_ipend(struct scc_softc *);
static int z8530_bfe_probe(struct scc_softc *);

static kobj_method_t z8530_methods[] = {
	KOBJMETHOD(scc_attach,	z8530_bfe_attach),
	KOBJMETHOD(scc_iclear,	z8530_bfe_iclear),
	KOBJMETHOD(scc_ipend,	z8530_bfe_ipend),
	KOBJMETHOD(scc_probe,	z8530_bfe_probe),
	KOBJMETHOD_END
};

struct scc_class scc_z8530_class = {
	"z8530 class",
	z8530_methods,
	sizeof(struct scc_softc),
	.cl_channels = 2,
	.cl_class = SCC_CLASS_Z8530,
	.cl_modes = SCC_MODE_ASYNC | SCC_MODE_BISYNC | SCC_MODE_HDLC,
	.cl_range = CHAN_B - CHAN_A,
};
开发者ID:coyizumi,项目名称:cs111,代码行数:31,代码来源:scc_dev_z8530.c


示例8: DELAY

	/* wait until codec is ready */
	for (i = 0; i < TIMO && fm801_rd(fm801,FM_CODEC_CMD,2) & FM_CODEC_CMD_BUSY; i++) {
		DELAY(10000);
		DPRINT("fm801 wrcd: 2 - DELAY\n");
	}
	if (i >= TIMO) {
		kprintf("fm801 wrcd: read codec busy\n");
		return -1;
	}
	DPRINT("fm801 wrcd release reg 0x%x val 0x%x\n",regno, data);
	return 0;
}

static kobj_method_t fm801_ac97_methods[] = {
    	KOBJMETHOD(ac97_read,		fm801_rdcd),
    	KOBJMETHOD(ac97_write,		fm801_wrcd),
	DEVMETHOD_END
};
AC97_DECLARE(fm801_ac97);

/* -------------------------------------------------------------------- */

/*
 * The interrupt handler
 */
static void
fm801_intr(void *p)
{
	struct fm801_info 	*fm801 = (struct fm801_info *)p;
	u_int32_t       	intsrc = fm801_rd(fm801, FM_INTSTATUS, 2);
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:30,代码来源:fm801.c


示例9: via_wr

		return -1;

	via_wr(via, VIA_AC97_CONTROL, VIA_AC97_CODEC00_VALID | 
	       VIA_AC97_READ | VIA_AC97_INDEX(reg), 4);

	if (via_waitready_codec(via))
		return -1;

	if (via_waitvalid_codec(via))
		return -1;

	return via_rd(via, VIA_AC97_CONTROL, 2);
}

static kobj_method_t via_ac97_methods[] = {
    	KOBJMETHOD(ac97_read,		via_read_codec),
    	KOBJMETHOD(ac97_write,		via_write_codec),
	KOBJMETHOD_END
};
AC97_DECLARE(via_ac97);

/* -------------------------------------------------------------------- */

static int
via_buildsgdt(struct via_chinfo *ch)
{
	u_int32_t phys_addr, flag;
	int i, seg_size;

	seg_size = sndbuf_getsize(ch->buffer) / SEGS_PER_CHAN;
	phys_addr = sndbuf_getbufaddr(ch->buffer);
开发者ID:victoredwardocallaghan,项目名称:DragonFlyBSD,代码行数:31,代码来源:via8233.c


示例10: mpu401_timeout

};

static void mpu401_timeout(void *m);
static mpu401_intr_t mpu401_intr;

static int mpu401_minit(struct snd_midi *, void *);
static int mpu401_muninit(struct snd_midi *, void *);
static int mpu401_minqsize(struct snd_midi *, void *);
static int mpu401_moutqsize(struct snd_midi *, void *);
static void mpu401_mcallback(struct snd_midi *, void *, int);
static void mpu401_mcallbackp(struct snd_midi *, void *, int);
static const char *mpu401_mdescr(struct snd_midi *, void *, int);
static const char *mpu401_mprovider(struct snd_midi *, void *);

static kobj_method_t mpu401_methods[] = {
	KOBJMETHOD(mpu_init, mpu401_minit),
	KOBJMETHOD(mpu_uninit, mpu401_muninit),
	KOBJMETHOD(mpu_inqsize, mpu401_minqsize),
	KOBJMETHOD(mpu_outqsize, mpu401_moutqsize),
	KOBJMETHOD(mpu_callback, mpu401_mcallback),
	KOBJMETHOD(mpu_callbackp, mpu401_mcallbackp),
	KOBJMETHOD(mpu_descr, mpu401_mdescr),
	KOBJMETHOD(mpu_provider, mpu401_mprovider),
	KOBJMETHOD_END
};

DEFINE_CLASS(mpu401, mpu401_methods, 0);

void
mpu401_timeout(void *a)
{
开发者ID:ele7enxxh,项目名称:dtrace-pf,代码行数:31,代码来源:mpu401.c


示例11: spltty

{
	struct au88x0_info *aui = arg;
	int sl;

	sl = spltty();
	au88x0_codec_wait(aui);
	au88x0_write(aui, AU88X0_CODEC_IO, AU88X0_CDIO_WRITE(reg, data), 4);
	splx(sl);
	return 0;
}

/*
 * Codec interface glue
 */
static kobj_method_t au88x0_ac97_methods[] = {
	KOBJMETHOD(ac97_read, au88x0_codec_read),
	KOBJMETHOD(ac97_write, au88x0_codec_write),
	KOBJMETHOD_END
};
AC97_DECLARE(au88x0_ac97);

#define au88x0_channel(aui, dir) \
	&(aui)->aui_chan[((dir) == PCMDIR_PLAY) ? 0 : 1]


/***************************************************************************\
 *                                                                         *
 *                          CHANNEL INTERFACE                              *
 *                                                                         *
\***************************************************************************/
开发者ID:Gwenio,项目名称:DragonFlyBSD,代码行数:30,代码来源:au88x0.c


示例12: device_printf

	}
	if (t == 20) {
		/* Timed out. Abort writing. */
		device_printf(ess->dev, "agg_wrcodec() PROGLESS timed out.\n");
		return -1;
	}

	bus_space_write_2(ess->st, ess->sh, PORT_CODEC_REG, data);
	bus_space_write_1(ess->st, ess->sh, PORT_CODEC_CMD,
	    CODEC_CMD_WRITE | regno);

	return 0;
}

static kobj_method_t agg_ac97_methods[] = {
    	KOBJMETHOD(ac97_init,		agg_ac97_init),
    	KOBJMETHOD(ac97_read,		agg_rdcodec),
    	KOBJMETHOD(ac97_write,		agg_wrcodec),
	{ 0, 0 }
};
AC97_DECLARE(agg_ac97);

/* -------------------------------------------------------------------- */

static inline void
ringbus_setdest(struct agg_info *ess, int src, int dest)
{
	u_int32_t	data;

	data = bus_space_read_4(ess->st, ess->sh, PORT_RINGBUS_CTRL);
	data &= ~(0xfU << src);
开发者ID:MarginC,项目名称:kame,代码行数:31,代码来源:maestro.c


示例13: quicc_read4

#define	quicc_read4(bas, reg)		\
	bus_space_read_4((bas)->bst, (bas)->bsh, reg)

#define	quicc_write2(bas, reg, val)	\
	bus_space_write_2((bas)->bst, (bas)->bsh, reg, val)
#define	quicc_write4(bas, reg, val)	\
	bus_space_write_4((bas)->bst, (bas)->bsh, reg, val)

static int quicc_bfe_attach(struct scc_softc *, int);
static int quicc_bfe_enabled(struct scc_softc *, struct scc_chan *);
static int quicc_bfe_iclear(struct scc_softc *, struct scc_chan *);
static int quicc_bfe_ipend(struct scc_softc *);
static int quicc_bfe_probe(struct scc_softc *);

static kobj_method_t quicc_methods[] = {
	KOBJMETHOD(scc_attach,	quicc_bfe_attach),
	KOBJMETHOD(scc_enabled,	quicc_bfe_enabled),
	KOBJMETHOD(scc_iclear,	quicc_bfe_iclear),
	KOBJMETHOD(scc_ipend,	quicc_bfe_ipend),
	KOBJMETHOD(scc_probe,	quicc_bfe_probe),
	KOBJMETHOD_END
};

struct scc_class scc_quicc_class = {
	"QUICC class",
	quicc_methods,
	sizeof(struct scc_softc),
	.cl_channels = 4,
	.cl_class = SCC_CLASS_QUICC,
	.cl_modes = SCC_MODE_ASYNC | SCC_MODE_BISYNC | SCC_MODE_HDLC,
	.cl_range = 0,
开发者ID:ele7enxxh,项目名称:dtrace-pf,代码行数:31,代码来源:scc_dev_quicc.c


示例14: ds_wr

	sec = regno & 0x100;
	regno &= 0xff;
	cid = sec? (sc->cd2id << 8) : 0;
	if (sec && cid == 0)
		return ENXIO;

	cmd = YDSXG_AC97WRITECMD | cid | regno;
	cmd <<= 16;
	cmd |= data;
	ds_wr(sc, YDSXGR_AC97CMDDATA, cmd, 4);

	return ds_cdbusy(sc, sec);
}

static kobj_method_t ds_ac97_methods[] = {
    	KOBJMETHOD(ac97_init,		ds_initcd),
    	KOBJMETHOD(ac97_read,		ds_rdcd),
    	KOBJMETHOD(ac97_write,		ds_wrcd),
	KOBJMETHOD_END
};
AC97_DECLARE(ds_ac97);

/* -------------------------------------------------------------------- */

static void
ds_enadsp(struct sc_info *sc, int on)
{
	u_int32_t v, i;

	v = on? 1 : 0;
	if (on) {
开发者ID:Alkzndr,项目名称:freebsd,代码行数:31,代码来源:ds1.c


示例15: while

		j *= align;
		dst += j;
		count -= j;

	} while (count != 0);

	return (dst - b);
}

static struct pcm_feederdesc feeder_volume_desc[] = {
	{ FEEDER_VOLUME, 0, 0, 0, 0 },
	{ 0, 0, 0, 0, 0 }
};

static kobj_method_t feeder_volume_methods[] = {
	KOBJMETHOD(feeder_init,		feed_volume_init),
	KOBJMETHOD(feeder_free,		feed_volume_free),
	KOBJMETHOD(feeder_set,		feed_volume_set),
	KOBJMETHOD(feeder_feed,		feed_volume_feed),
	KOBJMETHOD_END
};

FEEDER_DECLARE(feeder_volume, NULL);

/* Extern */

/*
 * feeder_volume_apply_matrix(): For given matrix map, apply its configuration
 *                               to feeder_volume matrix structure. There are
 *                               possibilites that feeder_volume be inserted
 *                               before or after feeder_matrix, which in this
开发者ID:dcui,项目名称:FreeBSD-9.3_kernel,代码行数:31,代码来源:feeder_volume.c


示例16: ua_chan_getcaps

}

static struct pcmchan_caps *
ua_chan_getcaps(kobj_t obj, void *data)
{
	return (uaudio_chan_getcaps(data));
}

static struct pcmchan_matrix *
ua_chan_getmatrix(kobj_t obj, void *data, uint32_t format)
{
	return (uaudio_chan_getmatrix(data, format));
}

static kobj_method_t ua_chan_methods[] = {
	KOBJMETHOD(channel_init, ua_chan_init),
	KOBJMETHOD(channel_free, ua_chan_free),
	KOBJMETHOD(channel_setformat, ua_chan_setformat),
	KOBJMETHOD(channel_setspeed, ua_chan_setspeed),
	KOBJMETHOD(channel_setblocksize, ua_chan_setblocksize),
	KOBJMETHOD(channel_setfragments, ua_chan_setfragments),
	KOBJMETHOD(channel_trigger, ua_chan_trigger),
	KOBJMETHOD(channel_getptr, ua_chan_getptr),
	KOBJMETHOD(channel_getcaps, ua_chan_getcaps),
	KOBJMETHOD(channel_getmatrix, ua_chan_getmatrix),
	KOBJMETHOD_END
};

CHANNEL_DECLARE(ua_chan);

/************************************************************/
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:31,代码来源:uaudio_pcm.c


示例17: sizeof

	{ 0, 0 }
};

static driver_t snapper_driver = {
	"snapper",
	snapper_methods,
	sizeof(struct snapper_softc)
};
static devclass_t snapper_devclass;

DRIVER_MODULE(snapper, iicbus, snapper_driver, snapper_devclass, 0, 0);
MODULE_VERSION(snapper, 1);
MODULE_DEPEND(snapper, iicbus, 1, 1, 1);

static kobj_method_t snapper_mixer_methods[] = {
	KOBJMETHOD(mixer_init, 		snapper_init),
	KOBJMETHOD(mixer_uninit, 	snapper_uninit),
	KOBJMETHOD(mixer_reinit, 	snapper_reinit),
	KOBJMETHOD(mixer_set, 		snapper_set),
	KOBJMETHOD(mixer_setrecsrc, 	snapper_setrecsrc),
	KOBJMETHOD_END
};

MIXER_DECLARE(snapper_mixer);

#define SNAPPER_IICADDR	0x6a	/* Hard-coded I2C slave addr */

/* Snapper (Texas Instruments TAS3004) registers. */
#define SNAPPER_MCR1	0x01	/* Main control register 1 (1byte) */
#define SNAPPER_DRC	0x02	/* Dynamic range compression (6bytes) */
#define SNAPPER_VOLUME	0x04	/* Volume (6bytes) */
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:31,代码来源:snapper.c


示例18: while

	if (!nm_waitcd(sc)) {
		while (cnt-- > 0) {
			nm_wr(sc, sc->ac97_base + regno, data, 2);
			if (!nm_waitcd(sc)) {
				DELAY(1000);
				return 0;
			}
		}
	}
	device_printf(sc->dev, "ac97 codec not ready\n");
	return -1;
}

static kobj_method_t nm_ac97_methods[] = {
    	KOBJMETHOD(ac97_init,		nm_initcd),
    	KOBJMETHOD(ac97_read,		nm_rdcd),
    	KOBJMETHOD(ac97_write,		nm_wrcd),
	KOBJMETHOD_END
};
AC97_DECLARE(nm_ac97);

/* -------------------------------------------------------------------- */

static void
nm_ackint(struct sc_info *sc, u_int32_t num)
{
	if (sc->type == NM256AV_PCI_ID) {
		nm_wr(sc, NM_INT_REG, num << 1, 2);
	} else if (sc->type == NM256ZX_PCI_ID) {
		nm_wr(sc, NM_INT_REG, num, 4);
开发者ID:JabirTech,项目名称:Source,代码行数:30,代码来源:neomagic.c


示例19: sizeof

    { 0, 0 }
};

static driver_t tumbler_driver = {
    "tumbler",
    tumbler_methods,
    sizeof(struct tumbler_softc)
};
static devclass_t tumbler_devclass;

DRIVER_MODULE(tumbler, iicbus, tumbler_driver, tumbler_devclass, 0, 0);
MODULE_VERSION(tumbler, 1);
MODULE_DEPEND(tumbler, iicbus, 1, 1, 1);

static kobj_method_t tumbler_mixer_methods[] = {
    KOBJMETHOD(mixer_init, 		tumbler_init),
    KOBJMETHOD(mixer_uninit, 	tumbler_uninit),
    KOBJMETHOD(mixer_reinit, 	tumbler_reinit),
    KOBJMETHOD(mixer_set, 		tumbler_set),
    KOBJMETHOD(mixer_setrecsrc, 	tumbler_setrecsrc),
    KOBJMETHOD_END
};

MIXER_DECLARE(tumbler_mixer);

#define TUMBLER_IICADDR		0x68	/* Tumbler I2C slave address */

/* Tumbler (Texas Instruments TAS3001) registers. */
#define TUMBLER_MCR		0x01	/* Main control register (1byte) */
#define TUMBLER_DRC         	0x02    /* Dynamic Range Compression (2bytes) */
#define TUMBLER_VOLUME		0x04	/* Volume (6bytes) */
开发者ID:ele7enxxh,项目名称:dtrace-pf,代码行数:31,代码来源:tumbler.c


示例20: KOBJMETHOD

icl_conn_pdu_free_t	icl_cxgbei_conn_pdu_free;
static icl_conn_pdu_data_segment_length_t
				    icl_cxgbei_conn_pdu_data_segment_length;
static icl_conn_pdu_append_data_t	icl_cxgbei_conn_pdu_append_data;
static icl_conn_pdu_get_data_t	icl_cxgbei_conn_pdu_get_data;
static icl_conn_pdu_queue_t	icl_cxgbei_conn_pdu_queue;
static icl_conn_handoff_t	icl_cxgbei_conn_handoff;
static icl_conn_free_t		icl_cxgbei_conn_free;
static icl_conn_close_t		icl_cxgbei_conn_close;
static icl_conn_task_setup_t	icl_cxgbei_conn_task_setup;
static icl_conn_task_done_t	icl_cxgbei_conn_task_done;
static icl_conn_transfer_setup_t	icl_cxgbei_conn_transfer_setup;
static icl_conn_transfer_done_t	icl_cxgbei_conn_transfer_done;

static kobj_method_t icl_cxgbei_methods[] = {
	KOBJMETHOD(icl_conn_new_pdu, icl_cxgbei_conn_new_pdu),
	KOBJMETHOD(icl_conn_pdu_free, icl_cxgbei_conn_pdu_free),
	KOBJMETHOD(icl_conn_pdu_data_segment_length,
	    icl_cxgbei_conn_pdu_data_segment_length),
	KOBJMETHOD(icl_conn_pdu_append_data, icl_cxgbei_conn_pdu_append_data),
	KOBJMETHOD(icl_conn_pdu_get_data, icl_cxgbei_conn_pdu_get_data),
	KOBJMETHOD(icl_conn_pdu_queue, icl_cxgbei_conn_pdu_queue),
	KOBJMETHOD(icl_conn_handoff, icl_cxgbei_conn_handoff),
	KOBJMETHOD(icl_conn_free, icl_cxgbei_conn_free),
	KOBJMETHOD(icl_conn_close, icl_cxgbei_conn_close),
	KOBJMETHOD(icl_conn_task_setup, icl_cxgbei_conn_task_setup),
	KOBJMETHOD(icl_conn_task_done, icl_cxgbei_conn_task_done),
	KOBJMETHOD(icl_conn_transfer_setup, icl_cxgbei_conn_transfer_setup),
	KOBJMETHOD(icl_conn_transfer_done, icl_cxgbei_conn_transfer_done),
	{ 0, 0 }
};
开发者ID:tomtor,项目名称:freebsd,代码行数:31,代码来源:icl_cxgbei.c



注:本文中的KOBJMETHOD函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ KOutMsg函数代码示例发布时间:2022-05-30
下一篇:
C++ KNullDesC函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap