Commit Graph

3675 Commits

Author SHA1 Message Date
SPRESENSE
e4b50c4ba0 drivers/mmcsd: Fix minor bugs
- Add missing cancel process when the send command fails
- Make it possible to recover from SD initialization error
- Reduce time in changing transfer mode to 5msec from 500msec.
  Replace usleep function instead of up_udelay in other to avoid
  blocking other tasks from working.
2020-07-22 09:51:54 -05:00
Xiang Xiao
e1ecb3e27c libc: Don't define localtime[_r] to macro when CONFIG_LIBC_LOCALTIME not define
since libc++ declare these function in ctime by:
using ::localtime[_r];

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic0bb68b44c0cab838ab7cc34baee2aaa3ca8a9b5
2020-07-19 19:35:21 -07:00
Masayuki Ishikawa
0475540c83 drivers: wireless: Add 'select SCHED_LPWORK' to WL_GS2200M
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-19 21:11:46 -05:00
Xiang Xiao
aa57174eb9 rwbuffer: Optimize the buffer algorithm
avoid the buffer flush as much as possible

Change-Id: I902f374e9540b36bd0b0c77a34cab5014a2c24fc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-19 13:13:50 -07:00
Xiang Xiao
e7034c102f rwbuffer: Fix the wrong remaining block calculation in invalidation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I00e6e7332f397bcddfd44e1b3c5c514a8f07923f
2020-07-19 13:13:50 -07:00
Masayuki Ishikawa
f5540e8922 drivers: wireless: Fix compile error with DEBUG_WIRELESS_INFO in gs2200m.c
Also, remove an inappropriate comment.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-17 11:59:27 +01:00
Adam Feuer
65a866fbe2 support for SAMA5D27 SDMMC peripheral
- MMC and SD Card driver
- ported from imxrt_usdhc.c

Squashed commit of the following:

commit 46cbe18ad6a6e41ec2727d839f86f5670577878a
Author: Adam Feuer <adam@starcat.io>
Date:   Wed Jul 15 10:28:02 2020 -0700

    nxstyle change - Public Function Prototypes

    - instead of Public Functions

commit 486b7b62e83a78ae15b114e34846900d8fef8248
Author: Adam Feuer <adam@starcat.io>
Date:   Wed Jul 15 10:06:51 2020 -0700

    nxstyle changes

commit 28280d585a40aac99fd0e538295828ea013739b7
Author: Adam Feuer <adam@starcat.io>
Date:   Wed Jul 15 10:06:29 2020 -0700

    removing unused enum value

commit 7da6ba437e7e023d348e63c497732fea985a2d1b
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 21:17:49 2020 -0700

    CI build error fixes

    - unused vars
    - incorrect method calls

commit 145a73449b9d1eaed8a6cbf47cb53fb5b7a551f6
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 17:29:56 2020 -0700

    adding #defines to prevent unused var warning

commit 47ed2c08235816caded26a019cf33899daed1621
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 16:29:07 2020 -0700

    removing obsolete config values

commit b43f129c03a8bb8dc57ae6984d124ce9e9306196
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 09:58:42 2020 -0700

    removed obsolete config setting

commit 23e3af846ac24cac928442c7af86c5d0ef183ad3
Merge: 8b47330fe5 6f6d61eec4
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 09:53:12 2020 -0700

    Merge remote-tracking branch 'upstream/master' into feature/sama5d27-sdmmc-support

commit 8b47330fe5bb49bbd1991f2f3e2c69bdfb833d2c
Author: Adam Feuer <adam@starcat.io>
Date:   Tue Jul 14 09:51:56 2020 -0700

    replaced license headers with Apache License 2.0

commit 865e69b9a84d077ab9e05c2056dc7a515222c6c7
Author: Adam Feuer <adam@starcat.io>
Date:   Thu Jul 9 18:38:01 2020 -0700

    SAMA5D2x SDMMC peripheral support (SD Card driver)

    - reading and writing at 25 MHz and 50Mhz
    - UHS_SDR50, UHS_DDR50, and UHS_SDR104 are supported
    - ported from imxrt_usdhc.c
    - only tested on SAMA5D27

    Squashed commit of the following:

    commit e3122baef2feaeb32bb00798ae56310b2cc5c448
    Author: Adam Feuer <adam@starcat.io>
    Date:   Thu Jul 9 18:30:03 2020 -0700

        added sdmmcnsh defconfig and basic docs

    commit 12a290d7465a0a006473ba67893bf891a7bcea83
    Author: Adam Feuer <adam@starcat.io>
    Date:   Thu Jul 9 17:50:06 2020 -0700

        nxstyle changes

    commit 33409c0f63c328dc200150ba883327cadf0300b2
    Author: Adam Feuer <adam@starcat.io>
    Date:   Thu Jul 9 16:15:00 2020 -0700

        add short delay to in recvshortcrc

        - to allow SDMMC to respond

    commit 3be7a7fb6f79900042d1fdbef72810f364ac5f62
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Thu Jul 9 10:54:59 2020 -0700

        added SDR50 and SDR104 SDMMC bus modes

    commit 2888408866548ca53e582ea1525178a7733617b4
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Thu Jul 9 10:54:25 2020 -0700

        comment formatting cleanup

    commit 06cf2c39193971155eaa6f9c89a39a88b53964a8
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Thu Jul 9 10:34:01 2020 -0700

        removed unneeded comment

    commit ac89b69231bdf19563754865fda93d4bbbb4488d
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Thu Jul 9 10:30:23 2020 -0700

        code cleanup

        - removing custinfo() logging
        - remove duplicate #defines
        - move var declarations to the beginning of methods

    commit bcd4abec7935ee9023ab72edfb02685dbeee243c
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Wed Jul 8 16:34:31 2020 -0700

        handle SDMA Boundary Pause interrupt (DMAINT)

        - SDMMC_INT_DINT
        - add to waitints
        - add handler to sam_interrupt

    commit e9da026c1270e999df520ee2c60487195799f58c
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Tue Jul 7 16:07:34 2020 -0700

        Kconfig setting for SDMMC bus speed

        - 25 and 50 MHz
        - 50 MHz is the default

    commit 9edc636b7f18f981d653f85970c3af0b80801778
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Mon Jul 6 21:55:51 2020 -0700

        added HSEN bit change for high speed mode

        - above 26 MHz

    commit b8e91c95b0f7b2f8220f02b1eb42b6134e0660d0
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Mon Jul 6 21:28:03 2020 -0700

        added calloc to fix bug

        - not sure why this works.

    commit 1ceaf2f8487fe39d4d6fb21adecd57e4c4992e07
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Mon Jul 6 21:25:47 2020 -0700

        removing spurious typo characters

    commit 14ba51743bcca35686b07a76f5af17bcce078a5f
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 18:10:46 2020 -0700

        nxstyle changes

    commit d8af26df47b7840117de0d3a44ec548b3a72bc2b
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 17:01:11 2020 -0700

        nxstyle changes

    commit 0ae532bd62d02c5ac36aa2192f31fa1f7f1cde99
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 16:37:17 2020 -0700

        remove long lines in comments - nxstyle

    commit 3d025a84f8e9ddb7f7a4570504118d782dd5574c
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 16:36:52 2020 -0700

        removed custinfo logging

    commit 366b5d9d241a42d693583679cb49aa7bf25615aa
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 16:35:08 2020 -0700

        removed custinfo logging

    commit c74396e4a4943873c7de5b6ffee193787c39baef
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 16:34:36 2020 -0700

        fixed typo

    commit 7f51e99d7f4c1e5e0bf71a84fd0b2467157fea59
    Merge: c40f8c1039 2481b1bfd5
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Sat Jul 4 15:33:06 2020 -0700

        Merge remote-tracking branch 'upstream/master' into feature/sama5d27-sdmmc-support

    commit c40f8c10390ecefeb3a113046edd6740b07ab31b
    Author: Adam Feuer <adam@adamfeuer.com>
    Date:   Thu Jul 2 22:08:20 2020 -0700

        SDMMC support for SAMA5D27
2020-07-16 23:39:37 +01:00
Oleg Evseev
b6ed3392a4 drivers/can: base readers checks on cd_readers list itself
Get rid of several useless dev vars
2020-07-11 15:06:56 -03:00
Oleg Evseev
06a5b1f566 drivers/can: fix tx_sem and rx_sem to be SEM_PRIO_NONE
issue 1354
2020-07-11 15:06:56 -03:00
Anthony Merlino
731594b7d2 drivers/eeprom/spi_xx25xx: Fixes build error. 2020-07-10 12:13:22 -07:00
Beat Küng
a349595316 gpio: extend gpio_pintype_e for pulldown/up and opendrain
- fix code style
- fix bool conversion when calling go_read()
2020-07-07 08:34:25 -05:00
Oleg Evseev
1798383a2d drivers/can: correct checking sem is locked
Object filled by nxsem_get_value can be zero or a negative number
fix for 190782c2959de2b28867022941e52f429d5d07fb

issue #1354
2020-07-06 09:53:22 -03:00
Oleg Evseev
908ee31e7d drivers/can: enter_critical_section in can_poll 2020-07-05 14:38:55 -03:00
Oleg Evseev
247bc10c26 drivers/can: fix wrong use of nxsem_getvalue
Bug caused increase of fifo->rx_sem with each received msg until finally after 32767 messages get into
DEBUGASSERT(sem->semcount<SEM_VALUE_MAX);
or stopping receiving anything at all without debug, while tx was working.

issue #1354
2020-07-05 14:38:55 -03:00
Claudio Micheli
7a346bee26 stm32f7: Add the option to include RTR in CAN header
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-06-29 09:05:44 -03:00
Xiang Xiao
095e492cb3 libc: Replace nuttx/lib/math.h with math.h
Because user may replace math library with other implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idb5f2a8b2a70302c8561553b3bcbc40529b5257f
2020-06-29 06:32:10 +02:00
Matias Nitsche
b3327419d3 tone: stop tone using 0 duty, not stop() 2020-06-25 11:04:14 +01:00
Matias Nitsche
10a9464bcf tone: start playing tune immediately without delay 2020-06-25 11:04:14 +01:00
Ouss4
701100f6f9 drivers/sensors/mpu60x0: Add I2C support. 2020-06-24 23:30:34 -03:00
Ouss4
530cad304f drivers/spi/spi_bitbang.c: Fix typos and nxstyle complaints. 2020-06-21 14:13:32 -06:00
Ouss4
bd82486f1c drivers/lcd: Add support for the ST7735 TFT controller. 2020-06-21 14:13:32 -06:00
Nakamura, Yuuichi
ec0212cc8a drivers/syslog/note_driver.c: nxstyle fix 2020-06-17 20:15:54 +08:00
Masayuki Ishikawa
ae92afd250 drivers: audio: Fix cxd56_stop in cxd56.c
In the previous implementation, cxd56_stop() checked the internal
state before sending AUDIO_MSG_STOP to the message queue. However,
if the worker thread took time to turn on AMP, cxd560_stop() was
not able to send the message and caused a deadlock.

This commit fixes this issue by always sending AUDIO_MSG_STOP
regardless of the internal state.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-16 08:52:40 +02:00
Matias Nitsche
53387b53c6 style fixes 2020-06-16 01:01:14 +01:00
Matias Nitsche
6c333d7cbf bmp280: support getting temperature via ioctl() 2020-06-16 01:01:14 +01:00
Alan C. Assis
3a95c41370 Fix devif_timer() function call 2020-06-15 07:13:21 -06:00
Alan C. Assis
7609b67496 Fix issues reported on PR #1233 2020-06-15 07:13:21 -06:00
Alan C. Assis
e1be7ace4b Fix netdev and add Apache license to the file 2020-06-15 07:13:21 -06:00
Adam Porter
07c0faff59 Add support to CDC-MBIM USB host driver
This driver was created by Adam Porter and posted on NuttX
mailing list at Google Group on Nov 14 2019
2020-06-15 07:13:21 -06:00
Alin Jerpelea
c6c0214f9a boards: arm: cxd56: initilize the video stream driver from the board
The video stream driver must be intialized from the board to comply with NuttX

NOTE:
Please remove the initalization from any camera example

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-06-15 08:10:49 +09:00
Alin Jerpelea
8fdfb745d6 drivers: video: fix uninitialized variables
Fix the build error by initializing the variables before we perform
th querry for the ext control.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-06-15 08:10:49 +09:00
Ouss4
02ad0e9094 drivers/leds/ncp5623c&pca9635pw: Fix nxstyle issues. 2020-06-12 17:51:23 -03:00
Ouss4
ebfc12d3d2 drivers/: Fix some drivers mode priviliges. It's not used but it's
better to get it right.
2020-06-12 17:51:23 -03:00
Ouss4
0acf6da4d8 drivers/analog/ and include/nuttx/analog: Fix typos and nxstyle issues. 2020-06-12 16:04:02 -03:00
Masayuki Ishikawa
958ddc1926 drivers: audio: Add a buffering feature to cxd56
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-10 09:11:15 -03:00
Masayuki Ishikawa
8a60cc01e2 drivers: audio: Send stop message when received the final buffer
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-10 09:11:15 -03:00
Xiang Xiao
76965474ac drivers/led: Let board_userled_initialize return the led number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf6638a6865bac42150b5957376e55909f041d40
2020-06-07 19:28:10 +01:00
Xiang Xiao
1ba1c34b01 drivers/led: Decopule USERLED from ARCH_HAVE_LEDS
and let USERLED_LOWER depends on ARCH_HAVE_LEDS instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie03e76d90b61a3d8d3457ccdd319a247b6075fa8
2020-06-07 19:28:10 +01:00
Xiang Xiao
1b47aa1cb2 drivers/button: Let board_button_initialize return the button number
so the lower half driver don't need include the specific board.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2ff5c30049a5c5e8ee90baea56e9f4cb1a8a4f87
2020-06-07 19:28:10 +01:00
Alan C. Assis
a7a272661e Char drivers should return -ENOTTY if CMD is not recognized 2020-06-06 14:51:02 -03:00
Ouss4
36f54e280f Fix PR1201 nxstyle issues. 2020-06-05 15:54:17 -03:00
Ouss4
8da4b02350 drivers/audio: Add CS4344 driver. 2020-06-05 15:54:17 -03:00
Tobias Johansson
368fbd0dea cxd56: Fix lock issue in Spresense audio driver
Replace semaphore with spinlock in the DMA buffer handling code
since it is called from an interrupt.
2020-06-05 19:50:27 +08:00
Masayuki Ishikawa
4b9886fa29 drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-05 12:02:33 +08:00
Gregory Nutt
0e425584b8 include/nuttx/video/video.h: Move global variable declaration out of header file
Move global variable declaration out of include/nuttx/video/video.h and into the file where it is initialized.  With some toolchains/environments, declaring globals in header files results in multiply defined symobl errors at link time.  This corrects that build problem.
2020-06-01 20:22:40 +01:00
Gregory Nutt
43183e5843 drivers/serial/pty.c: Correct returned number of bytes.
Reported by 권석근 <kwonsksj@gmail.com>:

I found a bug at "pty.c" during ssh server implementation.

When I turn on CONFIG_SERIAL_TERMIOS and OPOST|ONLCR on pty device
for nsh console's stdin/stdout (ssh shell service), I've got system crash.

Bugs at line 687 of pty.c, pty_write()
ntotal++;

when converting '\n' to '\r\n', pty_write() will return more than requested
(+1, for example) length. and this will break caller lib_fflush(), line 150
of lib_libfflush.c.
When she get (libfflush()) bytes_nwritten which is greater than nbuffer,
nbuffer goes to negative at line 150 and eventually destroys
*stream->fs_bufpos at line 163 of lib_libflush.c

Removing ntotal++;  line 687 of pty.c will fix this bug.

BTW, nsh using ptm/pty as a ssh shell service works great with libssh +
mbedtls.
2020-06-01 16:39:49 +01:00
Masayuki Ishikawa
806710b225 drivers: wireless: New flow control based on total bulk size in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-06-01 09:08:05 +02:00
Gregory Nutt
738f3c61f7 drivers/usbhost/usbhost_ft232r.c: Cosmetic
Cosmetic changes to alignment.  Also fixes some C89 non-compliance.  Sorry to be so OCD.
2020-05-28 21:17:58 +01:00
Gregory Nutt
5a9f7927ee nxstyle fixes 2020-05-28 12:22:46 -06:00
Nicholas Chin
560ba3adcd usbhost: adds a driver for the FTDI FT232R USB to serial converter 2020-05-28 12:22:46 -06:00
Kazuya Hioki
075334cfcc drivers: wireless: Fix buffer overrun in gs2200m.c
Warning ID: 85719.12039200

Reviewed-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Signed-off-by: Kazuya Hioki <Kazuya.Hioki@sony.com>
2020-05-26 15:38:43 +08:00
Xiang Xiao
8b20b97d26 build: Remove the dummy drivers folder under boards
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao
23668a4b9b build: Remove the empty variable assignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao
edb0ce2d5a build: Don't need use $(DELIM) in include statement
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao
dd61d3d9f9 build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Masayuki Ishikawa
287b9f9c38 drivers: wireless: Add WPA2-PSK in AP mode for gs2200m
NOTE: By default, WPA2-PSK is used instead of WEP

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>>
2020-05-22 10:20:07 +02:00
Masayuki Ishikawa
65e81a6159 drivers: wireless: Add do packet flow cotrol in gs2200m_ioctl_close()
NOTE: active close now works during http audio streaming

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-21 12:46:10 +02:00
Xiang Xiao
1a95cce1a3 build: Move .config check to the top Makefile
remove the workaround to handle the inexistence of .config/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Masayuki Ishikawa
3c622db780 drivers: wireless: Fix pkt_q_cnt overflow in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-20 13:59:12 +02:00
Xiang Xiao
5eae32577e build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Xiang Xiao
bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Gregory Nutt
57bc329aac Run nxstyle all .c and .h files modified by PR. 2020-05-17 14:01:00 -03:00
Gregory Nutt
a569006fd8 sched/: Make more naming consistent
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions

    nxsem_setprotocol -> nxsem_set_protocol
    nxsem_getprotocol -> nxsem_get_protocol
    nxsem_getvalue -> nxsem_get_value
2020-05-17 14:01:00 -03:00
Masayuki Ishikawa
60b404e076 drivers: wireless: Apply max payload size to gs2200m.c
Also, remove unnecessary initialization for tx packet.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-15 06:49:02 -06:00
Masayuki Ishikawa
3ead63c353 drivers: wireless: Fix to bind() with port=0 in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-14 14:17:47 +02:00
Masayuki Ishikawa
21c588b126 drivers: wireless: Add support for getsockname() to gs2200m
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-14 14:17:47 +02:00
Matias Nitsche
e0d21275df fix all remaining nxstyle errors 2020-05-14 08:32:48 +02:00
Matias Nitsche
5fd9bd5837 stm32: moved all remaining sensor initialization to common board logic 2020-05-14 08:32:48 +02:00
Masayuki Ishikawa
ef169b7ebf drivers: wireless: Handle multiple incoming packets in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-13 13:11:08 +02:00
Juha Niskanen
d666aa623f drivers/mtd/filemtd.c: fix build error 2020-05-11 09:25:45 -04:00
Xiang Xiao
517974787f Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -06:00
Xiang Xiao
b7d922960f Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 07:20:49 -06:00
Tobias Johansson
f2c957144a cxd56: Add input support to Spresense audio driver
Add recording support to the Nuttx audio driver for Spresense.
- Supports 16 bit data with 48 kHz sample rate only for now.
- Supports 1 (dual mono) 2 or 4 channels.
- Only analog mics have been tested so digital is considered
  unsupported.
2020-05-08 07:18:22 -06:00
Xiang Xiao
3e00d182d2 Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 20:53:11 -06:00
Xiang Xiao
94bb2e05bb syslog: Code outside libc shouldn't call nx_vsyslog directly
since nx_vsyslog is the implementation detail

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 20:53:11 -06:00
Pelle
b525218b55 Changed headers for apache 2.0 license 2020-05-05 12:20:53 -06:00
Pelle
59fcd9a3ee hdc1008: minor fixes to comments. 2020-05-05 12:20:53 -06:00
Pelle
8a0b2bc14e Added driver for the hdc1008 temperature/humidity sensor. 2020-05-05 12:20:53 -06:00
Xiang Xiao
d9d2fc0d0a debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-05 08:27:58 -06:00
Xiang Xiao
32b79b22ec Rename pipe2/mkfifo2 to nx_pipe/nx_mkfifo
and don't modify errno anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-04 07:20:02 -06:00
Xiang Xiao
f8a809eb5b Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-01 10:43:47 -03:00
Masayuki Ishikawa
350ffb20ad drivers: wireless: Improve packet receiving performance in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-30 09:09:17 +02:00
Masayuki Ishikawa
a5e4f0435d drivers: wireless: Fix packet queue overflow in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-30 09:09:17 +02:00
Ouss4
d0bb7c137a Use NuttX's signal set functions inside the OS. 2020-04-29 16:40:27 -06:00
liuhaitao
bd924bf7fb syslog: correct to #ifdef CONFIG_SYSLOG_RPMSG to call syslog_rpmsg_init
Same as syslog/Make.defs to use #ifdef CONFIG_SYSLOG_RPMSG to build syslog_rpmsg.c
in which syslog_rpmsg_init defined.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-29 07:08:25 -06:00
Xiang Xiao
972033a61f syslog: Check sc_flush in't NULL before invocation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 13:48:56 +08:00
Xiang Xiao
e9773addfa syslog/rpmsg: Fix warning: ‘syslog_rpmsg_write’ defined but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 13:48:56 +08:00
zhongan
927cb00f5e fix nxstyle warning
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-26 19:53:43 -06:00
zhongan
546e35fc98 drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.
Change-Id: I7c9da4bd985712a3fde4c56999901434740b33f7
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-26 19:53:43 -06:00
Tobias Johansson
79589eca1a cxd56: replace Sony return values
- Replace Sony error codes with standard ones where possible
- Unify error message and remove some unnecessary info prints
2020-04-21 17:19:52 -06:00
Tobias Johansson
ecc4939453 cxd56: fix volume setting and improve volume range
- Setting volume now works except when in paused state
- Volume range decreased to be a little more sane
2020-04-21 17:19:52 -06:00
Tobias Johansson
36e756a915 cxd56: add support for pause and resume
Implements pause and resume functionality
2020-04-21 17:19:52 -06:00
Tobias Johansson
7a83177419 cxd56: disable unused audio effects
Disables audio effects that are not currently in use.
Also fixes some minor indentation issues.
2020-04-21 17:19:52 -06:00
Alin Jerpelea
d9d720b296 audio: nxstyle fixes for core and drivers
nxstyle fixes for the audio core and drivers

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-04-21 17:19:52 -06:00
Xiang Xiao
6ad91aeb05 Kconfig: change the stack size default to DEFAULT_TASK_STACKSIZE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-18 07:17:38 -06:00
Tobias Johansson
57e8f0451a cxd56: add initial Nuttx audio driver
Adds an initial Nuttx audio driver supporting the Spresense CXD56.
Being a work in progress the driver has a number of limitations:
- Audio playback only, no recording yet.
- Only 16 bit stereo playback is supported.
- In practice only 48kHz playback is supported due to missing SRC.
- Configure driver in "Device Drivers --> Audio Device Support".
2020-04-16 12:50:05 -06:00
Nathan Hartman
3c829226f9 Fix typos and nxstyle complaints.
arch/x86_64/src/intel64/intel64_tickless.c:
boards/x86_64/intel64/qemu-intel64/src/qemu_freq.c:
drivers/modem/altair/altmdm.c:

    * Fix typos and nxstyle complaints.
2020-04-15 17:04:58 +01:00
zhongan
b4a50a9192 fix nxstyle warning.
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 12:30:50 -03:00
zhongan
987472d3bb syslog/rpmsg: remove unused local variable 'g_syslog_rpmsg_channel' which would cause build break.
Change-Id: Ie02ef9202ec2a9ecade62c47e4f8956adb96673f
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 12:30:50 -03:00
zhongan
ab566de77a syslog/rpmsg: fix the naming conflict of function 'syslog_rpmsg_putc'.
Change-Id: I3f89bfed71edb85bc3006446c1f9141e95202b5c
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-04-15 12:30:50 -03:00
Gregory Nutt
6548b41cab drivers/usbdev/usbmsc.c: Run nxstyle; fix complaints. 2020-04-15 12:30:08 -03:00
Juha Niskanen
c2ecdaecf7 drivers/usbdev/usbmsc.c: Fix build error with DEBUGASSERT 2020-04-15 12:30:08 -03:00
Masayuki Ishikawa
6725a29b60 drivers: wireless: Add support for UDP connect in gs2200m.c
NOTE: gs2200m_main.c needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-14 13:07:17 +02:00
Xiang Xiao
d3c4879113 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-13 12:01:39 -06:00
Xiang Xiao
b22e3b9e28 nuttx: Fix the nightly build warning
lpc2148_spi1.c:142:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type 'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types]
  142 |   .send              = spi_send,
      |                        ^~~~~~~~
lpc2148_spi1.c:142:24: note: (near initialization for 'g_spiops.send')

In file included from ieee802154/mac802154_bind.c:49:
ieee802154/mac802154_internal.h: In function 'mac802154_setdevmode':
ieee802154/mac802154_internal.h:788:42: warning: converting a packed 'enum ieee802154_devmode_e' pointer (alignment 1) to a 'const union ieee802154_attr_u' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  788 |                         (FAR const union ieee802154_attr_u *)&mode);
      |                                          ^~~~~~~~~~~~~~~~~

chip/stm32_hciuart.c: In function 'hciuart_read':
chip/stm32_hciuart.c:2104:30: warning: statement with no effect [-Wunused-value]
 2104 |                       ntotal == (ssize_t)ret;
      |                       ~~~~~~~^~~~~~~~~~~~~~~

wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_auth_event_handler':
wireless/ieee80211/bcm43xxx/bcmf_driver.c:579:23: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  579 |   type = bcmf_getle32(&event->type);
      |                       ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_driver.c:580:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  580 |   status = bcmf_getle32(&event->status);
      |                         ^~~~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_driver.c: In function 'bcmf_wl_scan_event_handler':
wireless/ieee80211/bcm43xxx/bcmf_driver.c:619:25: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  619 |   status = bcmf_getle32(&event->status);
      |                         ^~~~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_driver.c:620:35: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  620 |   escan_result_len = bcmf_getle32(&event->len);
      |                                   ^~~~~~~~~~~
wireless/ieee80211/bcm43xxx/bcmf_bdc.c: In function 'bcmf_bdc_process_event_frame':
wireless/ieee80211/bcm43xxx/bcmf_bdc.c:166:27: warning: taking address of packed member of 'struct bcmf_event_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
  166 |   event_id = bcmf_getle32(&event_msg->event.type);
      |                           ^~~~~~~~~~~~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_direct':
wireless/ieee80211/bcm43xxx/mmc_sdio.c:157:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  157 |   ret = SDIO_RECVR5(dev, SD_ACMD52, (uint32_t *)&resp);
      |   ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c: In function 'sdio_io_rw_extended':
wireless/ieee80211/bcm43xxx/mmc_sdio.c:239:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  239 |           ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
      |           ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:244:11: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  244 |           ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
      |           ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:257:7: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  257 |       ret = SDIO_RECVR5(dev, SD_ACMD53, (uint32_t *)&resp);
      |       ^~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:265:3: warning: converting a packed 'struct sdio_resp_R5' pointer (alignment 1) to a 'uint32_t' {aka 'unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  265 |   SDIO_RECVR1(dev, SD_ACMD52ABRT, (uint32_t *)&resp);
      |   ^~~~~~~~~~~
wireless/ieee80211/bcm43xxx/mmc_sdio.c:79:28: note: defined here
   79 | begin_packed_struct struct sdio_resp_R5
      |                            ^~~~~~~~~~~~

chip/stm32_adc.c: In function 'adc_reset':
chip/stm32_adc.c:2860:7: warning: unused variable 'ret' [-Wunused-variable]
 2860 |   int ret;
      |       ^~~
chip/stm32_adc.c: In function 'adc_shutdown':
chip/stm32_adc.c:3044:7: warning: unused variable 'ret' [-Wunused-variable]
 3044 |   int ret;
      |       ^~~

chip/stm32_i2c.c:722:12: warning: 'stm32_i2c_sem_wait_noncancelable' defined but not used [-Wunused-function]
  722 | static int stm32_i2c_sem_wait_noncancelable(FAR struct i2c_master_s *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wireless/gs2200m.c: In function 'gs2200m_read':
wireless/gs2200m.c:727:20: warning: passing argument 1 of 'nxsem_wait' from incompatible pointer type [-Wincompatible-pointer-types]
  727 |   ret = nxsem_wait(dev);
      |                    ^~~
      |                    |
      |                    struct gs2200m_dev_s *

.config:1207:warning: symbol value '' invalid for TESTING_OSTEST_FPUSIZE

platform/audio/cxd56_audio_analog.c:69:13: warning: inline function 'cxd56_audio_clock_is_enabled' declared but never defined
   69 | inline bool cxd56_audio_clock_is_enabled(void);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
platform/audio/cxd56_audio_analog.c:68:13: warning: inline function 'cxd56_audio_clock_disable' declared but never defined
   68 | inline void cxd56_audio_clock_disable(void);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
platform/audio/cxd56_audio_analog.c:67:13: warning: inline function 'cxd56_audio_clock_enable' declared but never defined
   67 | inline void cxd56_audio_clock_enable(uint32_t clk, uint32_t div);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~

chip/stm32_adc.c: In function 'adc_reset':
chip/stm32_adc.c:1348:7: warning: unused variable 'ret' [-Wunused-variable]
 1348 |   int ret;
      |       ^~~
chip/stm32_adc.c: In function 'adc_shutdown':
chip/stm32_adc.c:1496:7: warning: unused variable 'ret' [-Wunused-variable]
 1496 |   int ret;
      |       ^~~

chip/stm32_i2c.c:729:12: warning: 'stm32_i2c_sem_wait_uninterruptble' defined but not used [-Wunused-function]
  729 | static int stm32_i2c_sem_wait_uninterruptble(FAR struct i2c_master_s *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wireless/lpwan/sx127x/sx127x.c:147:52: warning: missing terminating ' character
  147 | #  warning OOK support is not complete, RX+TX doesn't work yet!
      |                                                    ^

str71_spi.c:435:24: warning: initialization of 'uint32_t (*)(struct spi_dev_s *, uint32_t)' {aka 'unsigned int (*)(struct spi_dev_s *, unsigned int)'} from incompatible pointer type
                                               'uint16_t (*)(struct spi_dev_s *, uint16_t)' {aka 'short unsigned int (*)(struct spi_dev_s *, short unsigned int)'} [-Wincompatible-pointer-types]
  435 |   .send              = spi_send,
      |                        ^~~~~~~~
str71_spi.c:435:24: note: (near initialization for 'g_spiops.send')

chip/pic32mx-lowconsole.c:147:24: warning: 'pic32mx_getreg' defined but not used [-Wunused-function]
 static inline uint32_t pic32mx_getreg(uintptr_t uart_base,
                        ^
chip/pic32mx-gpio.c:113:20: warning: 'pic32mx_value' defined but not used [-Wunused-function]
 static inline bool pic32mx_value(uint16_t pinset)
                    ^
chip/pic32mz-gpio.c:124:20: warning: 'pic32mz_value' defined but not used [-Wunused-function]
 static inline bool pic32mz_value(pinset_t pinset)
                    ^
chip/pic32mx-usbdev.c:3065:1: warning: 'pic32mx_epreserved' defined but not used [-Wunused-function]
 pic32mx_epreserved(struct pic32mx_usbdev_s *priv, int epno)
 ^

mmcsd/mmcsd_spi.c: In function 'mmcsd_mediachanged':
mmcsd/mmcsd_spi.c:1938:7: warning: 'return' with a value, in function returning void
       return ret;
       ^

In file included from partition/fs_partition.c:42:0:
partition/partition.h:66:19: warning: 'read_partition_block' defined but not used [-Wunused-function]
 static inline int read_partition_block(FAR struct partition_state_s *state,
                   ^

local/local_netpoll.c: In function 'local_pollsetup':
local/local_netpoll.c:305:1: warning: label 'pollerr' defined but not used [-Wunused-label]
 pollerr:
 ^~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If3ea8f32b878aa218072130f7c3018f0d3c1aca5
2020-04-13 12:01:39 -06:00
Gregory Nutt
759d8c1bfa Run nxstyle against files modified in previous commit. 2020-04-13 02:09:34 +08:00
Gregory Nutt
ca2b0a3657 Fix more warnings noted in PR checks
arp/arp_notify.c:132:43: warning: for loop has empty body [-Wempty-body]
           prev = curr, curr = curr->nt_flink);
                                              ^

    sixlowpan/sixlowpan_tcpsend.c:806:31: warning: implicit conversion from 'unsigned int' to 'uint16_t' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Wconstant-conversion]
                                  _SO_TIMEOUT(psock->s_sndtimeo));
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Numerous warnings like:

    ieee802154_getreq.c:93:3: warning: implicit declaration of function 'memcpy' is invalid in C99 [-Wimplicit-function-declaration]
      IEEE802154_EADDRCOPY(eaddr, req.attrval.mac.eaddr);
      ^

    nxfonts/nxfonts_cache.c:839:35: warning: for loop has empty body [-Wempty-body]
               fcache = fcache->flink);

    bluetooth/bluetooth_finddev.c💯11: warning: implicit declaration of function 'memcmp' is invalid in C99 [-Wimplicit-function-declaration]
          if (BLUETOOTH_ADDRCMP(dev->d_mac.radio.nv_addr, match->bf_addr))
              ^

    rwbuffer.c:559:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      if (rwb->rhmaxblocks > 0 && rwb->rhnblocks > 0)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-04-13 02:09:34 +08:00
Gregory Nutt
2aabf76815 Run nxstyle against modified files in PR 2020-04-13 02:09:34 +08:00
Gregory Nutt
62c1389825 Fix warnings noted in PR build checks:
net/telnet.c:1317:40: warning: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare]
                      if (priv->td_pending < CONFIG_TELNET_RXBUFFER_SIZE)
                          ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    time/lib_localtime.c:569:32: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [33]' [-Wsizeof-array-decay]
              sizeof(lsp->fullname - 1) <= strlen(p) + strlen(name))
                     ~~~~~~~~~~~~~ ^
2020-04-13 02:09:34 +08:00
ligd
cbf31bca5c global change: fix tools/checkpatch.sh warnnings
Change-Id: I88cfa979c44bcaf3a8f6e036c6bfccd3402ca85a
Signed-off-by: ligd <liguiding@fishsemi.com>
2020-04-09 10:29:28 -06:00
ligd
231ad202ee global change: repace sched_xfree() to kxmm_free()
Changes:
sched_xfree() => kxmm_free()
remove garbage related APIs
remove ARCH_HAVE_GARBAGE

Cause garbage feature move to mm_heap, then don't need
garbage anymore.

Change-Id: If310790a3208155ca8ab319e8d038cb6ff92c518
Signed-off-by: ligd <liguiding@fishsemi.com>
2020-04-09 10:29:28 -06:00
hartmannathan
bfc153ca27
Fix typos in comments and documentation (#750)
* Fix typos in comments and documentation
2020-04-08 06:45:35 -06:00
Nakamura, Yuuichi
9029e4daee Fix nxstyle issues 2020-04-07 06:23:15 -06:00
Nakamura, Yuuichi
776e469b02 Remove type casting to wdentry_t (drivers/) 2020-04-07 06:23:15 -06:00
Gregory Nutt
a6e69a82ad SDIO: Make interface field names conform to standard.
The SDIO interface structure includes fields with names like recvR1 and others.  These cause "Mixed case identifier" errors from nxstyle in all places they are uses.
This change performs a mass substition of recvR with recv_r to correct this coding standard violation.
2020-04-04 18:15:25 +01:00
Ouss4
f438220555 drivers/1wire/1wire.c: Fix a typo that caused a build failure. 2020-04-02 19:42:07 -06:00
Gregory Nutt
9ff1795760 Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for rwbuffer.c and those files under drivers/serial, drivers/timers, and drivers/usbdev.

This commit completes that step for all of the files under drivers/.  Still remaining:  All of the files under arch/.
2020-04-01 14:20:04 -03:00
Pelle Windestam
f26dda88d1 drivers/i2c: fixed nxstyle warnings 2020-04-01 08:03:50 +02:00
Pelle Windestam
2b9bdc04cc drivers/can: fixed nxstyle warnings 2020-04-01 08:03:50 +02:00
Gregory Nutt
92eae74340 drivers/rwbuffer.c: Back out unfinished changes
This file is a work in progress and was accidentally committed with some other files.  This PR backs out those changes until I can better verify the changes.
2020-03-31 22:52:39 +01:00
Ouss4
997d4fabb0 Check return from nxsem_wait_uninterruptible
This commit is only for those files under drivers/1wire, drivers/bch,
drivers/can and drivers/mmcsd.
2020-03-31 14:58:09 -06:00
Gregory Nutt
986e594563 Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for those files under drivers/pipes and drivers/wireless.
2020-03-31 21:52:50 +01:00
Gregory Nutt
5b74974919 Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for those files under drivers/audio, drivers/net, and drivers/lcd.
2020-03-31 20:12:21 +01:00
Alan Carvalho de Assis
c6b01c321c
Check return from nxsem_wait_initialize() (#661)
* Check return from nxsem_wait_initialize()

Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.

This commit is only for those files under drivers/eeprom.
2020-03-30 20:59:47 -06:00
Gregory Nutt
4829c3d2ab Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for those files under drivers/input.
2020-03-31 00:05:57 +01:00
Gregory Nutt
d9b42cebe7 Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for those files under drivers/usbhost.
2020-03-30 21:53:12 +01:00
Ouss4
2d13ea7477 drivers/: Check return from nxsem_wait_uninterruptible. 2020-03-30 14:40:01 -06:00
Gregory Nutt
0558aa0a78 "Uninterruptible" semaphore waits must return when canceled.
nxsem_timedwait_uninterruptible() must return -ECANCELED if the thread is canceled:

        include/nuttx/semaphore.h:  Return if nxsem_wait() returns ECANCELED meaning that the thread waiting for the semaphore has been canceled.
        sched/semaphore/sem_timedwait.c:  Same change (the inline version is in semaphore.h, the non-inlined version is in sem_tickwait.c).
        drivers/sensors/lps25h.c and drivers/wireless/bluetooth/bt_uart_bcm4343x.c:  Make sure that the caller deals correctly with the -ECANCELED return value.

    Refer to issue 619.
2020-03-29 11:58:28 -03:00
YAMAMOTO Takashi
f8077022bd Introduce CONFIG_DEFAULT_TASK_STACKSIZE
* The appropriate size of stack varies among archs.
  E.g. for 64-bit sim, 2048 is way too small, especially when the task
  happens to use host OS functionalities.
  I plan to allow an arch provide its own default.

* I plan to use this to replace hardcoded "STACKSIZE = 2048" in APPDIR.
2020-03-26 22:30:13 -05:00
Gregory Nutt
5c0e8e88b1 Revert "Makefile: move INCDIROPT to common place (#625)"
This reverts commit b9ace36fcc.

This change was added by PR 625 but has a serious logic flaw.  It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:

    else ifeq ($(WINTOOL),y)
      DEFINE = "$(TOPDIR)/tools/define.sh"
      INCDIR = "$(TOPDIR)/tools/incdir.sh" -w

This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined.  As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
2020-03-26 08:50:29 -07:00
Xiang Xiao
b9ace36fcc
Makefile: move INCDIROPT to common place (#625) 2020-03-26 08:09:59 -06:00
YAMAMOTO Takashi
1ffa009c8b Revert "Don't generate .depend anymore"
This reverts commit 79af7fbf4e.

Because:

* btashton reported some issues in local builds:

  https://github.com/apache/incubator-nuttx/pull/603#issuecomment-602264860

* this might be related to the current CI breakage:

  > /bin/sh: 1: /__w/incubator-nuttx/incubator-nuttx/nuttx/tools/mkdeps: not found
2020-03-22 23:07:29 -05:00
Xiang Xiao
79af7fbf4e
Don't generate .depend anymore 2020-03-22 18:15:29 +00:00
Gregory Nutt
547a3cb3d9 Run all .c and .h files in previous commits through nxstyle. 2020-03-22 08:24:07 -05:00
Gregory Nutt
431286532c drivers/: Remove support for CONFIG_FS_READABLE 2020-03-22 08:24:07 -05:00
Gregory Nutt
66ab039b89 drivers/: Remove support for CONFIG_FS_WRITABLE 2020-03-22 08:24:07 -05:00
Gregory Nutt
1ab71814c2 drivers/lcd/pcf8574_lcd_backpack.c: Fix nxstyle issues. 2020-03-18 11:24:59 -06:00
Pierre-Olivier Vauboin
b9b7af1001 drivers/lcd/pcf8574_lcd_backpack.c: increase delay for HOME and CLEAR instructions
Some LCD1602 require at least 1.52 ms wait time after "Clear display" and
"Return home" instructions. Make sure we wait enough.
2020-03-18 11:24:45 -06:00
Nathan Hartman
a5e643b0cd Fix typos in comments and documentation. 2020-03-16 20:01:11 -06:00
Gregory Nutt
98b2949e3b z20x: Improve usability of bootloader
boards/z80/ez80/z20x/configs/w25boot/defconfig:  Increase size of serial Tx buffer.

boards/z80/ez80/z20x/src/w25_main.c:  Add some fflush() in necessary places.  Greatly improves the usability of the UI.

boards/z80/ez80/z20x/README.txt:  Trival update to README

drivers/serial/serial.c and tcdrain.c:  Correct some typos.
2020-03-14 14:07:45 -03:00
Pelle Windestam
fc2d2e2a5e drivers/loop: fix nxstyle issues 2020-03-11 01:25:42 -05:00
Pelle Windestam
5afee5cbd1 drivers/bch: fix nxstyle errors 2020-03-11 01:25:42 -05:00
Pelle Windestam
b6fd522699 drivers/analog: fix nxstyle warnings 2020-03-10 07:20:38 -06:00
Pelle Windestam
8390a66a03 fix nxstyle warnings for drivers/analog/lmp92001.c 2020-03-10 03:53:42 -05:00
Pelle Windestam
633e539362 fix nxstyle warnings for drivers/analog/adc.c 2020-03-10 03:53:42 -05:00
Petro Karashchenko
3fa6baec98 spi: change spi_send() interface to support of 32-bit word transfer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2020-03-09 08:03:35 -06:00
anjana-tel
655fcf18d0 Fixed RTC periodic callback issue
alarminfo->active = false will kill the signal which will disable the interrupt.
In effect, periodic interrupt will behave like alarm interrupt.

So, removed alarminfo->active = false from rtc_periodic_callback() function

Update rtc.c
2020-03-09 06:21:21 -05:00
Gregory Nutt
0efed95115 drivers/net/tun.c: Eliminate unused function.
Eliminated unused function tun_ipv6multicast().  This eliminates a warning from the build test:

net/tun.c:1061:13: warning: 'tun_ipv6multicast' defined but not used [-Wunused-function]
 static void tun_ipv6multicast(FAR struct tun_device_s *priv)
             ^~~~~~~~~~~~~~~~~
2020-03-08 08:40:05 -05:00
Alan Carvalho de Assis
953a1fafae Fixed compilation issue with poll fds notification
Author: Alan Carvalho de Assis <acassis@gmail.com>
    Fix all nxstyle reported issues

Author: Robin Raymond <robin@opticaltone.com>
    Fixed compilation issue with poll fds notification.
    https://github.com/apache/incubator-nuttx/issues/483
2020-03-07 19:18:50 -03:00
Gregory Nutt
c8b39b48bb z20x: w25boot configuration nees CONFIG_FS_WRITABLE
boards/z80/ez80/z20x/configs/w25boot/defconfig:  needs CONFIG_FS_WRITABLE=y

Style cleanup / Correct file header

  drivers/bch/bchdev_register.c, drivers/mtd/ftl.c, and fs/driver/fs_findblockdriver.c:
  Run through nxstyle; replace BSD-3 license with Apache 2.0
2020-03-07 16:59:38 -03:00