Sign in
pigweed
/
third_party
/
github
/
zephyrproject-rtos
/
zephyr
/
b4ec662193fa0129e22c9411e62c671d1533af09
/
.
/
samples
/
subsys
/
console
/
getline
/
src
/
main.c
blob: 18d3886c97da639321deffdb42eea4cc253d029f [
file
] [
log
] [
blame
]
#include
<string.h>
#include
<zephyr.h>
#include
<misc/printk.h>
#include
<console.h>
void
main
(
void
)
{
console_getline_init
();
while
(
1
)
{
char
*
s
=
console_getline
();
printk
(
"line: %s\n"
,
s
);
printk
(
"last char was: 0x%x\n"
,
s
[
strlen
(
s
)
-
1
]);
}
}