コード例 #1
0
ファイル: user_main.c プロジェクト: whdlut/ESP8266_NONOS_SDK
void ICACHE_FLASH_ATTR user_init(void)
{
    char buf[128] = {0};
    at_customLinkMax = 5;
	sdio_slave_init();
	sdio_register_recv_cb(sdio_recv_data_callback);
    at_init();
	at_register_uart_rx_buffer_fetch_cb(at_custom_uart_rx_buffer_fetch_cb);
#ifdef ESP_AT_FW_VERSION
    if ((ESP_AT_FW_VERSION != NULL) && (os_strlen(ESP_AT_FW_VERSION) < 64)) {
        os_sprintf(buf,"compile time:%s %s\r\n"ESP_AT_FW_VERSION,__DATE__,__TIME__);
    } else {
        os_sprintf(buf,"compile time:%s %s",__DATE__,__TIME__);
    }
#else
    os_sprintf(buf,"compile time:%s %s",__DATE__,__TIME__);
#endif
    at_set_custom_info(buf);
	at_fake_uart_enable(TRUE,at_sdio_response);
	
    at_cmd_array_regist(&at_custom_cmd[0], sizeof(at_custom_cmd)/sizeof(at_custom_cmd[0]));

	espconn_tcp_set_wnd(4);
	at_port_print("\r\nready\r\n");

#ifdef SDIO_DEBUG
	os_timer_disarm(&at_spi_check);
	os_timer_setfn(&at_spi_check, (os_timer_func_t *)at_spi_check_cb, NULL);
	os_timer_arm(&at_spi_check, 1000, 1);
	os_printf("\r\ntimer start\r\n");
#endif
}
コード例 #2
0
void user_init(void)
{
    char buf[64] = {0};
    at_customLinkMax = 5;
    at_init();
    os_sprintf(buf,"eMax' NTP Version:%s %s",__DATE__,__TIME__);
    at_set_custom_info(buf);
    at_port_print("\r\nready\r\n");
    at_cmd_array_regist(&at_custom_cmd[0], sizeof(at_custom_cmd)/sizeof(at_custom_cmd[0]));
}
コード例 #3
0
void ICACHE_FLASH_ATTR
shield_init()
{
	wifi_status_led_install(STATUS_LED_PIN, STATUS_LED_MUX, STATUS_LED_FUNC);
	
	uart_init(DEFAULT_BAUD_RATE, DEFAULT_BAUD_RATE);
	
	os_memset(resetCommand, MAX_RESET_STR_LEGNTH + 1, 0);
	
    at_cmd_array_regist(&at_duinoShield_cmd[0], sizeof(at_duinoShield_cmd)/sizeof(at_duinoShield_cmd[0]));
}
コード例 #4
0
ファイル: user_main.c プロジェクト: HublessGenericIoT/ESP8266
void ICACHE_FLASH_ATTR user_init(void)
{
    char buf[64] = {0};
    at_customLinkMax = 5;
    at_init();
    os_sprintf(buf,"compile time:%s %s",__DATE__,__TIME__);
    at_set_custom_info(buf);
    at_port_print("\r\nready\r\n");
    at_cmd_array_regist(&at_custom_cmd[0], sizeof(at_custom_cmd)/sizeof(at_custom_cmd[0]));
	at_port_print("\r\n***==================================***");
	at_port_print("\r\n***  Welcome to at espconn demo!!!   ***");
	at_port_print("\r\n*** Please create a TCP Server on PC,***");
	at_port_print("\r\n*** then enter command AT+TEST.      ***");
	at_port_print("\r\n***==================================***\r\n");
}