Commit Graph

2253 Commits

Author SHA1 Message Date
dulibo1
8e938957c2 gpio:add example for wakeup gpio type
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
Neo Xu
0ed4ca1767 noteprintf: fix compile warnings
noteprintf_main.c:52:7: warning: unused variable 'binary' [-Wunused-variable]
   52 |     } binary =

Fix typo of sched.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-25 16:13:30 +02:00
yinshengkai
a7011eb6f6 examples: fix noteprint compile error
The sched_note_string/bprintf/dump interfaces have been removed and replaced with printf and event

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-25 16:13:30 +02:00
xucheng5
f2d3423f3b example/can: replace field ch_unused with ch_tcf
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-09 22:50:29 +08:00
wangjianyu3
b1c4e39205 examples/gps: Add default case for switch-warning of vendor extended sentence
Vendor may add extended sentence may not handled in switch, error if -Werror=switch enabled.
And extended sentence should not added to general examples.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 22:11:39 +08:00
wangjianyu3
ad2514fc6f examples/gps: Fix switch error
Log:
  gps_main.c:83:7: error: enumeration value 'MINMEA_SENTENCE_LOR_LSQ' not handled in switch [-Werror=switch]
     83 |       switch (minmea_sentence_id(line, false))
        |       ^~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
wangjianyu3
dae4d7572f module/sotest: Try devminor of romdisk
For case that /dev/ram${EXAMPLES_SOTEST_DEVMINOR}(e.g. /dev/ram0) already exists, and users may not care which device to use.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 12:16:02 +08:00
wangjianyu3
758ed55722 examples/sotest: Fix warning of unused variable 'devname'
Config:
  +CONFIG_EXAMPLES_SOTEST=y
  +CONFIG_EXAMPLES_SOTEST_BINDIR="/data"
Log:
  sotest_main.c: In function 'sotest_main':
  sotest_main.c:105:8: error: unused variable 'devname' [-Werror=unused-variable]
    105 |   char devname[32];
        |        ^~~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 11:36:27 +08:00
wangjianyu3
74b05468d6 module/sotest: Fix depends of SOTEST_BUILTINFS
Log:
  sotest_main.c: In function 'sotest_main':
  sotest_main.c:116:29: error: storage size of 'desc' isn't known
    116 |   struct boardioc_romdisk_s desc;
        |                             ^~~~
  sotest_main.c:116:29: error: unused variable 'desc' [-Werror=unused-variable]
  cc1: all warnings being treated as errors

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 11:36:27 +08:00
Huang Qi
140647cf8c Minor code style fixes
Fix issue in these files:
examples/flowc/flowc_mktestdata.c
examples/nxhello/nxhello_listener.c
examples/system/system_main.c
fsutils/passwd/passwd_append.c
graphics/ft80x/ft80x_gpio.c
graphics/pdcurs34/pdcurses/pdc_keyname.c
graphics/pdcurs34/pdcurses/pdc_touch.c
modbus/functions/mbfuncdiag.c

Fixed by AI and checked by manual

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-15 02:27:41 +08:00
xuxin19
683f25af15 cmake:support romfs prog for SIM CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
xuxin19
3d8dc5dce5 cmake:implement CMake build for NuttX Lua interpreter
add CMake module for register lua mod
nsh> lua
Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> hello.say_hello()
Hello World!
> io.write("abs is =",math.abs(-10),"\n")
abs is =10
> os.exit()
nsh>

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 12:31:10 +08:00
meijian
1f51bfe64d apps/ipforward: fix ci check failure
note: static declaration of 'chksum' follows non-static declaration

Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 13:38:38 +08:00
meijian
002e31c56d apps/dhcpd: fix dhcpd set dip error
dhcpd will set dip routing table 0.0.0.0|0.0.0.0|10.0.0.1 (TARGET|NETMASK|ROUTER) which will cover other's router 0.0.0.0|0.0.0.0|10.1.10.1.
And will cause shell/apps to internet failure.

Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 01:11:30 +08:00
Luchian Mihai
0a4c97ac09 examples/amg88xx: add example for amg88xx driver
Simple example for the amg88xx driver
2024-09-09 19:45:44 +08:00
raiden00pl
d71046c139 examples/nimble: fix example after update to latest master
this example is broken since bc68d954a

since bf76183741
ble_hci_sock_init is called from nimble code, so we can't call it again in example code
2024-08-30 21:29:25 +08:00
Michal Lenc
75d5f63f14 can: add support for FD frames if FD mode is configured
This enhances can example application with the possibility to send
CAN FD frames if FD mode is configured. Both EDL and BRS flags are
now correctly set with the latter one configurable with application's
arguments. Also data bytes are now correctly switched to DLC.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-08-30 01:16:04 +08:00
jianglianfang
73f26ca084 fb: supported bpp = 24
Added new draw_rect24 function to support bpp=24 devices.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
jianglianfang
2305255373 fb: select the FB_NO_OVERLAY because it will be showed on the main surface
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
jianglianfang
009fc1a28a fix: uninitialized pointer read
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
jianglianfang
72e186f64a apps/examples: fb_main need ioctl(FBIOPAN_DISPLAY) to update and adapt to double buffer mode.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
gaohedong
481d4b6e23 can: Merge netpacket/can.h into nuttx/can.h
This patch is associated with 'https://github.com/apache/nuttx/pull/13048', so it cannot be verified separately by CI. Please help to associate and review it. Thank you!

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-08-26 05:05:41 -04:00
Matheus Catarino
89dd0c29e2 Zig & D examples clean & refactor
dlang: use importC to get NuttX include
zig: leds_zig added
2024-08-26 10:22:16 +08:00
meijian
c91a1817aa netlib/setroute: fix dhcpd stack-overflow when calls netlib_set_dripv4addr with debug info-level
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-26 01:54:46 +08:00
zhangkai25
39d053ef74 apps/examples: Add test of edges counting at capture
Description: Add test of the function of counting cap edges

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-26 01:29:08 +08:00
Matheus Catarino
7c4590b818 hello_swift added
required: swift 6 (embedded module)
2024-08-23 09:04:31 +08:00
Kevin Zhou
ab67cb1911 examples/usbserial: Check if usbserial device exist before register 2024-08-22 04:28:53 +02:00
zhanghongyu
a1dbc8f37d examples/telnetd: fix compile telnetd multi definition error
Compiling system/telnetd and examples/telnetd at the same time could not
generate two builtin commands, Because the name is the same, one will be
overwritten, but there will be no compilation errors.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 17:08:07 +08:00
jianglianfang
7abd0a7303 lvgldemo: fix uninit_use_in_call
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-20 02:49:34 +08:00
Rushabh Gala
437c903c47 examples/leds_rust: Add Rust App for blinking the LED
- This PR adds `examples/leds_rust` to call NuttX POSIX APIs like `open()` and `ioctl()`, so that it blinks an LED
- The `leds_rust` app is also used for testing the GPIO and LED Drivers for Ox64 BL808 SBC and QEMU RISC-V Emulator in Google Summer of Code
- `leds_rust` be executed locally on Linux / macOS / Windows, by commenting out the first 2 lines of code
- The code is based on `examples/leds` in C, and `examples/hello_rust` in Rust

Co-Authored-By: Lup Yuen Lee <9960133+lupyuen@users.noreply.github.com>
2024-08-06 00:26:44 +08:00
Pressl, Štěpán
1a7da54a9b examples/qencoder: obtain samples using the QEIOC_GETINDEX ioctl call
Normally, the qencoder position is obtained using the QEIOC_POSITION
ioctl call. Adding the -i argument uses the QEIOC_GETINDEX to
obtain the qe_index_s struct containing the position alongisde
other fields.

Signed-off-by: Stepan Pressl <pressste@fel.cvut.cz>
2024-07-29 22:28:56 +08:00
SPRESENSE
8a82400929 examples/camera: Fix wrong device file path
In camera_main.c, the dev paths of capture_initialize() and open()
are different. So open could always failed.
2024-07-28 15:52:26 +08:00
Rodrigo Sim
4aea0dff38 examples/telnetd: Add support to reset command
Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-07-16 09:06:16 +08:00
Alan Carvalho de Assis
e9f60d85b9 examples/telnetd: Make it clear the goal of this telned
Signed-of-by: Alan C. Assis <acassis@gmail.com>
2024-07-03 17:47:10 +08:00
Alan Carvalho de Assis
c7072b45bb examples/stepper: Fix typo inside for() loop 2024-06-30 13:29:01 +08:00
p-szafonimateusz
097ed5c27d oneshot/oneshot_main.c: fix printf warning
fix printf warning in examples/oneshot

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-06-29 11:08:14 -03:00
SPRESENSE
42b16e3004 examples: Remove unnecessary descriptions from Makefile
Remove unnecessary SDKDIR variable from some Makefiles.
And fix audio_rttl to pass cmake build.
2024-06-28 20:17:13 +08:00
Matheus Catarino
6db9d5e582 dlang-app added 2024-06-07 03:27:41 +08:00
Tiago Medicci Serrano
3086dcbcf0 Revert "Add loading of ET_DYN shared object test to sotest"
This reverts commit 72eaed8fdd.
2024-05-30 19:13:28 -03:00
Neale Ferguson
72eaed8fdd Add loading of ET_DYN shared object test to sotest
* examples/sotest/lib/Makefile
  - Add dynload directory to build

* examples/sotest/lib/dynload/Makefile
  - Build the dynload shared object test
  - Use SHMODULEFLAGS and not SHLDFLAGS

* examples/sotest/lib/dynload/dynload.c
  - Test case for loading of ET_DYN shared objects

* examples/sotest/lib/dynload/.gitignore
  - Exclude built object from git

* examples/sotest/sotest_main.c
  - Load and invoke the dynload test
2024-05-29 19:17:15 -03:00
Xiang Xiao
2d4233c825 examples/usrsocktest: Fix error: variable 'ret' set but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-05-27 10:30:19 -03:00
Xiang Xiao
f228ee1e4f Fix Error: usrsocktest_basic_connect.c:112:7: error: variable 'ret' set but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-05-23 11:53:26 +08:00
raiden00pl
e3110d3ea7 examples/nxscope: add static to private functions 2024-05-23 11:50:08 +08:00
simbit18
d0e030ff00 fix nxstyle
fix Relative file path does not match actual file.
2024-05-15 23:53:05 +08:00
meijian
8d1bb4cfe8 [app][netlink_route] fix get route netlink bugs
Signed-off-by: meijian <meijian@xiaomi.com>
2024-05-14 22:06:47 +08:00
simbit18
a59797bbdd fix nxstyle
fix Relative file path does not match actual file.
2024-05-11 01:20:08 +08:00
simbit18
2bff210cdf /examples/lp503x: Removed the execute permissions. 2024-05-09 23:47:14 +08:00
simbit18
dadbea7e3b fix nxstyle
fix Relative file path does not match actual file.
Add missing Apache Foundation copyright header
2024-04-30 00:02:31 +08:00
Xu Xingliang
8c7323cc8b examples/lvglterm: upgrade to lvgl v9
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-29 10:04:34 +08:00
Neo Xu
c53abc5fdb apps/lvgl: upgrade to lvgl version v9
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-04-29 10:04:34 +08:00