Merge pull request #717 from karrots/feature/baudrate_define
Add #DEFINE to user_config.h to enable easier bit rate selection.
This commit is contained in:
commit
3e0a3e992e
app
|
@ -19,8 +19,12 @@
|
||||||
#ifdef DEVELOP_VERSION
|
#ifdef DEVELOP_VERSION
|
||||||
#define NODE_DEBUG
|
#define NODE_DEBUG
|
||||||
#define COAP_DEBUG
|
#define COAP_DEBUG
|
||||||
|
#define BIT_RATE_DEFAULT BIT_RATE_74880
|
||||||
|
#else
|
||||||
|
#define BIT_RATE_DEFAULT BIT_RATE_9600
|
||||||
#endif /* DEVELOP_VERSION */
|
#endif /* DEVELOP_VERSION */
|
||||||
|
|
||||||
|
|
||||||
#define NODE_ERROR
|
#define NODE_ERROR
|
||||||
|
|
||||||
#ifdef NODE_DEBUG
|
#ifdef NODE_DEBUG
|
||||||
|
|
|
@ -165,12 +165,8 @@ 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
|
||||||
|
|
Loading…
Reference in New Issue