Commit Graph

4809 Commits

Author SHA1 Message Date
Xiang Xiao
bb8c4485a2 libc: Change OK/ERROR macro to enum
to avoid the conflict with 3rd party c++ library(e.g. protobuf):
fdc35840b9/src/google/protobuf/stubs/status.h (L47)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie8bb9008a8375c729f8b947c9f10baa80104d157
2020-11-30 09:43:18 +01:00
Xiang Xiao
87dff7c69a Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-29 18:40:40 +09:00
Bernd Walter
68ff96c242 fix comment to match with #define 2020-11-28 23:50:50 -06:00
Chaochao Cui
fbb3cd660b add simple wm8994 codec driver 2020-11-28 10:23:40 -03:00
chao.an
946f99791b net/wireless: add country code control support
Change-Id: Ie3917815e9004bae9c1116916bc4eadb752f6e44
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-27 20:37:44 -03:00
Augusto Fraga Giachero
ffcedfd971 Remove copyright from headers 2020-11-25 05:13:46 -08:00
Augusto Fraga Giachero
558dfa28fb nxstyle fix 2020-11-25 05:13:46 -08:00
Augusto Fraga Giachero
6a43daa67e Update licenses to Apache 2.0 2020-11-25 05:13:46 -08:00
dongjiuzhu
148afd9548 driver/sensors: support custom type of sensor.
For examples, the custom sensor could define:
struct custem_event_s
{
  uint64_t timestamp;
  int16_t adc[8];
};
struct sensor_lowerhalf_s g_lower =
{
 .buffer_size = 1024,
};
sensor_custom_register(lower, "/dev/sensor/custom0", sizeof(struct custem_event_s));

Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-24 13:23:15 -03:00
Huang Qi
0a2873a37f spi/qspi.h: Fix data type of buflen
Summary:
- This patch change the data type of buflen in qspi_meminfo_s
- from uint16_t to uint32_t to allow data size greater than 64KB.

Impact:
- QSPI & some flash like s25fl1 etc

Testing:
- Tested with rm69330 oled controller on custom board

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-11-22 19:02:11 -08:00
Nathan Hartman
f13ee2848d include/nuttx/clock.h: Fix wrong comment
include/nuttx/clock.h:

    * USEC_PER_TICK: The docstring for this define mistakenly said
      that the default value of USEC_PER_TICK, 10000, corresponded
      to 100 KHz. However, it is actually 100 Hz. Corrected the
      comment. No functional changes.
2020-11-22 18:33:50 -08:00
Nathan Hartman
8e8ead3224 sched/signal/sig_timedwait.c: Fix typo in comment
sched/signal/sig_timedwait.c:

    * nxsig_timedwait(): Fix typo in comment:
      "is store din" -> "is stored in"

include/nuttx/signal.h:

    * Fix same typo in extern declaration of nxsig_timedwait().
2020-11-22 18:31:49 -08:00
Xiang Xiao
759b63d4be libc: implement getopt_long partially
only the short option is supported now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-21 07:01:08 -06:00
Xiang Xiao
af53bdb048 libc: Add opterr global variable
defined here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-21 07:01:08 -06:00
Michal Lenc
8cf6cfda1a imxrt: Added support for DP83825I PHY
Signed-off-by: Michal Lenc <lencmich@fel.cvut.cz>
2020-11-20 20:34:57 -03:00
dongjiuzhu
23ddeaf3be mm/circbuf: support circular buffer managerment
N/A

Change-Id: Ib1fc009b9ce3af5815920f22221fe8a7262299ef
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-20 05:33:03 -08:00
dongjiuzhu
60d1755e04 drivers: l3gd20 supports the sensor driver model
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-19 18:13:17 -08:00
YAMAMOTO Takashi
f1aab27c92 include/nuttx/streams.h: Sprinkle scanflike 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
b90809d5f0 stdio.h: Sprinkle scanflike 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
d167ec6038 compiler.h: Add scanflike macro 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
1f6d54fde4 include/nuttx/streams.h: Add printflike 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
7e702817c1 stdio.h: Sprinkle printflike attribute 2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
eb406a8394 compiler.h: Add printflike macro
The name was inspired from NetBSD's __printflike.

We can add similar macros for __syslog__, __scanf__, __format_arg__
later.
2020-11-19 18:03:04 -08:00
YAMAMOTO Takashi
6ee7fdf874 include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier
Replace definitions in other places.
2020-11-19 00:49:56 -08:00
YAMAMOTO Takashi
c10a8dc73b include/stdint.h: Use _uintmax_t and _intmax_t from arch types.h
As we do for other intXX_t types.
2020-11-19 00:49:56 -08:00
Alan C. Assis
e7c99480ea Fix nxstyle issue existing on fs/ioctl.h 2020-11-18 22:21:53 +01:00
Alan C. Assis
f09d103528 xtensa/esp32: Add high memory support to work with PSRAM 2020-11-18 22:21:53 +01:00
liuhaitao
55deefdb30 Add debug.h selection choice to support include chip debug.h
Select debug.h which may be under include/arch or include/arch/chip.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I5f465c41ba27d040e5e24b2eef2918cfbc18a0bd
2020-11-18 05:22:13 -08:00
liuhaitao
fd94a32468 sysconf: add _SC_PAGESIZE sysconf support
Also implement getpagesize() based on sysconf(_SC_PAGESIZE).

Change-Id: I812eb8f34ed602f7bc12c4cafafcebc0d98fd136
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-11-17 02:03:23 -08:00
YAMAMOTO Takashi
18b3b3f5c1 include/nuttx/streams.h: Appease nxstyle 2020-11-16 05:46:53 -08:00
Frank-Christian Kruegel
bf5fa5557d Support for MAX1161X family of I2C 12 bit ADC chips:
MAX11612:  4 channels VCC=5V0 Int VRef=4.096V
MAX11613:  4 channels VCC=3V3 Int VRef=2.048V
MAX11614:  8 channels VCC=5V0 Int VRef=4.096V
MAX11615:  8 channels VCC=3V3 Int VRef=2.048V
MAX11616: 12 channels VCC=5V0 Int VRef=4.096V
MAX11617: 12 channels VCC=3V3 Int VRef=2.048V
Note: The chips' auto-scanning feature is not supported in this revision.
2020-11-15 05:59:01 -08:00
Matias N
14d14bce05 pm.h: nxstyle fixes; change License to Apache (Greg and myself authors) 2020-11-12 08:01:25 +01:00
Matias N
13619ea0df nrf52: add SPI PM support (disable/enable SPI peripheral on sleep) 2020-11-12 08:01:25 +01:00
dongjiuzhu
089b1c17f6 driver/sensor: add fetch api to read sensor data directly
1.use userspace buffer rather than intermediate buffer of upperhalf driver
2.support block and non-block ways.

Change-Id: I1d0cecfaa20ce54961c58713d8f2f8857e349791
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
2cda16b606 driver/sensor: add new feature about sensor driver
1.support for multi-user access
2.support special cmd to control sensor
3.support userspace to set size of intermediate buffer
  by ioctl: SNOIC_SET_BUFFER_SIZE

Change-Id: I9ce3a65b88b12c28388ec397431f1a277b120c2a
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
2482052228 driver/sensor: user specifies device register number
N/A

Change-Id: Idd11461f933dd21b7271cd3ca87a2e33127a9d34
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
Xiang Xiao
84b90e00f0 libc/stdio: Preallocate the stdin, stdout and stderr
to handle the uninitialized stdin/stdout/stderr gracefully
report here:
https://github.com/apache/incubator-nuttx/issues/2203

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-11 09:56:10 -08:00
chao.an
27932faf1a sys/epoll: sync the epoll define with linux
Change-Id: If876e0c0b44de73cf2847a9d3c21ac138dd4f879
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 18:53:48 -08:00
chao.an
8b42e6abd2 pthread/spinlock: move the structure prototype out of the definition
pthread/pthread_spinlock.c: In function ‘pthread_spin_init’:
pthread/pthread_spinlock.c:114:11: error: dereferencing pointer to incomplete type ‘pthread_spinlock_t’ {aka ‘struct pthread_spinlock_s’}
  114 |       lock->sp_lock   = SP_UNLOCKED;
      |           ^~

Change-Id: I49dbb2682e36a17bb25a647c6468b7fb511e4a76
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 18:45:48 -08:00
Nathan Hartman
616b3e7436 include/nuttx/spi/spi.h: Fix typos in comments 2020-11-09 18:20:15 -08:00
chao.an
8604e98196 unistd/sched_sporadic: correct the disable value
Reference here:
https://github.com/openbsd/src/blob/master/include/unistd.h

Change-Id: Ifb08a69c9a2a2b68179bcfd716fb180ec3577e54
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 09:11:51 -03:00
chao.an
54d0c1c296 sys/uio: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:33:52 -08:00
chao.an
176d850445 sys/uio: include-able from C++ files
Change-Id: I4b512851fa96e1d696dbc886b25af4ab043da8dd
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:33:52 -08:00
chao.an
06d93828af sys/resource: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:22:34 -08:00
chao.an
82f1263db9 sys/resource: include-able from C++ files
Change-Id: I914ab40495a25da184d0b7f8f8b1fa0d376c66a4
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-09 02:22:34 -08:00
Juha Niskanen
70cbb7e537 include/nuttx/net/netconfig.h: fix typos and nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Juha Niskanen
62d38c32e8 drivers/lcd/memlcd.c: fix typos and nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-08 18:58:20 +01:00
Subhra Sankha Sarkar
6d32ad04dd Minor fixes & NuttX coding standards compliance 2020-11-07 06:41:40 -03:00
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