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"
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>