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
futerigele
06fc3eb1c3
input/touchscreen: added touchscreen gesture
...
added touchscreen gesture
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-12-03 01:20:02 -06:00
baggio63446333
917f1a64ad
libdsp: Fix compile error with the standard math library
...
The libdsp uses M_PI_F and M_PI_2_F which are defined only in the NuttX
math library. Fix an compile error when CONFIG_LIBM is disabled and the
other math library is used.
2021-12-02 12:49:27 +01:00
buyuer
b9345c64c8
Add cinttypes header file for mini-cxxlib.
...
Signed-off-by: buyuer <dingddding@163.com>
2021-12-01 06:51:51 -06:00
Sebastien Lorquet
437424d234
Support multiple SST26 devices on the same spi bus
2021-11-30 18:45:27 +01:00
Simon Filgis
46c36e2603
c++ style comment
2021-11-30 10:44:40 -06:00
Simon Filgis
0e327b18c0
added special registers of KSZ8061 ethernet phy
2021-11-30 10:44:40 -06:00
anjiahao
c2bcef4db8
include/stdio:add setlinebuf marco
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-11-29 11:18:36 -06:00
Xiang Xiao
54eabf9616
libc: Add mknod implementation
...
https://pubs.opengroup.org/onlinepubs/007904875/functions/mknod.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-28 23:31:16 +01:00
songlinzhang
22df553443
net/arp: clean the arp table when netdev carrier off
...
Fix the arp address changed if netdev renew, since the
arp table should be cleared when the netdev carrier off
Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
2021-11-27 06:19:50 -06:00
anjiahao
4db9513658
inculude/netinet:add net mask define
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-11-27 06:19:10 -06:00
anjiahao
80d32edbe1
libc/str:add strlcat to libc
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-11-26 15:24:35 -03:00
Petro Karashchenko
0d9425676d
arch/arm/src/samv7: add flash progmem erasestate ioctl support
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-11-26 14:55:34 -03:00
Xiang Xiao
c1cb429a98
libc/hex2bin: Handle the line ending(\r, \n and \r\n) dynamically
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-26 11:55:00 -03:00
chao.an
6cd850b0e6
net/icmp/v6: add ICMP Destination Unreachable code definitions
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-11-26 08:47:54 -06:00
zhangguoliang
b16eea4f14
feat: charger: add operation to get out voltage
...
Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
2021-11-26 11:16:53 +01:00
weizhifang
e20becd91b
feature: charge: add add chipid ioctl api
...
1.add chipid ioctl api to battery monitor code
2.add chipid itctl api to battery charger code
3.add chipid itctl api to battery gauge code
Signed-off-by: weizhifang <weizhifang@xiaomi.com>
2021-11-26 11:16:53 +01:00
anjiahao
624b8d0776
add MAXHOSTNAMELEN in headfile
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-11-24 22:49:09 -06:00
anjiahao
41c3b42468
change /dev/syslog & /dev/ramlog for unix standard
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-11-24 05:19:46 -06:00
chao.an
e228434cea
libs/libc: add interface to support output stream as buffer style
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-11-23 21:00:43 -06:00
chao.an
7cbb8da692
binfmt/elf: add bare metal coredump support
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-11-23 20:48:00 -06:00
chao.an
f33c46af21
elf: add elf define of Note Section
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-11-23 20:34:56 +09:00
Xiang Xiao
91f616e824
libc/pthread: Implement pthread_atfork
...
fork isn't supported yet, so the dummy implementation is enough.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-22 15:11:48 -03:00
Xiang Xiao
d2b693a204
sched: Move g_tcbinfo to include/nuttx/sched.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-22 14:59:48 -03:00
songnannan
83668c7091
fix(sensor): align for selftest interface define.
...
Align for selftest interface in struct sensor_ops_s
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-19 11:55:40 +01:00
songnannan
550d2bff32
feature: sensor: add set calibration interface for sensor driver.
...
Add standard sensor interface for setting calibartiion value.
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-19 11:55:40 +01:00
Xiang Xiao
a29ee19af4
driver/motor: Remove the unnecessary critical section operation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-11-18 19:27:07 -06:00
Jiuzhu Dong
c0c1e46c5f
driver/motor: add upperhalf structure
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-11-18 19:27:07 -06:00
ligd
b5d1ec28de
mm: do kmm_checkcorruption in IRQ when TCB_FLAG_DEBUG_CHECK set
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-17 09:55:19 -06:00
buyuer
fa90a3dfd4
Optimized GPS sensor and add gps satellite sensor.
...
Signed-off-by: buyuer <dingddding@163.com>
2021-11-17 08:59:40 -06:00
futerigele
17b67093cb
input/touchscreen: added time stamp for touchscreen event
...
added time stamp for touchscreen event
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-11-17 01:47:56 -06:00
songnannan
1799994f2c
feature: sensor: Add sensor type ots.
...
Add ots sensor type for ots sensor.
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-16 14:51:57 -03:00
Andres Sanchez
064f6c8c55
add MTDIOCTL_PROGMEM_ERASESTATE support
...
Signed-off-by: Andres Sanchez <tito97_sp@hotmail.com>
solve style check errors.
2021-11-16 14:45:03 -03:00
Alin Jerpelea
33383a09dd
include: Haltian Ltd: update licenses to Apache
...
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-11-15 06:49:32 -06:00
Xiang Xiao
bec1b0bc92
Revert "libc: Implement fesetround & fegetround for arm"
...
Since the toolchain provide the implementation now.
This reverts commit fe992a5b6c
.
2021-11-10 14:35:53 -03:00
Xiang Xiao
69d35455c7
clock.h: Remove the unnecessary L from macro
...
It's safe for the number <= 32767 since C standard require int at least 16bit
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-10 14:32:16 -03:00
zhuyanlin
012bd1494c
arch:debug: add struct for task aware debug.
...
When enable DEBUG_TCBINFO config, a global struct will
provide, then debuggers can aware nuttx task infomation.
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-11-10 14:31:10 -03:00
Gustavo Henrique Nihei
5dfb2713f6
include: Add __socklen_t_defined for compatibility to other C libraries
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-11-09 08:19:27 -06:00
futerigele
7381245159
input/touchscreen: separate the interface for user interaction
...
Separate the interface for user interaction, touch upper half
provides the interface uniformly.
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-11-08 21:56:03 -06:00
raiden00pl
bf23abfbd5
drivers/qencoder: add an interface to configure the encoder index pin position
2021-11-07 03:52:48 -06:00
David Sidrane
040a04241e
drivers/spi:Define SPI_~CS~_DELAY_CONTROL to support other delays
2021-11-06 05:14:05 -05:00
ligd
00ef4fca51
rpmgs_socket: set RPMSG_SOCKET_NAME_SIZE to 16 for handing prefix
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-04 13:29:51 -05:00
Jukka Laitinen
c79d2067c7
Move timespec calculations from sched into libc/sched
...
Allow using these functions also outside sched, where systick
related calculations are performed
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-04 13:19:01 -05:00
ligd
131e8dc7e7
socket.h: set SOMAXCONN default value to 8
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-11-01 13:52:10 -05:00
Xiang Xiao
aec01e96fa
libc: Remove the empty lib_initialize
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-01 11:03:02 -03:00
Jiuzhu Dong
1ed4118378
power/battery: add baterr, batinfo, batwarn for debug log
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-26 13:59:42 -03:00
zhuyanlin
b4ea11f7b1
arch:cache: add lock feature for cache
...
Some architectures support lock & unlock cache feature.
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-10-22 13:31:32 -03:00
anjiahao
0aa14f832d
mq_open: add long file name check and parameter check
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-21 11:01:45 -03:00
Jiuzhu Dong
f1f0bcc521
driver/sensor: support new sensor type:ECG,PPG,Imdepance
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-20 09:55:18 -05:00
zhangguoliang
12b2b7c240
fix: charger: change the operations of battery ioctl to common
...
Almost all charger chip need the same oprations, which was not
appropriate only for BQ2429X. Therefore, open the operations to
all charger chips.
Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
2021-10-20 09:52:21 +02:00
weizhifang
2a6673bcdd
feature: charge: modify battery_gauge code
...
add temperature and current ioctl api
Signed-off-by: weizhifang <weizhifang@xiaomi.com>
2021-10-20 09:52:11 +02:00
Alexander Lunev
6bdc737f5c
bcm43xxx: supported high-speed timing mode with a clock rate up to 50MHz
2021-10-18 21:58:03 -05:00
Jari van Ewijk
b1d5eff52d
Userled driver: Add option to check actual pin state with getall
2021-10-18 12:30:18 -07:00
Xiang Xiao
643e34efde
sdio: Update the defintion to the latest spec
...
and correct the comment:
https://www.sdcard.org/downloads/pls/
https://www.jedec.org/standards-documents/technology-focus-areas/flash-memory-ssds-ufs-emmc/e-mmc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-17 06:29:13 -03:00
Xiang Xiao
8b67944c75
sched: Remove pidhash_s and move ticks to tcb_s
...
simplify the code logic and reduce memory a little bit
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-16 06:19:17 -03:00
Juha Niskanen
fc1ac6e3e0
include/nuttx/net/netconfig.h: add MSS values for usrsock
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-10-15 06:18:27 -07:00
anjiahao
1623848720
battery_monitor:add poll support
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-11 05:33:22 -07:00
anjiahao
ef7c61ae2d
battery_gauge:add poll support
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-11 05:33:22 -07:00
anjiahao
0d95d6fa45
battery_charger:add poll support
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-11 05:33:22 -07:00
Jiuzhu Dong
9bc913abef
wd_start: use sclock_t type replace int
...
when enable SYSTEM_TIME64, tick may exceed the int32 range
example:
pthread_cond_clockwait
---->clock_abstime2ticks
---->wd_start
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-10 19:59:57 -07:00
Jiuzhu Dong
5ee16ee684
driver/sensor: support sensor_ops: selftest
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-10 08:28:49 -03:00
Jari van Ewijk
20bf309939
Userled driver: Rename functions to make it more consistent and avoid confusion
2021-10-05 06:08:10 -07:00
liushuai25
6c374fc06c
feat: driver: support double buffer for display
...
add pan display for fb driver.
reference links:
https://github.com/torvalds/linux/blob/master/drivers/video/fbdev/core/fbmem.c
https://github.com/torvalds/linux/blob/master/drivers/video/fbdev/goldfishfb.c
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
Update include/nuttx/video/fb.h
Co-authored-by: Gustavo Henrique Nihei <38959758+gustavonihei@users.noreply.github.com>
Update include/nuttx/video/fb.h
Co-authored-by: Gustavo Henrique Nihei <38959758+gustavonihei@users.noreply.github.com>
2021-09-30 09:07:48 -03:00
Xiang Xiao
77bc1d1bdf
power/battery: Move the enumurate to the common place
...
so the userspace program can handle the different battery driver equally
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-30 14:58:42 +09:00
Alin Jerpelea
b0ddc6e2c5
include: Omni Hoverboards: update licenses to Apache
...
Gregory Nutt has submitted the SGA
Omni Hoverboards has submitted the SGA
Paul Alexander Patience has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-28 04:37:38 -07:00
futerigele
a264fd9541
input/touch: add io command for touch firmware version
...
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-09-27 18:17:17 -07:00
FASTSHIFT
649f99ce30
libc/misc: add lib_glob.
...
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
2021-09-25 07:54:39 -03:00
zhuyanlin
a41f92d1f6
sched:tcb_s:rearrange sched_priority/int_priority to word align
...
As pid_t is uint16_t,this could save space for many archs.
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-23 23:08:51 -07:00
chao.an
c132e5bed4
net/tcp: sanity check for the listen address
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-23 23:07:57 -07:00
FASTSHIFT
f3477a86d2
libc/string: add lib_strchrnul.
2021-09-22 09:20:06 -03:00
iceaway
beba1056a8
userleds: add missing include (stdbool.h)
...
Would not compile without stdbool.h included (uses the bool type in
the header file)
2021-09-20 02:01:47 -07:00
Alexander Lunev
36fbedcbfc
net/devif/devif_callback.c: corrected the connection event list to work as FIFO instead of LIFO.
...
In case of enabled packet forwarding mode, packets were forwarded in a reverse order
because of LIFO behavior of the connection event list.
The issue exposed only during high network traffic. Thus the event list started to grow
that resulted in changing the order of packets inside of groups of several packets
like the following: 3, 2, 1, 6, 5, 4, 8, 7 etc.
Remarks concerning the connection event list implementation:
* Now the queue (list) is FIFO as it should be.
* The list is singly linked.
* The list has a head pointer (inside of outer net_driver_s structure),
and a tail pointer is added into outer net_driver_s structure.
* The list item is devif_callback_s structure.
It still has two pointers to two different list chains (*nxtconn and *nxtdev).
* As before the first argument (*dev) of the list functions can be NULL,
while the other argument (*list) is effective (not NULL).
* An extra (*tail) argument is added to devif_callback_alloc()
and devif_conn_callback_free() functions.
* devif_callback_alloc() time complexity is O(1) (i.e. O(n) to fill the whole list).
* devif_callback_free() time complexity is O(n) (i.e. O(n^2) to empty the whole list).
* devif_conn_event() time complexity is O(n).
2021-09-18 21:01:39 -05:00
Alin Jerpelea
48f92e6f1d
author: Bill Gatliff : update licenses to Apache
...
Gregory Nutt has submitted the SGA
Bill Gatliff has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-16 21:56:08 -05:00
Abdelatif Guettouche
3b2aea204c
sched/irq/irq_csection.c: Fix typos and correct some comments.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-16 10:53:51 -05:00
Peter Bee
a5406c63cb
drivers/lcd: Add GC9A01 driver and refine ST7735
...
Added custom resolution, offset and BGR mode for ST7735 driver
Added GC9A01 driver (based on ST7789 driver)
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-09-16 08:39:35 -03:00
Alin Jerpelea
49667a230e
include: author: Hexagon AB: update licenses to Apache
...
Hexagon AB has submitted the SGA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-15 18:19:42 +08:00
SPRESENSE
ebd736240e
drivers/video: Replace error output macro to verr
...
Add video debug macros verr/vwarn/vinfo, and replace error output macro to verr.
2021-09-15 07:06:35 +02:00
SPRESENSE
74df4b70b3
drivers: video: Rearchitect video driver
...
Rearchitect video driver:
- Define two video I/F(struct imgsensor_ops_s and struct imgdata_ops_s),
and support them.
- CISIF driver supports new video I/F struct imgdata_ops_s.
- ISX012 driver supports new video I/F struct imgsensor_ops_s.
- Move ISX012 driver to general driver directory.
2021-09-15 07:06:35 +02:00
chao.an
e8d7779ab1
sys/socket/scm: add more socket message control helper
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 12:04:01 +08:00
Abdelatif Guettouche
20d34cce98
sched/irq_section.c: irq_waitlock is a private function; remove its
...
prototype from irq.h and define it as static.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-15 06:20:59 +09:00
liushuai25
fdcd1228b2
feature: driver: add interface for lcd dev driver
...
add get and set framerate interface for lcd dev driver.
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2021-09-13 18:18:27 -03:00
liushuai25
3183251de0
feature: driver: add interface for fb driver
...
add get and set panel power interface for fb driver.
add get and set framerate interface for fb driver.
add panel information at videoinfo for fb driver.
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2021-09-13 18:18:27 -03:00
Alin Jerpelea
bb54ed4227
author: OffCode Ltd : update licenses to Apache
...
OffCode Ltd has submitted the SGA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-13 22:43:36 +08:00
Jiuzhu Dong
6df9d1907c
fs/ioctl: using FIOC_FILEPATH instead of FIOC_FILENAME.
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:56:10 +08:00
Jiuzhu Dong
dfb4b6e3d8
lib_vsprintf: Add %pV format support
...
test case:
void test(const char *fmt, ...)
{
struct va_format vaf;
va_list ap;
va_start(ap, fmt);
vaf.fmt = fmt;
vaf.va = ≈
printf("func:%s, %pV, line:%d\n", __func__, &vaf, __LINE__);
va_end(ap);
}
int main(int argc, FAR char *argv[])
{
char str[] = "Hello Boy and Girl!";
int count = 10;
test("%s %d", str, count);
return 0;
}
>> test
func:test, Hello Boy and Girl! 10, line:49
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:46 +08:00
Jiuzhu Dong
2438403f23
libc/rexec/rexec_af: support remote execution
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:06 +08:00
Jiuzhu Dong
d8ea482b58
errno: use staic errno to replace tl_errno before tls initialization
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:48:31 +08:00
Jiuzhu Dong
c9c284089f
debug: allow customize EXTRA_FMT
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:33:20 +08:00
Abdelatif Guettouche
083272ad92
spinlock.h: In single CPU case force the lock passed to
...
spin_lock_irqsave to be unused in the macro to avoid spreading
UNUSED() or void throughout the code base.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-11 23:24:32 +09:00
daviepeng
3b5914f57b
add support for power management ic axp202
2021-09-07 13:42:54 +08:00
Jukka Laitinen
1b75b5d5aa
Fix compilation of arm protected build
...
Correct typos in include/nuttx/arch.h and suppress
"'noreturn' function does return" warning coming from arm_pthread_exit.c
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-09-07 00:31:47 +08:00
liushuai25
0368cbdf7c
modify comments
...
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2021-09-07 00:31:33 +08:00
Alin Jerpelea
df088c39f0
author: Anthony Merlino : update licenses to Apache
...
Verge Aero has submitted the SGA
Anthony Merlino has submitted the SGA
Gregory Nutt has submitted the SGA
Sebastien Lorquet has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-06 20:38:14 +08:00
Alin Jerpelea
a20d4ac4ec
author: Aleksandr Vyhovanec: update licenses to Apache
...
Aleksandr Vyhovanec has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-03 17:38:33 +08:00
Alin Jerpelea
7f0aefa632
include: nxstyle fixes
...
fixes for nxstyle warnings reported by the nexstyle tool
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Alin Jerpelea
110632293c
LICENSE: revert to the original license from Atmel Corporation
...
revert to the original license from Atmel Corporation and add the files to
the LICENSE file
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-02 21:56:05 +08:00
Gustavo Henrique Nihei
a6e9be88c4
nuttx: Add function attribute for inhibiting stack protector
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-01 23:11:03 +08:00
Alin Jerpelea
151f6eab3c
author: Anton D. Kachalov: update licenses to Apache
...
Anton D. Kachalov has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-01 21:02:34 +08:00
Gustavo Henrique Nihei
558b772146
include/threads: Fix pthread_mutexattr_t initialization on mtx_init
...
pthread_attr_init was being erroneously called for initializing an
instance of pthread_mutexattr_t.
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-31 11:21:22 +08:00
Gustavo Henrique Nihei
270e9196c6
include/threads: Prevent operator precedence issues
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-31 11:21:22 +08:00
Gustavo Henrique Nihei
b628d92e63
include/threads: Fix incompatible pointer type on call to pthread_join
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-31 11:21:22 +08:00
daviepeng
60b6199120
fix nxstyle
2021-08-30 02:52:30 +08:00
daviepeng
c7cda607f4
Adds driver for msa301 sensore module
2021-08-30 02:52:30 +08:00
zhuyanlin
3c58b01721
stddef: Let offset
be defined from toolchain
...
Let `offset` could be defined from toolchain,
Which will be usefull for fixed code project.
2021-08-27 08:55:45 -07:00
Abdelatif Guettouche
5ff703d5d0
arch/*_testset: Fix few typos.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-25 00:20:20 +08:00
François Schauber
0bfacf4d12
include/threads.h: add missing semi-colon
2021-08-24 00:14:12 +08:00
chao.an
c826c37277
nuttx/up_backtrace: add up_backtrace interface
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-20 13:11:45 -03:00
Jiuzhu Dong
ccaea473f3
endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER
...
Change-Id: If072b69e37a89ccd6dc62e1d485b15703da029ac
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-20 07:47:07 -07:00
Jiuzhu Dong
1f93071370
byteswap.h: add byteswap.h header file
...
Change-Id: I2b00618f608efbb8834328823b5e0eaa66f42aba
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-20 07:47:07 -07:00
Xiang Xiao
af72376773
fs: Remove magic field from partition_info_s
...
since it is wrong and impossible to return file
system magic number from the block or mtd layer.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-20 09:19:52 -03:00
Alin Jerpelea
c7a2da8acf
update licenses to Apache
...
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-20 01:45:00 -07:00
raiden00pl
b30f5e146d
drivers/sensors: add an upper half 3-phase Hall effect sensor driver
2021-08-19 08:19:38 -07:00
chao.an
1060953567
sched/backtrace: add sched_backtrace support
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 01:30:50 -07:00
chao.an
83964231a5
libs/libc: move the backtrace implement to sched
...
1. move the backtrace implement to sched
2. rename CONFIG_UNWINDER to CONFIG_SCHED_BACKTRACE
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 01:30:50 -07:00
Alin Jerpelea
dc7b9b8dbb
include: can: move error.h to apps/canutils
...
This file is used by the libcanutils and can be isolated in apps
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-17 06:28:12 -07:00
Alin Jerpelea
12ebe75fa0
include: update licenses to Apache
...
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-16 07:11:32 -07:00
Xiang Xiao
4f8c3ab901
fs: Support 64bit in register_[block|mtd]partition
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-16 10:16:09 -03:00
Abdelatif Guettouche
5b350f3a0f
arch/*_reprioritizertr.c: Fix typos in comments.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-14 11:19:34 -07:00
Xiang Xiao
6b6c11f0ad
mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
177e1ced3f
Revert "mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE"
...
to simplify flt and partion layer implementation
This reverts commit 2e49e1bc5c
.
2021-08-12 08:01:29 -03:00
Xiang Xiao
f4addbd640
mtd: Replace MTDIOC_PARTINFO with BIOC_PARTINFO
...
to simplify flt and partion layer implementation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
76904371a1
fs: Remove endsector from partition_info_s
...
since it can be computed from startsector and numsectors simply
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 09:26:43 -03:00
Gustavo Henrique Nihei
b321ae023c
fs: Add ioctl command for retrieving partition info of a block device
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-10 19:45:14 -07:00
Gustavo Henrique Nihei
cddd9c9c38
mtd: Enable retrieval of MTD partition information
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-10 19:45:14 -07:00
Gustavo Henrique Nihei
6f5d02fb91
fs: Add data structure for Partition Information
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-10 19:45:14 -07:00
Abdelatif Guettouche
054e284785
*_cpustart.c: Fix typos in function description.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-08-11 11:06:27 +09:00
Xiang Xiao
a09f262f1e
fs/userfs: Support fchstat and chstat callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:57:48 -03:00
raiden00pl
dca8c65331
drivers/qencoder: add command to set the maximum encoder position
2021-08-10 11:19:05 -03:00
Xiang Xiao
776458143c
fs/hostfs: Support fchstat and chstat callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Xiang Xiao
6c61d032db
fs: Add utimens and lutimens
...
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Michal Lenc
87c5cc1a5d
adc: add IOCTL commands ANIOC_RESET_FIFO and ANIOC_SAMPLES_ON_READ
...
This commit adds two new IOCTL commnands for ADC driver. Command
ANIOC_RESET_FIFO resets FIFO head and tail which causes the driver
to wait for the new data to be received. Calling this command before
reading ADC data in user space ensures that the read data are newly
sampled.
Command ANIOC_SAMPLES_ON_READ return the number of read channels in
the buffer. This can be useful in nonblocking mode when the application
needs to get the samples received before the app was started.
Both IOCTL commands are used only in generic driver section only and do
not have any effect on existing architecture specific drivers.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-08-06 21:10:59 -07:00
Xiang Xiao
b12f588140
Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
...
since boardctl isn't a libc feature
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 13:58:26 +02:00
Xiang Xiao
5025fbef8d
Rename LIB_ to LIBC_ for all libc Kconfig
...
follow other libc component naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 19:45:24 +02:00
Xiang Xiao
319474b1b1
fs: Change off_t and related types to int64_t if long long is supported
...
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I019dc08aff02f9ea01eb6d750033bbc358994da5
2021-08-04 06:48:30 -07:00
Xiang Xiao
c597721633
libc: Implement gettext function
...
https://www.man7.org/linux/man-pages/man3/dcgettext.3.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 12:14:07 -03:00
Xiang Xiao
4a23737016
libc: Remove include/nuttx/lib/regex.h and libs/libc/misc/lib_match.c
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 08:59:54 -03:00
Xiang Xiao
ae7fe055fc
fs: Save umask to tls_task_s for non kernel mode only
...
since the kernel mode has the dedicated userspace
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 15:59:51 -03:00
Xiang Xiao
98de773081
libc: Support message catalog function
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/nl_types.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 08:24:59 -03:00
Xiang Xiao
a262eebe34
libc: Rename match to fnmatch
...
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 08:23:35 -03:00
Xiang Xiao
0e2cbe9a79
libc: Add the empty nl_langinfo implementation
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-31 15:35:47 -03:00
Xiang Xiao
f181ed6fd2
libc: Reorder LC_XXX as Linux
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-31 15:35:47 -03:00
Gustavo Henrique Nihei
ae714baae5
board/ctrl: Add BOARDIOC_BOOT_IMAGE for booting a new application image
...
This command enables the application to perform the final steps of the
booting process prior to finally switching the execution to another
firmware image.
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-07-30 09:47:46 -07:00
Xiang Xiao
cdc781bdfd
libc: Implement local_t related functions
...
since local_t isn't really implemented on NuttX,
we can simply redirect to the non-locale version.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-30 09:43:26 -03:00
Xiang Xiao
decf7d0ad9
locale: Add LC_GLOBAL_LOCALE which is specified by the standard
...
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-30 09:43:26 -03:00
Xiang Xiao
5d1a444812
Replace __attribute__ ((unused)) with unused_code
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Xiang Xiao
69df58c2e8
Replace __attribute__((no_instrument_function)) with noinstrument_function;
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Xiang Xiao
007adc7736
Replace all __attribute__((section(x)) with locate_data(x)
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Xiang Xiao
b3f9ffbe72
Replace all __attribute__((aligned(x)) with aligned_data(x)
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Xiang Xiao
545a93301b
fs: Don't define UTIME_OMIT if __cplusplus is defined
...
to avoid libcxx misdetect NuttX support utimensat(_LIBCPP_USE_UTIMENSAT).
This patch need be reverted after utimensat is supported in NuttX.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 06:33:49 -03:00
Xiang Xiao
307cc61893
fs: Add fchstat and chstat callback into mountpt_operations
...
and implement all status related change function. the individual
file system change will provide in other upcoming patchset.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4
2021-07-29 06:33:49 -03:00
raiden00pl
919008c51e
add upper-half CORDIC driver
2021-07-28 14:23:13 -03:00
Jiuzhu Dong
23d87ff9df
usrwqueue: implement order work queue
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-27 21:01:38 -07:00
Jiuzhu Dong
855c78bb9d
work_queue: schedule the work queue using the timer mechanism
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-27 21:01:38 -07:00
Michal Lenc
9fc806984c
adc: add ioctl command to get the number of configured channels
...
Number of configured ADC channels is currently only defined in board
level section, typically in xxx_adc.c file. This commit introduces
ioctl command ANIOC_GET_NCHANNELS that returns the number of configured
channels which is determined by the driver code. The change can allow the
applications to be more flexible when it comes to multiple ADC devices
with different number of configured channels.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-07-26 19:45:47 -07:00
Xiang Xiao
5e01fe050a
arch/sim: Copy include/nuttx/config.h to the local folder
...
so the source code compiled by host environment can include config.h
directly and then avoid pass Kconfig option through Makefile manually
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic9fe6f846082cef2d0808dc717df8ae6ed929edf
2021-07-27 07:44:33 +09:00
Xiang Xiao
3488a98bd7
sim: Correct the typedef in nuttx/hostfs.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5fbfd519417c5686325822549c068b1d42f83946
2021-07-27 07:44:33 +09:00
Michal Lenc
7354ab187e
pwm: add option to break the loops when using multiple PWM channels
...
PWM drivers currently use channel number 0 for the channels that are not
used by the application. This commit adds number -1 which indicates that
all following channels are not configured and that the loop can be broken.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-07-26 10:34:16 -03:00
Nathan Hartman
b92aeb8209
Fix various typos
...
arch/arm/src/eoss3/eoss3_serial.c:
arch/arm/src/imxrt/hardware/imxrt_flexcan.h:
arch/arm/src/imxrt/imxrt_flexcan.c:
arch/arm/src/imxrt/imxrt_flexpwm.c:
arch/arm/src/imxrt/imxrt_lpi2c.c:
arch/arm/src/kinetis/kinetis_flexcan.c:
arch/arm/src/nrf52/hardware/nrf52_rtc.h:
arch/arm/src/nrf52/nrf52_clockconfig.c:
arch/arm/src/nrf52/nrf52_radio.c:
arch/arm/src/nrf52/nrf52_tim.c:
arch/arm/src/rtl8720c/amebaz_depend.c:
arch/arm/src/s32k1xx/Kconfig:
arch/arm/src/s32k1xx/s32k1xx_flexcan.c:
arch/arm/src/s32k1xx/s32k1xx_lpi2c.c:
arch/arm/src/sama5/hardware/sam_sdmmc.h:
arch/arm/src/sama5/sam_gmac.c:
arch/arm/src/samd5e5/sam_wdt.c:
arch/avr/src/avr32/up_exceptions.S:
arch/avr/src/avr32/up_fullcontextrestore.S:
arch/renesas/src/rx65n/rx65n_dtc.c:
arch/renesas/src/rx65n/rx65n_usbhost.c:
arch/risc-v/src/esp32c3/esp32c3_tickless.c:
boards/arm/stm32h7/stm32h747i-disco/include/board.h:
include/nuttx/lcd/ili9225.h:
libs/libc/stdio/lib_fgetpos.c:
libs/libc/stdio/lib_fseek.c:
libs/libc/stdio/lib_fsetpos.c:
* Fix typos.
2021-07-25 18:36:53 -07:00
liuhaitao
a02f450773
board/ctrl: add BOARDCTL_SWITCH_BOOT switch boot system support
...
BOARDIOC_SWITCH_BOOT is required to communicate the boot partition from
userspace (OTA subsystem) to board. It can be used to change the system
boot behavior. So it's useful for A/B boot or even single boot case.
For the board support A/B boot case:
1. Download the new image from the sever
2. Write the new image to the alternative partition
3. Call BOARDCTL_SWITCH_BOOT to the alternative system
For single boot partition case:
1. Download the new image from the sever
2. Call BOARDCTL_SWITCH_BOOT and reboot to a small system
3. Write the new image to the main partition in the small system
4. Call BOARDCTL_SWITCH_BOOT again to the main system
Change-Id: Ifebb495784ecf06842946a249bec64f75dce894f
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-22 09:03:51 -07:00
liuhaitao
200c86bc92
board/ctrl: correct BOARDIOC_USER command value
...
Change-Id: I3a8eb8c6c39516bbf24b1aee73312767c37158cd
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-07-22 09:03:51 -07:00
ligd
4919d9b7df
arm: add up_secure_irq support
...
Change-Id: Ibc9402dcef4045ca122da400940d57de6b508308
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-22 10:50:53 -03:00
Xiang Xiao
af1dceb3e3
libc: Implement times function
...
https://pubs.opengroup.org/onlinepubs/009604599/functions/times.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If2cccfedd532a77f86035d16d36d94ae38d8f09c
2021-07-21 13:11:54 -03:00
chao.an
7d4502aca6
net/socket: add SO_SNDBUF support
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-20 20:24:58 -07:00
Nathan Hartman
609ee6b54b
Fix typos in comments and identifiers
2021-07-19 22:55:30 -03:00
Huang Qi
ad2f859170
sched: Move tls_ndxset_t & tls_dtor_t to tls.h
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-19 04:26:58 -07:00
Huang Qi
95cb33dbf5
sched: Remove unused TLS member from task_group_s
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-19 04:26:58 -07:00
Masayuki Ishikawa
cfd1c28606
fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
...
Summary:
- On Linux, fsblkcnt_t and fsfilcnt_t are used in struct statfs
- This commit applies the same logic
Impact:
- None
Testing:
- Tested with spresense:rndis_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Alin Jerpelea
7689392528
author: Zilogic Systems: update licenses to Apache
...
Gregory Nutt has submitted the SGA
Zilogic Systems has submitted the SGA
Uniquix Tecnologia has submitted the SGA
Michael Jung has submitted the ICLA
Alan Carvalho de Assis has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-07-19 03:08:00 -07:00
Gustavo Henrique Nihei
30cb497fe1
mtd: Add MTDIOC_ERASESTATE command for retrieving erase state value
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-07-17 09:00:41 -07:00
Xiang Xiao
663104a2e9
fs: Simplify sendfile implementation
...
and avoid call nx_ file API in the kernel space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id951ca161df2c2ee267dc4b5a0d7dfa67df4c1e6
2021-07-17 07:39:15 -03:00
Xiang Xiao
2e0901fcaa
net: Add file_socket function
...
and move the socket special process from fstat/nx_vfcntl/ to file_fstat/file_vfcntl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10341538488ba3a8444df8e73fb5257b2a1f512
2021-07-17 07:39:15 -03:00
Nathan Hartman
af1fd49fb0
wqueue: Fix typos
...
include/nuttx/wqueue.h:
libs/libc/wqueue/work_cancel.c:
libs/libc/wqueue/work_queue.c:
sched/wqueue/kwork_cancel.c:
sched/wqueue/kwork_queue.c:
* Fix spelling, grammar, and typos.
* Improve wording in a few areas.
* These changes affect comments only. No functional changes.
2021-07-16 19:54:08 -03:00
Jiuzhu Dong
9d264af4fc
rptun: fix compile break when disable openamp
...
Change-Id: I63251524d94fae43bfb0a71c324d55bf91d363f8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-14 23:36:14 -07:00
mage1
def007e2d7
add #undef for some libc function
...
since it's useful to redirect these functions to others
sometime(e.g. validate the memory before write).
Change-Id: I6253a9231af8809e8362f4bc5a1bd67fb094c3b0
2021-07-14 15:09:58 -03:00
Xiang Xiao
a0f2f6c362
fs: Move umask to task_info_s
...
and implement the related semantic correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0587341e2c505e41b5e24e55dba039ed200d65f2
2021-07-14 10:35:15 -03:00
Xiang Xiao
0148e1d501
fs: Support the root file system attributes(mode, uid, gid and time)
...
Note: all attributes is guarded by PSEUDOFS_ATTRIBUTES to save the space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664d60382e356068fd920f08aca5b4a49d8d92a9
2021-07-14 10:35:15 -03:00
zhouliang3
f230ba7b34
Increase the function of crc8 to use custom polynomials
...
N/A
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I3c53bf25541c1811a05d025b39dfe24cb0613b72
(cherry picked from commit 07b2bd769e608d4c46f8e039d091514b1b3d3ff0)
2021-07-12 20:33:21 -07:00
Huang Qi
e5c278981a
net: Rename IP_TTL to IP_TTL_DEFAULT
...
Since a SOL option IP_TTL exist, we should rename this IP_TTL
in netconfig.h to avoid confusion.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ib04c36553f23bce8d362e97294a8b83eaa050cf3
2021-07-12 16:30:37 -03:00
Huang Qi
c303a12f26
include/netinet: Add missing IP_TTL definition
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ic0c4bcb840952a4ccf7f262306ba0c3d43e01811
2021-07-12 16:30:37 -03:00
chao.an
80b7394a95
sys/poll: add POLLRDHUP definition
...
Change-Id: I1117279d9a620138789256d699ae32d47eab3a90
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-12 16:13:40 -03:00
chao.an
a018a3a26b
bluetooth/filter: add more OGF definition
...
Change-Id: I4f1b98dc63ab2d9eeb523b8040aae88ea285bb9a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-12 16:13:15 -03:00
Xiang Xiao
2fa1e55628
libc: Implement ttyname and ttyname_r
...
Note: this patch can get file path from root pseudo file handle,
but a general infrastructure is setup for other file system too.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I86cd79ebb741f2f43fdd398bb7498c40687d949b
2021-07-09 18:23:34 -03:00
zhouliang3
b7653e2fae
fs: Add parent node of inode
...
N/A
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
Change-Id: I006c6172ced8edd47b9d4661880e04d3a4274854
2021-07-09 18:23:34 -03:00
Xiang Xiao
ee767021b3
fs: Remove the inernal st_count field from struct stat
...
it's more simple to reuse the resolve argument as the recursive count
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I826b2fef3af8b12aae230e4766ab09f8de988f8a
2021-07-09 16:38:51 -03:00
Xiang Xiao
800acff10e
libc: Implement utime on top of utimes
...
https://man7.org/linux/man-pages/man2/utime.2.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10574fdd0d07eabbc93aceeea5a0b953e30339a
2021-07-09 15:51:28 -03:00
Xiang Xiao
bae265274a
libc: Move the declaration of futimens from sys/time.h to sys/stat.h
...
to follow the spec here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id8e418794bd43827c01af772ce704a8d3e7681c5
2021-07-09 15:51:28 -03:00
chao.an
940a07e1e5
net/socketpair: move socketpair implement into socket internal
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-08 03:05:43 -05:00
Xiang Xiao
76cdd5c329
mm: Remove mm_heap_impl_s struct
...
it's more simple to make mm_heap_s opaque outside of mm
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5c8e435f6baba6d22b10c5f7e8d9191104fb5af2
2021-07-07 04:25:15 -07:00
chao.an
441b03c61c
board/ctrl: add BOARDCTL_UNIQUEKEY support
...
Add unique key to support get trusted data from the trusted field
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 08:23:23 -03:00
chao.an
aab03ef86d
net/tcp: add window scale support
...
Reference here:
https://tools.ietf.org/html/rfc1323
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 03:55:41 -05:00
chao.an
a5cdc4e69b
net/tcp: change the tcp optdata to dynamic arrays
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-07 03:55:41 -05:00
buyuer
0f77a30b22
Add include header file <sys/types.h> to rpmsg.h.
...
When use netpacket/rpmsg.h,the compiler prompt that sa_family_t is not defined.
Signed-off-by: buyuer <dingddding@163.com>
2021-07-06 05:23:46 -05:00
Xiang Xiao
841a4922aa
binfmt: Replace all nx_ API with file_ API
...
since binfmt is a kernel component
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
Xiang Xiao
8612af4ae5
fs: Implement file_mmap and file_munmap API
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-06 11:18:13 +09:00
chao.an
eabe535de7
net/inet: add support of FIONREAD
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-05 06:20:52 -05:00
chao.an
ebf89ff63b
mm/iob: add iob_get_queue_size() helper
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-07-05 06:20:52 -05:00
Xiang Xiao
75bfa4584c
mm: Add kmm_malloc_size and mm_malloc_size
...
make malloc_size implementation align with malloc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8d7781925f06e58a880437a16569dccbfd2ea035
2021-07-05 14:23:24 +09:00
Xiang Xiao
ddaa3e42b9
mm: Move the real implementation of mm_sbrk to sbrk
...
and remove mm_sbrk and kmm_sbrk since it's wrong to expose
sbrk to other heaps except the default userspace heap.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-05 08:02:08 +09:00
Xiang Xiao
97216c220b
mm: Support malloc_size function
...
and rename malloc_usable_size to malloc_size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-04 18:53:44 -03:00
Huang Qi
50c08bf45b
libc: Move pthread_key_destructor to task_info_s
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-04 07:36:44 -05:00
ligd
3cabd49d49
select: fix asan report error
...
vfs/fs_select.c:116:25: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
vfs/fs_select.c:153:22: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Change-Id: I2e32bb8a3db8ff5a5955b83b382ac2fa5756122c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-03 13:09:52 -05:00
Xiang Xiao
b1f711f790
mm: Move procfs_register_meminfo into common place
...
to avoid the code duplication and ensure the consistent behaviour
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-03 09:39:32 -07:00
Jiuzhu Dong
817259ec2d
syslog/ramlog_channel: fix log confusion when multi task writing together
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-03 11:24:21 -05:00
Huang Qi
65fa11634b
sched: Refine tls_info_s and task_info_s
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-02 10:33:34 -05:00
ligd
2d32a52353
sched_critmon: add thread run time to critmonitor
...
Change-Id: Ib44e45f0f9a1b249b4067db324c9dbdf0cf3f288
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
ligd
2c775bb0c9
fs/procfs: fix heap overflow when snprintf meet long string
...
Change-Id: I90f2d9fab55b6e69f159855af3d6dbcb81142eb8
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-02 08:25:02 -05:00
Xiang Xiao
d7d3177668
sched/wdog: Remove flags field from wdog_s to save memory
...
since WDOG_ISACTIVE can check func field instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I21d7f9cfe6195c8ccb6cc5925ff66f3c89822f9d
2021-07-01 19:27:10 -03:00
Xiang Xiao
1d0ade6fa2
libc: Remove the duplication lib_xxx macro
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I73c876ed40811c013dad83b8b2aeb7bdc3041913
2021-07-01 11:28:34 -07:00
Nathan Hartman
a8cbcd084f
signal: Fix docs and comments related to SIGWORK and its config
...
Documentation/reference/os/wqueue.rst:
* CONFIG_SIG_SIGWORK: Fix sentence that was cut off in the
middle.
include/signal.h:
* SIGWORK: Fix grammar in comment.
sched/Kconfig:
* config SIG_SIGWORK: Fix ---help--- text to indicate that
this user-configured signal number may be used by various
internal worker threads.
2021-06-30 21:22:49 -05:00
Xiang Xiao
4ba1bafe55
libc/debug: Rename CONFIG_EABI_UNWINDER to CONFIG_UNWINDER
...
since the unwinder not only work with arm but also other arch(e.g. riscv)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I56cc54f2c99560c858362ab2dfba524097385716
2021-06-30 05:08:57 -07:00
YAMAMOTO Takashi
314237588e
Add iob_tailroom
...
I plan to use this for tcp.
2021-06-30 06:40:13 -05:00
YAMAMOTO Takashi
b2d3bf920d
Change the type of io_pktlen from uint16_t to unsigned int
...
I plan to use a simple IOB chain w/o IOB queue for tcp recv buffers.
for large configurations, uint16_t is not large enough to represent
the entire socket buffer.
2021-06-30 06:22:14 +09:00
Xiang Xiao
13780dada3
sched: Add kthread_create_with_stack
...
let caller customize the stack buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I878818ec1ce5650165dbbe2d72a4618cb2e6a094
2021-06-27 12:35:13 -03:00
Xiang Xiao
20f5a28e49
net: Add if_nameindex and if_freenameindex API
...
Specified here:
https://man7.org/linux/man-pages/man3/if_nameindex.3.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia5daed775bd11fa5978d54860632554da8f7b416
2021-06-26 22:37:12 +01:00
Abdelatif Guettouche
0a4982a80e
Introduce ARCH_HAVE_EXTRA_HEAPS, this config is going to be used for
...
chips that have multiple separate heaps.
For now it's used to enable APIs to initialize the different heaps
during the start sequence but can be extended for other purposes that
manage those heaps.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-26 09:52:43 -05:00
Xiang Xiao
9cc41f44f0
libc/sched: Implement nice API
...
Specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/nice.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib25be28c8dc1c9288e8c78ad756c91ec6ef325a7
2021-06-24 08:50:48 -03:00
Xiang Xiao
3d0320f891
libc/sched: Map the nice value more correctly
...
from https://pubs.opengroup.org/onlinepubs/007904875/functions/setpriority.html :
1.The nice value shall in the range [-{NZERO},{NZERO} -1]
2.Lower nice value shall cause more favorable scheduling
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5ad60d92abc3b69fbaa406da68cec2e40ca3fa6d
2021-06-24 08:50:48 -03:00
Huang Qi
fe992a5b6c
libc: Implement fesetround & fegetround for arm
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-06-24 08:47:34 -03:00
Xiang Xiao
ae9b5fd306
Replace mktime with timegm in rtc and fs driver
...
since kernel component should use UTC instead local time
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf939e1ab0af8e577105f539d2553bc67b3b3d10
2021-06-23 13:43:32 -03:00
Xiang Xiao
b1cd825cac
libc/time: Implement timegm function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id988ae077cf54597b2522546c4309b66416b8b0e
2021-06-23 13:43:32 -03:00
Xiang Xiao
55312052a7
sys/select.h: Should include sys/time.h instead of time.h
...
because struct timeval is defined in sys/time.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I767347fc3e0a4cdb3280307c7dfcac53fbddd24e
2021-06-23 17:35:53 +01:00
Alexander Lunev
f7c8875fd7
sdio,stm32h7: fixed an issue with not starting IDMA data transfer in case of IO_RW_EXTENDED command (CMD53);
...
corrected setting SDMMC_DCTRL.DTMODE field for block data transfers ending on block count
and for block data transfers ending with STOP_TRANSMISSION command;
stm32_sdio: added more debug messages
2021-06-21 02:47:46 -05:00
Nathan Hartman
4258190477
drivers/motor/foq: Remove forward declaration for nonexistent type
...
include/nuttx/motor/foc/foc.h:
* Remove forward declaration for struct foc_typespec_s, which
does not exist anywhere in the NuttX tree.
2021-06-18 14:11:05 -03:00