Xiang Xiao
4262b09cbf
libc: Implement terminal api regardless of CONFIG_SERIAL_TERMIOS setting
...
since many functions aren't related to termios directly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
077a28eff6
Fix termios/lib_cfspeed.c:78:5: error: large integer implicitly truncated to unsigned type
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
86684105f9
serial: Move tcdrain implementation from drivers/serial to libc
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
a010cb1af1
serial: Make SIGINT and SIGTSTP work even without CONFIG_SERIAL_TERMIOS
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 08:11:08 -03:00
Xiang Xiao
dd942f0b04
sched/backtrace: Dump the complete stack regardless the depth
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:54 +08:00
Xiang Xiao
20bbdd0997
libc: Add backtrace_symbols[_fd] functions
...
specified here:
https://linux.die.net/man/3/backtrace_symbols
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-29 12:09:37 +08:00
Xiang Xiao
f061766801
video/fb: Fix typo error in include/nuttx/video/fb.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-28 17:21:18 -03:00
Norman Rasmussen
48311cc61f
Fix unaligned memory access when creating ICMP Port Unreachable messages
...
commit 3b69d09c80
corrected the
unreachable handling for net/udp/icmp but introduced an unaligned store.
This splits the uint32_t data field into a two element uint16_t data
field to avoid the unaligned store.
2021-12-28 03:51:53 -06:00
zhuyanlin
1f87ded9c2
driver:clk: clk pending on semaphore waiting on IPC ready
...
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-27 23:25:28 -06:00
zhuyanlin
a22dae19c1
regulator/rpmsg: pending in wait ept ready for regulator client
...
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-27 23:25:28 -06:00
ligd
10ccba6671
init: move USERMAIN_XX out of INIT_ENTRYPOINT
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-24 08:23:30 -06:00
Xiang Xiao
cc1a1b5781
net: Implement getifaddrs and freeifaddrs
...
specify here:
https://man7.org/linux/man-pages/man3/getifaddrs.3.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-21 11:01:33 -03:00
Xiang Xiao
1cd935fece
net: Add lifr_ifindex field to struct lifreq
...
to ensure union lifr_ifru start at the same offset of union ifr_ifru
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-21 11:01:33 -03:00
chao.an
1e83c83bf3
net/usrsock: increase the send/recv() length limit to UINT32_MAX
...
change request type to uint32_t to the impove the throughput
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-21 03:14:25 -06:00
Simon Filgis
6cc48ff6ff
arch/arm/samv7: initial support for LIN bus communication
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-20 18:23:05 -03:00
chao.an
ce1c8413a2
libc/lzfcompress: add lzf compress stream
...
compress stream based on lzf algorithm:
struct lib_rawoutstream_s rawstream;
struct lib_lzfoutstream_s lzfstream;
lib_rawoutstream(&rawstream, fd);
lib_lzfoutstream(&lzfstream, &rawstream);
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 08:39:33 -06:00
Petro Karashchenko
d445282566
fs/vfs: Add file descriptor based timers support
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-20 04:00:20 -06:00
Xiang Xiao
187d9e58c9
Remove the unnecessary inclusion of assert.h and string.h from public header files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-20 10:30:08 +01:00
Xiang Xiao
c562263205
net: Move if_nametoindex and if_indextoname to libc
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 10:08:57 -06:00
Xiang Xiao
882bc8639c
net: Add NET_SOCK_[FAMILY|TYPE|PROTOCOL] defintion to netconfig.h
...
to help create a general sock for ioctl operation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 10:08:57 -06:00
Xiang Xiao
54e1c27e43
eventfd: Typedef eventfd_t to uint64_t on the supported platform
...
to compliant with Linux implementation as much as possible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 01:41:11 -06:00
Xiang Xiao
f9c1117c88
eventfd: Remove the unused and private eventfd_get_minor
...
since it isn't defined by Linux kernel too
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-19 01:41:11 -06:00
zhanghu6
f56aefaa41
sched_note: change uint32_t nbi_module into uint8_t array, because variables keep the same style that use uint8_t array
...
sched_note: add note dump module tag definitions
NOTE_MODULE(a, b, c, d)
example:
define TEST_MODULE NOTE_MODULE('t', 'e', 's', 't')
sched_note_dump(TEST_MODULE, event, data, len);
define AUDIO_MODULE NOTE_MODULE('a', 'u', 'd', 'i')
sched_note_dump(AUDIO_MODULE, event, data, len);
2021-12-16 04:18:17 -06:00
zhuyanlin
e43e1423d6
driver/ioexpander: add ioe_rpmsg server and client
...
N/A
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-16 01:29:24 -06:00
Xiang Xiao
ed1e4ddfa7
libc: Add getprogname function
...
defined here:
https://www.freebsd.org/cgi/man.cgi?query=getprogname&sektion=3
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-15 10:47:56 -06:00
zhanghu6
d05b9a9c79
note dump: add CONFIG_SCHED_INSTRUMENTATION_SWITCH
...
1. If CONFIG_SCHED_INSTRUMENTATION_SWITCH is enabled, then these additional interfaces are expected:
sched_note_suspend
sched_note_resume
at the same time,If CONFIG_SMP is enabled,then expected:
sched_note_cpu_pause
sched_note_cpu_paused
sched_note_cpu_resume
sched_note_cpu_resumed
2. other board if enable SCHED_INSTRUMENTATION,SCHED_INSTRUMENTATION_SWITCH to defconfig.
2021-12-15 07:07:00 -06:00
Petro Karashchenko
6c255f2d07
drivers/analog: add mcp48xx dac support
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-15 07:02:56 -06:00
Petro Karashchenko
3b3cebdd3e
typo: fix type for word "instance"
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 06:39:34 -06:00
Xiang Xiao
69468b700d
libc: Move syslog_stream from nuttx/streams.h to drivers/syslog/syslog.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-14 00:51:59 -06:00
zhanghu6
a32d14cb9c
sched note trace: and note dump
...
note_type NOTE_DUMP_STRING API:
sched_note_string
sched_note_vprintf
sched_note_printf
note_type NOTE_DUMP_BINARY API:
sched_note_dump
sched_note_vbprintf
sched_note_bprintf
2021-12-13 21:21:22 -06:00
ligd
166a9210ca
wqueue: update wqueue to support using wqueue before wqueue start
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 21:16:25 -06:00
Petro Karashchenko
af614ac77d
tls: restore C89 compatibility for TLS
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-13 21:14:53 -06:00
ligd
5b369c5cec
libs/lbc: remove CHAR_BIT = 16 support
...
For CEVA platform CHAR_BIT is 16, and will do lots of extra work
when use IPC.
We will not support this platform anymore, so remove all the b2c operations.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-13 11:08:28 -06:00
chao.an
d20bd62e08
libc/allsyms: Load all symbols for debugging
...
let the nuttx print out symbolic crash information and
symbolic stack backtraces. This increases the size of the nuttx
somewhat, as all symbols have to be loaded into the nuttx image.
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-13 08:31:13 -06:00
Xiang Xiao
1af8cd4de8
sched: Move argv from tcb_s to task_info_s
...
argv is allocated from stack and then belong to userspace,
so task_info_s is a best location to hold this information.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-11 10:08:53 -06:00
Jari van Ewijk
2e47ef32cf
GPIO driver: register all pintypes as generic /dev/gpioN
2021-12-09 23:55:12 -06:00
Xiang Xiao
6357523892
arch: Add _wchar_t typedef like other basic types
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-09 16:57:23 +09:00
Huang Qi
58e0781e2e
arch/arm: Implement TLS support
...
Signed-off-by: Huang Qi <no1wudi@qq.com>
2021-12-07 23:31:41 -06:00
zhuyanlin
3e8a3c9cc2
driver:regulator: add delay feature
...
N/A
2021-12-07 23:29:05 -06:00
zhuyanlin
b7db4304d6
driver/power: add gpio regulator
...
N/A
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-07 23:29:05 -06:00
zhuyanlin
eed6510202
driver:power:add regulator remote proc
...
N/A
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-07 23:29:05 -06:00
zhuyanlin
c8f1a9e430
driver:power:add regulator framework
...
N/A
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-07 23:29:05 -06:00
anjiahao
f9570810c0
libc/misc/err.c:add err.c to libc
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-12-07 04:01:27 -08:00
zhuyanlin
565964a12f
driver: add clk framework
...
N/A
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-07 01:35:45 -06:00
Xiang Xiao
a6eb6df688
libc/getopt: Move struct getopt_s to include/nuttx/tls.h
...
and remove include/nuttx/lib/getopt.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-06 06:30:16 -08:00
zhuyanlin
043d193fff
tcbinfo:sched: fix build break
...
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-12-06 00:47:58 -06:00
chao.an
437a30d117
arch/tcbinfo: fix build break if task name disabled
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-06 00:47:58 -06:00
Xiang Xiao
a0990ee416
arch: Remove the duplicated up_tls_info implementation
...
Define up_tls_info in arch/arch.h directly if the general one isn't suitable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-05 20:59:53 -06:00
Petro Karashchenko
e71b66c792
drivers/mtd: add MTD null driver support
...
- fix memory leak during RAM MTD initialization
- fix calculations for FILE MTD device with customized
block and erase sizes
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-05 03:11:02 -06:00
ligd
985cc4fc6d
hosfs_rpmsg: merge hostfs_rpmsg to rpmsgfs
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-12-04 01:04:18 -06:00