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
Daniel P. Carvalho
a5d340a5df
Add injected channel support.
2020-11-06 18:31:32 -03:00
YAMAMOTO Takashi
4c33d608d2
include/inttypes.h: Appease nxstyle
2020-11-05 18:49:22 -08:00
YAMAMOTO Takashi
6e3551866c
include/inttypes.h: Provide PRI/SCN macros for least and fast types
...
* To be consistent with stdint.h
* To reduce arch-dependent code
2020-11-05 18:49:22 -08:00
dongjiuzhu
8562e17ef1
rc/dummy: add dummy driver to test driver skeleton
...
N/A
Change-Id: Iae3c22587f9939f6923b102bf4c51bb7f88a6429
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-05 11:38:28 -03:00
dongjiuzhu
2ed6e13241
driver/rc: support IR remote control
...
N/A
guide link: https://www.kernel.org/doc/html/v4.14/media/uapi/rc/lirc-dev.html
Change-Id: I84abfc12578d444d72c8c0df31d06d1a85ce0725
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-05 11:38:28 -03:00
ligd
2dfd7a4e8f
signal.h: fix compile failed when open TTY_SIGINT
...
In file included from string/lib_strsignal.c:40:0:
string/lib_strsignal.c: In function ‘strsignal’:
string/lib_strsignal.c:142:12: error: ‘CONFIG_SIG_STOP’ undeclared (first use in this function); did you mean ‘CONFIG_SIG_PIPE’?
case SIGSTOP:
^
string/lib_strsignal.c:142:12: note: each undeclared identifier is reported only once for each function it appears in
string/lib_strsignal.c:147:12: error: ‘CONFIG_SIG_STP’ undeclared (first use in this function); did you mean ‘CONFIG_SIG_STOP’?
case SIGSTP:
Esnure all standard signal number is always defined
Change-Id: I3abce86079ebeba7bab038d7c770efc90b9cffd7
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-11-05 08:28:53 +01:00
Matias N
9266c54bc2
lcd: add optional putarea()/getarea() operations
2020-11-04 04:00:22 -08:00
Nakamura, Yuuichi
7905ee17d4
Add task name recording for note RAM driver
2020-11-02 01:12:08 -08:00
YAMAMOTO Takashi
e99e185712
Don't typedef wchar_t for C++
...
wchar_t is a builtin type in C++.
clang complains like the following even with -fshort-wchar:
error: cannot combine with previous 'type-name' declaration specifier
my clang version if it matters:
spacetanuki% clang++ --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
spacetanuki% clang++ -dM -E - < /dev/null | grep WCHAR
#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __SIZEOF_WCHAR_T__ 4
#define __WCHAR_MAX__ 2147483647
#define __WCHAR_TYPE__ int
#define __WCHAR_WIDTH__ 32
spacetanuki% clang++ -fshort-wchar -dM -E - < /dev/null | grep WCHAR
#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __SIZEOF_WCHAR_T__ 2
#define __WCHAR_MAX__ 65535
#define __WCHAR_TYPE__ unsigned short
#define __WCHAR_UNSIGNED__ 1
#define __WCHAR_WIDTH__ 16
spacetanuki%
2020-11-01 18:19:13 -08:00
Matias N
f97f1bbd1a
lcd_dev: put header in correct location; fix missing const
2020-10-31 13:26:30 -07:00
Yoshinori Sugino
51af06243f
include/nuttx/serial/serial.h: Fix nxstyle errors
2020-10-29 01:12:43 -07:00
Yoshinori Sugino
c13f869432
Modify SIGSTP to SIGTSTP
...
Follow the POSIX description.
SIGTSTP should be sent when the Ctrl-Z characters is encountered, not SIGSTP.
Testing:
Built with hifive1-revb:nsh (CONFIG_SERIAL_TERMIOS=y, CONFIG_SIG_DEFAULT=y and CONFIG_TTY_SIGTSTP=y)
2020-10-29 01:12:43 -07:00