Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
9b472a46
Commit
9b472a46
authored
Jan 23, 2015
by
funshine
Browse files
move nodemcu init stage after user_init(), rebuild bin
parent
f6768258
Changes
2
Show whitespace changes
Inline
Side-by-side
app/user/user_main.c
View file @
9b472a46
...
...
@@ -50,30 +50,8 @@ extern void spiffs_mount();
// extern uint16_t flash_get_sec_num();
/******************************************************************************
* FunctionName : user_init
* Description : entry of user application, init user function here
* Parameters : none
* Returns : none
*******************************************************************************/
void
user_init
(
void
)
void
nodemcu_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
"
);
// Initialize platform first for lua modules.
if
(
platform_init
()
!=
PLATFORM_OK
)
...
...
@@ -119,3 +97,30 @@ void user_init(void)
task_init
();
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
);
}
pre_build/latest/nodemcu_latest.bin
View file @
9b472a46
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment