/** * driver_init - initialize driver model. * * Call the driver model init functions to initialize their * subsystems. Called early from init/main.c. */ void __init driver_init(void) { printk(KERN_INFO "%s, devtmpfs_init\n", __FILE__); printk(KERN_INFO "%s, devices_init\n", __FILE__); printk(KERN_INFO "%s, buses_init\n", __FILE__); printk(KERN_INFO "%s, classes_init\n", __FILE__); printk(KERN_INFO "%s, firmware_init\n", __FILE__); printk(KERN_INFO "%s, hypervisor_init\n", __FILE__); printk(KERN_INFO "%s, platform_bus_init\n", __FILE__); printk(KERN_INFO "%s, cpu_dev_init\n", __FILE__); printk(KERN_INFO "%s, memory_dev_init\n", __FILE__); /* These are the core pieces */ devtmpfs_init(); devices_init(); buses_init(); classes_init(); firmware_init(); hypervisor_init(); /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); cpu_dev_init(); memory_dev_init(); }
void config_init() { logprintf(LOG_STACK, "%s(...)", __FUNCTION__); hardware_init(); settings_init(); devices_init(); gui_init(); #ifdef EVENTS rules_init(); #endif registry_init(); }
int periodic_task_2(void) { int i, j, k, equal=0; // UI thread if(telemetry_mode == UI_NCURSES_MODE) { ui_update(&imu_data, &eff_data, &mra_data,&enc_data, total, failure); } buff_i=buff_i%5; buff[0][0][buff_i]=imu_data.acc.x; buff[0][1][buff_i]=imu_data.acc.y; buff[0][2][buff_i]=imu_data.acc.z; buff[1][0][buff_i]=imu_data.gyr.x; buff[1][0][buff_i]=imu_data.gyr.x; buff[1][1][buff_i]=imu_data.gyr.y; buff[1][2][buff_i]=imu_data.gyr.z; buff[2][0][buff_i]=imu_data.mag.x; buff[2][1][buff_i]=imu_data.mag.y; buff[2][2][buff_i]=imu_data.mag.z; buff_i++; for( i=0; i<3; i++) { for( j=0; j<3; j++) for( k=1; k<3; k++) { if( buff[i][j][k]==buff[i][j][0] ) equal=1; else equal=0; } if( equal==1) i=3; } if( equal==1 ) { close(imu_param.i2c_dev); close(spi_param.spi_dev); devices_init(&imu_param, &spi_param, &mra_data); equal=0; } /*if(telemetry_mode == UI_MAVLINK_MODE) { mavlink_module_update(t_task_1_global, t0, &battery_data, &gps_data, &imu_data, &pitot_data, &pwm_read_data, &pwm_write_data, &scp1000_data, &sonar_data, &gps_measure, &imu_measure, &magnetometer_measure, &estimation_data, &control_data); }*/ return SUCCESS; }
void __init driver_init(void) { /* These are the core pieces */ devices_init(); buses_init(); classes_init(); firmware_init(); /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); system_bus_init(); cpu_dev_init(); }
void process_exit_test() { process_table_init(); process_create(1, (int) serial_test_write_exit_1); process_create(1, (int) serial_test_write_exit_2); process_create(1, (int) toggle_led1); devices_init(); irq_init(); timer_init(); irq_register_context_switch(); irq_enable(); kernel_to_user_mode(); }
void serial_test_calc() { process_table_init(); process_create(1, (int) toggle_led1); process_create(1, (int) serial_test_calculator); devices_init(); irq_init(); timer_init(); irq_register_context_switch(); irq_enable(); kernel_to_user_mode(); }
PROCESS_THREAD(eeprom_write_contiki_test, ev, data) { PROCESS_BEGIN(); static config_section_t * led_conf = 0; int i; led_conf = config_cnf_create_section(config_get()); strcpy(led_conf->name, "led"); config_section_set_uint(led_conf, "ddr", 39); config_section_set_uint(led_conf, "port", 40); config_section_set_uint(led_conf, "offset", 0); config_save(); config_close(); config_init(); if (config_open() == -1) alarma(10); modules_init(); devices_init(); if (admin_get_device_by_id(2) && admin_get_device_by_id(1)) { static led_t * led_m = 0; static led_t * led = 0; led_m = (led_t *)admin_get_device_by_id(2)->device; led = (led_t *)admin_get_device_by_id(1)->device; led->init(led); led_m->init(led_m); if (module_get(MODULE_LED1)->config == led_conf) { for (i = 0; i < 10; ++i) { led->on(led); _delay_ms(50); led->off(led); _delay_ms(50); } } led->on(led); led_m->on(led_m); } PROCESS_END(); }
int main( int argc, char *argv[] ) { logger_init( NULL ); logi( "compaction application startup ...\n" ); s_base = event_base_new(); cmd_processor_init(); devices_init(); event_base_dispatch( s_base ); return 0; }
/** * driver_init - initialize driver model. * * Call the driver model init functions to initialize their * subsystems. Called early from init/main.c. */ void __init driver_init(void) { /* These are the core pieces */ devtmpfs_init(); devices_init(); buses_init(); classes_init(); firmware_init(); hypervisor_init(); /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); cpu_dev_init(); memory_dev_init(); container_dev_init(); of_core_init(); }
/****************************************************************************** * FunctionName : user_init * Description : entry of user application, init user function here * Parameters : none * Returns : none *******************************************************************************/ void ICACHE_FLASH_ATTR user_init(void) { system_init_done_cb(user_init_done); // UART Devices mod_rfid_init(); mod_finger_init(); mod_emtr_init(); devices_init(); debug("\n\nSDK version: %s\n", system_get_sdk_version()); debug("Firmware: %s\n", config_firmware_bin()); memory_info(); user_config_init(); user_config_load(); #if SSL_ENABLE user_config_load_private_key(); user_config_load_certificate(); #endif user_events_init(); // Scan webserver_register_handler_callback(DEVICES_URL, devices_handler); webserver_register_handler_callback(WIFI_SCAN_URL, wifi_scan_handler); // Native Devices user_button_init(); user_relay_init(); user_adc_init(); // I2C Devices i2c_master_gpio_init(); mod_rgb_init(); mod_tc_mk2_init(); mod_io2_init(); mod_irda_init(); // SPI Devices mod_led_8x8_rgb_init(); webserver_init(); }
void console_test() { process_table_init(); //process_create(1, (int) toggle_led1); //process_create(1, (int) toggle_led2); //process_create(1, (int) dummy_process); // process_create(1, (int) console_start); devices_init(); irq_init(); timer_init(); irq_register_context_switch(); irq_enable(); kernel_to_user_mode(); }
void timer_test() { process_table_init(); process_create(1, (int)toggle_led1); process_create(1, (int)toggle_led2); devices_init(); irq_init(); timer_init(); //timer_add_handler(toggle_led_1, 5000); //timer_add_handler(toggle_led_2, 10000); irq_register_context_switch(); irq_enable(); kernel_to_user_mode(); }
void __init driver_init(void) { /* These are the core pieces */ devices_init(); buses_init(); classes_init(); #ifndef DDE_LINUX firmware_init(); hypervisor_init(); #endif /* These are also core pieces, but must come after the * core core pieces. */ platform_bus_init(); #ifndef DDE_LINUX system_bus_init(); cpu_dev_init(); memory_dev_init(); attribute_container_init(); #endif }
void serial_test() { process_table_init(); // process_create(1, (int)serial_test_test_yield); // process_create(1, (int)toggle_led1_yield); // process_create(1, (int)toggle_led2_yield); //process_create(1, (int) led1_on); //process_create(1, (int) led1_off); process_create(1, (int) toggle_led1); process_create(1, (int) toggle_led2); //process_create(1, (int) serial_test_write_1); //process_create(1, (int) serial_test_write_2); //process_create(1, (int) serial_test_write_3); //process_create(1, (int) serial_test_write_4); //process_create(1, (int) serial_test_write_5); process_create(1, (int) serial_test_calculator); devices_init(); serial_test_create(); irq_init(); timer_init(); irq_register_context_switch(); irq_enable(); kernel_to_user_mode(); // sys_yield(); // serial_test_test(); }
void fs_test() { file_t* file; char buffer[512]; //char text[] = { 't', 'e', 's', 't', '\n', '\r' }; char text[] = "new file\n\r\0"; devices_init(); mmchs_init(); fs_init(); fl_listdirectory("/"); file = (file_t*) fl_fopen("/test/thenewest.txt", "a"); fl_fwrite(text, sizeof(text), sizeof(text), file); fl_fclose(file); fl_listdirectory("/test/"); file = (file_t*) fl_fopen("/test/thenewest.txt", "r"); fl_fread(buffer, 512, sizeof(text), file); kernel_print(buffer); fl_fclose(file); }
int main(void) { int status = 0; int n = 0; int return_value = SUCCESS; // Parameters for IMU and SPI imu_param.acc.full_res=1; imu_param.acc.rate=100; imu_param.acc.range=16; imu_param.gyr.rate=100; imu_param.gyr.lpf_bw=188; imu_param.gyr.clk_source='Z'; imu_param.gyr.act="XYZ"; imu_param.mag.rate=75; imu_param.mag.range=0; imu_param.mag.samples_avg=8; imu_param.mag.meas_mode=0; imu_param.mag.op_mode=0; spi_param.mode=0; spi_param.speed=375000; spi_param.cs=0; // printf("\ngpio186 inicialmente = %d\n",gpio_read(GPIO_S0)); //printf("gpio10 inicialmente = %d\n",gpio_read(GPIO_SHDN)); // Initialization if( devices_init(&imu_param, &spi_param, &mra_data)==FAILURE ) { perror("Unsuccesful devices initialization"); return -1; } if( datalogger_init()!=SUCCESS ) { perror("Unsuccesful datalogger initialization"); return -1; } if( ui_init() != SUCCESS) { perror("Unsuccesful user interface initialization"); return -1; } // enc_zero_set(enc_data)!=SUCCESS ? perror("Unsuccesfull encoder set zero "); return -1; //gpio_write(GPIO_S0,1); //mra_data.Out_0=2275; //actuate(spi_param.spi_dev,&mra_data); //return_value=FAILURE; // Main Loop if(return_value != FAILURE) { //datalogger_start(); timer_start_task_1(); usleep(0.5*task_1_period_us); timer_start_task_2(); usleep(5*task_1_period_us); while(quittask == 0) { #if ANU_COMPILE_FOR_OVERO #else //if(datalogger_status() == DATALOGGER_RUNNING) datalogger_update_IPC(); #endif if(++n>100) { //printf("n = %d\n",n); if(datalogger_status() == DATALOGGER_RUNNING) datalogger_write_file(); n = 0; } usleep(5*task_1_period_us); } datalogger_stop(); timer_stop_task_1(); usleep(TASK1_PERIOD_US); timer_stop_task_2(); usleep(TASK2_PERIOD_US); } status = datalogger_close(); if(status != DATALOGGER_SUCCESS) { return_value = FAILURE; } status = ui_close(); if(status != SUCCESS) { return_value = FAILURE; } devices_close(&imu_param, &spi_param, &mra_data); return return_value; }
int main(int argc, char *argv[]) { int i, res; static char *const cmd[] = { "/init", NULL }; struct fstab *fstab = NULL; for(i = 1; i < argc; ++i) { if(strcmp(argv[i], "-v") == 0) { printf("%d\n", VERSION_TRAMPOLINE); fflush(stdout); return 0; } } umask(000); // Init only the little we need, leave the rest for real init mkdir("/dev", 0755); mkdir("/dev/pts", 0755); mkdir("/dev/socket", 0755); mkdir("/proc", 0755); mkdir("/sys", 0755); mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755"); mount("devpts", "/dev/pts", "devpts", 0, NULL); mount("proc", "/proc", "proc", 0, NULL); mount("sysfs", "/sys", "sysfs", 0, NULL); klog_init(); ERROR("Running trampoline v%d\n", VERSION_TRAMPOLINE); if(is_charger_mode()) { ERROR("Charger mode detected, skipping multirom\n"); goto run_main_init; } #if MR_DEVICE_HOOKS >= 3 tramp_hook_before_device_init(); #endif ERROR("Initializing devices..."); devices_init(); ERROR("Done initializing"); if(wait_for_file("/dev/graphics/fb0", 5) < 0) { ERROR("Waiting too long for fb0"); goto exit; } fstab = fstab_auto_load(); if(!fstab) goto exit; #if 0 fstab_dump(fstab); //debug #endif // mount and run multirom from sdcard mount_and_run(fstab); exit: if(fstab) fstab_destroy(fstab); // close and destroy everything devices_close(); run_main_init: if(access(KEEP_REALDATA, F_OK) < 0) { umount(REALDATA); umount("/dev/pts"); umount("/dev"); rmdir("/dev/pts"); rmdir("/dev/socket"); rmdir("/dev"); rmdir(REALDATA); } umount("/proc"); umount("/sys"); rmdir("/proc"); rmdir("/sys"); ERROR("Running main_init\n"); fixup_symlinks(); chmod("/main_init", EXEC_MASK); rename("/main_init", "/init"); res = execve(cmd[0], cmd, NULL); ERROR("execve returned %d %d %s\n", res, errno, strerror(errno)); return 0; }
/****************************************************************************** * FunctionName : user_init * Description : entry of user application, init user function here * Parameters : none * Returns : none *******************************************************************************/ void ICACHE_FLASH_ATTR user_init(void) { system_init_done_cb(user_init_done); // wifi_set_phy_mode(PHY_MODE_11N); // wifi_set_sleep_type(MODEM_SLEEP_T); #if UART0_SWAP stdout_disable(); system_uart_swap(); #endif #if UART1_ENABLE stdout_init(UART1); #endif // UART Devices #if DEVICE == PLUG user_plug_init(); #endif #if DEVICE == SWITCH1 user_switch1_init(); #endif #if DEVICE == SWITCH2 user_switch2_init(); #endif #if MOD_RFID_ENABLE mod_rfid_init(); #endif #if MOD_FINGER_ENABLE mod_finger_init(); #endif #if MOD_EMTR_ENABLE mod_emtr_init(); #endif devices_init(); debug("\n\nSDK version: %s\n", system_get_sdk_version()); debug("Firmware: %s\n", config_firmware_bin()); memory_info(); user_config_init(); user_config_load(); #if SSL_ENABLE user_config_load_private_key(); user_config_load_certificate(); #endif user_events_init(); // Scan webserver_register_handler_callback(DEVICES_URL, devices_handler); webserver_register_handler_callback(WIFI_SCAN_URL, wifi_scan_handler); // Native Devices #if BUTTON_ENABLE user_button_init(); #endif #if RELAY_ENABLE user_relay_init(); #endif #if ADC_ENABLE user_adc_init(); #endif #if BATTERY_ENABLE user_battery_init(); #endif #if I2C_ENABLE // I2C Devices i2c_master_gpio_init(); #if MOD_RGB_ENABLE mod_rgb_init(); #endif #if MOD_TC_MK2_ENABLE mod_tc_mk2_init(); #endif #if MOD_IO2_ENABLE mod_io2_init(); #endif #if MOD_IRDA_ENABLE mod_irda_init(); #endif #if DEVICE == DIMMER user_dimmer_init(); #endif #endif // SPI Devices #if MOD_LED_8x8_RGB_ENABLE mod_led_8x8_rgb_init(); #endif #if DEVICE == BADGE badge_init(); #endif key_init(); webserver_init(); }
int main(int argc, char *argv[]) { int i, res; static char *const cmd[] = { "/init", NULL }; struct fstab *fstab = NULL; char *inject_path = NULL; char *mrom_dir = NULL; int force_inject = 0; for(i = 1; i < argc; ++i) { if(strcmp(argv[i], "-v") == 0) { printf("%d\n", VERSION_TRAMPOLINE); fflush(stdout); return 0; } else if(strstartswith(argv[i], "--inject=")) inject_path = argv[i] + strlen("--inject="); else if(strstartswith(argv[i], "--mrom_dir=")) mrom_dir = argv[i] + strlen("--mrom_dir="); else if(strcmp(argv[i], "-f") == 0) force_inject = 1; } if(inject_path) { if(!mrom_dir) { printf("--mrom_dir=[path to multirom's data dir] needs to be specified!\n"); fflush(stdout); return 1; } mrom_set_dir(mrom_dir); mrom_set_log_tag("trampoline_inject"); return inject_bootimg(inject_path, force_inject); } umask(000); // Init only the little we need, leave the rest for real init mkdir("/dev", 0755); mkdir("/dev/pts", 0755); mkdir("/dev/socket", 0755); mkdir("/proc", 0755); mkdir("/sys", 0755); mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755"); mount("devpts", "/dev/pts", "devpts", 0, NULL); mount("proc", "/proc", "proc", 0, NULL); mount("sysfs", "/sys", "sysfs", 0, NULL); mount("pstore", "/sys/fs/pstore", "pstore", 0, NULL); #if MR_USE_DEBUGFS_MOUNT // Mount the debugfs kernel sysfs mkdir("/sys/kernel/debug", 0755); mount("debugfs", "/sys/kernel/debug", "debugfs", 0, NULL); #endif klog_init(); // output all messages to dmesg, // but it is possible to filter out INFO messages klog_set_level(6); mrom_set_log_tag("trampoline"); INFO("Running trampoline v%d\n", VERSION_TRAMPOLINE); if(is_charger_mode()) { INFO("Charger mode detected, skipping multirom\n"); goto run_main_init; } #if MR_DEVICE_HOOKS >= 3 tramp_hook_before_device_init(); #endif INFO("Initializing devices...\n"); devices_init(); INFO("Done initializing\n"); if(wait_for_file("/dev/graphics/fb0", 5) < 0) { ERROR("Waiting too long for fb0"); goto exit; } #ifdef MR_POPULATE_BY_NAME_PATH //nkk71 M7 hack Populate_ByName_using_emmc(); #endif fstab = fstab_auto_load(); if(!fstab) goto exit; #if 0 fstab_dump(fstab); //debug #endif // mount and run multirom from sdcard if(mount_and_run(fstab) < 0 && mrom_is_second_boot()) { ERROR("This is second boot and we couldn't mount /data, reboot!\n"); sync(); android_reboot(ANDROID_RB_RESTART, 0, 0); while(1) sleep(1); } exit: if(fstab) fstab_destroy(fstab); // close and destroy everything devices_close(); run_main_init: umount("/dev/pts"); rmdir("/dev/pts"); rmdir("/dev/socket"); if(access(KEEP_REALDATA, F_OK) < 0) { umount(REALDATA); umount("/dev"); rmdir(REALDATA); encryption_destroy(); } encryption_cleanup(); #if MR_USE_DEBUGFS_MOUNT umount("/sys/kernel/debug"); #endif umount("/proc"); umount("/sys/fs/pstore"); umount("/sys"); INFO("Running main_init\n"); fixup_symlinks(); chmod("/main_init", EXEC_MASK); rename("/main_init", "/init"); res = execve(cmd[0], cmd, NULL); ERROR("execve returned %d %d %s\n", res, errno, strerror(errno)); return 0; }
int main(int argc, char *argv[]) { if (argc > 1) return do_cmdline(argc, argv); int res; static char *const cmd[] = { "/init", NULL }; umask(000); // Init only the little we need, leave the rest for real init mkdir("/dev", 0755); mkdir("/dev/pts", 0755); mkdir("/dev/socket", 0755); mkdir("/proc", 0755); mkdir("/sys", 0755); mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755"); mount("devpts", "/dev/pts", "devpts", 0, NULL); mount("proc", "/proc", "proc", 0, NULL); mount("sysfs", "/sys", "sysfs", 0, NULL); mount("pstore", "/sys/fs/pstore", "pstore", 0, NULL); #if MR_USE_DEBUGFS_MOUNT // Mount the debugfs kernel sysfs mkdir("/sys/kernel/debug", 0755); mount("debugfs", "/sys/kernel/debug", "debugfs", 0, NULL); #endif klog_init(); // output all messages to dmesg, // but it is possible to filter out INFO messages klog_set_level(6); mrom_set_log_tag("trampoline"); INFO("Running trampoline v%d\n", VERSION_TRAMPOLINE); if(is_charger_mode()) { INFO("Charger mode detected, skipping multirom\n"); goto run_main_init; } #if MR_DEVICE_HOOKS >= 3 tramp_hook_before_device_init(); #endif INFO("Initializing devices...\n"); devices_init(); INFO("Done initializing\n"); run_core(); // close and destroy everything devices_close(); run_main_init: umount("/dev/pts"); rmdir("/dev/pts"); rmdir("/dev/socket"); if(access(KEEP_REALDATA, F_OK) < 0) { umount("/dev"); } #if MR_USE_DEBUGFS_MOUNT umount("/sys/kernel/debug"); #endif umount("/proc"); umount("/sys/fs/pstore"); umount("/sys"); INFO("Running main_init\n"); fixup_symlinks(); chmod("/main_init", EXEC_MASK); rename("/main_init", "/init"); res = execve(cmd[0], cmd, NULL); ERROR("execve returned %d %d %s\n", res, errno, strerror(errno)); return 0; }
static void init_machine(running_machine *machine) { mame_private *mame = machine->mame_data; int num; /* initialize basic can't-fail systems here */ cpuintrf_init(machine); sndintrf_init(machine); fileio_init(machine); config_init(machine); output_init(machine); state_init(machine); state_save_allow_registration(TRUE); drawgfx_init(machine); palette_init(machine); render_init(machine); ui_init(machine); generic_machine_init(machine); generic_video_init(machine); mame->rand_seed = 0x9d14abd7; /* initialize the base time (if not doing record/playback) */ if (!Machine->record_file && !Machine->playback_file) time(&mame->base_time); else mame->base_time = 0; /* init the osd layer */ if (osd_init(machine) != 0) fatalerror("osd_init failed"); /* initialize the input system */ /* this must be done before the input ports are initialized */ if (code_init(machine) != 0) fatalerror("code_init failed"); /* initialize the input ports for the game */ /* this must be done before memory_init in order to allow specifying */ /* callbacks based on input port tags */ if (input_port_init(machine, machine->gamedrv->ipt) != 0) fatalerror("input_port_init failed"); /* load the ROMs if we have some */ /* this must be done before memory_init in order to allocate memory regions */ rom_init(machine, machine->gamedrv->rom); /* initialize the timers and allocate a soft_reset timer */ /* this must be done before cpu_init so that CPU's can allocate timers */ timer_init(machine); mame->soft_reset_timer = timer_alloc(soft_reset); /* initialize the memory system for this game */ /* this must be done before cpu_init so that set_context can look up the opcode base */ if (memory_init(machine) != 0) fatalerror("memory_init failed"); /* now set up all the CPUs */ if (cpuexec_init(machine) != 0) fatalerror("cpuexec_init failed"); if (cpuint_init(machine) != 0) fatalerror("cpuint_init failed"); #ifdef MESS /* initialize the devices */ devices_init(machine); #endif /* start the save/load system */ saveload_init(machine); /* call the game driver's init function */ /* this is where decryption is done and memory maps are altered */ /* so this location in the init order is important */ ui_set_startup_text("Initializing...", TRUE); if (machine->gamedrv->driver_init != NULL) (*machine->gamedrv->driver_init)(machine); /* start the audio system */ if (sound_init(machine) != 0) fatalerror("sound_init failed"); /* start the video hardware */ if (video_init(machine) != 0) fatalerror("video_init failed"); /* start the cheat engine */ if (options.cheat) cheat_init(machine); /* call the driver's _START callbacks */ if (machine->drv->machine_start != NULL && (*machine->drv->machine_start)(machine) != 0) fatalerror("Unable to start machine emulation"); if (machine->drv->sound_start != NULL && (*machine->drv->sound_start)(machine) != 0) fatalerror("Unable to start sound emulation"); if (machine->drv->video_start != NULL && (*machine->drv->video_start)(machine) != 0) fatalerror("Unable to start video emulation"); /* free memory regions allocated with REGIONFLAG_DISPOSE (typically gfx roms) */ for (num = 0; num < MAX_MEMORY_REGIONS; num++) if (mame->mem_region[num].flags & ROMREGION_DISPOSE) free_memory_region(machine, num); #ifdef MAME_DEBUG /* initialize the debugger */ if (machine->debug_mode) mame_debug_init(machine); #endif }
/****************************************************************************** * FunctionName : user_init * Description : entry of user application, init user function here * Parameters : none * Returns : none *******************************************************************************/ void ICACHE_FLASH_ATTR user_init(void) { system_init_done_cb(user_init_done); // UART Devices #if MOD_RFID_ENABLE mod_rfid_init(); #endif #if MOD_FINGER_ENABLE mod_finger_init(); #endif #if MOD_EMTR_ENABLE mod_emtr_init(); #endif devices_init(); debug("\n\nSDK version: %s\n", system_get_sdk_version()); debug("Firmware: %s\n", config_firmware_bin()); memory_info(); user_config_init(); user_config_load(); #if SSL_ENABLE user_config_load_private_key(); user_config_load_certificate(); #endif user_events_init(); // Scan webserver_register_handler_callback(DEVICES_URL, devices_handler); webserver_register_handler_callback(WIFI_SCAN_URL, wifi_scan_handler); // Native Devices #if BUTTON_ENABLE user_button_init(); #endif #if RELAY_ENABLE user_relay_init(); #endif #if ADC_ENABLE user_adc_init(); #endif #if BATTERY_ENABLE user_battery_init(); #endif // I2C Devices i2c_master_gpio_init(); #if MOD_RGB_ENABLE mod_rgb_init(); #endif #if MOD_TC_MK2_ENABLE mod_tc_mk2_init(); #endif #if MOD_IO2_ENABLE mod_io2_init(); #endif #if MOD_IRDA_ENABLE mod_irda_init(); #endif // SPI Devices #if MOD_LED_8x8_RGB_ENABLE mod_led_8x8_rgb_init(); #endif key_init(); webserver_init(); }
void devices_test() { devices_init(); }