raiden00pl
c43ec4283f
libdsp/lib_motor.c: remove maximum openloop speed limiter
2021-04-01 01:24:12 -05:00
raiden00pl
eea371093c
libdsp/lib_svm.c: return not saturated output from modulator, the current corection now takes float as an arguments
2021-04-01 01:24:12 -05:00
raiden00pl
5034e4d8ba
libdsp: introduce libdsp-specific debug assertion (LIBDSP_DEBUGASSERT)
2021-04-01 01:24:12 -05:00
raiden00pl
66972d947e
libdsp: add _f32_ suffix to all libdsp data structures tht use float as a numerical type.
...
This is an initial step to support fixed16 calculations for libdsp
2021-04-01 01:24:12 -05:00
Gregory Nutt
2ccc0da0c7
Move getopt() variables into TLS
...
getopt() in the FLAT build environment is not thread safe. This is because global variables that are process-specific in Unix are truly global in the FLAT build. Moving the getopt() variables into TLS resolves this issue.
No side-effects are expected other than to getopt()
Tested with sim:nsh
2021-03-31 21:13:01 -05:00
Xiang Xiao
bea6e0ddd7
sched/signal: Implement SA_NODEFER and SA_RESETHAND
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I9baa72b272c8877022cd94722824f393c7087721
2021-03-31 18:27:01 -03:00
Jiuzhu Dong
1c74d8042a
rtc/rpmsg: support server and client to set time each other
...
Change-Id: I5d13f424cb636a79a9fd98c275786771c213ddb8
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-30 22:41:12 -05:00
raiden00pl
e4c27dfdd6
drivers: add generic upper-half driver for Field Oriented Control (FOC)
2021-03-30 21:54:39 -03:00
Xiang Xiao
3a97f51a8d
serial: Don't comment out ws_[x|y]pixel field from winsize struct
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3d2435c3950e8f60b50d9af8a54c65bd0d16f2e0
2021-03-30 17:23:29 -03:00
Xiang Xiao
c82c7b6685
sys/stat.h: Add S_IREAD, S_IWRITE and S_IEXEC macro
...
to be more compatible with BSD libc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4067f8cac6c465a3f1b06906e2e274a660792d93
2021-03-29 21:40:24 -03:00
Jiuzhu Dong
0c068ed4e3
limits.h: modify _POSIX_OPEN_MAX to 16
...
fix ltp/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_open/speculative/26-1.c:46:8: error: size of array 'queue' is negative
mqd_t queue[_POSIX_OPEN_MAX + _POSIX_MQ_OPEN_MAX + 1];
Change-Id: I1185ea9f84752aaa0150689b5801d01c3f52c598
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-29 05:51:27 -07:00
Xiang Xiao
f67d1fdc87
netdb.h: Change all tab to space
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-26 18:04:59 +01:00
Cis van Mierlo
ab38af02e9
boardctl: added pm_checkstate() function to BOARDIOC_PM_CONTROL
2021-03-25 19:14:44 -03:00
Matias N
75b13c8353
documentation: improve boardctl() docs
2021-03-25 19:03:49 -03:00
Fotis Panagiotopoulos
f13adbe4bb
Added support for multiple syslog channels.
2021-03-23 21:35:22 -07:00
Cis van Mierlo
dc31b4f1c1
boardctl: added the option to change the pm state
2021-03-23 21:20:05 -07:00
chenwen
f54aef9977
xtensa/esp32: Support esp32 wireless ioctl cmd
2021-03-23 16:29:52 -03:00
chao.an
db8e498e4f
net/if: remove the macro expansion of the public structure
...
This is a compatibility issue if different structures included
in the usrsock server/client scene, usrsock client has no habit
of actively choosing of config CONFIG_NETDEV_IFINDEX at most of the time
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-23 00:29:20 -07:00
Alin Jerpelea
8dd660ecd4
nuttx: Author David S. Alessio: update licenses to Apache
...
David S. Alessio has submitted the ICL and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-22 19:28:38 -07:00
Xiang Xiao
e14c458747
mm/heap: Move semaphore related declaration to private header
...
since other subsystem doesn't need call these function anymore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idfb217c412db62d9f17f427310b75bb78785dc50
2021-03-22 15:35:32 +01:00
Abdelatif Guettouche
0f44e9539e
include/debug.h/syslog.h: Fix small typos and repeated words
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-22 06:06:44 -07:00
Alin Jerpelea
bdd2ce7ade
include: Author Sebastien Lorquet: update licenses to Apache
...
Sebastien Lorquet has submitted the ICL and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-20 19:22:58 -07:00
Jaroslav Beran
a0f5892be9
can: Add CAN FD flags to CAN message header
...
EDL, BRS and ESI bits added to struct can_hdr_s.
The `ch_unused' field is useless (adjacent fields in
packed structs are aligned to the next byte), but some
drivers explicitly set this field to zero, so it is kept there
for API backward compatibility.
Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-03-19 23:00:07 -07:00
mage1
635cfadc25
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-19 09:56:39 -07:00
Alan C. Assis
be572c11b6
lcd/hd4478ou: Fix MIxED case
2021-03-17 19:51:11 -07:00
Matheus Castello
85edf0f49d
tools/version.sh: Add the remaining cut to VERSION
...
The idea is to have something like EXTRAVERSION. This is useful for
getting RC tags, development tags and for customizing the version. For
example using the tag `nuttx-10.0.0-RC0` the VERSION will be
`10.0.0-RC0`
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2021-03-17 19:19:58 -03:00
Jiuzhu Dong
e96c8b9283
fs: allocate file/socket dynamically
...
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Byron Ellacott
c9db653c8d
symtabs: improve handling of symbol lookups
...
When CONFIG_SYMTAB_ORDEREDBYNAME is selected most code will use
the ordered search function. When it is not selected no code will
use the ordered search function. This change merges the two
functions and varies its behaviour based on the config setting,
such that all callers can simply call the one search function
and get the best behaviour.
An additional configuration option allows leading underscores to
be stripped from symbols being relocated in loaded objects. This
allows toolchains which prefix C symbol with underscores to make
loadable ELF objects.
2021-03-16 10:18:17 -07:00
buyuer
c0f9c7b48c
vfs: Fix epoll cannot work under 64-bit operating system
...
by switching to the real file handle
Signed-off-by: buyuer <dingddding@163.com>
2021-03-13 10:55:41 -08:00
David Sidrane
0c57351f78
mmcsd:Stuck in 1-bit mode, Removed CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
...
mmcsd:Remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
stm32h7:sdmmc remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
stm32f7:sdmmc remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
stm32f7:sdmmc WRITE COMPLETE prevent false triggers
stm32h7:sdmmc WRITE COMPLETE prevent false triggers
While testing PR #2989 on the H7 I noticed that the cards
were staying in 1-bit mode. The root cause was that the
scr read path was using DMA without an invlidate.
This was caused by CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT,
but the sdmmc driver, did not use the delayed invalidate
nor would it work on 8 bytes.
The driver fully supported dcache mgt on runt buffers, but
the #ifdef CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT blocked it.
Reviewing the PR that added CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
it may have been valid at the time. But after the dcache operations
we fixed. It is not necessary and offers no benefit.
2021-03-12 16:42:16 -03:00
Xiang Xiao
d2d7b6d24d
net: Add sendmsg and recvmsg to syscall list
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-11 03:17:35 -08:00
buyuer
097df2669c
drivers/sensor: fakesensor support batch.
...
Signed-off-by: buyuer <dingddding@163.com>
2021-03-10 14:16:38 +08:00
Gustavo Henrique Nihei
330eff36d7
sourcefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
ligd
70442d1f9d
net/socket_rpmsg: add net socket rpmsg support
...
Change-Id: Ie23ee4c0052cf2fc66972ea9bc5f11c070fbcf8a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-07 01:45:51 -08:00
Peter Bee
e223f60c09
net/socket: move si_send/recv into sendmsg/recvmsg
...
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-05 04:46:13 -08:00
Xiang Xiao
90be95bb89
sched: Remove all group id related stuff
...
it is wrong to define a new grpid_t, but not reuse pid_t,
because it make getpid(parent) == getppid(child) impossible.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-05 20:35:22 +08:00
ligd
1d66d5c297
debug tools: add heap & stack check in idle thread
...
N/A
Change-Id: Iba6f5cdffb1336697096c71fca86c9ece584225f
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-04 18:38:05 -08:00
Gustavo Henrique Nihei
49147fbe3c
include: Add iso646.h for alternative spellings
2021-03-04 18:32:12 -08:00
Xiang Xiao
d9cfeb0bc3
sched: Don't forward gettid to getpid directly
...
prepare to implement the right semantics:
getpid should return the main thread id
gettid should return the current thread id
2021-03-04 17:17:41 -06:00
ligd
48d49e5a7c
mqueue: add poll support
...
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-04 07:11:43 -08:00
Jiuzhu Dong
4d5a964f29
net: unify socket into file descriptor
...
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Xiang Xiao
c8d4a4c76a
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-03 13:47:59 -08:00
Michael Jung
cbe3fb5c60
libs/libc: License Clearance
...
Change the copyright header of assorted source files in libs/libc to the
ASF version. I was listed as the author in these files. I did also
check the heritage of those files and besides me they have only been
changed by the following people, all of whom did sign a CLA to the best
of my knowledge:
Alin Jerpelea
Haitao Liu
Gregory Nutt
Yamamoto Takashi
Xiang Xiao
Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-02 03:44:06 -08:00
Xiang Xiao
cf73496d9e
fs/fs.h: Reference the argumnet 'r' in _NX_SETERRNO
...
to avoid the unused variable warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Jiuzhu Dong
355956fb57
umm_heap/valloc: support valloc (LEGACY)
...
Reference:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/valloc.html
Change-Id: Ieb425a77b0a8d758956996d201223a0050ae4920
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-26 11:47:11 -08:00
Jiuzhu Dong
48050c9425
signal: set SIGRTMIN to SIGUSR1 because signo 0 don't catch.
...
Change-Id: I600fed48d25e19c229aac899508b86ddfebb24f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-25 22:27:24 -08:00
Gustavo Henrique Nihei
b9f231cdca
include: Fix typos reported by codespell
2021-02-25 11:30:38 -08:00
Byron Ellacott
3e3af5b73d
net: fix a few DP83848C and DP83825I constants
2021-02-24 19:04:05 -08:00
Jiuzhu Dong
936ce77d21
driver/sensor: gets the capacity of the hardware fifo
...
to hold the number of events
Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Jiuzhu Dong
54ea96da6b
driver/sensor: replace lower->buffer_size with lower->buffer_number
...
more efficient
Change-Id: I0823b10248caf75e4dd6a5086ad230ba4a7298f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Gustavo Henrique Nihei
07900cdce9
Fix typo in "repetitions" word
2021-02-23 07:18:33 -08:00
Xiang Xiao
e7c97ce7f0
fs: Merge fs_poll into poll_fdsetup
...
to avoid the user misuse the wrong funciton
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-23 08:39:48 -03:00
Xiang Xiao
35ec84ffca
Remove the duplicated _NX_ and _MQ_ macro
...
reuse the definition come from include/nuttx/fs/fs.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-21 12:33:02 +00:00
YAMAMOTO Takashi
33005897ba
netdb.h: Add NI_MAXHOST and NI_MAXSERV
...
* These are not parts of the standards as far as I know.
* These are provided by many platforms. (GLIBC, BSD, Windows, etc)
* These are convenient.
2021-02-19 09:34:09 -08:00
Xiang Xiao
a4c6b179bb
mqueue: Add _MQ_OPEN, _MQ_CLOSE and _MQ_UNLINK macro
...
and replace mq_open, mq_close and mq_unlink with these in libnx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-19 09:59:39 +00:00
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