diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-05-24 12:00:15 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-05-24 12:00:15 -0600 |
commit | 554d4df527c830038562c975e690f9f7d4038be2 (patch) | |
tree | 24d40dae3999733e4c129ca1929210125e2726c9 /apps | |
parent | 4ec39dfdc2134d73a809f1159460156a101c89a5 (diff) | |
download | nuttx-554d4df527c830038562c975e690f9f7d4038be2.tar.gz nuttx-554d4df527c830038562c975e690f9f7d4038be2.tar.bz2 nuttx-554d4df527c830038562c975e690f9f7d4038be2.zip |
Additional bug fixes and minor extensions to the STM32L-Disovery segment LCD support and to the apps/examples/slcd segment LCD test.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/examples/slcd/slcd_main.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/apps/examples/slcd/slcd_main.c b/apps/examples/slcd/slcd_main.c index 1d93993fb..a5fb12d9f 100644 --- a/apps/examples/slcd/slcd_main.c +++ b/apps/examples/slcd/slcd_main.c @@ -243,8 +243,20 @@ static void slcd_puts(FAR struct lib_outstream_s *outstream, int slcd_main(int argc, char *argv[]) { FAR struct slcd_test_s *priv = &g_slcdtest; + FAR const char *str = g_slcdhello; int ret; + /* Parse the command line. For now, only a single optional string argument + * is supported. + */ + +#if defined(CONFIG_NSH_BUILTIN_APPS) + if (argc > 1) + { + str = argv[1]; + } +#endif + /* Initialize the output stream */ memset(priv, 0, sizeof(struct slcd_test_s)); @@ -273,8 +285,8 @@ int slcd_main(int argc, char *argv[]) goto errout_with_fd; } - printf("Geometry rows: %d columns: %d\n", - priv->geo.nrows, priv->geo.ncolumns); + printf("Geometry rows: %d columns: %d nbars: %d\n", + priv->geo.nrows, priv->geo.ncolumns, priv->geo.nbars); /* Home the cursor and clear the display */ @@ -283,8 +295,8 @@ int slcd_main(int argc, char *argv[]) /* Say hello */ - printf("Print [%s]\n", g_slcdhello); - slcd_puts(&priv->stream, g_slcdhello); + printf("Print [%s]\n", str); + slcd_puts(&priv->stream, str); slcd_flush(&priv->stream); /* Normal exit */ |