Browse Source

samples: hello_world: use printf

Instead of printk. This change aligns the sample a bit more to the
canonical "hello world" sample in C. Also, samples should in general be
as portable as possible.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
pull/61591/head
Gerard Marull-Paretas 2 years ago committed by Carles Cufí
parent
commit
f623fcf398
  1. 4
      samples/hello_world/src/main.c

4
samples/hello_world/src/main.c

@ -4,10 +4,10 @@ @@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <stdio.h>
int main(void)
{
printk("Hello World! %s\n", CONFIG_BOARD);
printf("Hello World! %s\n", CONFIG_BOARD);
return 0;
}

Loading…
Cancel
Save