Commit Graph

626 Commits

Author SHA1 Message Date
Zhe Weng
2f9d98cab2 netutils/netlib: Add support for add/del a single IPv6 address
Note:
The `SIOCSIFADDR` and `SIOCDIFADDR` uses different params for `AF_INET` and `AF_INET6` (`struct ifreq` vs `struct in6_ifreq`) as defined by https://man7.org/linux/man-pages/man7/netdevice.7.html

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-11-08 00:20:19 +08:00
raiden00pl
57f98ee20e industrial/foc: add options to configure foclib logs 2023-11-05 12:15:03 +08:00
jinxiuxu
518b1aea61 system/nxrecorder: add amr offload record support
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2023-10-27 21:00:59 +08:00
raiden00pl
1c922f2d2d examples/foc: add phase angle observer support (sensorless mode)
This app can work now as sensorless ESC.

Also introduce a cmd line option that force open-loop control
which is useful when tuning angle/velocity observers
2023-10-19 19:33:43 +08:00
raiden00pl
6cf6a73fc0 industry/foc: add support for PMSM feedforward compensation
reference: https://electronics.stackexchange.com/questions/386246/field-oriented-control-feed-forward-term
2023-10-17 14:24:23 +08:00
chao an
929f1009c7 system/readline: correct the readline(3) prototype
Reference:
https://man.openbsd.org/readline.3

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-16 22:04:18 +08:00
Petteri Aimonen
5a992d4e18 Add basic IEEE-1588 PTP server/client
What works:
- Basic server & client operation
- Transmission and reception of announce, sync and follow-up

Still missing:
- SO_TIMINGS for getting more precise packet timestamps
- Implementation of delay_req and delay_resp packets
- Status and stop interfaces for the daemon
2023-10-06 17:25:23 +08:00
raiden00pl
a56f0922c5 industrial/foc: add an interface that returns the modulation state
Useful for debugging and demonstrating FOC operation
2023-10-05 20:42:46 +08:00
raiden00pl
f505b6cb08 nxscope/serial: ignore baud configuration if set to 0 2023-10-02 21:46:52 +03:00
wangmingrong
a9f0fc55d1 codecs: add md5_file API
Add the API for 'md5_file' to directly obtain the digest value by passing in the file path

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2023-09-08 02:11:23 +08:00
makejian
4e016e2260 mbedtls: add nuttx crypto alternative implementation in mbedtls
(1)add dev_alt to manage /dev/crypto
(2)add sha_alt to alternate sha1 algorithm
(3)use new mbedtls_config.h to admin configs of mbedtls
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-11 18:13:11 +08:00
Huang Qi
712d008f66 tools: Using math.h from NuttX for wasm build
wasm clang can't find math.h if using libm from toolchain.

It's OK to using math.h from NuttX since only declaration is needed for wasm build.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-08-10 12:14:03 +08:00
shipei
b63c56cefa audio:Resolve compilation errors in nxplayer/nxrecorder/nxlooper on ARM64 architecture
resolve compilation errors: '%0lx' directive output may be truncated
writing between 1 and 16 bytes into a region of size 11 [-Werror=format-truncation=]

Signed-off-by: shipei <shipei@xiaomi.com>
2023-08-09 20:59:19 +08:00
yangsen5
4d2fb8a6cf nxcamera: Add logic to convert to rgb565
Since the current fb display format of vela qemu is rgb565, it is necessary to convert the frame obtained by v4l2 to rgb565

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-09 18:22:39 +08:00
shipei
5aaf4136bf nxplayer:add sbc simple parser in nxplayer
Usage:
device /dev/audio/compress0p
play /data/test.sbc

This function requires the platform to support compress decoding and playback

Signed-off-by: shipei <shipei@xiaomi.com>
2023-08-08 21:41:15 +08:00
simbit18
85988dc77f Fix nuttx coding style
Remove TABs
2023-08-01 23:10:32 -07:00
SPRESENSE
4a4c550ced audioutils/fmsynth: Add create instance for static
To use this with static instance, add create function with
arguments.
2023-07-31 22:48:52 -07:00
zhanghongyu
1bc2e93124 iptables: modify the formatting of some definitions in xtables.h
Based on the previous patch comments, some changes were made to make it more
nuttx style.
https://github.com/apache/nuttx-apps/pull/1829

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-07-17 07:56:48 +02:00
zhanghongyu
bbb2b289cf iptables: add iptables libary
Add xtables.c and xtables.h
In order to support the compilation of third-party utils, we encounter some
situations where the macro is not defined, refer to the common implementation
of other systems, add relevant definitions and empty function.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-07-13 15:52:36 +08:00
Petro Karashchenko
aed0e2873e apps: fix style issues in code
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 18:47:50 +08:00
SPRESENSE
4a9b3a5881 lte: Add usrsock daemon for ALT1250 LTE modem
Add usrsock daemon for ALT1250 LTE modem.
2023-06-07 01:51:33 +08:00
Roy Feng
ea0501387f Add interface to configure DHCP daemon 2023-06-06 17:17:08 +08:00
Xiang Xiao
7032c72f2f Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 07:39:53 +03:00
raiden00pl
5eebfbb441 logging/nxscope: do not complete the stream frame if the previous send failed
In this case, the buffer already contains a frame ready to be send
2023-05-15 13:17:47 -03:00
Xiang Xiao
0acd68b391 Indent the include statement by two spaces
follow the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-13 10:16:26 -03:00
simbit18
1707be3977 graphics: Fix nxstyle errors
error: Bad alignment
error: Right brace must be followed by a blank line
error: Long line found
2023-05-03 17:35:05 +08:00
Tiago Medicci Serrano
3516a5d2ee wireless/wapi: support WPA3 on wapi psk command
Similarly to the alg_flag (which can be set by text), the ver_flag
is able to select the WPA version which will be sent to the Wi-Fi
driver through the `IW_AUTH_WPA_VERSION` command. A new bit field
(IW_AUTH_WPA_VERSION_WPA3) was created to indicate WPA3 is set.

It's up to the arch's Wi-Fi driver to implement handling of this
new bit field and config the underlying driver to handle WPA3 on
AP and/or STA mode.

This implementation doesn't interfere with commonly used commands.

`wapi psk wlan0 mypasswd 3` still selects CCMP algorithm and WPA2
and is equivalent to `wapi psk wlan0 mypasswd 3 WPA_VER_2`.

One can use `wapi psk wlan0 mypasswd 3 WPA_VER_3` to set WPA3.
2023-04-29 10:02:52 -03:00
wangchen
c2f75330f7 nshlib/netcmds:support to set MTU
Usage:ifconfig interfacename mtu ***

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-04-27 18:02:23 +08:00
Petro Karashchenko
a926c8bf12 include/netutils: fix code alignments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Petro Karashchenko
f15605da2f nuttx: add missing FAR and CODE
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Xiang Xiao
aa99d267b7 Change the private default signal number to 32
and remove the unused private signal number macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
raiden00pl
220a5a2ce6 nxscope: use the entire reserved channel length when sending strings
The previous version makes stream data parser too complicated and susceptible to errors.
2023-02-08 10:29:28 +08:00
qiaohaijiao1
61c4050d31 nxrecorder: add support to record media file.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-02 22:12:00 +08:00
qiaohaijiao1
3648ddce0f nxlooper: add loopback of compressed audio data.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-02 14:36:08 +08:00
qiaohaijiao1
20fb7e1898 nxplayer: enqueue streaming data to audio driver.
audio offload playback, change data form to streaming.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-01-31 22:26:39 +08:00
ligd
0e06cfeaec system/media: replace sem lock with pthread_mutex
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-20 22:47:26 +08:00
Zhe Weng
64f9dc100c netutils: Add iptables in netlib.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 14:26:41 +08:00
raiden00pl
cd499f9d37 add the NxScope library - a real-time data logging tool 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
huangjian
19553cb395 nshlib:fix "Long line"
Signed-off-by: huangjian <huangjian@xiaomi.com>
2022-12-20 23:39:36 +08:00
huangjian
9f3e2cd234 nshlib:add platform_skip_login to nshlib.h
Signed-off-by: huangjian <huangjian@xiaomi.com>
2022-12-20 23:39:36 +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
zhanghongyu
df3121213e cmd_arp: add device input for arp interface
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-14 21:19:37 +08:00
Peter Bee
38a190156a apps/system: add nxcamera app
Add NxCamera app similar to NxLooper, which can be used to control video
capture device. The basic capture n' display function is complete, while
file output and camera control features are left TODO.

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-10 02:46:31 +08:00
huangjian
5a623cc9e3 nshlib:add platform challenge function for nsh login
Signed-off-by: huangjian <huangjian@xiaomi.com>
2022-12-04 19:24:57 +08:00
qiaohaijiao1
05eadd1bd6 nxplayer: add mp3 offload playback demo
Mask: Only parse ID3v2 header simple.

Usage:
    nxplayer
    device pcm0p
    play /stream/1.mp3

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2022-12-02 22:51:58 +08:00
Xiang Xiao
76e6a03d71 fix Error: include/graphics/twm4nx/apps/ccalibration.hxx:149:34: error: private field 'm_stop' is not used [-Werror,-Wunused-private-field]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-11 21:12:22 +01:00
Xiang Xiao
5f4525bf0c Fix Error: include/graphics/twm4nx/cwindow.hxx:145:35: error: private field 'm_eventObj' is not used [-Werror,-Wunused-private-field]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-11 21:12:22 +01:00
Xiang Xiao
dbc757d79d Fix error: 'CTouchscreen' defined as a class here but previously declared as a struct
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 21:38:21 +01:00
Xiang Xiao
7bc1c17ecd Fix error: private field 'm_stop' is not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 21:38:21 +01:00