move nodemcu init stage after user_init(), rebuild bin
This commit is contained in:
parent
f676825872
commit
9b472a465b
|
@ -50,30 +50,8 @@ extern void spiffs_mount();
|
||||||
|
|
||||||
// extern uint16_t flash_get_sec_num();
|
// extern uint16_t flash_get_sec_num();
|
||||||
|
|
||||||
/******************************************************************************
|
void nodemcu_init(void)
|
||||||
* FunctionName : user_init
|
|
||||||
* Description : entry of user application, init user function here
|
|
||||||
* Parameters : none
|
|
||||||
* Returns : none
|
|
||||||
*******************************************************************************/
|
|
||||||
void user_init(void)
|
|
||||||
{
|
{
|
||||||
// NODE_DBG("SDK version:%s\n", system_get_sdk_version());
|
|
||||||
// system_print_meminfo();
|
|
||||||
// os_printf("Heap size::%d.\n",system_get_free_heap_size());
|
|
||||||
// os_delay_us(50*1000); // delay 50ms before init uart
|
|
||||||
|
|
||||||
#ifdef DEVELOP_VERSION
|
|
||||||
uart_init(BIT_RATE_74880, BIT_RATE_74880);
|
|
||||||
#else
|
|
||||||
uart_init(BIT_RATE_9600, BIT_RATE_9600);
|
|
||||||
#endif
|
|
||||||
// uart_init(BIT_RATE_115200, BIT_RATE_115200);
|
|
||||||
|
|
||||||
#ifndef NODE_DEBUG
|
|
||||||
system_set_os_print(0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NODE_ERR("\n");
|
NODE_ERR("\n");
|
||||||
// Initialize platform first for lua modules.
|
// Initialize platform first for lua modules.
|
||||||
if( platform_init() != PLATFORM_OK )
|
if( platform_init() != PLATFORM_OK )
|
||||||
|
@ -119,3 +97,30 @@ void user_init(void)
|
||||||
task_init();
|
task_init();
|
||||||
system_os_post(USER_TASK_PRIO_0,SIG_LUA,'s');
|
system_os_post(USER_TASK_PRIO_0,SIG_LUA,'s');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* FunctionName : user_init
|
||||||
|
* Description : entry of user application, init user function here
|
||||||
|
* Parameters : none
|
||||||
|
* Returns : none
|
||||||
|
*******************************************************************************/
|
||||||
|
void user_init(void)
|
||||||
|
{
|
||||||
|
// NODE_DBG("SDK version:%s\n", system_get_sdk_version());
|
||||||
|
// system_print_meminfo();
|
||||||
|
// os_printf("Heap size::%d.\n",system_get_free_heap_size());
|
||||||
|
// os_delay_us(50*1000); // delay 50ms before init uart
|
||||||
|
|
||||||
|
#ifdef DEVELOP_VERSION
|
||||||
|
uart_init(BIT_RATE_74880, BIT_RATE_74880);
|
||||||
|
#else
|
||||||
|
uart_init(BIT_RATE_9600, BIT_RATE_9600);
|
||||||
|
#endif
|
||||||
|
// uart_init(BIT_RATE_115200, BIT_RATE_115200);
|
||||||
|
|
||||||
|
#ifndef NODE_DEBUG
|
||||||
|
system_set_os_print(0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
system_init_done_cb(nodemcu_init);
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue