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
Matias N
9833256406
bt_hci: add various definitions, better expose some fields
2020-10-28 22:02:09 -07:00
Juha Niskanen
75c332e008
include/nuttx/lcd/ssd1306.h: cleanup for non-existent configs, nxstyle
...
Correct typo LCD_SSD1306_SPI to CONFIG_LCD_SSD1306_SPI, remove
references to non-existent config variable names in comments.
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 19:28:30 -07:00
Yoshinori Sugino
04c0055355
Fix typos
2020-10-28 19:15:04 -07:00
Juha Niskanen
1115452061
drivers/pipes: nx_pipe syscall takes three params, also use nx_close on error path
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 09:11:05 -07:00
GAEHWILER Reto
83745652c4
TCP-stack fix for stalled tcp sockets due to broken keepalive
...
Fixes an issue where tcp sockets with activated keepalives stalled and
were not properly closed. Poll would not indicate a POLLHUP and therefore
locks down the application.
* tcp_conn_s.tcp_conn_s & tcp_conn_s.keepintvl changed to uint32_t
According RFC1122 keepidle MUST have a default of 2 hours.
2020-10-27 11:21:56 -07:00
ligd
d0966b800f
usrsock.h: add reserved value to usrsock struct
...
N/A
access (struct usrsock_message_req_ack_s)->result can caused
unaligend-access, add reserved value to avoid this
Change-Id: I6c7d49c57bf898fbf8459b5db9a219122494e254
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-10-27 01:20:52 -07:00
ligd
b69c587dc9
stdio: remove depends on setbuf setvbuf
...
N/A
Cause the function realize will handle this
Change-Id: I154c21c7a40667afae423bb0ebb67de8f5fc42fd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-10-26 22:12:02 -07:00
Simon Piriou
b405722276
usbdev: add Android Debug Bridge driver
2020-10-26 08:28:48 -03:00
Masayuki Ishikawa
f12d49076c
drivers: wireless: Fix to handle address info in accept() in gs2200m.c
...
Summary:
- This commit fixes to handle address info in accept() in gs2200m.c
Impact:
- All use cases which use accept() with gs2200m
- Need to update apps/wireless/gs2200m as well
Testing:
- Tested with spresene:wifi
- Tested with telnet daemon
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>>
2020-10-26 10:53:34 +01:00
Masayuki Ishikawa
02b08590a1
drivers: wireless: Fix to handle UDP connect() with bind() in gs2200m.c
...
Summary:
- This commit fixes to handle UDP connect() with bind() to a local port.
Impact:
- All UDP cases which use connect() with gs2200m
- Need to update apps/wireless/gs2200m as well
Testing:
- Tested with spresense:wifi
- Create a UDP socket and bind() to a local port.
- Then connect() to remote address with port and send()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 10:53:34 +01:00
YAMAMOTO Takashi
6a2bd9a75b
Change the default value of SIGPIPE
...
To avoid the conflicting default with SIGQUIT.
2020-10-25 20:35:41 -07:00
YAMAMOTO Takashi
ad5c168b30
signalh.h: Use the right config for SIGPIPE
2020-10-25 20:35:41 -07:00
Matias N
5386f972fa
bluetooth: Add support for HCI RAW channel; make host layer optional
2020-10-25 17:04:25 -07:00
Brennan Ashton
1080d3f411
Bluetooth: Start implementing BTPROTO_HCI socket support
...
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-25 17:04:25 -07:00
YAMAMOTO Takashi
df812d09a2
math: Make this friendly with libcxx
...
- Turn some macros into functions
- Implement some type-agnostic functions.
(Just use __builtin_xxx)
- Add some missing function prototypes
(Just prototypes, not actually implemented in this commit)
2020-10-25 07:30:14 -07:00
Yoshinori Sugino
3ac90fca79
Remove tabs and spaces at the end of lines
2020-10-24 09:38:21 +01:00
dongjiuzhu
a3f978da02
sensor/driver: wtgahrs2 by serial interface follow sensor.c/sensor.h
...
Wtgahrs2 integrates multiple sensor: accel, gyro, mag, baro and gps.
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-22 10:17:36 -03:00
dongjiuzhu
fa09c6a8bc
driver/sensor: add unified management for sensor
...
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-22 10:17:36 -03:00
dongjiuzhu
2b5be56bd0
serial/termios: support custom baud rate setting
...
N/A
Change-Id: I0cc00f6d0fda852533bd4a38ea6fc39e0d0059da
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-21 10:11:21 -07:00
Nakamura, Yuuichi
d8d19911ef
Add SCHED_INSTRUMENTATION_HIRES support
2020-10-21 00:33:10 +08:00
Nakamura, Yuuichi
87a7c0317e
Add note_syscall args support
2020-10-21 00:31:51 +08:00
Xiang Xiao
2956b8516b
Fix nxstyle warning
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Xiang Xiao
eb4121ce38
Change all 'Nuttx' to 'NuttX'
...
Unify the naming convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-20 01:45:06 -07:00
Nakamura, Yuuichi
9e470ad73e
Fix note_syscall_leave_s to avoid unaligned access
2020-10-17 23:48:43 +08:00
Yoshinori Sugino
296eff3d40
Fix typos
2020-10-17 09:04:37 +01:00
Philippe Coval
cafe24528c
sensors: Support fxos8700cq motion I2C sensor
...
Device is composed of
3-axis, linear accelerometer and 3-axis, magnetometer
It is onboarded in NXP FRDM-K64F SBC.
Change-Id: I405a12cbf2c9994f3bd66e108d2eb8faeee00e18
Bug: https://github.com/apache/incubator-nuttx/issues/1988
Relate-to: https://www.nxp.com/docs/en/data-sheet/FXOS8700CQ.pdf
Forwarded: https://github.com/apache/incubator-nuttx/pull/1989
Signed-off-by: Philippe Coval <rzr@users.sf.net>
2020-10-16 10:10:35 +08:00
YAMAMOTO Takashi
f9475df13d
include/nuttx/lib/math.h: Add signbit
2020-10-13 08:09:30 +02:00
raiden00pl
33901969fe
Fix nxstyle warnings
2020-10-10 12:24:28 -06:00
raiden00pl
24e17910b2
libdsp: Changed headers for apache 2.0 license
2020-10-10 12:24:28 -06:00
raiden00pl
1621305e79
drivers: Changed headers for apache 2.0 license
2020-10-10 12:24:28 -06:00
Sara Souza
0faf861256
xtensa/esp32: Added Timer Support
2020-10-07 14:12:22 -03:00
Nakamura, Yuuichi
a373079a94
Fix /dev/note driver for task trace support
2020-10-06 03:26:46 +08:00
Nakamura, Yuuichi
6efecd2105
Add notectl driver
2020-10-06 03:26:46 +08:00
Nakamura, Yuuichi
6b54377476
Add note filter functions
2020-10-06 03:26:46 +08:00
Nathan Hartman
80ce7800a9
Sources and Docs: Fix typos and nxstyle issues
...
Documentation/contributing/coding_style.rst:
* Fix repeated words: ("this this").
* Remove trailing spaces.
boards/z80/z80/z80sim/README.txt:
* Fix repeated words: ("this this") and rewrap lines.
graphics/Kconfig,
libs/libc/math/Kconfig:
* Fix repeated words: ("this this").
arch/arm/src/armv7-a/arm_assert.c,
arch/arm/src/armv7-r/arm_assert.c,
arch/arm/src/imxrt/imxrt_enet.c,
arch/arm/src/kinetis/kinetis_enet.c,
arch/arm/src/kinetis/kinetis_flexcan.c,
arch/arm/src/s32k1xx/s32k1xx_enet.c,
arch/arm/src/s32k1xx/s32k1xx_flexcan.c,
arch/arm/src/stm32/stm32_pwm.c,
arch/arm/src/stm32h7/stm32_pwm.c,
arch/arm/src/stm32l4/stm32l4_pwm.c,
arch/renesas/src/rx65n/rx65n_usbdev.c,
binfmt/libnxflat/libnxflat_bind.c,
drivers/pipes/pipe_common.c,
net/igmp/igmp_input.c,
net/tcp/tcp_conn.c,
sched/sched/sched_roundrobin.c:
* Fix typo in comment ("this this").
arch/arm/src/cxd56xx/cxd56_usbdev.c,
arch/arm/src/lc823450/lc823450_usbdev.c:
* Fix typo in comment and rewrap lines.
arch/arm/src/imxrt/imxrt_usbdev.c,
arch/arm/src/stm32/stm32_dac.c,
arch/arm/src/stm32f0l0g0/stm32_pwm.c,
arch/arm/src/stm32f7/stm32_pwm.c,
arch/arm/src/tiva/lm/lm4f_gpio.h,
fs/nxffs/nxffs_write.c,
include/nuttx/analog/pga11x.h,
include/nuttx/usb/usbdev.h,
net/mld/mld_join.c:
* Fix typo in comment ("this this").
* Fix nxstyle issues.
2020-10-02 04:54:52 +02:00
Yoshinori Sugino
698008d1e5
Fix typos
2020-09-28 13:54:43 +08:00
ligd
b54e9ffccc
nuttx/audio/audio.h: add ac_chmap support for both input & output
...
Change-Id: Ic582868fa3099943c4c28ccca7e33f7b3a2afbf7
2020-09-25 00:54:26 -07:00
David Sidrane
4665a3d648
cstdio:Fixed compile error with CONFIG_STDIO_DISABLE_BUFFERING lit.
...
Resolves compiler error introduced by 57dfb9 when
using cpp with CONFIG_STDIO_DISABLE_BUFFERING lit.
NuttX/nuttx/include/cxx/cstdio:79:11: error: '::setbuf' has not been declared
using ::setbuf;
2020-09-24 13:56:10 +02:00
Gregory Nutt
ebdfd16f0f
Move gettid() implementation to /libs/libc/unistd
...
Move sched/task/task/task_gettid.c to libs/libc/unistd/lib_gettid.c. gettid() is a dumb wrapper around getpid(). It is wasteful of resources to support TWO systme calls, one for getpid() and one for gettid(). Instead, move gettid() in the C library where it calls the single sysgtem call, getpid(). Much cleaner.
2020-09-22 19:40:56 -07:00
Xiang Xiao
411f5d591a
sched: Fix undefined reference to 'sched_cpu_count'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-21 07:37:04 -07:00
Xiang Xiao
ba3f12c93f
libc: Implement popcount/popcountl/popcountll
...
specified here:
https://www.unix.com/man-page/netbsd/3/popcountll/
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-21 07:37:04 -07:00
Brennan Ashton
5498f72fa5
input: Q10 BlackBerry Keyboard from Solder Party
...
This adds support for the Q10 BlackBerry based keyboard
from Solder Party. https://www.solder.party/docs/keyboard-pmod/
They keyboard device registered at /dev/kbdN is fully compatible
with hidkbd and has been testing with the Keyboard FeatherWing
on the nRF52 platform.
The buttons are added as a standard discrete joystick if
optionally enabled. The PMOD variant of this does not
include these buttons, but the Keyboard FeatherWing does.
This joystick is usually defined at /dev/djoyN and
can be used with the djoy example application.
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-21 07:40:42 -06:00
licheng
29030557ff
sched: Fix nuttx typo
2020-09-20 02:32:25 -07:00
chao.an
b2b7541d59
nuttx/wireless: fix nxstyle warning
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 11:39:13 -07:00
chao.an
9e45d6e88e
nuttx/wireless: add wireless event member length helper
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 11:39:13 -07:00
chao.an
216c33a5c7
libs/libc/stdlib: Implement mkdtemp(3) syscall
...
See the reference here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdtemp.html
Change-Id: I49081ecafc011a843e6067b1118b53bf65d4418b
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 04:16:14 -07:00
chao.an
4067a9f057
libs/libc/stdio: correct the prototype of mktemp(3)
...
From: int mktemp(FAR char *path_template);
To: FAR char *mktemp(FAR char *path_template);
See the reference here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/mktemp.html
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 04:16:14 -07:00
chao.an
7816b5ec8c
include/stdlib: alignment function definitions
...
Change-Id: Id12ed4241698c8d4426907ca72eef334894ee1f3
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 04:16:14 -07:00
chao.an
0826b827ee
libs/libc/time: add stub for futimes/ns(2)
...
Change-Id: I231817d10b9e2071b1f642e8694839b2a64b1c4c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 03:20:09 -07:00
chao.an
9db2e9e393
libs/unistd: add system variables of physical pages
...
Change-Id: If739b25d358c35de90115ae51e0c1bfbe7bd7a88
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:08:39 -07:00
chao.an
06e78dc883
libc/time: redirect timegm(3) to mktime(3)
...
See the reference here:
https://man7.org/linux/man-pages/man3/timegm.3.html
Change-Id: Ic583b1bd5c7da02086aef7ff043003e402faa4d4
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:04:17 -07:00
liuhaitao
e0aa7c6d81
syscall: update syscall_lookup.h with gettid to fix build break
...
proxies/PROXY_gettid.c: In function 'gettid':
proxies/PROXY_gettid.c:12:41: error: 'SYS_gettid' undeclared (first use in this function); did you mean 'SYS_getpid'?
12 | return (pid_t)sys_call0((unsigned int)SYS_gettid);
| ^~~~~~~~~~
| SYS_getpid
proxies/PROXY_gettid.c:12:41: note: each undeclared identifier is reported only once for each function it appears in
proxies/PROXY_gettid.c:13:1: warning: control reaches end of non-void function [-Wreturn-type]
13 | }
| ^
CC: proxies/PROXY_mmap.c
Makefile:83: recipe for target 'PROXY_gettid.o' failed
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: Ib4d6e315aa7f17235292dd2d6550458a53bc1596
2020-09-18 20:07:00 -07:00
chao.an
bf8446e235
sched/task: Implement gettid(2) syscall
...
See the reference here:
https://man7.org/linux/man-pages/man2/gettid.2.html
Change-Id: Ia814d0ccc3b20d8dfc36c809682ddf6e21811d20
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-18 20:07:00 -07:00
chao.an
9241725312
fs/munmap: export the symbols to avoid build break on C++ syntax
...
base/metrics/persistent_memory_allocator.cc:1009:18: error: expected id-expression before ‘-’ token
1009 | int result = ::munmap(memory, size);
| ^~~~~~
Change-Id: I24e55c18d09553d3acc341a27063d01489d905ec
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-18 20:05:10 -07:00
chao.an
b8fa1e51d8
time/tm: add "tm_zone" member into tm
...
base/time/time_exploded_posix.cc:190:14: error: ‘struct tm’ has no member named ‘tm_zone’; did you mean ‘tm_mon’?
190 | timestruct.tm_zone = nullptr; // not a POSIX field, so mktime/timegm ignore
| ^~~~~~~
| tm_mon
Change-Id: I9f93e63b50c0692a7a2bfc47abd9d07aa2c8e8db
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-18 20:03:05 -07:00
chao.an
614ac5b0f2
libs/libc/unistd: Implement pipe2(2) syscall
...
See the reference here:
https://www.man7.org/linux/man-pages/man2/pipe2.2.html
Change-Id: Ife19b9bdbde73c7421be381a094da67017819e63
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-18 20:01:26 -07:00
chao.an
78005a4ba0
sys/epoll: include-able from C++ files
...
Change-Id: Icc73be9de7a9217e33903243b0ecf1a9a596b381
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-18 19:51:55 -07:00
dongjiuzhu
45a8de8fa0
include/poll: add POLLPRI for exceptional event
...
Change-Id: I40d566e2c6f0d1fd7232148918635fa8d336ce28
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-09-18 19:49:51 -07:00
Gregory Nutt
415d83cf19
STMPE811: Fix name collision in include/nuttx/input/stmpe811.h
...
The macro name GPIO_PIN collides with naming used by many architectures:
$ find . -name "*.h" | xargs grep "define GPIO_PIN[(]"
./arch/arm/src/am335x/hardware/am335x_gpio.h:#define GPIO_PIN(n) (1 << ((n) & 0x1f)) /* Bit n: Pin n, n=0-31 */
./arch/arm/src/imx6/hardware/imx_gpio.h:#define GPIO_PIN(n) (1 << (n)) /* Bit n: Pin n, n=0-31 */
./arch/arm/src/imxrt/hardware/imxrt_gpio.h:#define GPIO_PIN(n) (1 << (n)) /* Bit n: Pin n, n=0-31 */
./arch/arm/src/lpc43xx/hardware/lpc43_gpio.h:#define GPIO_PIN(p) (1 << (p)) /* Bits 0-31: Read/write pin state */
./arch/arm/src/nrf52/nrf52_gpio.h:# define GPIO_PIN(n) ((n) << GPIO_PIN_SHIFT)
./arch/arm/src/nuc1xx/hardware/nuc_gpio.h:#define GPIO_PIN(n) (1 << (n)) /* Bit n: GPIOx Pin[n] pin value */
./arch/avr/src/at32uc3/at32uc3_gpio.h:#define GPIO_PIN(n) (1 << (n))
./include/nuttx/input/stmpe811.h:#define GPIO_PIN(n) (1 << (n))
This commit changes the name used by the STMPE811 driver to STMPE11_GPIO_PIN
2020-09-17 12:10:29 -07:00
Brennan Ashton
e2fd1fdd84
LED: Support for WS2812 led controller (aka Adafruit NeoPixel)
...
The WS2812 is very common in LED strips as it is an integrated
controller and LED. It is driven by a single data line, but
the timing requirements can be met by using most SPI controllers
and the use of DMA.
This driver has been validated on the nRF52 arch both with a
single LED and a strip of 144.
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-16 10:35:56 -07:00
Yoshinori Sugino
d4ec1ababd
fs/vfs/fs_ioctl.c: Add FIOCLEX/FIONCLEX support
2020-09-16 02:31:33 -07:00
ligd
57dfb98713
include: add dependence to setvbuf & isatty, undefine symbols when !CONFIG_SERIAL_TERMIOS
...
Change-Id: I053504fcfc90d926e6f529bfd7badedc71596313
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-15 10:28:21 -03:00
ligd
c38c821fc2
libs/libc/time: add gethrtime() support
...
Change-Id: I8882207d3a7e5062f70c7b4b95205361c71f8744
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-15 10:28:21 -03:00
Xiang Xiao
77ae03788a
note: Rename note driver to noteram driver
...
to reflect this is just a normal note driver with ram buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-15 14:55:22 +08:00
Xiang Xiao
027e2eed28
libc: Implement umask function
...
Here is the spec:
https://pubs.opengroup.org/onlinepubs/009695399/functions/umask.html
Note: The simple implementaton is enough since
NuttX doesn't really support the permission
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-14 12:16:58 -03:00