Browse Source

samples: shell now emits a banner

It is useful to have the shell emit the zephyr version number.
Output looks like this:
  Zephyr version 1.3.0
  shell>

Change-Id: I2608272564a5d2fe39f263c420a897d845457a98
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
pull/255/head
Chuck Jordan 9 years ago committed by Anas Nashif
parent
commit
4f07126496
  1. 6
      samples/shell/src/main.c

6
samples/shell/src/main.c

@ -44,5 +44,11 @@ const struct shell_cmd commands[] = { @@ -44,5 +44,11 @@ const struct shell_cmd commands[] = {
void main(void)
{
uint32_t version = sys_kernel_version_get();
printk("Zephyr version %d.%d.%d\n",
SYS_KERNEL_VER_MAJOR(version),
SYS_KERNEL_VER_MINOR(version),
SYS_KERNEL_VER_PATCHLEVEL(version));
shell_init("shell> ", commands);
}

Loading…
Cancel
Save