From ba91ff10e8c974e50e429d072641ac5e0acdd72e Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Wed, 19 Oct 2016 17:03:52 +0200 Subject: nwztools: add a new plattools directory with code to run on the device This is code is intended to development into a library of code for the NWZ that will be useful to write the "bootloader" on those device. At the same time, it comes with test programs that are easy to run in firmware upgrade mode and also provide a great test bench for the library. At the moment, two test programs are available: - test_display: simply prints two messages using /usr/bin/lcdmsg - test_keys: displays input key event Change-Id: I9d214894ffc9127b528fcdd3eb5d6b61f4e657a7 --- utils/nwztools/plattools/test_display.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 utils/nwztools/plattools/test_display.c (limited to 'utils/nwztools/plattools/test_display.c') diff --git a/utils/nwztools/plattools/test_display.c b/utils/nwztools/plattools/test_display.c new file mode 100644 index 0000000000..a0dc706624 --- /dev/null +++ b/utils/nwztools/plattools/test_display.c @@ -0,0 +1,30 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2016 Amaury Pouly + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "nwz_lib.h" + +int main(int argc, char **argv) +{ + /* clear screen and display welcome message */ + nwz_lcdmsg(true, 0, 0, "test_display"); + nwz_lcdmsg(false, 3, 10, "This program will stop in 5 seconds"); + sleep(5); + return 0; +} -- cgit v1.2.3