examples/nxscope: make channel 19 configurable
Channel 19 uses an additional thread to send a text message. This commit makes this behaviour configurable.
This commit is contained in:
parent
5cfcd769bf
commit
e7bb97cb5f
@ -55,6 +55,10 @@ config EXAMPLES_NXSCOPE_RXBUF_LEN
|
|||||||
int "nxscope RX buffer length"
|
int "nxscope RX buffer length"
|
||||||
default 32
|
default 32
|
||||||
|
|
||||||
|
config EXAMPLES_NXSCOPE_CHARLOG
|
||||||
|
bool "nxscope send text message over channel 19"
|
||||||
|
default n
|
||||||
|
|
||||||
config EXAMPLES_NXSCOPE_CRIBUF_LEN
|
config EXAMPLES_NXSCOPE_CRIBUF_LEN
|
||||||
int "nxscope critical channels buffer length"
|
int "nxscope critical channels buffer length"
|
||||||
default 32
|
default 32
|
||||||
|
@ -309,6 +309,7 @@ errout:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLES_NXSCOPE_CHARLOG
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: nxscope_charlog_thr
|
* Name: nxscope_charlog_thr
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -336,6 +337,7 @@ static FAR void *nxscope_charlog_thr(FAR void *arg)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -621,12 +623,14 @@ int main(int argc, FAR char *argv[])
|
|||||||
u.s.cri = 0;
|
u.s.cri = 0;
|
||||||
nxscope_chan_init(&nxs, 18, "chan18", u.u8, 0, 4);
|
nxscope_chan_init(&nxs, 18, "chan18", u.u8, 0, 4);
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLES_NXSCOPE_CHARLOG
|
||||||
/* Char channel with metadata */
|
/* Char channel with metadata */
|
||||||
|
|
||||||
u.s.dtype = NXSCOPE_TYPE_CHAR;
|
u.s.dtype = NXSCOPE_TYPE_CHAR;
|
||||||
u.s._res = 0;
|
u.s._res = 0;
|
||||||
u.s.cri = 0;
|
u.s.cri = 0;
|
||||||
nxscope_chan_init(&nxs, 19, "chan19", u.u8, 64, 4);
|
nxscope_chan_init(&nxs, 19, "chan19", u.u8, 64, 4);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
||||||
/* Critical channel */
|
/* Critical channel */
|
||||||
@ -649,6 +653,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLES_NXSCOPE_CHARLOG
|
||||||
/* Create char log thread */
|
/* Create char log thread */
|
||||||
|
|
||||||
env.nxs = &nxs;
|
env.nxs = &nxs;
|
||||||
@ -658,6 +663,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
printf("ERROR: pthread_create failed %d\n", ret);
|
printf("ERROR: pthread_create failed %d\n", ret);
|
||||||
goto errout;
|
goto errout;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
||||||
/* Create critical channel thread */
|
/* Create critical channel thread */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user