zephyr/samples/subsys/console/getchar/src/main.c
Anas Nashif 3405607d9e license: add missing licenses and copyright
We were missing license boilerplate in many files, add them

Jira: ZEP-1464

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-08 10:41:56 -04:00

21 lines
276 B
C

/*
* Copyright (c) 2017 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <misc/printk.h>
#include <console.h>
void main(void)
{
console_init();
while (1) {
u8_t c = console_getchar();
printk("char: [0x%x] %c\n", c, c);
}
}