Commit Graph

38307 Commits

Author SHA1 Message Date
Xiang Xiao
f4794f0b48 libc: Implement access function correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6ae3abf79bd9aa8cfb54b8bbe302d69c4d9cb8ff
2020-09-22 10:30:36 +02:00
spiriou
a1c047fe53 libc/uio: enable writev() for sockets 2020-09-21 19:31:06 -07:00
spiriou
65bb956e5e pipe: check for writers first in case of pipe empty 2020-09-21 19:30:21 -07:00
Abdelatif Guettouche
a128995eab arch/xtensa: Few typos and style fixes.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-21 19:14:19 -04:00
Nathan Hartman
bc9d3cdd14 tiva: tiva_flash.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_flash.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-21 22:04:45 +01:00
Bhindhiya
b8b4055cb1 RX65N Pre-check Warning Resolved 2020-09-21 19:59:34 +01:00
Xiang Xiao
68a2727c12 arch/sim: Extend the heap size to 64MB
to support the more complex application and
remove the special definition for CONFIG_MM_SMALL

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-21 07:40:17 -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
zhongan
657d1c9fdc Add and fix CSR macros listed in RISC-V spec V1.10.
Add csr operatiing macros.

Change-Id: Ia5c148d10709c21424c5ecaaca01b7d200fb8e01
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-09-21 07:35:56 -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
Juha Niskanen
366e8afdb1 net/usrsock: fix outputted function name in debug prints
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-09-21 10:36:31 -03:00
chenwen
64e2f102ac xtensa/esp32: Add power management of force-sleep 2020-09-20 17:23:07 +01: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
0f06c35640 unistd/priority: Implement [s/g]etpriority(2) syscall
See the reference here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/getpriority.html

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:06:51 -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
8f52d4536c timers/watchdog: configable keep alive interval
Change-Id: I519f5f9e0a8ab7ca298f834af20f7ad437ef92a4
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-18 19:58:29 -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
Bhindhiya
7910b58415 RX65N Defconfig Modification 2020-09-18 23:58:37 +01:00
Nathan Hartman
4ceb8ef4e1 tiva: tiva_sysctrl.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_sysctrl.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-18 23:50:59 +01:00
Nathan Hartman
bcb6c30dc7 CONTRIBUTING.md: Minor grammar fixes.
CONTRIBUTING.md:

    * Replace "you" with "your"
    * Replace "this" with "these"
    * Add one period
2020-09-18 16:43:48 -03:00
Augusto Fraga Giachero
f92e9641cd Fix coding style issues
Fix long lines pointed by nxstyle.
2020-09-18 07:03:09 -07:00
Augusto Fraga Giachero
1efbb4c114 Fix build errors when using DEBUGASSERT
I never tested these drivers with debug assertions enabled as I should
have. This commit fixes build errors due to wrong variable names used.
2020-09-18 07:03:09 -07:00
Brennan Ashton
1473c6848f nRF52: Add hooks for missing SPI register callbacks
This implements the missing callback hooks nrf52_spi0/1/2/3register
that are usually used with mmcsd for card detection.

This also stubs out the missing spi trigger function which is not
used on this platform.

The card detect was tested with the nRF52-feather board and a
modified KeyBoard FeatherWing.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-18 04:31:47 -07:00
ligd
a9830254cf SIM in MacOS: make MacOS link process same with Linux
1. There is difference about symbol replace on nuttx-names.in
   between MacOS & Linux
2. For MacOS, if open '-fvisibility=hidden' and adjust nuttx-names.in,
   it will meet symbol link-back-to-nuttx error.
3. Make the MacOS replace behaviour, same with Linux

Note:
MacOS should install objcopy with command:
$ brew install binutils
$ export PATH=$PATH:/usr/local/opt/binutils/bin

already check in to cibuild.sh

Change-Id: If78b784cc0ecb98cdbf7091de38acef00a8a02f3
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-18 18:58:32 +09:00
Fotis Panagiotopoulos
b0b5f87699 Removed broken overdrive function in STM32. 2020-09-18 02:53:40 -07:00
Brennan Ashton
7554eedf9a input: STMPE811 GPIO interrupt bug fixes
This patch resolves to bugs in the GPIO interrupt logic:

1. Any pins did not have STMPE811_GPIO_RISING in their pincfg
   would clear the rising edge interrupt enable flag for all
   pins due to a masking bug.

2. Pins would never trigger a second interrupt.  There is an
   undocumented requirement that you have to clear both the
   GPIO interrupt status register __and__ also the edge
   detection status register.  Failure to clear either of
   these will result in no further interrupts being triggered.
   This requirement exists both for edge and level modes of
   operation.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-17 21:32:05 -07:00
Matias N
2731ab5c19 Add CONTRIBUTING.md 2020-09-17 21:30:47 -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
Nathan Hartman
a4d1a20b93 tiva: tiva_lowputc.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_lowputc.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-17 11:07:35 -07:00
Brennan Ashton
204e84f1ad input: Add SPI mode for STMPE811 touch screen controller
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-17 08:34:41 -06:00
Masayuki Ishikawa
3941e47259 boards: spresense: Update README.txt regarding gs2200m
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-17 09:24:39 +02:00
Masayuki Ishikawa
e53970583e drivers: wireless: Apply NET_LL_IEEE80211 to gs2200m.c
Summary:
- This commit applies NET_LL_IEEE80211 to gs2200m.c
- Also selects DRIVERS_IEEE80211 in Kconfig

Impact:
- Affects use cases with gs2200m driver

Testing:
- Tested with spresense:wifi and spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-17 09:24:39 +02:00
Xiang Xiao
18c19c1198 init: Move file system initialization before clock/irq
since these subsystem may register the driver under /dev

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-17 15:51:03 +09:00
Matias N
c695a5924f configure.sh/sethost.sh: add set -e so that the script aborts on any error 2020-09-16 20:09:44 -07:00
Nathan Hartman
e916896aa9 tiva: tiva_eeprom.h: Fix nxstyle warnings
arch/arm/src/tiva/tiva_eeprom.h:

    * Fix nxstyle warnings. No functional changes.
2020-09-16 22:15:34 -03:00
Adam Feuer
d4f3a7a9ad link giant-board into board tree 2020-09-16 18:48:41 -06:00