Commit Graph

3687 Commits

Author SHA1 Message Date
Tobias Johansson
2cce572162 drivers: audio: cxd56: rename queue status
This commit improves the readability for each state

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-11-06 11:11:27 +09:00
Tobias Johansson
43b21a4693 drivers: audio: cxd56: add I2S debugging
When audio fails it is usefull to have I2S transfer errors in place
to be able to track the issue

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-11-06 11:11:27 +09:00
Tobias Johansson
d572b06a6c drivers:audio: cxd56: move helpers to the header file
The Queue helpers should be moved to the header file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-11-06 11:11:27 +09: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
Brennan Ashton
54832f37f2 sim: Initial Linux i2c bus support
This adds the inital wiring for i2c bus support in the sim target
and for Linux host adds the lower half that uses the i2c chardev.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-04 23:51:09 -08:00
Matias N
9266c54bc2 lcd: add optional putarea()/getarea() operations 2020-11-04 04:00:22 -08:00
Masatoshi Ueno
04ec9cf989 gs2200m: Add function to get IWNWID / IWFREQ / IWSENS information
Summary:
- This commit enables gs2200m driver to get IWNWID/IWFREQ/IWSENS information

Impact:
- Affects gs2200m only

Testing:
- Tested with spresense:wifi
2020-11-02 19:58:58 +09:00
Nakamura, Yuuichi
7905ee17d4 Add task name recording for note RAM driver 2020-11-02 01:12:08 -08:00
Brennan Ashton
21f9093966 nxstyle fixes
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-02 00:04:08 -08:00
Brennan Ashton
b459645105 lcd: Minor fixes to ssd1306 i2c driver
The sendblk function was missing NOSTOP on the first msg of the
i2c transaction. This could cause an extra STOP to be inserted
in the transaction.

The driver uses up_mdelay for some timing where it should be
using a sleep.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-02 00:04:08 -08:00
Masatoshi Ueno
c0b4bd2f85 gs2200m: Check disassociation from AP and enable rejoin
Summary:
- This commit enables gs2200m driver re-associate to the access point when disassociated

Impact:
- Affects gs2200m only

Testing:
- Tested with spresense:wifi
2020-11-02 16:11:13 +09:00
Matias N
f97f1bbd1a lcd_dev: put header in correct location; fix missing const 2020-10-31 13:26:30 -07:00
Matias N
278e7af5e5 Add LCD character driver: allows interacting with LCD directly from userspace 2020-10-30 19:55:10 -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
Yoshinori Sugino
13c0debec7 drivers/serial/Kconfig: Fix typos 2020-10-28 23:47:39 -07:00
Juha Niskanen
d53abbc4ac drivers/lcd: ssd1306: cleanup to comments, README, nxstyle issues
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 19:28:30 -07:00
Juha Niskanen
bdb398fa8c drivers/lcd: ssd1306: fix one bad debug assert
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 19:28:30 -07:00
Masayuki Ishikawa
1e321ca032 drivers: wireless: Fix tcp/udp connect with heavy bulk data traffic in gs2200m.c
Summary:
- During network stress testing, ASSERT happened in gs2200m_ioctl_connect()
- The test was nxplayer (http audio streaming) and repeating wget every 0.5sec
- gs2200m_ioctl_connect() calls gs2200m_send_cmd() to send an AT command
- Then it waits for a synchronous command response.
- However, if heavy tcp traffic happens on another socket, it can receive a bulk packet
- With this commit, if it receives such a packet then the packet is duplicated.
- After that, the duplicated packet is added to the packet queue and notify the userland.

Impact:
- Affect almost all use cases with gs2200m

Testing:
- Tested with both spresense:wifi and spresense:wifi_smp
- Tested with nxplayer (http audio streaming) and repeat wget

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-28 11:36:17 -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
Simon Piriou
b405722276 usbdev: add Android Debug Bridge driver 2020-10-26 08:28:48 -03:00
dongjiuzhu
d452a05910 pollnotify: we should send poll events before semaphore incrementes.
There is a good case on sim platform:
When we input some cmd and click enter key to start application in terminal,
this context will change to application from IDLE loop. Althrough entey key '\r'
has been received to recv buffer and complete post semaphore of reader, but
pollnotify may not be called because context change. So when application run
poll function, because no events happend and poll enter wait, context will
again change to IDLE loop, this pollnotify of IDLE loop will run to send poll
events, poll function of applicaton will wake up. It's wrong!

Change-Id: I812a889f2e90781a9c3cb4b0251cccc4d32bebd1
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-26 08:27:09 -03:00
Masayuki Ishikawa
df952074eb drivers: wireless: Add support for ioctl(fd, SIOCGIFADDR, ...) to gs2200m.c
Summary:
- This commit adds support for ioctl(fd, SIOCGIFADDR, ...) to gs2200m.c

Impact:
- Only affects ioctl(fd, SIOCGIFADDR, ...) with gs2200m
- Need to update apps/wireless/gs2200m as well

Testing:
- Tested with spresense:wifi
- Tested with dhcpc

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 10:53:34 +01: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
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
Alexander Vasiljev
d523757d4a serial: break from read after closing 2020-10-21 09:20:04 -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
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
raiden00pl
33901969fe Fix nxstyle warnings 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
Masayuki Ishikawa
822497d021 drivers: note: Fix compile errors in noteram_driver.c
Summary:
- This commit fixes compile errors if CONFIG_DEBUG_ASSERTIONS=y

Impact:
- Affects noteram_driver only

Testing:
- Tested with spresense:wifi_smp with CONFIG_DEBUG_ASSERTIONS=y

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-06 16:42:40 +08:00
Nakamura, Yuuichi
89ea234af8 Add on-boot instrumentation support for note filter 2020-10-06 03:26:46 +08: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
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
Brennan Ashton
f41b9a10b3 ws2812: moved SPI_LOCK and forgot to change spi drv var name
This snuck in durring a slight PR fixup.
2020-09-28 08:25:43 +01:00
Xiang Xiao
650e18baa1 serial: Shouldn't mangle pid when ISIG is changed
Let's check ISIG flag directly instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I060f70eefc79b1c34aa11ed4071179d2ae5fa5ca
2020-09-25 06:48:26 -07:00
Alexander Vasiljev
834e584169 spi_xx25xx: in write operation return the number of bytes written not the result of ee25xx_semtake 2020-09-25 04:51:25 -07:00
Xiang Xiao
eacca2b7a2 wireless/bluetooth: replace open with file_open in uart shim drivers
it is simpler than open and then file_detach

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I22585b7450804c6c012fecf369a8d7e25970c192
2020-09-23 15:08:18 -03:00
Masayuki Ishikawa
89cfaf1e6a drivers: audio: Fix cxd56.c for SMP
Summary:
- Add spin_unlock_irqrestore to avoid deadlock
- Improve cxd56_resume() sequence
- Remove AUDIO_MSG_USER and call cxd56_stop_dma() for buffering
- Remove redandant 'Lock interrupt' and 'Unlock interrupt'

Impact:
- Affects all use cases with cxd56.c audio driver

Testing:
- Tested with spresense:rndis and spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-23 10:45:29 +02:00
spiriou
65bb956e5e pipe: check for writers first in case of pipe empty 2020-09-21 19:30:21 -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
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
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
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