examples/qencoder/qe_main.c:
* main(): Call to printf() had "%d" but argument was
int32_t, leading to compiler warning. Change format
specifier to PRIi32 (suggested by Gregory Nutt).
since romfs can return the soft link with the kernel change:
commit 67ef70d460db4695b950208d861ff47d4a40bdb3
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Mon Jul 6 00:34:32 2020 +0800
vfs/dirread: Should return the same file type as lstat
by extend the possible value of d_type for the special file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
should be CONFIG_EXAMPLES_PTYTEST_SERIALDEV, regression in commit:
commit 6ddbffd200
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Sun Jan 3 23:50:50 2021 -0800
examples/pty_test: Remove O_NONBLOCK from open
to avoid the log storm:
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
to avoid the log storm:
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
ERROR Failed to read from serial: 11
...
Change-Id: I821743411c33b5412165f1e9020b6c9ce6c24660
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
The examples/webserver app can be built in two modes:
(1) in standalone mode, or
(2) as a NSH built-in app.
When run in standalone mode, the webserver program is responsible for
bringing up the network (including DHCP if configured). Also, the
webserver program must never exit, so if httpd fails (i.e., if
httpd_listen() returns), webserver_main() goes into an endless loop.
When run as a NSH built-in app, network bring-up is the responsibility
of other processes and the webserver program assumes the network is
already properly configured when it starts. Also, if httpd_listen()
returns, the webserver program should terminate.
Prior to this change, the webserver program would *not* terminate,
even when running as a NSH built-in app. For example:
nsh> webserver &
webserver [6:100]
nsh> Starting webserver
nsh> kill -9 6
nsh> webserver_main: Still running
nsh> webserver_main: Still running
nsh> webserver_main: Still running
nsh> webserver_main: Still running
The line "webserver_main: Still running" would be forever printed
every 3 seconds, however httpd_listen() is no longer running and the
webserver is not functional.
This change makes the webserver play nicely when running as a NSH
built-in app. With this change applied:
nsh> webserver &
webserver [6:100]
nsh> Starting webserver
nsh> kill -9 6
nsh> webserver_main: Exiting
apps/examples/webserver/webserver_main.c:
* main(): Infer from CONFIG_NSH_BUILTIN_APPS if this is a
standalone program or a NSH built-in app. (See [1], where
similar logic was added to decide whether to do network bring-up
or not.) If standalone, run forever as before. If built-in
app, exit when httpd terminates.
References:
[1] Commit 3a21b0b222
wget is missing from some system (like macOS and Windows native),
it's better to use curl to simplify build environment.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
- Fix bug for multiple PWM outputs (CONFIG_PWM_MULTICHAN). Wrong define
was in use and only the information about the first channel was shown.
- Fix formatting (a few line breaks and spaces missing).
Because the configured signo may have the default action(e.g. SIGPIPE),
and then will generate the bad side effect before the caller wakeup.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
since isascii isn't a standard defined function and then
may not exist in all cctype header file(e.g. libc++):
cctype_main.cxx: In function 'int cctype_main(int, char**)':
cctype_main.cxx:64:45: error: 'isascii' is not a member of 'std'; did you mean 'isascii'?
64 | std::isspace(i), std::isascii(i), std::isprint(i), std::isgraph(i),
| ^~~~~~~
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8c4fd5ccf120ae5a1566cd4d90695e47ffc30cad
2schar_main.c: In function 'parse_args':
i2schar_main.c:199:20: error: 'struct i2schar_state_s' has no member named 'rxcount'
199 | i2schar->rxcount = (uint32_t)value;
| ^~
i2schar_main.c:211:20: error: 'struct i2schar_state_s' has no member named 'txcount'
211 | i2schar->txcount = (uint32_t)value;
| ^~
i2schar_main.c: In function 'i2schar_main':
i2schar_main.c:276:16: error: 'struct i2schar_state_s' has no member named 'rxcount'
276 | g_i2schar.rxcount = CONFIG_EXAMPLES_I2SCHAR_RXBUFFERS;
| ^
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie85a9bc46516f44e4a286da3d40f1b02a2bbfde0