Commit Graph

1721 Commits

Author SHA1 Message Date
Xiang Xiao
2f1ecbaf74 Change all .cpp suffix to .cxx suffix
follow the coding standard requirement

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-16 13:57:48 -07:00
Sara Souza
1673df81d1 apps/examples/watcher: Fixed an assert failure 2021-03-16 11:30:04 -07:00
Jiuzhu Dong
4c6ded2661 app: delete NFILE_DESCRIPTORS limits
Change-Id: I3ced2b2b7440a2c79a712cfc97b4cd15d2bddd4c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-12 21:12:07 -08:00
ligd
d4259acc15 rpmsgsocket: add rpmsgsocket test case
Change-Id: Ia07b5915da2c9c96fa8137bcaecdf1b120c76853
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-05 07:51:51 -08:00
Gustavo Henrique Nihei
7ebd1309dd examples/watcher: Add missing dependencies on Kconfig 2021-02-18 17:30:17 +00:00
Gustavo Henrique Nihei
fe5732494b examples/watchdog: Fix printf format warnings 2021-02-15 20:04:07 -08:00
Brennan Ashton
22115cc011 hidkbd: Do not require CONFIG_USBHOST for the app 2021-02-15 00:02:37 -08:00
YAMAMOTO Takashi
6d1d6e76ea wget: print a message on an error
To give the user some clue on what's going.
2021-02-04 00:30:01 -08:00
Xiang Xiao
e4f76ac9eb examples/romfs: Add ldir(soft link) into check
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>
2021-01-21 11:12:40 -03:00
Juha Niskanen
b66002c364 examples/README.md: correct ftpc usage, other minor updates and typos 2021-01-19 19:51:33 +01:00
Xiang Xiao
95a06846bc examples/pty_test: Fix the hardcode uart device path
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>
2021-01-14 08:34:47 +01:00
Juha Niskanen
eceaeb926a netutils/ftpd, examples/ftpd: code cleanup and nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-01-13 20:22:55 -06:00
Xiang Xiao
6aca60133c nsh: Pass the correct command lines to nsh_consolemain
Change-Id: Ic6617cecb6949054e6bdce8757523e7a60d83eb0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:40:18 +08:00
Xiang Xiao
6ddbffd200 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
...

Change-Id: I821743411c33b5412165f1e9020b6c9ce6c24660
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:40:18 +08:00
Nathan Hartman
538c757340 apps/examples/webserver: nxstyle fixes
apps/examples/webserver/webserver_main.c:

    * Fix nxstyle errors.
2021-01-03 21:10:38 -06:00
Nathan Hartman
819454ee6e apps/examples/webserver: When NSH app, allow terminating
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
2021-01-03 21:10:38 -06:00
yjdwbj
92cfd092f7 added: Using nRF24L01+ as A Bluetooth Low Energy Broadcaster/Beacon 2020-12-29 21:13:17 -08:00
Huang Qi
3040c59ae9 Replace all wget with curl
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>
2020-12-21 22:45:46 -06:00
Sara Souza
cb1a424bc1 examples/readme.txt: Added information about watcher example. 2020-12-18 09:10:33 -03:00
Sara Souza
c3494c310a examples: Added watcher and watched examples. 2020-12-18 09:10:33 -03:00
Juha Niskanen
5105474e77 examples/ftpc: proper dual-stack support, also fix getopt re-entrancy issues
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-16 00:40:52 -06:00
John Bampton
db0b595b4b Remove unneeded semicolons and parentheses from Python files 2020-12-12 19:20:38 +01:00
YAMAMOTO Takashi
2bafb70ce1 examples/touchscreen/tc_main.c: Fix a syslog format 2020-12-04 00:04:35 +01:00
Matias N
02c3298fca LVGL: use NuttX's printf() 2020-11-30 22:28:29 -06:00
Diego Herranz
e066cd177c examples/pwm: fix style issue found in CI 2020-11-29 21:59:39 +01:00
Diego Herranz
37c8e5486c examples/pwm: fix help message
- 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).
2020-11-29 21:59:39 +01:00
chao.an
fe915679b1 style/Document: remove unnecessary trailing whitespace
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:10 +01:00
chao.an
b5692d8034 style/code: remove unnecessary trailing whitespace
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:10 +01:00
Xiang Xiao
d64929d736 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-28 12:19:39 +01:00
Xiang Xiao
12a5a5cce9 examples: Ignore the default action if app call sigwait
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>
2020-11-28 12:19:39 +01:00
Xiang Xiao
0eac035245 examples/cctye: change std::isascii to isascii
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
2020-11-27 09:48:40 +09:00
Xiang Xiao
24b6f9199a examples/mld: Fix undefined reference to `mld_catfile'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0948b75fe3aea2351c3584cda9bcb7dd41cdd1f9
2020-11-24 19:33:57 +01:00
Xiang Xiao
a4ae159277 examples/i2schar: Fix the compile error
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
2020-11-24 04:07:55 -08:00
Xiang Xiao
736a21f0d5 examples/chrono: Rename button_daemon to chrono_daemon
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1aaf0a6ec8466c35c96a35b30896def7917c8c03
2020-11-24 04:07:36 -08:00
Xiang Xiao
54d5def4d5 examples/chrono: Fix error: 'CONFIG_EXAMPLES_SLCD_DEVNAME' undeclared
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I04c09878ec55cbf910159ab84e0b402cc94dad9b
2020-11-24 04:07:36 -08:00
Philippe Coval
4e4c92fa98 fxos8700cq_test: Adjust rate and lint json output
Change-Id: Iab80381e4f451ac186515cd5593434d80e4c7421
Relate-to: https://github.com/rzr/aframe-smart-home/issues/3
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-11-17 20:11:38 -08:00
YAMAMOTO Takashi
2d4d8aa643 examples/touchscreen/tc_main.c: Fix a printf format warning 2020-11-15 21:33:25 -08:00
YAMAMOTO Takashi
3690669242 examples/fboverlay/fboverlay_main.c: Fix a printf format warning 2020-11-15 19:43:36 -08:00
YAMAMOTO Takashi
c408462892 examples/romfs/romfs_main.c: Fix a printf format warning 2020-11-14 17:49:14 -08:00
YAMAMOTO Takashi
473fef4e58 examples/romfs/romfs_main.c: Appease nxstyle 2020-11-14 17:49:14 -08:00
YAMAMOTO Takashi
fa727e08f1 examples/fboverlay/fboverlay_main.c: Fix printf format warnings 2020-11-14 17:49:14 -08:00
YAMAMOTO Takashi
0d3fde2d6b examples/media/media_main.c: Fix printf format warnings 2020-11-14 17:49:14 -08:00
YAMAMOTO Takashi
780891f8aa examples/media/media_main.c: Appease nxstyle 2020-11-14 17:49:14 -08:00
Alan C. Assis
03284a07b9 Fix license headers on Make.defs and Makefile 2020-11-13 05:52:38 -08:00
Alan C. Assis
048c44cd61 Add ESP32 High Memory Application Example 2020-11-13 05:52:38 -08:00
YAMAMOTO Takashi
590e6432cb examples/udp/udp_client.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
4f99572f65 examples/chrono/chrono_main.c: Fix a few printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
a0c7a719c4 examples/chrono/chrono_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
229d62eddb examples/mount/mount_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
e2b94845b8 examples/can/can_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
8532f0ee96 examples/ina219/ina219_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
e4823bc62c examples/bmp180/bmp180_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
1c30ff6fe4 examples/dac/dac_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
31118b0a94 examples/dac/dac_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
b2299b4c8f examples/can/can_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
ff130be078 examples/fboverlay/fboverlay_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
20c7a06a84 examples/fboverlay/fboverlay_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
379c0c1fd4 examples/fb/fb_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
69b6bb32a8 examples/nrf24l01_term/nrf24l01_term.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
2ff55ac151 examples/nrf24l01_term/nrf24l01_term.c: Appease nxstyle
Still has a few errors because of include/nuttx/wireless/nrf24l01.h.

examples/nrf24l01_term/nrf24l01_term.c:125:33: error: Mixed case identifier found
examples/nrf24l01_term/nrf24l01_term.c:129:15: error: Mixed case identifier found
2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
0b792be90a examples/pwm/pwm_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
acc750c8d6 examples/can/can_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
a9e8b5c3b0 examples/can/can_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
4ff27f2a03 examples/serialrx/serialrx_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
575063150d examples/serialrx/serialrx_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
6d2bba1004 examples/pwlines/pwlines_update.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
2556c6f800 examples/pwlines/pwlines_update.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
20b7b28f55 examples/bridge/bridge_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
c3e63c2a3b examples/bridge/bridge_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
5a766cd93b examples/elf/elf_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
1723a68b0a examples/posix_spawn/spawn_main.c: Fix a type mismatch 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
67f18f8f2c examples/touchscreen/tc_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
c8f2f0f262 examples/touchscreen/tc_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
89a4d02fce examples/adc/adc_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
5576c127fd examples/adc/adc_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
7fa6f69756 examples/sx127x_demo/sx127x_demo.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
53f9f600d2 sx127x_demo.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
c5c327ab02 examples/gpio/gpio_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
99884e40f1 examples/buttons/buttons_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
700b10f2aa examples/buttons/buttons_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
54cb3ca933 examples/mtdrwb/mtdrwb_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
3993e99471 examples/mtdrwb/mtdrwb_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
ffc32ad70d examples/mtdpart/mtdpart_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
2aa2e0d897 examples/mtdpart/mtdpart_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
20b0ebfd08 examples/mount/mount_main.c: Fix fprintf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
175432f54b examples/pf_ieee802154/pf_client.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
16f805cb22 examples/pf_ieee802154/pf_client.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
0d09a09f33 examples/module/module_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
4736d33410 examples/ipforward/ipforward.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
dcfebf1cea examples/ipforward/ipforward.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
5b1eeb5cae examples/nxlines/nxlines_bkgd.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
5ee054186c examples/nxlines/nxlines_bkgd.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
862a9fcbda examples/pwm/pwm_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
b04e19ffc7 examples/pwm/pwm_main.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
saramonteiro
2e8f068a61 examples/watchdog/watchdog_main.c: Elapsed var is now being updated through clock 2020-11-07 23:36:14 -08:00
Subhra Sankha Sarkar
c431c25d14 Fix for sim:mount selftest failure 2020-11-05 18:44:15 -08:00
Matias N
0d7ef382c8 hello: update to Apache license 2020-10-31 09:27:23 -07:00
Matias N
5bcaeff541 lvgl: use malloc/free for memory handling and "tickless" tick interface
This makes LVGL use malloc/free to handle its memory (instead of
their own memory handling) and supports a tick interface by which
LVGL can ask NuttX the elapsed time, instead of having to periodically
"tick" LVGL internal time in a thread.
2020-10-29 22:26:32 -07:00
Xiang Xiao
e76ab9c868 Remove all fclose with stdin, stdout and stderr
since it is wrong to close the builtin stream and specially note
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fclose.html:

Since after the call to fclose() any use of stream results in
undefined behavior, fclose() should not be used on stdin, stdout,
or stderr except immediately before process termination (see XBD
Process Termination), so as to avoid triggering undefined behavior
in other standard interfaces that rely on these streams. If there
are any atexit() handlers registered by the application, such a
call to fclose() should not occur until the last handler is
finishing. Once fclose() has been used to close stdin, stdout, or
stderr, there is no standard way to reopen any of these streams.

and it is also unnecessary because the stream always get flushed.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-29 20:43:59 +09:00
saramonteiro
2279eeb0a7 Examples/WDT: Added argument to select devname 2020-10-27 14:10:35 -03:00