void shellInit(void) { telnetInit(2500); g_shellCommandLen = 0; g_cmdNum = 0; strcpy(g_shellUserName, "admin"); strcpy(g_shellPassword, "admin"); //shellRegCmd("paint", cmdLcdPait, "paint start..."); }
//Main routine. Initialize stdout, the I/O, filesystem and the webserver and we're done. void user_init(void) { mmInit(mmData); //Redirect stdout to websocket os_install_putc1((void *)stdoutPutcharWs); ioInit(); captdnsInit(); telnetInit(333); // 0x40200000 is the base address for spi flash memory mapping, ESPFS_POS is the position // where image is written in flash that is defined in Makefile. #ifdef ESPFS_POS espFsInit((void*)(0x40200000 + ESPFS_POS)); #else espFsInit((void*)(webpages_espfs_start)); #endif httpdInit(builtInUrls, 80); os_timer_disarm(&websockTimer); os_timer_setfn(&websockTimer, websockTimerCb, NULL); os_timer_arm(&websockTimer, 1000, 1); os_printf("\nReady\n"); wifi_set_sleep_type(LIGHT_SLEEP_T); }