丁欣童
c52a65890b
drivers/sensor: fakesensor support batch.
...
N/A
Change-Id: I8377e359ceb111519c4da7d84c2e0dc3b7234ad3
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com >
2021-03-08 16:02:19 +08:00
Xiang Xiao
5aa9333731
mtd/progmem: Add up_progmem_read callback guarded by ARCH_HAVE_PROGMEM_READ
...
since sometime platform code need do some special action during memcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: Id108ef4232376feab3e37e9b3aee9a7927a03bd4
2021-03-04 11:54:59 +08:00
dongjiuzhu1
bb65de6cae
net: unify socket info file descriptor
...
MIRTOS-255
Change-Id: Iee680c8ac07fe87fb6e7900b4f792e0f1ff5036d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-03-03 22:23:44 +08:00
mage1
465f98384b
mm: Move mm_heap_s related stuff to private header file
...
since it will improve the modularity and reduce the inforamtion explosion
Change-Id: I085b36adb38993a979625a1f4c252d364a15afa1
2021-03-02 22:21:46 +08:00
Peter Bee
a2a31c735e
net/socket: move si_send/recv into sendmsg/recvmsg
...
MIRTOS-272
Implement si_send/sendto/recvfrom with si_sendmsg/recvmsg, instead of
the other way round.
Change-Id: I7b858556996e0862df22807a6edf6d7cfe6518fc
Signed-off-by: Peter Bee <bijunda1@xiaomi.com >
2021-03-02 17:33:01 +08:00
chao.an
800421e231
net/tcp: cache the drop packet to avoid retransmit
...
Change-Id: Ia27ed17a7708df8481ac96d9a3a870b6ccef4d24
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-02 10:12:56 +08:00
ligd
43742ca827
debug tools: add heap & stack check in idle thread
...
N/A
Change-Id: Iba6f5cdffb1336697096c71fca86c9ece584225f
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-03-01 10:41:09 +08:00
chao.an
87de0294a0
mm/iob: add iob_free_queue() interface
...
Change-Id: Ic06d9725e6b7ff4aac554f735d4c88bdec519d18
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-02-26 21:58:25 +08:00
chao.an
af341ee4fc
mm/iob: rename the iob_free_queue() to iob_destroy_queue()
...
make the semantics more precise
Change-Id: Ie3ac87d6a478cdd65e9129e708afc833f0a124b0
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-02-26 20:38:44 +08:00
ligd
df76063a35
Revert "net: unify socket info file descriptor"
...
This reverts commit 27b332283e .
2021-02-26 10:21:02 +08:00
Jiuzhu Dong
27b332283e
net: unify socket info file descriptor
...
N/A
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-25 16:53:58 +08:00
Jiuzhu Dong
d1f3707798
signal: set SIGRTMIN to SIGUSR1 because signo 0 don't catch.
...
MIRTOS-434
Change-Id: I600fed48d25e19c229aac899508b86ddfebb24f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-19 16:51:08 +08:00
Jiuzhu Dong
de92bc7fad
driver/sensor: gets the capacity of the hardware fifo
...
N/A
to hold the number of events
Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-09 11:51:09 +08:00
Jiuzhu Dong
f44a5eeb4a
driver/sensor: replace lower->buffer_size with lower->buffer_number
...
N/A
more efficient
Change-Id: I0823b10248caf75e4dd6a5086ad230ba4a7298f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-09 11:50:30 +08:00
chao.an
6f39a980f5
mm/iob: add iob_get_queue_count() helper
...
Change-Id: I73cc9bc9c51b25c828cefef917df12d202ffa414
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-02-08 09:50:32 +08:00
丁欣童
4fa2a5b4d1
Add fakesensor driver.
...
N/A
This driver can read data from csv file.
Change-Id: Ibf7af0553441b5c05a4a4f3e6ed4786472771be1
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com >
2021-02-07 17:17:23 +08:00
Jiuzhu Dong
9674f89d56
libc/valloc: support valloc
...
MIRTOS-424
Change-Id: Ieb425a77b0a8d758956996d201223a0050ae4920
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-07 15:03:36 +08:00
Jiuzhu Dong
0e05d49284
rptun: fix compile break when disable openamp
...
N/A
Change-Id: I63251524d94fae43bfb0a71c324d55bf91d363f8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-04 22:10:24 +08:00
chao.an
96267fe88c
wireless/bluetooth: add BT/BLE dual mode bridge driver
...
Change-Id: I692228fda27df1a4249f11474ff50a1049becf4b
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-14 23:30:48 +08:00
Xiang Xiao
32f3ddec8b
fs: Remove fs_dupfd and fs_dupfd2 internal functions
...
let's call either nx_dup/nx_dup2 or file_dup/file_dup2
instead just like other fs api: xxx->nx_xxx->file_xxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: I1aacfb9e25dc7b3fcb0345ff7b269b1953a01e5b
2021-01-13 17:40:52 +08:00
chao.an
043ed0e36b
wireless/bluetooth: move H4_* definition to external
...
Change-Id: Ie67a566857c5ed825b6dddc33832f936b5755fbe
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-13 16:51:35 +08:00
Xiang Xiao
5bdf084aed
bt_uart_shim: Correct the prototype of bt_uart_shim_getdevice
...
1.Add const to the path argument
2.Return the explicit type(struct btuart_lowerhalf_s *)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2021-01-13 16:12:36 +08:00
Xiang Xiao
09be85dcba
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: Idf0acfc238d8598084b5d5c42e0a5e0045d98490
2021-01-13 16:12:22 +08:00
Xiang Xiao
514f62c790
bluetooth: Fix the typo error in BT_GETUINT16 and BT_PUTUINT16
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2021-01-13 16:11:53 +08:00
Xiang Xiao
a2c724bd27
bluetooth: Remove the unnecessary forward reference
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2021-01-13 16:10:41 +08:00
Xiang Xiao
0567d9e812
bluetooth: Fix typos in comment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2021-01-13 16:10:24 +08:00
Xiang Xiao
18badb068e
fs: Make nx_vxxx and file_vxxx as internal functions
...
these functions are the implementation detail and then
don't need expose to external
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: Ief832391d5b42d1f1645907eb465631650490234
2021-01-13 14:02:24 +08:00
Xiang Xiao
eba7216926
fs: Remove file_detach since it is unefficient to call open and file_detach
...
the kernel user should call file_open directly instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: I5bf7f661006f5d43739bc8618abfb4b983fde78d
2021-01-12 11:03:36 +08:00
Xiang Xiao
ac99898bc7
fs: Reimplement file_open to not depend on nx_open
...
on the other hand, open/nx_open call file_open instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: I66990a77cdeb6ff18f7bf48a65bbc7b701dad552
2021-01-12 11:03:20 +08:00
ligd
a5d6f1fc68
mqueue: add poll support
...
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-12 10:34:43 +08:00
chao.an
60f03d2a92
wireless/bluetooth: add more hci event definitions
...
Change-Id: I35c034762335cf72f2d46ea383f0136361506e1e
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-11 10:18:11 +08:00
chao.an
8b671fd79c
wireless/bluetooth: remove the host dependency
...
Change-Id: I2f7073731fdf920ea69d79462275468f83f2cc4c
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-11 10:18:01 +08:00
ligd
87694f68a7
mqueue: add file_mq_xx for kernel use
...
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-08 14:31:37 +08:00
ligd
dcf8dae046
mqueue: simplify the mqueue reailize
...
1. remove descript management in mqueue, save code size
2. use i_ops instead of i_mqueue to remove the dup logic
Change-Id: Ie88960e50ddcae9c87977c9ad65a45297c663291
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-08 14:31:37 +08:00
Xiang Xiao
0af4d1e617
fs: Remove the special hack for pty in nx_vopen
...
let's replace the content of file in place instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: I538910d55815c7aec656c05dba4eab2fa1d6d964
2021-01-08 11:17:57 +08:00
Xiang Xiao
028c6aa6e6
fs: Add file_pipe function
...
so pty don't need call nx_pipe and then file_detach
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: Ibb8d108abd76bafe53897e5fca35babcf3e1bae9
2021-01-08 11:16:15 +08:00
Xiang Xiao
085543a156
Move the declaration of nx_mkfifo/nx_pipe to nuttx/fs/fs.h
...
the new location is better than nuttx/drivers/drivers.h
since they are part of the file system api.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2021-01-08 11:16:03 +08:00
Xiang Xiao
3eb62b010b
fs: Fix the race condition in file_dup
...
NULL inode passed to files_allocate doesn't mark file struct in the
allocated state, so other threads which invovle in file allocation
(e.g. open or dup) may allocate the same file struct again.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: I53ff876eae3c7a1e311e7f671686b73a4b4ef891
2021-01-08 11:15:49 +08:00
chao.an
d3ffbe5367
netpacket/if_addr: add interface address header
...
Change-Id: I1aab82fea6916e187d19a66e4d0817119a98c3ea
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-08 10:25:19 +08:00
chao.an
cf988ebad3
ctype/iscntrl: correct the control character function
...
all the characters placed before the space on the ASCII table
and the 0x7F character (DEL) are control characters.
Change-Id: Id187b39ce50b80e9ebee85a7242716eb017575d7
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-04 17:17:15 +08:00
ligd
0a7d86f587
fs: remove INODE_IS_SPECIAL() use others instead
...
Change-Id: I949f1ad012836e6cb233d5362fe2542732b5ecf4
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-02 21:14:21 +08:00
ligd
f58ef1476c
fs/vfs: add nx_unlink support
...
Change-Id: If9009cb7301bb4e49bdce3aea2d56c243256f5a2
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-02 21:14:21 +08:00
danguanghua
d226e8fb49
libs/libc/net: implement socketpair
...
N/A
Reference here:
https://www.freebsd.org/cgi/man.cgi?apropos=0&sektion=2&query=socketpair&manpath=FreeBSD+7.0-current&format=html
Change-Id: I959b4d661cd436f5d5050baf9e821db84139d482
Signed-off-by: danguanghua <danguanghua@xiaomi.com >
2020-12-30 18:26:50 +08:00
chao.an
688911373d
arch/spinlock: implement the default test-and-set semantics
...
use the default testset implement on single core platform
that does not support test-and-set, more flexibility for
SMP drivers(using spinlock) if configured in a single-core
configuration.
Change-Id: I954899f71bc6e903dce48c6e27719cb99f13e4b6
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-30 15:20:33 +08:00
Xiang Xiao
ca2ec9b137
libc: Add b64_ntop and b64_pton implementation
...
implemented by many libc(e.g. freebsd, glibc, newlib)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2020-12-29 11:22:13 +08:00
Xiang Xiao
d2572b31d1
sched: Add include/sys/poll.h
...
since many libc implementation(e.g. glibc, freebsd) provide this header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2020-12-25 17:43:05 +08:00
dongjiuzhu
b9a62d9531
signal: fix compile break in c++
...
N/A
nuttx.rel: In function `__metal_sleep_usec':
nuttx/include/metal/system/nuttx/sleep.h:27: undefined reference to `nxsig_usleep(unsigned int)'
collect2: error: ld returned 1 exit status
Change-Id: I9dd2ed0a72d144bb152dc3753e7f9a6695dfb2d4
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com >
2020-12-25 11:27:46 +08:00
chao.an
c9dcce4f30
Revert "libs/libc/dumpbuffer: add support to dump the buffer to file descriptor."
...
This reverts commit 080b380955 .
2020-12-22 16:25:38 +08:00
Xiang Xiao
66b601e075
libc: Implement getppid
...
as specified here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/getppid.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
2020-12-21 17:44:50 +08:00
chao.an
080b380955
libs/libc/dumpbuffer: add support to dump the buffer to file descriptor.
...
Change-Id: I5742a69a75faf288df36da12ee5138f27a4f1532
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-21 17:18:26 +08:00