当前位置: 首页>>代码示例>>C++>>正文


C++ driver_init函数代码示例

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


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

示例1: checkboard

int checkboard(void)
{
	struct ps2_bootinfo *info = (void *) CKSEG0ADDR(PS2_BOOTINFO_OLDADDR);
	uint32_t size;
	volatile uint32_t *sbios_magic;
	int sbversion = 0;
	struct ps2_bootinfo bootinfo;

	puts("Board: Sony Playstation 2 MIPS r5900\n");
	memset(&bootinfo, 0, sizeof(bootinfo));
	size = info->size;
	if (size > sizeof(bootinfo)) {
		size = sizeof(bootinfo);
	}
	memcpy(&bootinfo, info, size);

	sbios_magic = (uint32_t *) SBIOS_MAGIC;
	if (*sbios_magic == SBIOS_MAGICVAL) {
		gd->arch._sbios = *(int (**)(int, void *))(SBIOS_BASE);
	}
	else
		gd->arch._sbios = NULL;

	sbversion = sbios(SB_GETVER, NULL);
	printf("SBIOS Version 0x%08x\n", sbversion);

	driver_init();
	return 0;
}
开发者ID:jur,项目名称:ps2-u-boot,代码行数:29,代码来源:ps2.c

示例2: kernel_main

int kernel_main()
{
    /*
     * Tell the kernel memory allocator which memory it can't use.
     * It already knows not to touch kernel image.
     */
    lmm_remove_free( &malloc_lmm, (void*)USER_MEM_START, USER_MEM_SIZE );
    lmm_remove_free( &malloc_lmm, (void*)0, 0x100000 );

    /*
     * Initialize drivers here.
     */
    driver_init();
    
    /*
     * initialize the PIC so that IRQs and
     * exception handlers don't overlap in the IDT.
     */
    pic_init( BASE_IRQ_MASTER_BASE, BASE_IRQ_SLAVE_BASE );


    /* This is all up to you... */

    return -1;
}
开发者ID:shalinipriya,项目名称:Device-Drivers,代码行数:25,代码来源:kernel.c

示例3: sef_cb_init_fresh

/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
{
/* Initialize the filter driver. */
	int r;

	r = parse_arguments(env_argc, env_argv);
	if(r != OK) {
		printf("Filter: wrong argument!\n");
		return 1;
	}

	if ((buf_array = flt_malloc(BUF_SIZE, NULL, 0)) == NULL)
		panic("no memory available");

	sum_init();

	driver_init();

	/* Subscribe to driver events for VFS drivers. */
	r = ds_subscribe("drv\\.vfs\\..*", DSF_INITIAL | DSF_OVERWRITE);
	if(r != OK) {
		panic("Filter: can't subscribe to driver events");
	}

	/* Announce we are up! */
	driver_announce();

	return(OK);
}
开发者ID:Spenser309,项目名称:CS551,代码行数:32,代码来源:main.c

示例4: ConfigureLinuxHWDev

void
ConfigureLinuxHWDev(VPNum vp)
{
    if (vp) return;

    {
	LinuxEnv le(SysCall);
	vfs_caches_init(0x1<<8);
	driver_init();
	buffer_init();
    }

    ConfigureLinuxHWDevArch();

    INITCALL(deadline_slab_setup);
    INITCALL(device_init);
    INITCALL(elevator_global_init);
    INITCALL(init_bio);
    INITCALL(vio_bus_init);

    if (!KernelInfo::OnSim() || KernelInfo::OnHV()) {
	INITCALL(pcibus_class_init);
	INITCALL(pci_driver_init);
	INITCALL(pci_init);

    }
}
开发者ID:BillTheBest,项目名称:k42,代码行数:27,代码来源:Configure.C

示例5: do_basic_setup

/*
 * Ok, the machine is now initialized. None of the devices
 * have been touched yet, but the CPU subsystem is up and
 * running, and memory and process management works.
 *
 * Now we can finally start doing some real work..
 */
static void __init do_basic_setup(void)
{
	rcu_init_sched(); /* needed by module_init stage. */
	init_workqueues();
	usermodehelper_init();
	driver_init();
	init_irq_proc();
	do_initcalls();
}
开发者ID:souljaboy11792,项目名称:ZCF-kernel,代码行数:16,代码来源:main.c

示例6: do_basic_setup

/*
 * Ok, the machine is now initialized. None of the devices
 * have been touched yet, but the CPU subsystem is up and
 * running, and memory and process management works.
 *
 * Now we can finally start doing some real work..
 */
static void __init do_basic_setup(void)
{
	/* drivers will send hotplug events */
	init_workqueues();
	usermodehelper_init();
	driver_init();
	init_irq_proc();
	do_initcalls();
}
开发者ID:JiakangJ,项目名称:cs370,代码行数:16,代码来源:main.c

示例7: system_init

/**
  * @brief  System initialization.
  * @param  None
  * @retval  None
  */
void system_init(void)
{
	RCC_ClocksTypeDef tRCC;
	
	RCC_GetClocksFreq(&tRCC); 
	delay_init(tRCC.HCLK_Frequency);
	
    device_init();
    driver_init();
}
开发者ID:Seok-Jung,项目名称:STM32F207,代码行数:15,代码来源:Config.c

示例8: dde_init

void dde_init()
{
    /* invoked in vfs_cache_init in Linux */
    chrdev_init();

    driver_init();
    dde_call_machine_init();
    do_initcalls();

    loadable_module_init();
}
开发者ID:chyyuu,项目名称:ucore-arch-arm,代码行数:11,代码来源:dde_main.c

示例9: do_basic_setup

/*
 * Ok, the machine is now initialized. None of the devices
 * have been touched yet, but the CPU subsystem is up and
 * running, and memory and process management works.
 *
 * Now we can finally start doing some real work..
 */
static void __init do_basic_setup(void)
{
	init_workqueues();
	cpuset_init_smp();
	usermodehelper_init();
	init_tmpfs();
	driver_init();
	init_irq_proc();
	do_ctors();
	do_initcalls();
}
开发者ID:badcompany1982,项目名称:android_kernel_zte_V768,代码行数:18,代码来源:main.c

示例10: main

int main(int argc, char *argv[])
{
    enum { SC = 3 };
    int opt, n;
    int sigs[] = { SIGINT, SIGHUP, SIGTERM };
    void (*sighandlers[])() = { sigint_handler,
                                sighup_handler,
                                sigterm_handler };
    struct sigaction s[SC];

    for (n = 0; n < SC; ++n)
    {
        s[n].sa_handler = SIG_IGN;
        sigfillset(&s[n].sa_mask);
        s[n].sa_flags = 0;
        sigaction(sigs[n], &s[n], NULL);
    }

    for (opt = 1; opt < argc; ++opt)
    {
        if (strcmp(argv[opt], "-h") == 0
         || strcmp(argv[opt], "--help") == 0)
        {
            show_usage();
            return 0;
        }
    }

    mod_src_create();
    gtk_init(&argc, &argv);
    settings_init();
    driver_init();
    lfo_tables_init();
    mixer_init();
    patch_control_init();
    dish_file_state_init();
    session_init(argc, argv);
    gui_init();

    for (n = 0; n < SC; ++n)
    {
        s[n].sa_handler = sighandlers[n];
        sigfillset(&s[n].sa_mask);
        s[n].sa_flags = 0;
        sigaction(sigs[n], &s[n], NULL);
    }

    gtk_main();

    cleanup();

    return 0;
}
开发者ID:jphaenlin,项目名称:Petri-Foo,代码行数:53,代码来源:petri-foo.c

示例11: rmd_rec_start

int rmd_rec_start()
{
	set_report_rec_stat();

	if (driver_init() != 0)
		return -1;

	if (task_init() != 0)
		return -1;

	return 0;
}
开发者ID:WayWingsDev,项目名称:openrmd,代码行数:12,代码来源:rmd_rec.c

示例12: egl_init_opengl

int egl_init_opengl(void *erlCallbacks) 
{
#ifdef _WIN32
  driver_init((TWinDynDriverCallbacks *) erlCallbacks);
#endif
  if(egl_initiated == 0) {
    if(load_gl_functions()) {
      init_tess();
      egl_initiated = 1;
    }
  }
  return 1;
}
开发者ID:Bwooce,项目名称:otp,代码行数:13,代码来源:egl_impl.cpp

示例13: do_basic_setup

/*
 * Ok, the machine is now initialized. None of the devices
 * have been touched yet, but the CPU subsystem is up and
 * running, and memory and process management works.
 *
 * Now we can finally start doing some real work..
 */
static void __init do_basic_setup(void)
{
   driver_init();

#ifdef CONFIG_SYSCTL
   sysctl_init();
#endif

   /* Networking initialization needs a process context */
   sock_init();

   init_workqueues();
   do_initcalls();
}
开发者ID:OS2World,项目名称:DRV-LXAPI32,代码行数:21,代码来源:oi_main.c

示例14: do_basic_setup

/*
 * Ok, the machine is now initialized. None of the devices
 * have been touched yet, but the CPU subsystem is up and
 * running, and memory and process management works.
 *
 * Now we can finally start doing some real work..
 */
static void __init do_basic_setup(void)
{
    /* drivers will send hotplug events */
    init_workqueues();
    usermodehelper_init();
    driver_init();

#ifdef CONFIG_SYSCTL
    sysctl_init();
#endif

    /* Networking initialization needs a process context */
    sock_init();

    do_initcalls();
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:23,代码来源:main.c

示例15: init

void init()
{
	Serial.begin(115200);
	debug("Starting...");
	pinMode(FIRST_RUN_PIN, INPUT);

	web_run();
	if(digitalRead(FIRST_RUN_PIN) && AppSettings.load()){
		debugf("SSID:%s PASS:%s", AppSettings.ssid.c_str(), AppSettings.password.c_str());
		WifiStation.config(AppSettings.ssid.c_str(), AppSettings.password.c_str());
		WifiStation.waitConnection(on_wifi_connected);
		driver_init();
	} else {
		first_run();
	}

}
开发者ID:Bravo13,项目名称:esp_hello_world,代码行数:17,代码来源:application.cpp


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