Commit Graph

2182 Commits

Author SHA1 Message Date
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
Peter van der Perk
c026bd824a canardv0 nxstyle fix 2022-08-02 17:01:28 +08:00
Peter van der Perk
819c34e975 Add libcanardv1 for Cyphal, rename libcanard to libcanardv0 2022-08-02 17:01:28 +08:00
Xiang Xiao
af2741317a examples/noteprintf: Change CONFIG_LIBC_LONG_LONG to CONFIG_HAVE_LONG_LONG
follow the kernel side change:
https://github.com/apache/incubator-nuttx/pull/6613

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-20 22:22:49 +03:00
Xiang Xiao
c252ec1481 Add printflike to all printf like functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:09:10 +03:00
curuvar
ca4ef69661 Added simple ws2812 example 2022-07-04 10:50:48 +08:00
zouboan
e7961a696e examples: add pwm input capture example
Co-authored-by: Alan Carvalho de Assis <alan.carvalho@espressif.com>
2022-06-28 23:52:21 +08:00
Adam Kaliszan
835f43524b serialblaster bugfix 2022-06-13 15:47:44 +08:00
Nimish Telang
1f0ba0db6e Update examples/elf/tests/helloxx/Makefile
Check for the right config variable

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-06-11 17:04:20 +08:00
Nimish Telang
550cb3a1ea Address #190
Should guard against these being included if exception support isn't there
2022-06-11 17:04:20 +08:00
Adam Kaliszan
e08fdca129 Fixed bug in drawing rectangle using 1 bit palette 2022-05-31 08:01:12 +03:00
Xiang Xiao
dcd481360f examples/README.md: Remove -nostartfiles and -nodefaultlibs
follow nuttx change:
commit b30e0a26efae828b3505059ffaa3a75df74236c0
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Sun May 15 12:32:04 2022 +0800

    Move "-nostartfiles -nodefaultlibs" from Make.defs to Toolchian.defs

    and replace "-nostartfiles -nodefaultlibs" with "-nostdlib"

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-22 18:12:27 +03:00
Xiang Xiao
02da51ddf5 examples/nrf24l01: Replace the hardcode value with enum const
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 16:19:46 +03:00
YAMAMOTO Takashi
59fc69c453 examples/thttpd: -fno-builtin for a file generated by mksymtab.sh 2022-05-12 23:12:39 +08:00
YAMAMOTO Takashi
4b383b397d examples/sotest: -fno-builtin for a file generated by mksymtab.sh 2022-05-12 23:12:39 +08:00
YAMAMOTO Takashi
dc9103a72d examples/nxflat: -fno-builtin for a file generated by mksymtab.sh 2022-05-12 23:12:39 +08:00
YAMAMOTO Takashi
b7f57a1952 examples/posix_spawn: -fno-builtin for a file generated by mksymtab.sh 2022-05-12 23:12:39 +08:00
YAMAMOTO Takashi
8e6081abe0 examples/module: -fno-builtin for a file generated by mksymtab.sh 2022-05-12 23:12:39 +08:00
YAMAMOTO Takashi
adf7ceedf4 examples/elf: -fno-builtin for a file generated by mksymtab.sh 2022-05-12 23:12:39 +08:00
Takayoshi Koizumi
5040719911 audioutils/mml_parser: Add mml_parser library
Add Music Macro Language parser library in audioutils.
audioutils is also created for several audio utilities
not only mml_parser.
2022-05-07 13:56:53 +08:00
Xiang Xiao
1acca2946e Update the call site of exec to accommodate the environment variables
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-22 10:40:38 +03:00
Xiang Xiao
3760ab5fc8 Remove the unneeded void cast
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-17 23:31:35 +03:00
SPRESENSE
f2e7faa478 examples/scd41: Add new example for scd41 CO2 sensor
Add new example for scd41 CO2 sensor application.
2022-04-11 20:54:48 +08:00
Jiuzhu Dong
2f2e4680d0 fs/epoll: fix compile break about change type of pollevent_t
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 12:13:22 +08:00
Petro Karashchenko
319203d5d8 apps: unify FAR attribute usage across apps
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-05 00:55:22 +08:00
chao.an
90484a33e9 sched/trace: correct the note print format
note print should with Instruction pointer.

e.g:

        trace_printk("hello NuttX");

trace dump:

        hello-6  [000] .... 23080.367994: 0xc044a005: hello NuttX

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
zhanghongyu
16c1fec99d usrsock: Move event field to usrsock_message_common_s
Zero the events field for all response message

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-04-03 11:39:19 +09:00
Petro Karashchenko
214dbe51b4 open() options: pass file options 0 if only ioctl is used
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-01 12:22:07 -03:00
Petro Karashchenko
c1dfaf42ff netutils/ftpd: add option to login to FTPD using FSUTILS_PASSWD
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-28 23:30:45 +08:00
SunJ
f8811eab38 examples/watchdog: Fix watchdog command parameter error 2022-03-28 13:42:49 +08:00
Michael Mogenson
f1a74533f2 examples: add Lua module example 2022-03-21 13:49:42 +08:00
Gerson Fernando Budke
afefa1c308 boot/mcuboot: Move MCUboot samples to examples dir
The current examples belongs to 'examples/mcuboot' directory. This
moves related example code and Kconfig entries to their respective
project inside examples/mcuboot directory. It cleans all Kconfig
entries at 'boot/mcuboot', including Kconfig, Makefile and
README.md files.

This not perform any code modification.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2022-03-19 16:09:44 +02:00
Petro Karashchenko
566be8c7b1 definitions: unify MAX and MIN macro definitions
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 23:20:17 +08:00
Petro Karashchenko
b207387d48 examples/timer: fix timer notification asignment
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 23:19:41 +08:00
Matheus Catarino França
cdb04f6172 Zig hello-example
rename example - fix

confusion-rename fixed

zigflags added

rm zigflag single-threaded

zig rules added
2022-03-16 12:18:01 +08:00
litong12
c14996aa93 examples/rpmsgsocket: Fix rpmsg example's bug
Signed-off-by: litong12 <litong12@xiaomi.com>
2022-03-15 11:26:04 +08:00
Alin Jerpelea
a0f9b7d33f apps: examples: ft80x: nxstyle fixes
fixes for errors reported by the nxstyle tool.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-09 21:07:53 +08:00
Alin Jerpelea
bd1444300a examples: pdcurses: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-09 21:07:53 +08:00
Alin Jerpelea
6084fdb8ea examples: ft80x: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-09 21:07:53 +08:00
Alin Jerpelea
4f0a18c9bb apps: examples: lis3dsh_reader: fix nxstyle errors
fix errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-09 21:07:53 +08:00
Petro Karashchenko
f9baa422c1 style: unify path to files in comment section
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-09 10:37:33 +08:00
Alin Jerpelea
3984796156 apps: examples: nxstyle fixes
Fix for errors reported by the nxstyle tool.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Alin Jerpelea
abf34e5d5a apps: examples: update license to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Alin Jerpelea
a02fe36343 apps: examples: audio: fix Nxstyle errors
Fix errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Alin Jerpelea
d681eb16ee apps: examples: update licenses to Apache
Gregory Nutt has submitted the SGA
Sony has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Alin Jerpelea
0208f6469b apps: examples: Omni Hoverboards Inc. update licenses to Apache
Gregory Nutt has submitted the SGA
Omni Hoverboards Inc. has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Michal Lenc
81b9be5d2e examples/serialrx: implement option to print string characters
The option CONFIG_EXAMPLES_SERIALRX_PRINTSTR was available in the
configuration but was not implemented in the source code. This commit
implements the option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-03-08 09:25:26 +08:00
Alin Jerpelea
5b4c891b7b apps: examples: fboverlay: update licenses to Apache
Gregory Nutt has submitted the SGA
Marco Krahl has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
6ccf6db273 apps: examples: powermonitor: nxstyle fixes
fix for errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
db53ca66b6 apps: examples: powermonitor: update licenses to Apache
Giorgio Groß has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
cd79a79d00 Makefile: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
e0499fea49 apps: testing: ostest: nxstyle fixes
fixes for errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
7f0c835edf apps: examples: calib_udelay: nxstyle fixes
fixes for errors reported by nxstyle

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
59a62a91ab apps: examples: usrsocktest: update licenses to Apache
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Alin Jerpelea
7dfbedf961 apps: examples: calib_udelay: update licenses to Apache
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Xiang Xiao
b5f14a2072 examples/chrono: Fix the compiler warning when -fno-builtin isn't set
Error: chrono_main.c:434:51: error: '%01ld' directive output may be truncated writing between 1 and 3 bytes into a region of size between 2 and 10 [-Werror=format-truncation=]
  434 |           snprintf(str, sizeof(str), "%02ld:%02ld:%01ld",
      |                                                   ^~~~~
chrono_main.c:434:38: note: directive argument in the range [-21, 21]
  434 |           snprintf(str, sizeof(str), "%02ld:%02ld:%01ld",
      |                                      ^~~~~~~~~~~~~~~~~~~
chrono_main.c:434:11: note: 'snprintf' output between 8 and 18 bytes into a destination of size 16
  434 |           snprintf(str, sizeof(str), "%02ld:%02ld:%01ld",
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435 |                    min, sec, (priv->ts_end.tv_nsec / 100000000));
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 17:27:15 +02:00
Xiang Xiao
aac20c317c Fix compiler warning
chrono_main.c: In function 'chrono_main':
Error: chrono_main.c:396:11: error: 'strncpy' output truncated before terminating nul copying 7 bytes from a string of the same length [-Werror=stringop-truncation]
  396 |           strncpy(str, "00:00.0", 7);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
Error: chrono_main.c:434:25: error: '%02ld' directive writing between 2 and 9 bytes into a region of size 8 [-Werror=format-overflow=]
  434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
      |                         ^~~~~
chrono_main.c:434:24: note: directive argument in the range [-35791394, 35791394]
  434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
      |                        ^~~~~~~~~~~~~~~~~~~
chrono_main.c:434:24: note: directive argument in the range [-59, 59]
chrono_main.c:434:24: note: directive argument in the range [-21, 21]
chrono_main.c:434:11: note: 'sprintf' output between 8 and 18 bytes into a destination of size 8
  434 |           sprintf(str, "%02ld:%02ld:%01ld", min, sec,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435 |                   (priv->ts_end.tv_nsec / 100000000));
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nsh_routecmds.c: In function 'cmd_delroute':
Error: nsh_routecmds.c:611:11: error: 'memset' forming offset [16, 27] is out of the bounds [0, 16] of object 'inaddr' with type 'union <anonymous>' [-Werror=array-bounds]
  611 |           memset(&inaddr.ipv6, 0, sizeof(struct sockaddr_in6));
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nsh_routecmds.c:491:5: note: 'inaddr' declared here
  491 |   } inaddr;
      |     ^~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 13:34:28 +02:00
Piet
aa2c9e7c33 hello_rust: changes for target support 2022-02-25 23:22:24 +08:00
Alan C. Assis
0baf524def apps: Modify oneshot example to let users see it working 2022-02-25 11:55:10 +08:00
Xiang Xiao
4cc0c755bf Remove CONFIG_CLOCK_MONOTONIC special code
since this opion doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Piet
c1757660a6 apps: hello_rust example program 2022-02-20 07:37:29 +08:00
raiden00pl
81f15936c1 examples/foc/foc_parseargs.c: fix help message 2022-02-17 10:30:41 +01:00
raiden00pl
95b1625a6d examples/foc/foc_motor: store the configured FOC run mode in a separate variable
The controller mode can change during example execution and depends on the thread state (IDENT [not yet upstream] / ALIGN / RUN)
2022-02-17 10:30:41 +01:00
raiden00pl
3b1967ec71 examples/foc: add an option to disable motor controller logic
This is useful feature for debug purposes.
2022-02-16 23:57:27 +08:00
raiden00pl
e6b6c14f53 examples/foc: make the FOC current controller configurable
For now only the FOC PI current controller is supported, but this can be easily extended to support other control methods
2022-02-16 23:49:46 +08:00
Petro Karashchenko
9a85c405f5 examples/buttons: fix strange code in buttons_main
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-16 23:48:24 +08:00
chao.an
c48a8fdf4e examples/tcpecho: fix typo
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-08 20:57:55 +01:00
Gerson Fernando Budke
836cd05526 examples: Add mcuboot Swap Test example
This example demonstrate swap between two valid images. Instructions
are available at readme.md file inside project directory.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2022-02-02 17:38:29 +08:00
Petro Karashchenko
41c8342927 examples/lvgldemo: bugfix typos and enable GRAPHICS_LVGL
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-29 00:54:29 +08:00
Petro Karashchenko
480400c523 examples/pca9635: change O_RDONLY to O_WRONLY for driver open call
PCA9635 driver does not support neither need nor write operations.
The ioctl is supports PWMIOC_SETLED_BRIGHTNESS that is write like

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-29 00:52:24 +08:00
Petro Karashchenko
2498be1f40 romfsimg: add attribute to set minimum 4 bytes aignment for romfs image data
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-28 00:02:45 +08:00
Petro Karashchenko
3c556384ea examples/chrono: fix typo in log message
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-25 23:09:12 +01:00
Xiang Xiao
c7e96dbe32 Fix the nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-17 07:57:22 +01:00
Petro Karashchenko
9480c0ec12 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 17:36:21 +08:00
Fotis Panagiotopoulos
bc5d8034f1 Typo fixes. 2022-01-06 10:30:41 +08:00
Abdelatif Guettouche
33475cbff6 hts221_reader_main.c: Fix the start IOCTL.
SNIOC_START is not handled by the hts221 driver.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-01-02 10:45:02 +08:00
Norman Rasmussen
2e773bcdc6 Use macros from fixedmath.h for manipulating duty cycle
This avoids magic shift logic in code, and has no change to behavior.
2021-12-29 06:25:27 -06:00
Norman Rasmussen
28c133a503 Adjust channel and duty bounds to allow testing sentinel values
commit 7354ab187ed701ae041b45a0a6603878ab9b165d and commit
1e2f06718103e7028809012a69b7ac932e9ae537 added code to skip all
remaining channels when the channel number is -1. This adds support for
testing that using the example app. The BL602 driver's first channel is
channel 0, so this also allows the example app to select the first
channel.
2021-12-29 06:25:27 -06:00
Norman Rasmussen
75c1e43334 increase number of supported PWM channels from 4 to 6
commit d8199fe460 changed Kconfig, but it
looks like pwm_main.c should have been changed too. This adds support
for the 5th and 6th channels to the code, and adds an error if more than
6 channels are configured.
2021-12-29 06:25:27 -06:00
Norman Rasmussen
ec93611307 examples/mqttc: Fix handling of getaddrinfo errors
commit 36d4bfa774 set a hostname to work
around getaddrinfo failing. getaddrinfo returns a non-zero value on
error, and there should be an early return after the error message is
printed.
2021-12-29 02:45:47 -06:00
Petro Karashchenko
5ac15130db apps: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 20:52:08 -06:00
Diego Herranz
0e8e08e2a0 Add example app for isl29023 driver
Created from the hdc1008_demo example.
2021-12-25 19:53:05 +08:00
Alan C. Assis
64a09770c8 apps/sht3x: Add simple application to test SHT3x sensor 2021-12-24 12:02:45 -06:00
zhanghu6
2bd3a1701c sched note: printf API example
test API:
void sched_note_string(FAR const char *buf);
void sched_note_dump(uint32_t module, uint8_t event,
                     FAR const void *buf, size_t len);
void sched_note_printf(FAR const char *fmt, ...) printflike(1, 2);
void sched_note_bprintf(uint32_t module, uint8_t event,
                        FAR const char *fmt, ...) printflike(3, 4);
https://github.com/apache/incubator-nuttx/pull/4963

suggestion:
1. add "&" after the command when running this example.
2. must enable SCHED_INSTRUMENTATION_DUMP, and that enable CONFIG_SYSTEM_TRACE can help you view log.
2021-12-19 20:29:52 -06:00
Fadil R. Berisha
2aadb22301 examples/wget: Saving a file downloaded with wget
wget [-o <local-path>] <url>
2021-12-19 20:28:56 -06:00
Diego Herranz
7ba6f7cdb3 examples/hdc1008_demo: fix formatting after decimal point
Modulo operation used to calculate digits after decimal point,
but if that result is <10, a leading zero wasn't added, giving a
wrong value.

Same as 34c7bec0dc
but on the example app.
2021-12-18 07:14:03 -06:00
Jari van Ewijk
21e0ff1153 timer_gpout example: rename to timer_gpio 2021-12-09 12:00:44 -06:00
Jari van Ewijk
128996fb5f timer_gpout example: use /dev/gpioN instead of /dev/gpoutN 2021-12-09 12:00:44 -06:00
Jari van Ewijk
71f5af47e4 GPIO example application: Add support for changing pintypes 2021-12-09 11:34:53 -06:00
raiden00pl
0577bd2c33 examples/foc: add a simple character based interface to interact with the app 2021-12-08 12:20:42 -06:00
raiden00pl
37aa562f03 examples/foc: move adc and button interfaces logic to a separate file 2021-12-07 07:51:12 -06:00
raiden00pl
ea27aacbd2 examples/foc: move threads related logic to a separate file 2021-12-07 07:51:12 -06:00
raiden00pl
3fda1294d7 examples/foc: move setpoint and vbus configuration from foc_adc.h to foc_cfg.h 2021-12-07 07:51:12 -06:00
raiden00pl
edeaacedb0 examples/foc/foc_cfg.h: fix typo 2021-12-07 07:51:12 -06:00
Xiang Xiao
9397e92fcd examples/thttpd: Don't touch task_tcb_s::argv field
since it move to task_info_s now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-06 09:58:38 +01:00
futerigele
c26e5a0b44 examples/touchscreen: added timestamp printing in tc
added timestamp printing in tc

Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-12-04 01:05:16 -06:00
liushuai25
02ff4a8a59 fix: fb: set overlay to 0
when CONFIG_FB_OVERLAY=y, need set overlay=0,
otherwise the lcd driver doesn't know which
layer to get.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2021-11-25 08:00:45 -06:00
Xiang Xiao
75c11d4480 examples/helloxx: add extern "C" to main implementation directly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-23 17:23:05 -03:00
erhan cengiz
6b7fe2ac51 FOC Kconfig corrected 2021-11-08 07:40:09 -06:00
raiden00pl
629e5a8e62 examples/foc: add support for sensor index search 2021-11-07 03:46:17 -06:00
raiden00pl
15b66aa128 examples/foc: add Qenco support 2021-11-07 03:44:03 -06:00
raiden00pl
f38d7d2ed3 examples/foc: terminate main loop if FOC control loop terminated 2021-11-07 03:42:06 -06:00
raiden00pl
5ee9572531 examples/foc: add Hall sensor support 2021-11-04 13:50:57 -05:00
raiden00pl
c771942d8e examples/foc: add support for sensor alignment 2021-11-04 13:50:57 -05:00
raiden00pl
b30f3329f6 foc/examples: initial logic to support torque, velocity and position controller modes 2021-11-04 13:50:57 -05:00
raiden00pl
b0eeefd0a5 examples/foc: add logic for controller state machine 2021-11-04 13:50:57 -05:00
raiden00pl
f9cec1c770 examples/foc: move the motor controller code to separate files 2021-10-31 12:13:45 -05:00
raiden00pl
22ed7da99c examples/foc: move the common FOC dev logic from threads to one place 2021-10-31 12:13:45 -05:00
raiden00pl
e0ef3cecb9 examples/foc: move FOC device data to foc_device_s 2021-10-31 12:13:45 -05:00
raiden00pl
33b34f8852 examples/foc: open FOC device in FOC threads 2021-10-31 12:13:45 -05:00
raiden00pl
2d034ed09a examples/foc: separate motor control logic from motor state logic 2021-10-31 12:13:45 -05:00
raiden00pl
2fb79db8b4 examples/foc: replace the requested velocity input with a more general setpoint input.
This is the inital step to support torque/velocity/position control
2021-10-30 13:50:56 -05:00
raiden00pl
9c8e3cc46a examples/foc: add option to disable open-loop operations
Initial step towards sensored control
2021-10-30 10:00:38 -05:00
raiden00pl
cc4d817df4 examples/foc: use getopt to parse arguments 2021-10-30 07:59:02 -05:00
raiden00pl
013caaa334 examples/foc: move the parse args logic to a separate file 2021-10-30 07:59:02 -05:00
Xiang Xiao
8d3a536650 examples/charger: Update enum type usage per kernel change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-30 15:37:05 +09:00
SPRESENSE
d8757a6bcf examples/camera: Fix some issues and update license
Fix some issues and update license to apache.
- Fails to open the video driver.
- Change format from YUV422 to RGB565,
  and add captured image output to LCD.
- An application cannot exit by infinite loop.
- In video-only mode without capturing still images,
  do not allocate capture memory for still images to
  reduce the memory usage.
2021-09-16 10:45:36 +02:00
Alin Jerpelea
7ffa080a2a examples: camera: add EXAMPLES_CAMERA_OUTPUT_LCD
until the camera patches are merged we must add the
EXAMPLES_CAMERA_OUTPUT_LCD option to Kconfig

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-15 14:47:45 +08:00
Vagner Guadagnin
b11dcc34c6 examples/wgetjson: fix concatenation len buffer json 2021-09-12 09:08:49 -03:00
Alexander Lunev
7a88209077 examples/ipforward: improved ipforward test to analyze the order of forwarded packets 2021-09-04 14:24:47 +08:00
Juha Niskanen
b283289986 apps: fix miscellaneous typos
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-08-26 11:39:28 -07:00
raiden00pl
e6b767f185 examples: add Hall effect sensor example 2021-08-19 08:32:24 -07:00
Xiang Xiao
605c90aedc examples/userfs: Implement the dummy callback of fchstat and chstat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-15 12:52:47 +02:00
raiden00pl
4fa7248036 examples/qencoder: add an option to configure the encoder maximum position
Signed-off-by: raiden00pl <raiden00@railab.me>
2021-08-11 03:08:45 -07:00
Xiang Xiao
d4d2f13f89 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 11:04:35 +02:00
Xiang Xiao
967f526850 Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 16:42:32 +02:00
Xiang Xiao
1120bc844a examples/media: Fix the compiler warning
format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'off_t' {aka 'long long int'}

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 15:52:11 +02:00
Xiang Xiao
4109f0e8ba examples/media: Fix the compiler wanring after off_t type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 10:05:59 +08:00
raiden00pl
e21330df53 examples: add CORDIC example 2021-07-28 14:25:17 -03:00
Jiuzhu Dong
7d457b4d0b pipe: modify default stack size to fix stack overflow
Change-Id: I16910ff216db6b915d7c1cc4084c0b79228769a5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-12 20:27:39 -07:00
SPRESENSE
931a873d04 examples/configdata: Fix some printf format warnings
Fix some printf format warnings by -Wformat.
2021-07-03 23:21:11 -05:00
SPRESENSE
4afa1f1514 examples/charger: Fix some printf format warnings
Fix some printf format warnings by -Wformat.
2021-07-03 23:21:11 -05:00
SPRESENSE
814f10544e examples/bmi160: Fix printf format warning
Fix printf format warning by -Wformat.
2021-07-03 23:21:11 -05:00
ligd
2f2d3e5723 examples/watchdog: add depends on CONFIG_WATCHDOG
Change-Id: I266145bef5c6ba2912457163f7e909146d4732b4
Signed-off-by: ligd <liguiding1@xiaomi.com>
(cherry picked from commit 201d0bb19fa9577841021964511cfe5b129b7937)
2021-07-01 14:32:25 -07:00
Sara Souza
b15e78b9fa examples: Adds Timer gpout example 2021-06-18 16:52:00 -06:00
Abdelatif Guettouche
bde687bac0 examples/elf: Drop the 0x when printing pointers.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-16 21:21:28 -05:00
Abdelatif Guettouche
ff48ece8fb Fix few typos in builtin/ and sotest_main example.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-16 21:21:28 -05:00
Xiang Xiao
7847c1f974 example/posix_spawn: Ensure argv has filename and NULL terminator
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-16 12:07:11 -06:00
Alin Jerpelea
869535e470 examples: nxstyle fixes
fixes for nxstyle errors reported by CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
2ac8589a25 examples: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
d9dad2a99e author: Bob Feretich: update licenses to Apache
Gregory Nutt has submitted the SGA

RAF Research has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
e0d26edcd7 author: Sebastien Lorquet: update licenses to Apache
Gregory Nutt has submitted the SGA

Sebastien Lorquet has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
1671147a87 author: Max Holtzberg : update licenses to Apache
Gregory Nutt has submitted the SGA

Max Holtzberg has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
1c24e87605 author: Abdelatif GUETTOUCHE: update licenses to Apache
Gregory Nutt is has submitted the SGA

Abdelatif GUETTOUCHE has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
efcc22ab6e author: Ken Pettit: update licenses to Apache
Ken Pettit has submitted the ICLA

Gregory Nutt is has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
0e9d68046f author: Mateusz Szafoni: update licenses to Apache
Mateusz Szafoni has submitted the ICLA

Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
20309ee58c author: Laurent Latil: update licenses to Apache
Gregory Nutt is has submitted the SGA

Laurent Latil has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Michal Lenc
aa79958bea examples/qencoder: fix nxstyle warning and errors
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-06-16 08:39:59 -03:00
Alin Jerpelea
6bc7a448de examples: author: Gregory Nutt: update licenses to Apache
Gregory Nutt is has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-15 05:16:58 -05:00
Xiang Xiao
99e1674912 Call posix_spawn with filename as the first argv entry
pair with the kernel side change to follow the standard defintion:
https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-14 07:12:54 -06:00
Michal Lenc
21562e8960 examples/dhtxx: added configuration option for dhtxx sensor devpath
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-06-14 06:13:39 -05:00
Alin Jerpelea
f73cc8cda7 Author: Michal Lyszczek: update licenses to Apache
Gregory Nutt is has submitted the SGA

Michal Lyszczek has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 05:05:27 -05:00