您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DEVMETHOD函数代码示例

51自学网 2021-06-01 20:21:15
  C++
这篇教程C++ DEVMETHOD函数代码示例写得很实用,希望能帮到您。

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

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

示例1: device_printf

		device_printf(dev, "bus_setup_intr() failed! (%d)/n", error);		goto bad;	}	return (0);bad:	if (eisa_io)		bus_release_resource(dev, SYS_RES_IOPORT, 0, eisa_io);	ep_free(dev);	return (error);}static device_method_t ep_eisa_methods[] = {	/* Device interface */	DEVMETHOD(device_probe, ep_eisa_probe),	DEVMETHOD(device_attach, ep_eisa_attach),	DEVMETHOD(device_detach, ep_detach),	DEVMETHOD_END};static driver_t ep_eisa_driver = {	"ep",	ep_eisa_methods,	sizeof(struct ep_softc),};extern devclass_t ep_devclass;DRIVER_MODULE(ep, eisa, ep_eisa_driver, ep_devclass, 0, 0);
开发者ID:JabirTech,项目名称:Source,代码行数:31,


示例2: usb_bus_mem_free_all

	usb_bus_mem_free_all(&sc->sc_dci.sc_bus, NULL);	/* disable clocks */	at91_pmc_clock_disable(sc->sc_iclk);	at91_pmc_clock_disable(sc->sc_fclk);	at91_pmc_clock_disable(sc->sc_mclk);	at91_pmc_clock_deref(sc->sc_fclk);	at91_pmc_clock_deref(sc->sc_iclk);	at91_pmc_clock_deref(sc->sc_mclk);	return (0);}static device_method_t at91_udp_methods[] = {	/* Device interface */	DEVMETHOD(device_probe, at91_udp_probe),	DEVMETHOD(device_attach, at91_udp_attach),	DEVMETHOD(device_detach, at91_udp_detach),	DEVMETHOD(device_suspend, bus_generic_suspend),	DEVMETHOD(device_resume, bus_generic_resume),	DEVMETHOD(device_shutdown, bus_generic_shutdown),	DEVMETHOD_END};static driver_t at91_udp_driver = {	.name = "at91_udp",	.methods = at91_udp_methods,	.size = sizeof(struct at91_udp_softc),};
开发者ID:ornarium,项目名称:freebsd,代码行数:30,


示例3: km_identify

struct km_softc {	struct device		*sc_dev;	struct ksensor		sc_sensor;	struct ksensordev	sc_sensordev;};static void	km_identify(driver_t *, struct device *);static int	km_probe(struct device *);static int	km_attach(struct device *);static int	km_detach(struct device *);static void	km_refresh(void *);static device_method_t km_methods[] = {	DEVMETHOD(device_identify,	km_identify),	DEVMETHOD(device_probe,		km_probe),	DEVMETHOD(device_attach,	km_attach),	DEVMETHOD(device_detach,	km_detach),	{ NULL, NULL }};static driver_t km_driver = {	"km",	km_methods,	sizeof(struct km_softc)};static devclass_t km_devclass;DRIVER_MODULE(km, hostb, km_driver, km_devclass, NULL, NULL);
开发者ID:mihaicarabas,项目名称:dragonfly,代码行数:29,


示例4: ti_mmchs_detach

ti_mmchs_detach(device_t dev){	struct ti_mmchs_softc *sc = device_get_softc(dev);	ti_mmchs_hw_fini(dev);	ti_mmchs_deactivate(dev);	ti_sdma_deactivate_channel(sc->sc_dmach_wr);	ti_sdma_deactivate_channel(sc->sc_dmach_rd);	return (0);}static device_method_t ti_mmchs_methods[] = {	/* device_if */	DEVMETHOD(device_probe, ti_mmchs_probe),	DEVMETHOD(device_attach, ti_mmchs_attach),	DEVMETHOD(device_detach, ti_mmchs_detach),	/* Bus interface */	DEVMETHOD(bus_read_ivar,	ti_mmchs_read_ivar),	DEVMETHOD(bus_write_ivar,	ti_mmchs_write_ivar),	/* mmcbr_if - MMC state machine callbacks */	DEVMETHOD(mmcbr_update_ios, ti_mmchs_update_ios),	DEVMETHOD(mmcbr_request, ti_mmchs_request),	DEVMETHOD(mmcbr_get_ro, ti_mmchs_get_ro),	DEVMETHOD(mmcbr_acquire_host, ti_mmchs_acquire_host),	DEVMETHOD(mmcbr_release_host, ti_mmchs_release_host),	{0, 0},
开发者ID:dmarion,项目名称:freebsd-armv6-sys,代码行数:31,


示例5: at91_pmc_clock_deref

	clk->pll_min_in    = SAM9260_PLL_B_MIN_IN_FREQ;		/*   1 MHz */	clk->pll_max_in    = SAM9260_PLL_B_MAX_IN_FREQ;		/*   5 MHz */	clk->pll_max_in    = 2999999;				/*  ~3 MHz */	clk->pll_min_out   = SAM9260_PLL_B_MIN_OUT_FREQ;	/*  70 MHz */	clk->pll_max_out   = SAM9260_PLL_B_MAX_OUT_FREQ;	/* 130 MHz */	clk->pll_mul_shift = SAM9260_PLL_B_MUL_SHIFT;	clk->pll_mul_mask  = SAM9260_PLL_B_MUL_MASK;	clk->pll_div_shift = SAM9260_PLL_B_DIV_SHIFT;	clk->pll_div_mask  = SAM9260_PLL_B_DIV_MASK;	clk->set_outb      = at91_pll_outb;	at91_pmc_clock_deref(clk);	return (0);}static device_method_t at91sam9260_methods[] = {	DEVMETHOD(device_probe, at91_probe),	DEVMETHOD(device_attach, at91_attach),	DEVMETHOD(device_identify, at91_identify),	{0, 0},};static driver_t at91sam9260_driver = {	"at91sam9260",	at91sam9260_methods,	sizeof(struct at91sam9_softc),};static devclass_t at91sam9260_devclass;DRIVER_MODULE(at91sam9260, atmelarm, at91sam9260_driver, at91sam9260_devclass, 0, 0);
开发者ID:dmarion,项目名称:freebsd-armv6-sys,代码行数:30,


示例6: uart_octeon_probe

#include <mips/cavium/octeon_pcmap_regs.h>#include <contrib/octeon-sdk/cvmx.h>#include "uart_if.h"extern struct uart_class uart_oct16550_class;static int uart_octeon_probe(device_t dev);extern struct uart_class octeon_uart_class;static device_method_t uart_octeon_methods[] = {	/* Device interface */	DEVMETHOD(device_probe, uart_octeon_probe),	DEVMETHOD(device_attach, uart_bus_attach),	DEVMETHOD(device_detach, uart_bus_detach),	{0, 0}};static driver_t uart_octeon_driver = {	uart_driver_name,	uart_octeon_methods,	sizeof(struct uart_softc),};extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;static int
开发者ID:AhmadTux,项目名称:freebsd,代码行数:31,


示例7: nexus_set_resource

				void *);static struct resource_list *nexus_get_reslist(device_t dev, device_t child);static	int nexus_set_resource(device_t, device_t, int, int, u_long, u_long);static	int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *);static void nexus_delete_resource(device_t, device_t, int, int);#ifdef DEV_APICstatic	int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs);static	int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs);static	int nexus_alloc_msix(device_t pcib, device_t dev, int *irq);static	int nexus_release_msix(device_t pcib, device_t dev, int irq);static	int nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data);#endifstatic device_method_t nexus_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		nexus_probe),	DEVMETHOD(device_attach,	nexus_attach),	DEVMETHOD(device_detach,	bus_generic_detach),	DEVMETHOD(device_shutdown,	bus_generic_shutdown),	DEVMETHOD(device_suspend,	bus_generic_suspend),	DEVMETHOD(device_resume,	bus_generic_resume),	/* Bus interface */	DEVMETHOD(bus_print_child,	nexus_print_child),	DEVMETHOD(bus_add_child,	nexus_add_child),	DEVMETHOD(bus_alloc_resource,	nexus_alloc_resource),	DEVMETHOD(bus_adjust_resource,	nexus_adjust_resource),	DEVMETHOD(bus_release_resource,	nexus_release_resource),	DEVMETHOD(bus_activate_resource, nexus_activate_resource),	DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),	DEVMETHOD(bus_setup_intr,	nexus_setup_intr),
开发者ID:cyrilmagsuci,项目名称:freebsd,代码行数:31,


示例8: g_modem_timeout

static device_probe_t g_modem_probe;static device_attach_t g_modem_attach;static device_detach_t g_modem_detach;static usb_handle_request_t g_modem_handle_request;static usb_callback_t g_modem_intr_callback;static usb_callback_t g_modem_bulk_read_callback;static usb_callback_t g_modem_bulk_write_callback;static void g_modem_timeout(void *arg);static devclass_t g_modem_devclass;static device_method_t g_modem_methods[] = {	/* USB interface */	DEVMETHOD(usb_handle_request, g_modem_handle_request),	/* Device interface */	DEVMETHOD(device_probe, g_modem_probe),	DEVMETHOD(device_attach, g_modem_attach),	DEVMETHOD(device_detach, g_modem_detach),	DEVMETHOD_END};static driver_t g_modem_driver = {	.name = "g_modem",	.methods = g_modem_methods,	.size = sizeof(struct g_modem_softc),};
开发者ID:Alkzndr,项目名称:freebsd,代码行数:29,


示例9: ACPI_SERIAL_DECL

ACPI_HANDLE acpi_lid_handle;ACPI_SERIAL_DECL(lid, "ACPI lid");static int	acpi_lid_probe(device_t dev);static int	acpi_lid_attach(device_t dev);static int	acpi_lid_suspend(device_t dev);static int	acpi_lid_resume(device_t dev);static void	acpi_lid_notify_status_changed(void *arg);static void 	acpi_lid_notify_handler(ACPI_HANDLE h, UINT32 notify,					void *context);static device_method_t acpi_lid_methods[] = {    /* Device interface */    DEVMETHOD(device_probe,	acpi_lid_probe),    DEVMETHOD(device_attach,	acpi_lid_attach),    DEVMETHOD(device_suspend,	acpi_lid_suspend),    DEVMETHOD(device_resume,	acpi_lid_resume),    DEVMETHOD_END};static driver_t acpi_lid_driver = {    "acpi_lid",    acpi_lid_methods,    sizeof(struct acpi_lid_softc),};static devclass_t acpi_lid_devclass;DRIVER_MODULE(acpi_lid, acpi, acpi_lid_driver, acpi_lid_devclass, 0, 0);
开发者ID:2asoft,项目名称:freebsd,代码行数:30,


示例10: i2c_get_node

	bus_space_tag_t		bst;};static phandle_t i2c_get_node(device_t, device_t);static int i2c_probe(device_t);static int i2c_attach(device_t);static int i2c_repeated_start(device_t, u_char, int);static int i2c_start(device_t, u_char, int);static int i2c_stop(device_t);static int i2c_reset(device_t, u_char, u_char, u_char *);static int i2c_read(device_t, char *, int, int *, int, int);static int i2c_write(device_t, const char *, int, int *, int);static device_method_t i2c_methods[] = {	DEVMETHOD(device_probe,			i2c_probe),	DEVMETHOD(device_attach,		i2c_attach),	/* OFW methods */	DEVMETHOD(ofw_bus_get_node,		i2c_get_node),	DEVMETHOD(iicbus_callback,		iicbus_null_callback),	DEVMETHOD(iicbus_repeated_start,	i2c_repeated_start),	DEVMETHOD(iicbus_start,			i2c_start),	DEVMETHOD(iicbus_stop,			i2c_stop),	DEVMETHOD(iicbus_reset,			i2c_reset),	DEVMETHOD(iicbus_read,			i2c_read),	DEVMETHOD(iicbus_write,			i2c_write),	DEVMETHOD(iicbus_transfer,		iicbus_transfer_gen),	{ 0, 0 }
开发者ID:ChristosKa,项目名称:freebsd,代码行数:31,


示例11: bus_setup_intr

	bus_setup_intr(dev, irq, INTR_TYPE_CAM|INTR_ENTROPY, NULL, adv_intr, 	    adv, &ih);	/* Attach sub-devices - always succeeds */	adv_attach(adv);	if (adv_b != NULL)		adv_attach(adv_b);	return 0; bad:	bus_release_resource(dev, SYS_RES_IOPORT, 0, io);	bus_release_resource(dev, SYS_RES_IRQ, 0, irq);	return -1;}static device_method_t adv_eisa_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		adv_eisa_probe),	DEVMETHOD(device_attach,	adv_eisa_attach),	{ 0, 0 }};static driver_t adv_eisa_driver = {	"adv", adv_eisa_methods, sizeof(struct adv_softc)};static devclass_t adv_eisa_devclass;DRIVER_MODULE(adv, eisa, adv_eisa_driver, adv_eisa_devclass, 0, 0);MODULE_DEPEND(adv, eisa, 1, 1, 1);
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:30,


示例12: clkdom_dump

	}#ifdef CLK_DEBUG	clkdom_dump(sc->clkdom);#endif	free(__DECONST(char *, def.clkdef.name), M_OFWPROP);	free(def.clkdef.parent_names, M_OFWPROP);	return (bus_generic_attach(dev));fail:	free(__DECONST(char *, def.clkdef.name), M_OFWPROP);	free(def.clkdef.parent_names, M_OFWPROP);	return (rv);}static device_method_t clk_fixed_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		clk_fixed_probe),	DEVMETHOD(device_attach,	clk_fixed_attach),	DEVMETHOD_END};DEFINE_CLASS_0(clk_fixed, clk_fixed_driver, clk_fixed_methods,    sizeof(struct clk_fixed_softc));static devclass_t clk_fixed_devclass;EARLY_DRIVER_MODULE(clk_fixed, simplebus, clk_fixed_driver,    clk_fixed_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);MODULE_VERSION(clk_fixed, 1);#endif
开发者ID:Digital-Chaos,项目名称:freebsd,代码行数:30,


示例13: rman_get_bushandle

	(bus_space_write_1(rman_get_bustag((reg)), 	/	    rman_get_bushandle((reg)), 0, (val)))static void	ichss_identify(driver_t *driver, device_t parent);static int	ichss_probe(device_t dev);static int	ichss_attach(device_t dev);static int	ichss_detach(device_t dev);static int	ichss_settings(device_t dev, struct cf_setting *sets,		    int *count);static int	ichss_set(device_t dev, const struct cf_setting *set);static int	ichss_get(device_t dev, struct cf_setting *set);static int	ichss_type(device_t dev, int *type);static device_method_t ichss_methods[] = {	/* Device interface */	DEVMETHOD(device_identify,	ichss_identify),	DEVMETHOD(device_probe,		ichss_probe),	DEVMETHOD(device_attach,	ichss_attach),	DEVMETHOD(device_detach,	ichss_detach),	/* cpufreq interface */	DEVMETHOD(cpufreq_drv_set,	ichss_set),	DEVMETHOD(cpufreq_drv_get,	ichss_get),	DEVMETHOD(cpufreq_drv_type,	ichss_type),	DEVMETHOD(cpufreq_drv_settings,	ichss_settings),	DEVMETHOD_END};static driver_t ichss_driver = {	"ichss", ichss_methods, sizeof(struct ichss_softc)};static devclass_t ichss_devclass;
开发者ID:JabirTech,项目名称:Source,代码行数:31,


示例14: uart_rc32434_probe

#include <dev/uart/uart.h>#include <dev/uart/uart_bus.h>#include <dev/uart/uart_cpu.h>#include <dev/ic/ns16550.h>#include "uart_if.h"static int uart_rc32434_probe(device_t dev);extern struct uart_class uart_rc32434_uart_class;static device_method_t uart_rc32434_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		uart_rc32434_probe),	DEVMETHOD(device_attach,	uart_bus_attach),	DEVMETHOD(device_detach,	uart_bus_detach),	{ 0, 0 }};static driver_t uart_rc32434_driver = {	uart_driver_name,	uart_rc32434_methods,	sizeof(struct uart_softc),};extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;static intuart_rc32434_probe(device_t dev)
开发者ID:2asoft,项目名称:freebsd,代码行数:30,


示例15: bus_space_read_4

	for (i = 0; i < 10; i++) {		reg = bus_space_read_4(sc->bst, sc->bsh, MCT_WRITE_STAT);		if (reg & mask) {			bus_space_write_4(sc->bst, sc->bsh,			    MCT_WRITE_STAT, mask);			return (0);		}		cpufunc_nullop();	}	/* NOTREACHED */	panic("Can't enable timer/n");}static device_method_t arm_tmr_methods[] = {	DEVMETHOD(device_probe,		arm_tmr_probe),	DEVMETHOD(device_attach,	arm_tmr_attach),	{ 0, 0 }};static driver_t arm_tmr_driver = {	"arch_timer",	arm_tmr_methods,	sizeof(struct arm_tmr_softc),};static devclass_t arm_tmr_devclass;DRIVER_MODULE(arch_timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0);
开发者ID:JabirTech,项目名称:Source,代码行数:30,


示例16: amr_pci_intr

static void		amr_pci_intr(void *arg);static void		amr_pci_free(struct amr_softc *sc);static void		amr_sglist_helper(void *arg, bus_dma_segment_t *segs, int nseg, int error);static int		amr_sglist_map(struct amr_softc *sc);static int		amr_setup_mbox(struct amr_softc *sc);static int		amr_ccb_map(struct amr_softc *sc);static u_int amr_force_sg32 = 0;TUNABLE_INT("hw.amr.force_sg32", &amr_force_sg32);SYSCTL_DECL(_hw_amr);SYSCTL_UINT(_hw_amr, OID_AUTO, force_sg32, CTLFLAG_RD, &amr_force_sg32, 0,    "Force the AMR driver to use 32bit scatter gather");static device_method_t amr_methods[] = {    /* Device interface */    DEVMETHOD(device_probe,	amr_pci_probe),    DEVMETHOD(device_attach,	amr_pci_attach),    DEVMETHOD(device_detach,	amr_pci_detach),    DEVMETHOD(device_shutdown,	amr_pci_shutdown),    DEVMETHOD(device_suspend,	amr_pci_suspend),    DEVMETHOD(device_resume,	amr_pci_resume),    DEVMETHOD(bus_print_child,	bus_generic_print_child),    DEVMETHOD(bus_driver_added,	bus_generic_driver_added),    { 0, 0 }};static driver_t amr_pci_driver = {	"amr",	amr_methods,	sizeof(struct amr_softc)
开发者ID:juanfra684,项目名称:DragonFlyBSD,代码行数:31,


示例17: nexus_inlist

static bus_get_resource_list_t nexus_get_resource_list;#ifdef SMPstatic bus_bind_intr_t nexus_bind_intr;#endifstatic bus_describe_intr_t nexus_describe_intr;static bus_get_dma_tag_t nexus_get_dma_tag;static ofw_bus_get_devinfo_t nexus_get_devinfo;static int nexus_inlist(const char *, const char *const *);static struct nexus_devinfo * nexus_setup_dinfo(device_t, phandle_t);static void nexus_destroy_dinfo(struct nexus_devinfo *);static int nexus_print_res(struct nexus_devinfo *);static device_method_t nexus_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		nexus_probe),	DEVMETHOD(device_attach,	nexus_attach),	DEVMETHOD(device_detach,	bus_generic_detach),	DEVMETHOD(device_shutdown,	bus_generic_shutdown),	DEVMETHOD(device_suspend,	bus_generic_suspend),	DEVMETHOD(device_resume,	bus_generic_resume),	/* Bus interface */	DEVMETHOD(bus_print_child,	nexus_print_child),	DEVMETHOD(bus_probe_nomatch,	nexus_probe_nomatch),	DEVMETHOD(bus_read_ivar,	bus_generic_read_ivar),	DEVMETHOD(bus_write_ivar,	bus_generic_write_ivar),	DEVMETHOD(bus_add_child,	nexus_add_child),	DEVMETHOD(bus_alloc_resource,	nexus_alloc_resource),	DEVMETHOD(bus_activate_resource,	nexus_activate_resource),	DEVMETHOD(bus_deactivate_resource,	nexus_deactivate_resource),
开发者ID:edgar-pek,项目名称:PerspicuOS,代码行数:31,


示例18: gic_v3_fdt_probe

#include "gic_v3_reg.h"#include "gic_v3_var.h"/* * FDT glue. */static int gic_v3_fdt_probe(device_t);static int gic_v3_fdt_attach(device_t);static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *,    rman_res_t, rman_res_t, rman_res_t, u_int);static const struct ofw_bus_devinfo *gic_v3_ofw_get_devinfo(device_t, device_t);static device_method_t gic_v3_fdt_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		gic_v3_fdt_probe),	DEVMETHOD(device_attach,	gic_v3_fdt_attach),	/* Bus interface */	DEVMETHOD(bus_alloc_resource,		gic_v3_ofw_bus_alloc_res),	DEVMETHOD(bus_activate_resource,	bus_generic_activate_resource),	/* ofw_bus interface */	DEVMETHOD(ofw_bus_get_devinfo,	gic_v3_ofw_get_devinfo),	DEVMETHOD(ofw_bus_get_compat,	ofw_bus_gen_get_compat),	DEVMETHOD(ofw_bus_get_model,	ofw_bus_gen_get_model),	DEVMETHOD(ofw_bus_get_name,	ofw_bus_gen_get_name),	DEVMETHOD(ofw_bus_get_node,	ofw_bus_gen_get_node),	DEVMETHOD(ofw_bus_get_type,	ofw_bus_gen_get_type),	/* End */
开发者ID:embedclub,项目名称:freebsd,代码行数:31,


示例19: DEVMETHOD

 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */#include USB_GLOBAL_INCLUDE_FILE#include <dev/usb/controller/saf1761_otg.h>#include <dev/usb/controller/saf1761_otg_reg.h>static device_probe_t saf1761_otg_fdt_probe;static device_attach_t saf1761_otg_fdt_attach;static device_detach_t saf1761_otg_fdt_detach;static device_method_t saf1761_otg_methods[] = {	/* Device interface */	DEVMETHOD(device_probe, saf1761_otg_fdt_probe),	DEVMETHOD(device_attach, saf1761_otg_fdt_attach),	DEVMETHOD(device_detach, saf1761_otg_fdt_detach),	DEVMETHOD(device_suspend, bus_generic_suspend),	DEVMETHOD(device_resume, bus_generic_resume),	DEVMETHOD(device_shutdown, bus_generic_shutdown),	DEVMETHOD_END};static driver_t saf1761_otg_driver = {	.name = "saf1761otg",	.methods = saf1761_otg_methods,	.size = sizeof(struct saf1761_otg_softc),};
开发者ID:2trill2spill,项目名称:freebsd,代码行数:30,


示例20: mga_detach

static intmga_detach(device_t kdev){	struct drm_device *dev = device_get_softc(kdev);	int ret;	ret = drm_detach(kdev);	free(dev->driver, DRM_MEM_DRIVER);	return ret;}static device_method_t mga_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		mga_probe),	DEVMETHOD(device_attach,	mga_attach),	DEVMETHOD(device_detach,	mga_detach),	{ 0, 0 }};static driver_t mga_driver = {	"drm",	mga_methods,	sizeof(struct drm_device)};extern devclass_t drm_devclass;#if __FreeBSD_version >= 700010DRIVER_MODULE(mga, vgapci, mga_driver, drm_devclass, 0, 0);
开发者ID:ele7enxxh,项目名称:dtrace-pf,代码行数:31,


示例21: ehci_bs_r_4

static uint32_tehci_bs_r_4(void *t, bus_space_handle_t h, bus_size_t o){	return bus_space_read_4((bus_space_tag_t) t, h, 0x100 + o);}static voidehci_bs_w_4(void *t, bus_space_handle_t h, bus_size_t o, uint32_t v){	bus_space_write_4((bus_space_tag_t) t, h, 0x100 + o, v);}static device_method_t ehci_methods[] = {	/* Device interface */	DEVMETHOD(device_probe, ehci_ixp_probe),	DEVMETHOD(device_attach, ehci_ixp_attach),	DEVMETHOD(device_detach, ehci_ixp_detach),	DEVMETHOD(device_suspend, ehci_ixp_suspend),	DEVMETHOD(device_resume, ehci_ixp_resume),	DEVMETHOD(device_shutdown, ehci_ixp_shutdown),	/* Bus interface */	DEVMETHOD(bus_print_child, bus_generic_print_child),	{0, 0}};static driver_t ehci_driver = {	"ehci",	ehci_methods,
开发者ID:DangerDexter,项目名称:FreeBSD-8.0-dyntick,代码行数:30,


示例22: DEVMETHOD

/* Table of sysctl names and HKEY functions to call. */static struct {	char		*name;	hkey_fn_t	*handler;} sysctl_table[] = {	/* name,		handler */	{"lcd_brightness_max",	hkey_lcd_brightness_max},	{"lcd_brightness_min",	hkey_lcd_brightness_min},	{"lcd_brightness",	hkey_lcd_brightness},	{"sound_mute",		hkey_sound_mute},	{NULL, NULL}};static device_method_t acpi_panasonic_methods[] = {	DEVMETHOD(device_probe,		acpi_panasonic_probe),	DEVMETHOD(device_attach,	acpi_panasonic_attach),	DEVMETHOD(device_detach,	acpi_panasonic_detach),	DEVMETHOD(device_shutdown,	acpi_panasonic_shutdown),	{0, 0}};static driver_t acpi_panasonic_driver = {	"acpi_panasonic",	acpi_panasonic_methods,	sizeof(struct acpi_panasonic_softc),};static devclass_t acpi_panasonic_devclass;
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:29,


示例23: device_printf

		device_printf(dev, "detach failed/n");		return (error);	}	error = bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih);	if (error) {		device_printf(dev, "failed to unregister interrupt handler/n");	}	aic_isa_release_resources(dev);	return (0);}static device_method_t aic_isa_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		aic_isa_probe),	DEVMETHOD(device_attach,	aic_isa_attach),	DEVMETHOD(device_detach,	aic_isa_detach),	{ 0, 0 }};static driver_t aic_isa_driver = {	"aic",	aic_isa_methods, sizeof(struct aic_isa_softc),};extern devclass_t aic_devclass;MODULE_DEPEND(aic, cam, 1,1,1);DRIVER_MODULE(aic, isa, aic_isa_driver, aic_devclass, 0, 0);
开发者ID:Alkzndr,项目名称:freebsd,代码行数:30,


示例24: csa_readmem

u_int32_tcsa_readmem(csa_res *resp, u_long offset){	return bus_space_read_4(rman_get_bustag(resp->mem), rman_get_bushandle(resp->mem), offset);}voidcsa_writemem(csa_res *resp, u_long offset, u_int32_t data){	bus_space_write_4(rman_get_bustag(resp->mem), rman_get_bushandle(resp->mem), offset, data);}static device_method_t csa_methods[] = {	/* Device interface */	DEVMETHOD(device_probe,		csa_probe),	DEVMETHOD(device_attach,	csa_attach),	DEVMETHOD(device_detach,	csa_detach),	DEVMETHOD(device_shutdown,	bus_generic_shutdown),	DEVMETHOD(device_suspend,	bus_generic_suspend),	DEVMETHOD(device_resume,	csa_resume),	/* Bus interface */	DEVMETHOD(bus_alloc_resource,	csa_alloc_resource),	DEVMETHOD(bus_release_resource,	csa_release_resource),	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),	DEVMETHOD(bus_setup_intr,	csa_setup_intr),	DEVMETHOD(bus_teardown_intr,	csa_teardown_intr),	DEVMETHOD_END
开发者ID:Alkzndr,项目名称:freebsd,代码行数:30,


示例25: device_printf

done:	if (error)		device_printf(dev, "Unable to initialize/n");	return (error);}static int cyapa_probe(device_t);static int cyapa_attach(device_t);static int cyapa_detach(device_t);static void cyapa_cdevpriv_dtor(void*);static devclass_t cyapa_devclass;static device_method_t cyapa_methods[] = {	/* device interface */	DEVMETHOD(device_probe,		cyapa_probe),	DEVMETHOD(device_attach,	cyapa_attach),	DEVMETHOD(device_detach,	cyapa_detach),	DEVMETHOD_END};static driver_t cyapa_driver = {	"cyapa",	cyapa_methods,	sizeof(struct cyapa_softc),};static	d_open_t	cyapaopen;static	d_ioctl_t	cyapaioctl;static	d_read_t	cyaparead;
开发者ID:grembo,项目名称:freebsd_c720,代码行数:31,


示例26: bhnd_pcib_suspend

static intbhnd_pcib_suspend(device_t dev){	return (bhnd_pci_generic_suspend(dev));}static intbhnd_pcib_resume(device_t dev){	return (bhnd_pci_generic_resume(dev));}static device_method_t bhnd_pcib_methods[] = {	/* Device interface */	DEVMETHOD(device_attach,	bhnd_pcib_attach),	DEVMETHOD(device_detach,	bhnd_pcib_detach),	DEVMETHOD(device_suspend,	bhnd_pcib_suspend),	DEVMETHOD(device_resume,	bhnd_pcib_resume),	DEVMETHOD_END};DEFINE_CLASS_1(pcib, bhnd_pcib_driver, bhnd_pcib_methods, sizeof(struct bhnd_pcib_softc), bhnd_pci_driver);static devclass_t pcib_devclass;DRIVER_MODULE(bhnd_pcib, bhnd, bhnd_pcib_driver, pcib_devclass, 0, 0);MODULE_VERSION(bhnd_pcib, 1);MODULE_DEPEND(bhnd_pcib, bhnd, 1, 1, 1);MODULE_DEPEND(bhnd_pcib, bhnd_pci, 1, 1, 1);MODULE_DEPEND(bhnd_pcib, pci, 1, 1, 1);
开发者ID:2asoft,项目名称:freebsd,代码行数:30,



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


C++ DEVNAME函数代码示例
C++ DEVICE_STATE_EVENT_NUMBER函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。