Commit Graph

2133 Commits

Author SHA1 Message Date
simbit18
a37267e644 apps/examples/xbc_test/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
3a912b8778 apps/examples/watcher/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
5578539c88 apps/examples/sht3x/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
826b95a377 apps/examples/posix_spawn/filesystem/hello/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
1a0cd7211a apps/examples/nxscope/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
311e1edbdb apps/examples/nxflat/tests/struct/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
478ad2c782 apps/examples/noteprintf/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
e4f0a55673 apps/examples/mount/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
63a80df4e2 apps/examples/hello_zig/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
de4c99f870 apps/examples/hello_rust/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
0a187004c1 apps/examples/hello_nim/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
2235f33033 apps/examples/hello/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
simbit18
bfdb76c609 apps/examples/cordic/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-17 03:23:12 +01:00
jturnsek
b13f70ca59 Nng library and pubsub example 2023-03-08 10:49:13 +08:00
simbit18
4a9752ed3d Update pwm.h
Fix nxstyle
2023-03-07 10:00:43 +08:00
simbit18
5854208e55 apps/examples/dac/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
943fda1aa8 apps/examples/audio_rttl/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
9fc5fea946 apps/examples/audio_rttl/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
2bfa344cc0 apps/examples/relays/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
853e574800 apps/examples/etl/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
15b24123f5 apps/examples/nxdemo/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
b85bd22fe1 apps/examples/esp32_himem/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
82c78c6734 apps/examples/esp32_himem/Make.def:sFix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
b6cd7679e4 apps/examples/pwm/pwm.h: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
71bbfbea43 apps/examples/mtdrwb/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
24667d219e apps/examples/tcp_ipc_server/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
7c803d28e6 apps/examples/tcp_ipc_server/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
2792127849 apps/examples/tcp_ipc_client/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 10:00:43 +08:00
simbit18
13315255e5 apps/examples/tcp_ipc_client/Make.defs: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-07 10:00:43 +08:00
Gustavo Henrique Nihei
f500c64962 Include missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-07 09:58:13 +08:00
simbit18
02d293d4b7 qe.h: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-06 05:19:02 -08:00
simbit18
baf15a1a89 apps/examples/qencoder/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-06 05:19:02 -08:00
chao an
4f11f38c38 interpreters/wamr: add compile role of WebAssembly
Add compilation rules to support WebAssembly(WASM/WAMR):

1. Compile Toolchain
 1> Download WASI sdk and export the WASI_SDK_PATH path:

$ wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz
$ tar xf wasi-sdk-19.0-linux.tar.gz
Put wasi-sdk-19.0 to your host WASI_SDK_PATH environment variable, like:
$ export WASI_SDK_PATH=`pwd`/wasi-sdk-19.0

 2> Download Wamr "wamrc" AOT compiler and export to the PATH:
$ mkdir wamrc
$ wget https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-1.1.2/wamrc-1.1.2-x86_64-ubuntu-20.04.tar.gz
$ tar xf wamrc-1.1.2-x86_64-ubuntu-20.04.tar.gz
$ export PATH=$PATH:$PWD

2. Configuring and running

 1> Configuring sim/wamr and compile:

nuttx$ ./tools/configure.sh  sim/wamr
nuttx$ make
...
Wamrc Generate AoT: /home/archer/code/nuttx/n5/apps/wasm/hello.aot
Wamrc Generate AoT: /home/archer/code/nuttx/n5/apps/wasm/coremark.aot
LD:  nuttx

 2> Copy the generated wasm file(Interpreter/AoT)

nuttx$ cp ../apps/wasm/hello.aot .
nuttx$ cp ../apps/wasm/hello.wasm .
nuttx$ cp ../apps/wasm/coremark.wasm .

 3> Run iwasm

nuttx$ ./nuttx
NuttShell (NSH) NuttX-10.4.0
nsh> iwasm /data/hello.wasm
Hello, World!!
nsh> iwasm /data/hello.aot
Hello, World!!
nsh> iwasm /data/coremark.wasm
2K performance run parameters for coremark.
CoreMark Size    : 666
Total ticks      : 12000
Total time (secs): 12.000000
Iterations/Sec   : 5.000000
Iterations       : 60
Compiler version : Clang 15.0.7
Compiler flags   : Using NuttX compilation options
Memory location  : Defined by the NuttX configuration
seedcrc          : 0xe9f5
[0]crclist       : 0xe714
[0]crcmatrix     : 0x1fd7
[0]crcstate      : 0x8e3a
[0]crcfinal      : 0xa14c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 5.000000 / Clang 15.0.7 Using NuttX compilation options / Defined by the NuttX configuration

Co-Authored-By: Huang Qi <huangqi3@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-06 13:23:44 +02:00
simbit18
b370f77851 Update batt_main.c 2023-03-04 13:50:22 +08:00
simbit18
d4e85ce384 apps/examples/battery/batt_main.c: Fix mistakes in comments
Fix mistakes in comments
2023-03-04 13:50:22 +08:00
simbit18
13d2cc1d88 apps/examples/battery/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-04 13:50:22 +08:00
simbit18
e7a86f38d3 apps/examples/battery/Makefile:Fix mistakes in comments
Fix mistakes in comments
2023-03-04 13:50:22 +08:00
simbit18
68fee5effb apps/examples/ina226/Makefile: Fix mistake in comment
fix relative path error
2023-03-04 01:43:30 +08:00
simbit18
4e4ccd6c73 apps/examples/apds9960/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-04 01:43:17 +08:00
simbit18
88b01447b5 apps/examples/lp503x/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-04 01:43:03 +08:00
simbit18
006e33c646 apps/examples/hidkbd/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-04 01:43:03 +08:00
simbit18
2254074f82 apps/examples/can/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-04 01:43:03 +08:00
Xiang Xiao
21bc466a2b Remove the tail space char from all files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-03 00:18:36 +02:00
yinshengkai
4f04151f17 exampels/note: modify SCHED_NOTE_XXX -> sched_note_xxx
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-02 11:20:40 +08:00
SPRESENSE
b58ecee1c9 apps/examples/udp: Fix warnings by -Wformat
Fix warnings where address of IPv4 is displayed.
2023-03-02 11:20:06 +08:00
Michal Lenc
99b99c8c5e pwm: update channel range with support of 0 and -1
PWM drivers support channel numbers 0 (skip the channel) and -1 (skip this
channel and all following channels). This commit enables usage of this
numbers in PWM example application.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-27 22:33:56 +08:00
Takeyoshi Kikuchi
c785e32183 add "hello_nim" example application written by Nim.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
2023-02-27 10:15:33 +01:00
lilei19
41f60bd669 change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-22 23:09:55 +08:00
pengyiqiang
e86745b9a2 lvgldemo: use nitems instead of sizeof
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-22 23:09:42 +08:00
pengyiqiang
6f192bd1e0 lvgl/port: add libuv porting
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-22 15:33:53 +02:00
chao an
cf4db3f62d drivers/note: fix build break by note rename change
Regression by:

| commit 4e6041a46c (HEAD, origin/master, origin/HEAD)
| Author: Xiang Xiao <xiaoxiang@xiaomi.com>
| Date:   Tue Feb 14 01:17:13 2023 +0800
|
|     system: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
|
|     follow the kernel side change: https://github.com/apache/nuttx/pull/8531
|
|     Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 16:13:54 +08:00
Xiang Xiao
4e6041a46c system: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
follow the kernel side change: https://github.com/apache/nuttx/pull/8531

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:57 +08:00
Nathan Hartman
8e77b79f78 Kconfig: Make indent consistent with TABS 2023-02-10 14:11:48 +08:00
chao an
42d34fcef3 build/Kconfig: fix warnings detected by kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 19:45:36 +08:00
raiden00pl
ee1e84a261 examples/nxscope: add a new option to wake up the samples thread with timer.
Now we can add samples with at a higher frequency than with usleep().
2023-02-08 02:54:56 +08:00
raiden00pl
1dd7d3dec3 examples/timer_gpio: fix compilation 2023-02-08 00:36:20 +08:00
chao an
8ad4ae5508 net: fix compiler warning
sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
   48 |   strncpy(arg.ifr_name, ifname, IFNAMSIZ);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-08 00:35:39 +08:00
raiden00pl
bcd721b627 examples/nxscope: add support for CDCACM dev 2023-02-08 00:34:33 +08:00
Lee Lup Yuen
c57e7a7b81 examples/lvglterm: Add LVGL Terminal for NSH
This PR adds an LVGL App that executes NSH Commands (entered with a Touchscreen Keyboard) and renders the NSH Output. The app follows the same design as the `lvgldemo` app and is explained here: ["NuttX RTOS for PinePhone: LVGL Terminal for NSH Shell"](https://lupyuen.github.io/articles/terminal)

`examples/README.md`: Added doc for `lvglterm` app

`examples/lvglterm/lvglterm.c`: LVGL Terminal App

`examples/lvglterm/Makefile`, `Make.defs`: Makefile for LVGL Terminal

`examples/lvglterm/Kconfig`: Added menuconfig option for "Application Configuration > Examples > LVGL Terminal"
2023-02-07 20:53:24 +08:00
Xiang Xiao
a29d9ea9da fsutils/examples: Include unistd.h explicitly
to get the prototypes or macros are defined in it

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02:00
Gustavo Henrique Nihei
b0da60e498 apps: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-02 00:35:14 +02:00
Lee Lup Yuen
757fc307c3 examples/lvgldemo: Select default demo
The LVGL Example App `lvgldemo` currently requires 1 argument: the name of the demo to show.

```bash
lvgldemo widgets
```

In this PR, we propose to make the argument optional if there is only one demo configured. This will enable PINE64 PinePhone to boot straight into `lvgldemo` and auto-start the LVGL App, without entering any `nsh` commands.

### Modified Files

`examples/lvgldemo/lvgldemo.c`: If no arguments are specified and only 1 demo exists, select the demo
2023-01-16 19:41:19 +08:00
chao an
8b368b7680 examples/netlink_route: fix compiler warning
netlink_route_main.c: In function ‘dump_neighbor’:
netlink_route_main.c:151:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint8_t *’ {aka ‘unsigned char *’} [-Wformat=]
  151 |               printf("%02x", nb->ne_addr.u.na_addr);
      |                       ~~~^   ~~~~~~~~~~~~~~~~~~~~~
      |                          |                |
      |                          unsigned int     uint8_t * {aka unsigned char *}
      |                       %02hhn
netlink_route_main.c:155:26: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘uint8_t *’ {aka ‘unsigned char *’} [-Wformat=]
  155 |               printf("%02x.", nb->ne_addr.u.na_addr);
      |                       ~~~^    ~~~~~~~~~~~~~~~~~~~~~
      |                          |                 |
      |                          unsigned int      uint8_t * {aka unsigned char *}
      |                       %02hhn

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-11 15:14:51 +08:00
raiden00pl
efdc1ebf3f move embedlog from system to logging 2023-01-05 21:42:15 +08:00
Xiang Xiao
6e6df7dca8 Remove the unnecessary NULL fields in global instance definition of file_operations
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 09:30:25 +02:00
pengyiqiang
a610b633d2 graphics/lvgl: Upgrade to lvgl v8 version
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-01-01 10:14:55 -03:00
TimJTi
9d1a70af86 Add example app for LP503x LED driver
Update examples/lp503x/lp503x_main.c

Move struct lp503x_cmd_s to private types section

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Update examples/lp503x/lp503x_main.c

Co-Authored-By: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-30 21:19:33 +08:00
raiden00pl
eb8ad7af2f add NxScope example 2022-12-28 01:40:24 +08:00
Xiang Xiao
d1e46c2d3e compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
align with other macro naming style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:12 +02:00
ligd
9fcb58fb8a pipe: fix pipe test case failed
pipe shouldn't use /tmp folder, /tmp maybe mounted to tmpfs

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 23:39:12 +08:00
Xiang Xiao
cfc005a460 arp: Remove the unnecessary inclusion of nuttx/net/arp
and change the remain inclusion to netinet/arp.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:11:10 +02:00
yinshengkai
595adbcca6 drivers/note: rename /dev/note to /dev/note/ram
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-15 12:15:53 +08:00
zhanghongyu
c7e8ade590 arp: change arptable get struct from arp_entry_s to arpreq
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-14 21:19:37 +08:00
Xiang Xiao
3e2c8fdb41 examples/camera: Cast the last argument of ioctl to uintptr_t
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-08 12:38:55 +01:00
Xiang Xiao
519c4ccb1b examples/camera: Add FAR for all pointer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-08 12:38:55 +01:00
Xiang Xiao
02f608b64d examples/camera: Call VIDIOC_S_FMT before VIDIOC_REQBUFS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-08 12:38:55 +01:00
Xiang Xiao
ca855f3f23 examples/camera: Fix the style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-08 12:38:55 +01:00
Xiang Xiao
00dd4affea examples/hidkbd: Reuse lib_meminstream_s and remove hidbkd_instream_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 13:55:31 +01:00
Xiang Xiao
2c56945fee libc/stream: Rename (put|get) to (putc|getc)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-05 13:55:31 +01:00
Xiang Xiao
8fff07b435 Remove the unnecessary "return;" at the end of function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-27 22:36:40 +01:00
Robert-Ionut Alexa
e517dfd672 apps/ltr308: add simple application to test ltr308 sensor
Signed-off-by: Robert-Ionut Alexa <robertalexa2000@gmail.com>
2022-11-26 21:16:30 +08:00
Xiang Xiao
92d38a3bb1 Fix Error: nxtext_popup.c:250:20: error: unused function 'nxpu_puts'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-22 11:32:35 +08:00
Xiang Xiao
bce24201c7 Fix ft80x_coprocessor.c:3911:14: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 19:03:20 +08:00
Xiang Xiao
0c200b8966 Fix dac_main.c: error: format string is not a string literal (potentially insecure)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-19 18:47:41 +01:00
Xiang Xiao
81de5d4c59 Fix foc_fixed16_thr.c:188:27: error: variable 'time' set but not used
and foc_float_thr.c:189:27: error: variable 'time' set but not used

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-19 18:47:41 +01:00
Junbo Zheng
3a6775c8ac examples/tcp_ipc_server: fix wrong file path typo
The lorawan folder is under the path of examples/tcp_ipc_server, the server_tcp folder is not exist here, fix it.

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-11-18 16:44:04 +08:00
Xiang Xiao
da30a87b81 Fix Error: version_main.c:124:42: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 14:55:30 +01:00
Xiang Xiao
25f200e9b0 Fix Error: sx127x_demo.c:464:7: error: variable 'fd' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-13 14:55:30 +01:00
Alan Carvalho de Assis
46fac8c851 Fix CI crash because switch() as missing NMEA sentences 2022-11-13 00:31:02 +01:00
Alan Carvalho de Assis
d03b87b1bc gps: Fix GPS example application 2022-11-13 01:45:43 +08:00
yinshengkai
bd2efd9f51 tools: replace DEFINE to DEFINE_PREFIX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-11 01:18:32 +08:00
yinshengkai
ee4d8b738f Makefile: replace INCDIR to INCDIR_PREFIX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-10 02:38:58 +08:00
Xiang Xiao
36a0c924f7 netutils: Support telnetd in the kernel mode
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-07 15:24:08 +09:00
Xiang Xiao
12863fbd52 system/telnet: Fix the style warning
and remove the unused code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 15:24:08 +09:00
pedrobertoleti
1d9e1deb77 Improve tcp_ipc_server LoraWAN module communication 2022-11-05 12:55:40 +08:00
raiden00pl
13bfad1053 examples/foc: control motor identification parameters from cmd line 2022-11-04 02:07:15 +08:00
raiden00pl
682cac07d9 examples/foc/Kconfig: update EXAMPLES_FOC_MMODE range 2022-11-04 02:07:15 +08:00
raiden00pl
2bbfb1b396 examples/foc: move validate_args to parseargs file 2022-11-04 02:07:15 +08:00
raiden00pl
2c5dc1e4a2 examples/foc: simplify control thread configuration 2022-11-04 02:07:15 +08:00
raiden00pl
b1f91528ec examples/foc: separate control thread configuration from general args 2022-11-04 02:07:15 +08:00
raiden00pl
c2efa80969 examples/foc: refactor args 2022-11-04 02:07:15 +08:00
dongjiuzhu1
6e3c4aab7d alarm: using timegm instead of mktime beacuse rtc is gmt time
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-11-01 21:58:43 +08:00
Xiang Xiao
1c23a095ea Fix Error: keyboard_main.c:420:15: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
if (key != EOF)
          ~~~ ^  ~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-31 06:28:17 +01:00
SPRESENSE
c3f91b3a0a examples/camera: Dynamically get the connected device
This example can support for both ISX012 and ISX019 image sensors.
2022-10-25 22:46:45 +08:00
liangchaozhong
ffab06c6c5 usrsock:fix stack-buffer-overflow issue when running basic_send test case
The following error was reported when runing usrsocktest with KASAN check enabled.
    ==1348590==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xf20ec610 at pc 0x56ac61ba bp 0xf20ec278 sp 0xf20ec268

rootcause:
hdrbuf's size is not large enough to store the data in usrsock's request.

solution:
double herbuf's size to make sure the space, used to store usrsock's request, is enough.

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2022-10-24 17:02:15 +08:00
raiden00pl
8d61a10a74 industry/foc/foc_ident: make the Ki resistance measurement parameter configurable
The hardcoded parameter may not be suitable for various types of motors
2022-10-24 01:14:52 +08:00
Petro Karashchenko
5862b9d15c netutils/thttpd: remove MIN and MAX definitions from libhttpd.c
This reverts commit e12d48f0d2.
2022-10-24 01:13:27 +08:00
Petro Karashchenko
0fe45a4c73 Revert "Revert "examples/foc: fix description in Kconfig""
This reverts commit 1a18703a42.
2022-10-24 01:13:27 +08:00
Petro Karashchenko
9368b659a7 Revert "Revert "examples/timer_gpio: fix initialization of timer notification""
This reverts commit 539b7363d0.
2022-10-24 01:13:27 +08:00
Petro Karashchenko
e12d48f0d2 Revert "netutils/thttpd: remove MIN and MAX definitions from libhttpd.h"
This reverts commit c52f40770e.
2022-10-23 08:29:01 +02:00
Petro Karashchenko
1a18703a42 Revert "examples/foc: fix description in Kconfig"
This reverts commit eca51e267f.
2022-10-23 08:29:01 +02:00
Petro Karashchenko
539b7363d0 Revert "examples/timer_gpio: fix initialization of timer notification"
This reverts commit e431abe2ed.
2022-10-23 08:29:01 +02:00
Petro Karashchenko
e431abe2ed examples/timer_gpio: fix initialization of timer notification
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-23 11:45:52 +08:00
Petro Karashchenko
eca51e267f examples/foc: fix description in Kconfig
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-23 11:45:52 +08:00
Petro Karashchenko
c52f40770e netutils/thttpd: remove MIN and MAX definitions from libhttpd.h
add newlines between MIN and MAX definitions for style consistency

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-23 11:45:52 +08:00
pedrobertoleti
00bd5a2edf Fixed unused variable and improved Kconfig for TCP IPC Client & Server 2022-10-19 15:51:04 +08:00
Xiang Xiao
b659f0fbdf Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 18:40:23 +02:00
Pedro Bertoleti
c908661414 Client & Server examples to use TCP/IP socket as an IPC Channel for LoRaWAN 2022-10-17 18:54:55 -03:00
Xiang Xiao
964747dd36 nshlib: Call nsh_telnetstart in nsh_initialize to avoid the dupliation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Xiang Xiao
4941182cc6 Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),)
to support the tristate option correctly and unify the usage

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 14:59:08 +02:00
zhanghongyu
78541e9876 usrsocktest: Fix default config mismatch in recv_block & no_block_connect
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 11:39:41 +09:00
nietingting
6e3b402cf4 examples: clean warning of pipe
transfer_test.c:66:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_writer':
transfer_test.c:122:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_test':
transfer_test.c:169:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&readerid, NULL, transfer_reader, (pthread_addr_t)fdin);
                                                          ^
transfer_test.c:179:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&writerid, NULL, transfer_writer, (pthread_addr_t)fdout);
                                                          ^
transfer_test.c:202:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       ret = (int)value;
             ^
transfer_test.c:216:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       tmp = (int)value;
             ^

Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-10-11 19:49:45 +08:00
Xiang Xiao
9291d07a87 Fix the coding style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-06 12:20:32 +02:00
Xiang Xiao
a86790c367 poll: Don't need monitor POLLERR or POLLHUP explicitly
since spec require the implementation always report POLLERR/POLLHUP:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-05 05:58:02 +02:00
Alan Carvalho de Assis
ed78d25934 webserver: Help users to easily identify missing configurations
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-04 20:22:33 +02:00
Tiago Medicci Serrano
66f957792f examples/i2schar: Fix compile error and warning
Fix compile error due to unnecessary endif.
Fix warning of long line.
2022-09-30 10:24:17 +08:00
Huang Qi
0d5804c527 examples/hello_zig: Fix unused return value
Zig don't allow unused return value, so let's discard it explicitly.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-10 11:09:22 +08:00
Fotis Panagiotopoulos
387eba2efd ftpd: server port made configurable. 2022-09-04 11:03:28 -04:00
chao an
3d0a49f33e examples/usrsocktest: read from the closed remote should return EOF
fix usrsock remote_disconnect fail:

nsh> usrsocktest
...
Testing group "remote_disconnect" =>
        [TEST ASSERT FAILED!]
                In function "receive":
                line 497: Assertion `(ssize_t)((ret)) == (ssize_t)((0))' failed.
                        got value: -1
                        should be: 0
        Group "remote_disconnect": [FAILED]
...

Reference:

RECV(2)

NAME
       recv, recvfrom, recvmsg - receive a message from a socket
...
RETURN VALUE
...
       When a stream socket peer has performed an orderly shutdown,
       the return value will be 0 (the traditional "end-of-file" return).

       Datagram sockets in various domains (e.g., the UNIX and Internet domains)
       permit zero-length datagrams.  When such a datagram is received, the return value is 0.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
6bc5196ff0 examples/usrsocktest: add some delay to wait the daemon task ready
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
45a21aea8e examples/usrsocktest: add USRSOCK_REQUEST_IOCTL support
The test model of usrsock ioctl() has changed after file socket layer implemented from vfs,
usrsock must implement the ioctl() hook to pass this test

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
046e83bec9 examples/usrsocktest: fix build break
usrsocktest_wake_with_signal.c: In function ‘do_wake_test’:
usrsocktest_wake_with_signal.c:553:16: error: ‘USEC_PER_MSEC’ undeclared (first use in this function)
  553 |   usleep(100 * USEC_PER_MSEC); /* Let worker thread proceed to blocking
      |                ^~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
5b47bc24ae examples/usrsocktest: correct the check region of remote address
let us skip the sin_zero

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
a8d2924c55 examples/usrsocktest: correct return value check of dup2()
DUP(2) Linux Programmer's Manual

NAME
       dup, dup2, dup3 - duplicate a file descriptor
...
RETURN VALUE
       On success, these system calls return the new file descriptor.
       On error, -1 is returned, and errno is set appropriately.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
Huang Qi
2e2630e838 Don't download tarballs if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-28 17:20:47 +08:00
raiden00pl
35c31e35c1 examples/foc: add options to run only the sensor alignment routine or the motor identification routine 2022-08-28 13:24:51 +08:00
raiden00pl
7dbd02947e examples/foc: support for motor identification 2022-08-28 01:20:53 +08:00
raiden00pl
f987c6c02e examples/foc: make sure that the queue is empty before start the control thread 2022-08-27 23:50:58 +08:00
raiden00pl
429f5a166f examples/foc: terminate the control thread if no work to do 2022-08-27 23:50:58 +08:00
raiden00pl
420da4589e examples/foc: print default values in the help message 2022-08-27 23:50:58 +08:00
liyi
7035546422 fix use of addroute/delroute
Signed-off-by: liyi <liyi25@xiaomi.com>
2022-08-27 23:50:46 +08:00
Takayoshi Koizumi
4d86c69a22 examples/fmsynth: Add examples for FM synthesizer lib
Add examples to show how to use fmsynth library.

There are 2 samples.
One is a music keyboard, and the other is music player decording MML.
2022-08-25 20:29:55 +09:00
yintao
8e9462985a examples/rpmsgsocket: fix wrong typo
Signed-off-by: yintao <yintao@xiaomi.com>
2022-08-16 01:04:10 +08:00
raiden00pl
13a0d539fe examples/foc/Kconfig: EXAMPLES_FOC_SETPOINT_ADC depends on ADC 2022-08-15 16:42:56 +03:00
raiden00pl
1f4f338772 examples/foc/foc_motor_b16.c: fix open loop Q current 2022-08-15 16:42:00 +03:00
Xiang Xiao
b515a00fea zmodem: Move crc16.h and crc32.h from host to host/nuttx
to avoid the conflict with the 3rd party library

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-13 13:28:30 +03:00
Peter van der Perk
9179783906 Embedded Template Library (ETL) Example application 2022-08-05 13:56:36 +08:00
Nathan Hartman
30805a7001 Remove executable permission from source file. 2022-08-04 23:19:39 +08:00
Peter van der Perk
dcd60a2abe Use thread-safe ntoa functions
NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Use thread-safe ntoa functions

NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

API fixes and NXStyle fixes

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-04 23:18:06 +08:00