Byron Ellacott
9a1b726bae
fs: change geometry types from size_t
to blkcnt_t
and blksize_t
...
This change reflects that the geometry isn't related to the largest
allocatable unit on the platform.
Calls to read and write block devices are also affected and have
been updated.
2021-02-18 20:38:22 -08:00
Gustavo Henrique Nihei
7750de72bb
stdint.h: Use conversion macros for the definition of MIN and MAX constants
2021-02-18 18:35:35 -08:00
YAMAMOTO Takashi
f305cefe82
procfs: Add procfs_register_meminfo
...
This allows subsystems to register their mallinfo-like functions
to be shown in /proc/meminfo.
2021-02-12 03:16:03 -08:00
buyuer
a2c79bed20
Add fakesensor driver.
...
This driver can read sensor data from csv file.
Signed-off-by: buyuer <dingddding@163.com>
2021-02-11 09:28:55 -08:00
Masayuki Ishikawa
611dbb6d22
include: nuttx: Introduce spinlock_t for #ifndef CONFIG_SPINLOCK
...
Summary:
- This commit introduces spinlock_t for #ifndef CONFIG_SPINLOCK
which is useful for the non-SMP case because it does not consume
memory
Impact:
- None:
Testing:
- N/A
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-09 11:29:18 -08:00
Masayuki Ishikawa
d87f350831
arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
...
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
g_irq_spin for backword compatibility (In this case, NULL must be specified)
Impact:
- None
Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Masayuki Ishikawa
ad2e85433a
boards, include, sched: Remove CONFIG_SPINLOCK_IRQ
...
Summary:
- This commit removes CONFIG_SPINLOCK_IRQ to avoid complexity
Impact:
- None
Testing:
- Tested with the following configs
- spresense:wifi, spresense:smp
- esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU)
- maix-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi
2021-02-05 22:50:04 -08:00
Alin Jerpelea
9b9be7e1f0
include: Author: Gregory Nutt: update licenses to Apache 2.0
...
Update files from Gregory Nutt to Apache 2.0 license.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
Alin Jerpelea
f9c6eb3e99
include: Author: Alan Carvalho de Assis: update licenses to Apache 2.0
...
Update files from Alan Carvalho de Assis to Apache 2.0 license.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
Alin Jerpelea
861c0071bd
include: nuttx: fix nxstyle errors
...
Fix nxstyle errors to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
Alin Jerpelea
a8a1308240
include: nuttx: update licenses to Apache 2.0
...
The SGA from Gregory Nutt had been submitted and we can replace
the licenses to Apache 2.0
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
88a48bbde3
include: nuttx: sensors: max31855.h: fix nxstyle errors
...
Nxstyle errors fix to pass CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
d49e0f56c6
include: nuttx: net: telnet.h: fix nxstyle errors
...
Nxstyle errors fix to pass CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
3a566af4bb
include: nuttx: addrenv.h: fix nxstyle errors
...
Nxstyle errors fix to pass CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
b288986ccd
include: nuttx: usb: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
30a5a3edad
include: nuttx: timers: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
3bdf98cc33
include: nuttx: syslog: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
419bcb05d5
include: nuttx: spi: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
83ebb6448c
include: nuttx: serial: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
fa10244ccb
include: nuttx: power: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
2b6cad5178
include: nuttx: net: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
fe4be428f5
include :nuttx: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
822fbe5c10
drivers: mtd: mtd_nandscheme: mix case identifier fix
...
nxstyle fix for mix case identifier.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alan C. Assis
f63e1e277f
Add generic support to LWL Console
2021-01-26 18:21:28 -08:00
Alin Jerpelea
90ffb03903
include: nuttx: nx: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
95ed9fc576
include: nuttx: lib: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
785cb0dffe
include: nuttx: lcd: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
647adf9fcc
include: nuttx: mtd: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
8c5044fa4a
include: nuttx: mm: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
9491f4a9f1
include: nuttx: video: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
f29beab982
include: nuttx: leds: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
408e612353
include: nuttx: ioexpander: nxstyle fixes
...
Nxstyle fixes to pass CI
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
1824894feb
include: nuttx: replace licenses with Apache 2.0
...
This change is a license change to Apache 2.0 license.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea
b11b27d177
include: nuttx: input: fix nxstyle errors
...
Fix nxstyle violations for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
2b3ad7c405
include: nuttx: i2c: fix nxstyle errors
...
Fix nxstyle violations for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
0157f9cc6d
include: nuttx: sensors: nxstyle fixes
...
Fix nxstyle violations for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
4c2920e760
include: nuttx: fs: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
265f758f57
include: nuttx: eeprom: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
0aa932a062
include: nuttx: drivers: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
47141edb27
include: nuttx: crypto: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
cb92444802
include: nuttx: contactless: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
2901b8d1cf
include: nuttx: can: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
186c2bbe44
include: nuttx: binfmt: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
36da2e2bc3
include: nuttx: analog: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Alin Jerpelea
59f4e27a67
include: nuttx: 1wire: fix nxstyle errors
...
Fix nxstyle errors for headers
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-25 08:26:44 -08:00
Matias N
0fa34a0b64
drivers: add generic i2c bitbang driver
2021-01-24 19:03:56 -08:00
Matias N
76cc5c36e4
bmp280: convert to common sensor interface
2021-01-18 21:08:34 -03:00
Matias N
42b6c665da
sensor: change set_interval to use a value, not a pointer to value
2021-01-18 21:08:34 -03:00
Xiang Xiao
9103184722
bluetooth: Rename *bt_uart_shim_getdevice to btuart_shim_getdevice
...
follow other bluetooth driver convention(e.g. btuart_register)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00
chao.an
92259cb194
netpacket/if_addr: add interface address header
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 22:52:39 -08:00
chao.an
c8a6f31a33
wireless/bluetooth: move H4_* definition to external
...
Reference the define from board or arch driver
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
chao.an
f308ac1583
wireless/bluetooth: add more hci event definitions
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
chao.an
605cd77a23
wireless/bluetooth: remove the host dependency
...
HCI driver should not depend on the bluetooth host
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
Alan C. Assis
154949403c
Add generic efuse driver for NuttX
...
Squashed commits:
Fix small typos on efuse driver
Fix nxstyle issues
Fix aligment and missing FAR
Improvements to efuse driver
Fix: don't free 'lower' on efuse_unregister
Describe the efuse_param
Remove upper pointer from lowerhalt
Fix blank line at end of function
Co-authored-by: saramonteiro <saramonteirosouza44@gmail.com>
Co-authored-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-15 10:34:12 -06:00
Xiang Xiao
e49bae1300
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 16:39:45 +08:00
Xiang Xiao
985f33e42c
time.h: Sprinkle strftime format attribute
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 16:39:24 +08:00
Xiang Xiao
0dc6990166
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Xiang Xiao
0536953ded
Kernel module should prefer functions with nx/kmm prefix
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Matthew Trescott
301ba3a5cd
can: fix RTR ioctl and support timeout
2021-01-12 11:57:22 -06:00
Xiang Xiao
fe96250c40
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-12 17:08:22 +01:00
Xiang Xiao
1604fe0b4b
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-11 23:47:57 +01:00
Xiang Xiao
0032ddb8bf
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-11 23:47:57 +01:00
Xiang Xiao
1aa69f4c73
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:04:24 +08:00
Xiang Xiao
a24ff44ae6
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:03:19 +08:00
Xiang Xiao
4d4cba41f6
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:03:19 +08:00
Xiang Xiao
86fab49c46
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:01:46 +08:00
Xiang Xiao
98382dd8db
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>
2021-01-06 14:23:50 +08:00
ligd
f63db66382
mqueue: add file_mq_xx for kernel use
...
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-05 02:40:43 -06:00
ligd
3bc33572e3
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-05 02:40:43 -06:00
chao.an
c8784faf3c
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.
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-05 01:34:36 -06:00
danguanghua
7d33f73e27
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>
2021-01-03 20:56:27 -06:00
chao.an
1241f910ce
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 mode.
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-01 15:03:55 -06:00
ligd
3386941a10
fs: remove INODE_IS_SPECIAL() use others instead
...
Change-Id: I949f1ad012836e6cb233d5362fe2542732b5ecf4
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-30 12:21:02 -06:00
ligd
f5b59e287a
fs/vfs: add nx_unlink support
...
Change-Id: If9009cb7301bb4e49bdce3aea2d56c243256f5a2
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-30 12:21:02 -06:00
Virus.V
7e84874cb1
Reconstruct bl602 readme; move up_irq_save/restore declaration to common place
2020-12-29 01:52:09 -08:00
Xiang Xiao
10adf76209
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-28 13:53:20 -03:00
Xiang Xiao
aec3220fae
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>
2020-12-28 10:38:42 +01:00
Xiang Xiao
f992ff37c3
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao
b06067aa23
bluetooth: Fix the typo error in BT_GETUINT16 and BT_PUTUINT16
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao
3dfb897ed1
bluetooth: Remove the unnecessary forward reference
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Xiang Xiao
d1dc0bf848
bluetooth: Fix typos in comment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 08:50:16 +01:00
Masayuki Ishikawa
32ad989c03
include: wireless: Replace license header with Apache License 2.0
...
Summary:
- This commit replaces SHES related headers in gs2200m.h
Impact:
- No impact
Testing:
- Build check only
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-28 08:43:35 +01:00
dongjiuzhu
f508d80c3d
signal: fix compile break in c++
...
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 21:07:04 +01:00
Michal Lenc
b11bfefff5
drivers/lcd: Added support for ST7789 controller based on ST7735
...
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-12-23 11:19:53 -03:00
chao.an
2980792efd
libs/libc: add lib_dumpvbuffer support
...
e.g: Encapsulation Type: Bluetooth H4: add packet type dump support
From:
lib_dumpvbuffer(NULL, data, len);
[ 1.567100] 0000 03 0c 00 ...
[ 1.890100] 0000 0e 04 01 03 0c 00 ......
[ 1.890100] 0000 03 10 00 ...
[ 1.892900] 0000 0e 0c 01 03 10 00 ff ff 8f fe db ff 5b 87 ............[.
[ 1.892900] 0000 01 10 00 ...
[ 1.894900] 0000 0e 0c 01 01 10 00 06 bb 22 06 0a 00 bb 22 ........"...."
[ 1.894900] 0000 02 10 00 ...
[ 1.901900] 0000 0e 44 01 02 10 00 ff ff ff 03 fe ff ff ff ff ff .D..............
[ 1.901900] 0010 ff ff f3 0f e8 fe 3f f7 83 ff 1c 00 00 00 61 f7 ......?.......a.
[ 1.901900] 0020 ff ff 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 1.901900] 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 1.901900] 0040 00 00 00 00 00 00 ......
To:
struct iovec bufs[2];
bufs[0].iov_base = &type;
bufs[0].iov_len = 1;
bufs[1].iov_base = data;
bufs[1].iov_len = len;
lib_dumpvbuffer(NULL, bufs, 2);
[ 3.711400] 0000 01 03 0c 00 ....
[ 4.035400] 0000 04 0e 04 01 03 0c 00 .......
[ 4.035400] 0000 01 03 10 00 ....
[ 4.037400] 0000 04 0e 0c 01 03 10 00 ff ff 8f fe db ff 5b 87 .............[.
[ 4.037400] 0000 01 01 10 00 ....
[ 4.039400] 0000 04 0e 0c 01 01 10 00 06 bb 22 06 0a 00 bb 22 ........."...."
[ 4.039400] 0000 01 02 10 00 ....
[ 4.046400] 0000 04 0e 44 01 02 10 00 ff ff ff 03 fe ff ff ff ff ..D.............
[ 4.046400] 0010 ff ff ff f3 0f e8 fe 3f f7 83 ff 1c 00 00 00 61 .......?.......a
[ 4.046400] 0020 f7 ff ff 7f 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 4.046400] 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[ 4.046400] 0040 00 00 00 00 00 00 00 .......
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-23 00:11:38 -08:00
Xiang Xiao
085619d395
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-20 16:40:14 -03:00
Xiang Xiao
98be50a9bc
libc: Implement posix_fallocate
...
as specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/posix_fallocate.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-14 09:20:15 +01:00
Juha Niskanen
de1ad1fdb3
net: fix typos, incorrect comments, nxstyle
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 09:06:28 -06:00
chao.an
859e1ce63a
crypto/arc4random: rename getrandom to arc4random_buf
...
Change-Id: I5c9f0c9acf5af71f01beceaf06ebe0a2c87676bc
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-13 08:49:51 -06:00
Masayuki Ishikawa
6158b6b77b
spinlock: Introduce SP_WFE() and SP_SEV()
...
Summary:
- This commit introduces SP_WFE() and SP_SEV() to be used for spinlock
- Also, use wfe/sev instructions for ARMV7-A to reduce power consumption
Impact:
- ARMV7-a SMP only
Testing:
- sabre-6quad:smp (QEMU, dev board)
- maix-bit:smp, esp32-devkitc:smp, spresense:smp sim:smp (compile only)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-11 05:58:35 -06:00
Masayuki Ishikawa
21cb7935c5
include: nuttx: Fix style warnings in spinlock.h
...
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-11 05:58:35 -06:00
chao.an
866bb35d2d
libs/libc/net: implement ether_aton/ether_aton_r
...
Reference here:
https://www.unix.com/man-page/linux/3/ether_aton
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 20:37:32 -06:00
chao.an
8ac184633b
clock/time: add CLOCK_BOOTTIME definition
...
Change-Id: I1adc0445dcdd8284d11aec44bd67b447b2b0490f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-10 06:40:47 -06:00
Masayuki Ishikawa
a24905059e
sched: irq: Change irq_waitlock() from private to public
...
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-12-10 08:33:42 +01:00
Brennan Ashton
68b526b335
tcp: Remove incomplete support for TCP reassembly
2020-12-09 07:25:26 -08:00
YAMAMOTO Takashi
48c7fee534
include/debug.h: Apply sysloglike to _none
2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi
8d16fe7cfd
include/nuttx/compiler.h: Use __syslog__ if available
2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi
ed1a2584f0
include/syslog.h: Sprinkle sysloglike
2020-12-06 09:03:09 -06:00
YAMAMOTO Takashi
7b39e612db
include/nuttx/compiler.h: Add sysloglike macro
...
Right now, same as printflike.
Introduce a separate macro because syslog takes
a bit different format from printf. (ie. %m)
If it turns out that a compiler is not happy with
the difference, we can disable this selectively.
2020-12-06 09:03:09 -06:00
Yoshinori Sugino
a5e00ac3f0
include/sys/wait.h: Modify P_GID to P_PGID
...
Summary:
- Follow the POSIX description.
Impact:
- No impact as P_GID and P_PGID are not used.
Testing:
- Built with hifive1-revb:nsh
2020-12-04 11:40:46 -06:00
Abdelatif Guettouche
064de6e140
include/nuttx/sensors/hts221.h: Fix nxstyle errors.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-04 14:34:22 -03:00
Abdelatif Guettouche
4eb2b32310
include/nuttx/sensors/hts221.h: Forward reference i2c_master to avoid
...
any warning.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-12-04 14:34:22 -03:00
Xiang Xiao
bb8c4485a2
libc: Change OK/ERROR macro to enum
...
to avoid the conflict with 3rd party c++ library(e.g. protobuf):
fdc35840b9/src/google/protobuf/stubs/status.h (L47)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie8bb9008a8375c729f8b947c9f10baa80104d157
2020-11-30 09:43:18 +01:00
Xiang Xiao
87dff7c69a
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-29 18:40:40 +09:00
Bernd Walter
68ff96c242
fix comment to match with #define
2020-11-28 23:50:50 -06:00
Chaochao Cui
fbb3cd660b
add simple wm8994 codec driver
2020-11-28 10:23:40 -03:00
chao.an
946f99791b
net/wireless: add country code control support
...
Change-Id: Ie3917815e9004bae9c1116916bc4eadb752f6e44
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-27 20:37:44 -03:00
Augusto Fraga Giachero
ffcedfd971
Remove copyright from headers
2020-11-25 05:13:46 -08:00
Augusto Fraga Giachero
558dfa28fb
nxstyle fix
2020-11-25 05:13:46 -08:00
Augusto Fraga Giachero
6a43daa67e
Update licenses to Apache 2.0
2020-11-25 05:13:46 -08:00
dongjiuzhu
148afd9548
driver/sensors: support custom type of sensor.
...
For examples, the custom sensor could define:
struct custem_event_s
{
uint64_t timestamp;
int16_t adc[8];
};
struct sensor_lowerhalf_s g_lower =
{
.buffer_size = 1024,
};
sensor_custom_register(lower, "/dev/sensor/custom0", sizeof(struct custem_event_s));
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-24 13:23:15 -03:00
Huang Qi
0a2873a37f
spi/qspi.h: Fix data type of buflen
...
Summary:
- This patch change the data type of buflen in qspi_meminfo_s
- from uint16_t to uint32_t to allow data size greater than 64KB.
Impact:
- QSPI & some flash like s25fl1 etc
Testing:
- Tested with rm69330 oled controller on custom board
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-11-22 19:02:11 -08:00
Nathan Hartman
f13ee2848d
include/nuttx/clock.h: Fix wrong comment
...
include/nuttx/clock.h:
* USEC_PER_TICK: The docstring for this define mistakenly said
that the default value of USEC_PER_TICK, 10000, corresponded
to 100 KHz. However, it is actually 100 Hz. Corrected the
comment. No functional changes.
2020-11-22 18:33:50 -08:00
Nathan Hartman
8e8ead3224
sched/signal/sig_timedwait.c: Fix typo in comment
...
sched/signal/sig_timedwait.c:
* nxsig_timedwait(): Fix typo in comment:
"is store din" -> "is stored in"
include/nuttx/signal.h:
* Fix same typo in extern declaration of nxsig_timedwait().
2020-11-22 18:31:49 -08:00
Xiang Xiao
759b63d4be
libc: implement getopt_long partially
...
only the short option is supported now
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-21 07:01:08 -06:00
Xiang Xiao
af53bdb048
libc: Add opterr global variable
...
defined here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-21 07:01:08 -06:00
Michal Lenc
8cf6cfda1a
imxrt: Added support for DP83825I PHY
...
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-11-20 20:34:57 -03:00
dongjiuzhu
23ddeaf3be
mm/circbuf: support circular buffer managerment
...
N/A
Change-Id: Ib1fc009b9ce3af5815920f22221fe8a7262299ef
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-20 05:33:03 -08:00
dongjiuzhu
60d1755e04
drivers: l3gd20 supports the sensor driver model
...
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-19 18:13:17 -08:00
YAMAMOTO Takashi
f1aab27c92
include/nuttx/streams.h: Sprinkle scanflike
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
b90809d5f0
stdio.h: Sprinkle scanflike
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
d167ec6038
compiler.h: Add scanflike macro
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
1f6d54fde4
include/nuttx/streams.h: Add printflike
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
7e702817c1
stdio.h: Sprinkle printflike attribute
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
eb406a8394
compiler.h: Add printflike macro
...
The name was inspired from NetBSD's __printflike.
We can add similar macros for __syslog__, __scanf__, __format_arg__
later.
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
6ee7fdf874
include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier
...
Replace definitions in other places.
2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
c10a8dc73b
include/stdint.h: Use _uintmax_t and _intmax_t from arch types.h
...
As we do for other intXX_t types.
2020-11-19 00:49:56 -08:00
Alan C. Assis
e7c99480ea
Fix nxstyle issue existing on fs/ioctl.h
2020-11-18 22:21:53 +01:00
Alan C. Assis
f09d103528
xtensa/esp32: Add high memory support to work with PSRAM
2020-11-18 22:21:53 +01:00
liuhaitao
55deefdb30
Add debug.h selection choice to support include chip debug.h
...
Select debug.h which may be under include/arch or include/arch/chip.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I5f465c41ba27d040e5e24b2eef2918cfbc18a0bd
2020-11-18 05:22:13 -08:00
liuhaitao
fd94a32468
sysconf: add _SC_PAGESIZE sysconf support
...
Also implement getpagesize() based on sysconf(_SC_PAGESIZE).
Change-Id: I812eb8f34ed602f7bc12c4cafafcebc0d98fd136
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-11-17 02:03:23 -08:00
YAMAMOTO Takashi
18b3b3f5c1
include/nuttx/streams.h: Appease nxstyle
2020-11-16 05:46:53 -08:00
Frank-Christian Kruegel
bf5fa5557d
Support for MAX1161X family of I2C 12 bit ADC chips:
...
MAX11612: 4 channels VCC=5V0 Int VRef=4.096V
MAX11613: 4 channels VCC=3V3 Int VRef=2.048V
MAX11614: 8 channels VCC=5V0 Int VRef=4.096V
MAX11615: 8 channels VCC=3V3 Int VRef=2.048V
MAX11616: 12 channels VCC=5V0 Int VRef=4.096V
MAX11617: 12 channels VCC=3V3 Int VRef=2.048V
Note: The chips' auto-scanning feature is not supported in this revision.
2020-11-15 05:59:01 -08:00
Matias N
14d14bce05
pm.h: nxstyle fixes; change License to Apache (Greg and myself authors)
2020-11-12 08:01:25 +01:00
Matias N
13619ea0df
nrf52: add SPI PM support (disable/enable SPI peripheral on sleep)
2020-11-12 08:01:25 +01:00
dongjiuzhu
089b1c17f6
driver/sensor: add fetch api to read sensor data directly
...
1.use userspace buffer rather than intermediate buffer of upperhalf driver
2.support block and non-block ways.
Change-Id: I1d0cecfaa20ce54961c58713d8f2f8857e349791
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
2cda16b606
driver/sensor: add new feature about sensor driver
...
1.support for multi-user access
2.support special cmd to control sensor
3.support userspace to set size of intermediate buffer
by ioctl: SNOIC_SET_BUFFER_SIZE
Change-Id: I9ce3a65b88b12c28388ec397431f1a277b120c2a
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
2482052228
driver/sensor: user specifies device register number
...
N/A
Change-Id: Idd11461f933dd21b7271cd3ca87a2e33127a9d34
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
Xiang Xiao
84b90e00f0
libc/stdio: Preallocate the stdin, stdout and stderr
...
to handle the uninitialized stdin/stdout/stderr gracefully
report here:
https://github.com/apache/incubator-nuttx/issues/2203
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-11 09:56:10 -08:00
chao.an
27932faf1a
sys/epoll: sync the epoll define with linux
...
Change-Id: If876e0c0b44de73cf2847a9d3c21ac138dd4f879
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 18:53:48 -08:00
chao.an
8b42e6abd2
pthread/spinlock: move the structure prototype out of the definition
...
pthread/pthread_spinlock.c: In function ‘pthread_spin_init’:
pthread/pthread_spinlock.c:114:11: error: dereferencing pointer to incomplete type ‘pthread_spinlock_t’ {aka ‘struct pthread_spinlock_s’}
114 | lock->sp_lock = SP_UNLOCKED;
| ^~
Change-Id: I49dbb2682e36a17bb25a647c6468b7fb511e4a76
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 18:45:48 -08:00
Nathan Hartman
616b3e7436
include/nuttx/spi/spi.h: Fix typos in comments
2020-11-09 18:20:15 -08:00
chao.an
8604e98196
unistd/sched_sporadic: correct the disable value
...
Reference here:
https://github.com/openbsd/src/blob/master/include/unistd.h
Change-Id: Ifb08a69c9a2a2b68179bcfd716fb180ec3577e54
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 09:11:51 -03:00
chao.an
54d0c1c296
sys/uio: fix nxstyle warning
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:33:52 -08:00
chao.an
176d850445
sys/uio: include-able from C++ files
...
Change-Id: I4b512851fa96e1d696dbc886b25af4ab043da8dd
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:33:52 -08:00
chao.an
06d93828af
sys/resource: fix nxstyle warning
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:22:34 -08:00
chao.an
82f1263db9
sys/resource: include-able from C++ files
...
Change-Id: I914ab40495a25da184d0b7f8f8b1fa0d376c66a4
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:22:34 -08:00
Juha Niskanen
70cbb7e537
include/nuttx/net/netconfig.h: fix typos and nxstyle
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Juha Niskanen
62d38c32e8
drivers/lcd/memlcd.c: fix typos and nxstyle
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Subhra Sankha Sarkar
6d32ad04dd
Minor fixes & NuttX coding standards compliance
2020-11-07 06:41:40 -03:00