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
66e65bd3
Commit
66e65bd3
authored
Oct 29, 2015
by
Jonathan karras
Browse files
Add #DEFINE to user_config.h to enable easier bit rate selection.
parent
f11a5df9
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/include/user_config.h
View file @
66e65bd3
...
@@ -19,7 +19,11 @@
...
@@ -19,7 +19,11 @@
#ifdef DEVELOP_VERSION
#ifdef DEVELOP_VERSION
#define NODE_DEBUG
#define NODE_DEBUG
#define COAP_DEBUG
#define COAP_DEBUG
#endif
/* DEVELOP_VERSION */
#define BIT_RATE_DEFAULT BIT_RATE_74880
#else
#define BIT_RATE_DEFAULT BIT_RATE_9600
#endif
/* DEVELOP_VERSION */
#define NODE_ERROR
#define NODE_ERROR
...
...
app/user/user_main.c
View file @
66e65bd3
...
@@ -83,7 +83,7 @@ void task_init(void){
...
@@ -83,7 +83,7 @@ void task_init(void){
void
nodemcu_init
(
void
)
void
nodemcu_init
(
void
)
{
{
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
)
{
{
// This should never happen
// This should never happen
...
@@ -117,7 +117,7 @@ void nodemcu_init(void)
...
@@ -117,7 +117,7 @@ void nodemcu_init(void)
// Flash init data at FLASHSIZE - 0x04000 Byte.
// Flash init data at FLASHSIZE - 0x04000 Byte.
flash_init_data_default
();
flash_init_data_default
();
// Flash blank data at FLASHSIZE - 0x02000 Byte.
// Flash blank data at FLASHSIZE - 0x02000 Byte.
flash_init_data_blank
();
flash_init_data_blank
();
}
}
#if defined( BUILD_WOFS )
#if defined( BUILD_WOFS )
...
@@ -165,14 +165,10 @@ void user_init(void)
...
@@ -165,14 +165,10 @@ void user_init(void)
// os_printf("Heap size::%d.\n",system_get_free_heap_size());
// os_printf("Heap size::%d.\n",system_get_free_heap_size());
// os_delay_us(50*1000); // delay 50ms before init uart
// os_delay_us(50*1000); // delay 50ms before init uart
UartBautRate
br
=
UartBautRate
br
=
BIT_RATE_DEFAULT
;
#ifdef DEVELOP_VERSION
BIT_RATE_74880
;
#else
BIT_RATE_9600
;
#endif
uart_init
(
br
,
br
,
USER_TASK_PRIO_0
,
SIG_UARTINPUT
);
uart_init
(
br
,
br
,
USER_TASK_PRIO_0
,
SIG_UARTINPUT
);
#ifndef NODE_DEBUG
#ifndef NODE_DEBUG
system_set_os_print
(
0
);
system_set_os_print
(
0
);
#endif
#endif
...
...
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