1 /*
2  * Copyright (c) 2017 Linaro Limited
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include <zephyr/sys/printk.h>
9 #include <zephyr/console/console.h>
10 
main(void)11 int main(void)
12 {
13 	console_init();
14 
15 	printk("Start typing characters to see their hex codes printed\n");
16 
17 	while (1) {
18 		uint8_t c = console_getchar();
19 
20 		printk("char: [0x%x] %c\n", c, c);
21 	}
22 	return 0;
23 }
24