blob: 9ed8854e1e84eef6015a353fc83dc58926e4a3a2 [file] [log] [blame]
/*
* Copyright (c) 2017 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/printk.h>
#include <zephyr/console/console.h>
void main(void)
{
console_getline_init();
printk("Enter a line\n");
while (1) {
char *s = console_getline();
printk("line: %s\n", s);
printk("last char was: 0x%x\n", s[strlen(s) - 1]);
}
}