Commit Graph

3554 Commits

Author SHA1 Message Date
Xiang Xiao
dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao
f982ee43db drivers/serial: Remove the lowconsole driver
Replace with the syslog console driver which has more capability than lowconsole
2020-02-18 12:51:09 -06:00
Gregory Nutt
21aef0dd68 drivers/*/Kconfig: Consolidate driver Kconfig Files.
This commit does two things:

1. First, it reorganizes the driver Kconfig files so that each is self contained.  Before, a part of the driver configuration was in drivers/Kconfig and the rest was in in drivers/xyz/Konfig.  Now, all of the driver configuration is consolitated in the latter.

2. Second, this commit correct numerous serious errors introduced in a previous reorganization of the driver Kconfig files.  This was first noted by Nicholas Chin in PR270 for the case of the drivers/i2c/Kconfig but some examination indicates that the error was introduced into several other Kconfig files as well.

The nature of the introduced error was basically this:

- Nothing must intervene between the menuconfig selection and the following conditional configuration otpions.
- A previous PR erroneously introduced unconditional options between the menuconfig and the following confditional logic, thus corrupting the driver menus.

This error was easy to make because the driver Kconfig files were not well modularized.  Making them fully self-contained should eliminate this kind of error in the future.
2020-02-15 15:19:11 +01:00
Gregory Nutt
f5e0bb2d30 Run all files modified by PR274 through nxstyle. 2020-02-15 07:17:22 -06:00
Xiang Xiao
20a9a62fdf Make compare_timespec public so timer driver could reuse it 2020-02-15 07:17:07 -06:00
Nicholas Chin
ddc8f52202 drivers/eeprom/i2c_xx24xx.c: increase number of retries in ee24xx_waitwritecomplete 2020-02-14 09:20:33 -06:00
Juha Niskanen
15b78abccf Fix typos in comments 2020-02-14 08:50:45 -06:00
Gregory Nutt
3c0b49448a Network Loopback Driver: A configuration option to control packet size.
Historically, the loopback driver used the largest packet size of all enabled link layer protocols.  This permitted packets to be forward via the loopbak device with no major loss of performance.  However, in experimenting with configurations where no other link layer protocols were enabled, this means the loopback packet size was set to the smallest possible size, to the SLIP minimum of 296 bytes.  This resulted in terrible loopback performance.

    This commit adds an option to increase the loopback packet size with the option CONFIG_NET_LOOPBACK_PACKETSIZE.

    The loopback driver packet buffer should be quite large.  The larger the loopback packet buffer, the better will be TCP performance of the loopback transfers.  The Linux loopback device historically used packet buffers of size 16Kb, but that was increased in recent Linux versions to 64Kb.  Those sizes may be excessive for resource constrained MCUs, however.

    The network still enforces the lower limit that is the maximum packet size of all enabled link layer protocols.  But this new option permits the loopback packet size to be increased from that.

    * net/Kconfig:  Adds CONFIG_NET_LOOPBACK_PKTSIZE option
    * include/nuttx/net/netconfig.h:  Assures that the packet size that is used is at least as large as the largest packet size of other link layer protocols.
    * drivers/net/loopback.c:  Use that larger packet size.
    * boards/sim/sim/sim/configs/tcploop/defconfig:  Set the loopback packet size to 1500
2020-02-10 22:17:32 -03:00
Xiang Xiao
d68693f74c drivers/telnet: Stop the loop if SIGSTP char is match and SIGINT not enabled
Change-Id: I78510616e68330b0171230ca0e081c0d702a6f42
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-10 09:21:34 -06:00
Gregory Nutt
d09af3b7f3 Run .c and .h files modified by PR241 through nxstyle. 2020-02-10 08:57:20 -06:00
liuhaitao
bbd102808d drivers/net/telnet.c: correct typo error to fix build break
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-10 10:12:10 -03:00
Gregory Nutt
10721c0826 Kconfig: Move the ARCH_PHY_INTERRUPT option to net/Kconfig and make it
unconditionally selectable.
2020-02-09 00:55:41 +00:00
Xiang Xiao
3cb259daa6 drivers/Kconfig: Move if/endif to subfolder Kconfig
Move if/endif to subfolder Kconfig and make ARCH_HAVE_XXX option always selectable by moving out of if/endif
2020-02-08 08:04:05 -06:00
Xiang Xiao
a8de37fbec Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-08 07:25:56 -06:00
Gregory Nutt
b35bf20824 drivers/net/telnet.c: Run file changed in last PR through nxstyle. 2020-02-07 07:25:57 -06:00
Xiang Xiao
652c763a32 drivers/net/telnet.c: Unify the coding style in telnet driver
Unify th ecoding style in the telenet driver and ensure kernel version API used in all place and remove the unused stuff
2020-02-07 07:24:43 -06:00
Xiang Xiao
6be0b2f1b8 drivers/net/telnet.c: Trigger SGA and ECHO proactively in the character mode
Trigger SGA and ECHO proactively in character mode otherwise Ubuntu bultin telnet can't enter this mode

Change-Id: I8aa2ab2b31c35007077c701c264b3971152435f0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:23:45 -06:00
Xiang Xiao
ed2a002ee5 drivers/net/telnet.c: Remove g_telnet_common global variable
Remove g_telnet_common global variable; we can reuse g_clients_sem as the lock guard

Change-Id: Ic3af9f2116f70523a4249b29c65bd1fb83ca4da2
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:21:54 -06:00
Xiang Xiao
70786fa758 drivers/net/telnet.c: telnet driver should return -EAGAIN if O_NONBLOCK
Telnet driver should return -EAGAIN is O_NONBLOCK is active also should report -EPIPE first

Change-Id: I7ad2df15377c7bec8e22d0f5d1b54f7ce33eb0db
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:20:54 -06:00
Xiang Xiao
350d25c855 driverts/net/telnet.c: Refine Ctrl+C handling in telnet driver
Refine Ctrl-C handling in telnet driver to avoid issue the kill more than once

Change-Id: I9fcec5d861ea85258170f379d741d2bb8e4d9b9e
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:19:58 -06:00
Xiang Xiao
3c425a8d82 drivers/net/telnet.c Remove the unnecessary '\0' terminator from telnet driver 2020-02-07 07:19:21 -06:00
Xiang Xiao
b216d915e1 drivers/net/telnet.c: Split common_ioctl to telnet_ioctl and factory_ioctl
Splict common_ioctl into telnet_ioctl and factoral_ioctl.  Rmove the wrong telnet_poll from g_factory_fops

Change-Id: I39f278763ff279d464c5be6728b9936c6cab16eb
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:17:18 -06:00
Peter van der Perk
499607d68f
S32K add support for Nxp drone boards (#224)
* S32K add support for Nxp drone boards

* Update arch/arm/src/s32k1xx/hardware/s32k1xx_rtc.h codestyle

Co-Authored-By: David Sidrane <David.Sidrane@Nscdg.com>

Co-authored-by: Jari van Ewijk <jari.vanewijk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2020-02-07 04:53:40 -08:00
David Sidrane
cabd6927bc
Merge pull request #223 from han1raaijmakers/KinetisTJA110X
Kinetis renamed TJA1100 to TJA110X registers
2020-02-07 04:08:41 -08:00
Peter van der Perk
513475c11c Kinetis renamed TJA1100 to TJA110X registers 2020-02-07 10:04:48 +01:00
Xiang Xiao
ac2aec96e0 Refine Kconfig under drivers folder
1.Move subsystem config into sub folder
2.Remove the duplicated if/endif

Change-Id: I0b96ac0570ee1ba62bbb95586381f5410b90bcf0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-06 08:47:30 -03:00
YAMAMOTO Takashi
d4e5736712 Improvements to gs2200m
gs2200m: Make CHECK_VERSION use Kconfig

    gs2200m: Add a config to set log level
2020-02-05 18:32:33 -03:00
YAMAMOTO Takashi
85617c05fc gs2200m: Add a comment to mention the referred document
Many of existing comments in this file refer to the document.
Like "NOTE: See 3.2.2.3 Annexure - HI Frame Format (From Host)"
2020-02-05 09:01:44 +01:00
Xiang Xiao
1321c34022 drivers/net/phy_notify.c: Use IFNAMSIZ for interface name size
Replace CONFIG_PHY_NOTIFICATION_MAXINTFLEN with IFNAMSIZ
2020-02-02 11:02:39 -06:00
Xiang Xiao
0159726da5 drivers/net/slip.c: It's enough to only hold the net lock in SLIP driver 2020-02-02 08:27:33 -06:00
Xiang Xiao
ca8191ad41 drivers/net/slip.c: Don't use fd related operation in SLIP kernel thread 2020-02-02 08:26:30 -06:00
Xiang Xiao
c5b1554d84 Remove NETDEV_LOOPBACK option, NET_LOOPBACK is enough 2020-02-02 08:25:06 -06:00
Xiang Xiao
2d7c072723 Remove duplicated NET_SLIP option from drivers/net/Kconfig 2020-02-02 08:24:50 -06:00
Xiang Xiao
e9bc32cdbc Improve tun (#198)
* Remove the code duplication in tun_net_receive_tap and remove the unused filep field
  * Shouldn't return -EBUSY in tun_write.  Let the caller wait until the write buffer free
  * Handle that write buffer is ready first correctly in tun_read
  * Remove the unused tun_ipv6multicast
2020-02-02 08:02:17 -06:00
Xiang Xiao
5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao
0b860726db Ensure psock_socket and psock_accept initialize s_crefs to 1
This simplifies the caller usage
2020-01-31 13:45:14 -06:00
Xiang Xiao
9f9566c0eb Rename net_clone/net_dupsd[2] to psock_dup2/net_dup[2] like vfs 2020-01-31 13:45:14 -06:00
Xiang Xiao
80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao
68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Gregory Nutt
f27152a1af Fix several coding standard issues in the generic SPI LCD driver. 2020-01-28 12:00:02 -03:00
Dave Marples
e99a8d192d Generic SPI interface for controlling an LCD display 2020-01-28 11:32:35 -03:00
Masayuki Ishikawa
6ad906488e drivers: wireless: Return OK with 0 bytes in gs2200m_send_bulk() when device is busy.
Also, change max retry count and interval in driver layer.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-28 09:18:50 +01:00
YAMAMOTO Takashi
83354983c3 Fix "with with" typos
In many cases, remove one of them.
In a few places, it looks like a typo of "width" actually.
2020-01-27 08:46:46 +01:00
patacongo
ecb2f99dfb drivers/rwbuffer.c: Fix coding style issues. (#164)
Run .c and .h files affected by PR163 through nxstyle and fix all coding style complaints.

Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-25 15:26:42 +01:00
Satoshi Togawa
aad1ab2574 Fix assertion occurrence in rwb_invalidate_writebuffer() 2020-01-25 07:48:34 -06:00
Gregory Nutt
211c6dcaa7 Remove unused configuration option CONFIG_RAMDISK 2020-01-23 17:42:56 -03:00
Xiang Xiao
1e3f457c9e Remove TIME_EXTENDED option to more conform C standard
Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h files modified in this PR through nxstyle and correct all coding standard problems.

Xiang Xiao <xiaoxiang@xiaomi.com>

    Remove TIME_EXTENDED option to more conform C standard

    Note: the code/data size increment is small
2020-01-23 08:17:22 -06:00
Xiang Xiao
9a8ff07716 Change boards/renesas/m32262f8 to boards/hc/m16c
to fix the follow error:
Refresh skp16c26/ostest
LN: include/arch/board to /workspace/mirtos/nuttx/boards/renesas/m32262f8/skp16c26/include
LN: include/arch/chip to arch/renesas/include/m32262f8
2020-01-22 20:44:18 -06:00
Oleg
41efa2ae72 drivers/can/can.c: Fix errors with pointers when using internal OS interface (#118)
Author: Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h files in last PR through tools/nxstyle and correct all coding standard complaints.

Author: Oleg <ev.mipt@gmail.com>

    * Fix CAN driver to work with internal OS interfaces.  Store internal file pointer in f_priv and use it then to distinct readers (See issue #111)
    * Store reader pointer in f_priv instead of filep
    * Don't need in filep in can_reader_s
2020-01-17 09:46:39 -06:00
raiden00pl
e23d58e86d drivers/sensors/lsm303agr: fix compilation warnings and run through nxstyle; drivers/sensors/lsm6dsl: run through nxstyle 2020-01-16 12:27:18 -03:00
Alan Carvalho de Assis
29f480f57f boards/arm/stm32/stm32f4discovery/: Add board support to external LoRa NiceRF module 2020-01-12 10:59:30 -06:00
Masayuki Ishikawa
784408e617 drivers: serial: Fix a wrong variable in serial.c in SMP mode. 2020-01-10 09:38:51 -06:00
Alin Jerpelea
275f4baf9f Fix USB issues
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on .c and .h files and fix it

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    drivers: usbdev: minor fix

    drivers: usbdev: usbmsc full speed not available

      Change transfer size to be based on maxpacket size.

    drivers: usbdev: Fix string ID calculation

      For *_STRBASE defines, it already unnecessary because composite device setup
      has been changed, it would be calculated by *_composite.c in board sources.

    drivers: usbdev: Fix invalid/unsupported command processing

      Mass Storage Class shall stall when invalid or unsupported commands
      has been recieved.

    drivers: usbdev: Remove unnecessary reset logic

    drivers: usbdev: Flags comparison fix

    drivers: usbdev: Descriptor type mismatch fix when dual speed is enabled
2020-01-10 12:09:05 -03:00
Adam Feuer
237c0cca09 CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained #68
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle against .c .h files and fix it

Author: Adam Feuer <adam@starcat.io>

Summary

    Adds CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained
      (and maybe other boards) (most of the code was there already,
      but didn't work out of the box for the SAMA5D36-Xplained)
    Only SAMA5D36-Xplained has been tested so far

Impact

    None if you don't use the CDC ECM Ethernet driver
    On SAMA5D36-Xplained, this adds high-speed Internet connectivity
      over USB 2.0 High Speed. via the USB CDC ECM Gadget driver.
    It may work on other boards too.
    This also fixed full-speed (low-speed) mode for the board too.

Limitations

    Hasn't been tested on anything other than SAMA5D36-Xplained board.

TODO

    Ideally this would include a composite RNDIS device so it would
      also work seamlessly on Windows. That is for a future PR
    Ideally this would include software to help configuration via
      mDNS/DNS-SD for plug and play compatibility with Linux and macOS.
      That is for a future PR.

Detail

    Only a few lines of C driver code needed to be changed, since the
      capability was there already. The rest is config and documentation.
    Changes the SAMA5D3-Xplained board bringup to match the SAMA5D3-EK
      board bringup
    A helper script to configure Linux routing and iptables NAT is also
      provided, along with documentation on how to use it.

Testing

    Manual, on a Ubuntu Linux 19.10 system and MacOS 10.14.6 Mojave
      MacBook Pro.

How To Verify

    Follow the new CDC ECM Ethernet over USB instructions in the board
      README.txt file

Commits:

    remove non-UTF-8 chars in comment and reformat

    removed unneeded comment markers

    instructions for using the defconfigs

    removed EMAC from config

    - to prove this example only needs the CDC ECM Ethernet over USB to work

    added CDC-ECM Ethernet over USB info to README

    added U-Boot image

    added netusb helper script

    - this can configure the Linux network interface and routes
      so you can ping or access the NuttX system via TCP/IP.

    renamed defconfig dirs to be ethernet-over-usb

    - was usb-over-ethernet which is not right

    added USB DMA to defconfigs

    updated readme with autoboot and debugging info

    bringing ethernet-over-usb examples into parity

    added cdc ecm ethernet over usb with telnetd config

    added defconfig

    only use phy interrupt if netdevices is ethernet

    - because now netdevice could be CDC ECM ethernet over usb
      which has no PHY interrupt

    add bringup to Makefile

    add bringup

    app init cleanup

    init cdc ecm driver and rndis driver; some cleanup

    fixed some typos and odd characters

    usb over ethernet working over usb 2.0 hs
2020-01-10 07:13:37 -03:00
Xiang Xiao
fbad85000f Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c introduced by 6a3c2ade
Report by juniskane

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-09 15:30:01 -03:00
Alin Jerpelea
ecfdd6e056 smartfs improvements #66
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on all .c and .h and fix all issues

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    drivers: mtd: smart: Add smartfs fsck feature

    Support fsck to check and repair the smartfs file system. If the power
    loss occurs during writing into the flash, the dead space are created
    in flash after the next power cycle. To avoid this problem, introduce
    fsck and keep the consistency of file system in initializing smartfs.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

commit 60927c5fb6a353994341601f55071c618e97682b
Author: Alin Jerpelea <alin.jerpelea@sony.com>
Date:   Thu Dec 28 18:27:21 2017 +0900

    drivers: mtd: smart: Fix duplicate sector selection in SmartFS

    Add care for 16-bit sequence without CRC.

    drivers: mtd: smart: Check CRC of duplicate sectors

    In the illegal case by power-loss, when the multiple logical sectors are
    duplicated, we compare the sequence number of each sector and select the newer
    sector. Just in case, add CRC check for the newer sector. If the newer sector
    has CRC error, then we use the older sector.

    drivers: mtd: smart: SPI-Flash recovery from the initial error state

    The FLASH may be not erased in the initial delivery state.
    Just in case for the recovery of this fatal situation,
    after once erasing the sector, return the sector as a free sector.

    drivers: mtd: smart: Fix error handling in smartfs mtd driver

    Add error handling in relocate sector.

    drivers: mtd: smart: Fix initialize sector sequence value in smartfs

    Fix initialization of sequence value into sector header and also avoid
    unaligned memory access when CONFIG_MTD_SMART_ENABLE_CRC=n.

    drivers: mtd: smart: Fix handling of duplicate sector in smartfs

    In smartfs scan, if duplicate logical sector is found on the device,
    then smartfs selects the winner sector by comparing sequence number,
    and the loser sector is soon released. Fix a bug this loser sector
    is registered into logical-to-physical sector mapping table.
2020-01-09 10:14:39 -03:00
liuzhao
dc5d8f7c44 Add Quectel EC20 4G LTE Module USB CDC/ACM support
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle to check .c and .h files and fix reported issues

Author: liuzhao <happypapa@yeah.net>

    Add Quectel EC20 4G LTE Module USB CDC/ACM support
2020-01-09 08:00:05 -03:00
Gregory Nutt
9d5d60fee1 Run all .c and .h files in last PR49 through nxstyle. 2020-01-07 09:54:35 -06:00
Alin Jerpelea
a8d63c0cec various fixes (#49)
* libs: libc: math: Fix tanh() math functions
* drivers: mtd: smart: Fix trivial debug message in smartfs
* binfmt: libelf: Fix fd not closed on error
* binfmt: Fix stack memory leak on error
* fs: romfs: Fix private data not free on error
* sched: group: Fix reference after free memory
* sched: clock: Fix clock sync

Fix clock sync when CONFIG_RTC_HIRES is enabled
2020-01-07 09:06:02 -06:00
Xiang Xiao
926a41feba bcm43xxx: correct typo error to fix build break in photon board (#45)
Change-Id: I340b8d6d939b5049d25789d04c4a334bc97b1067
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-07 07:12:08 -03:00
Mateusz Szafoni
d644567dff sx127x: fix some coding standard problems (#36) 2020-01-04 08:58:47 -03:00
Xiang Xiao
d612fd3dc5 Squashed commit of the following:
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run all .h and .c files modified in last PR through nxstyle.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)

    result by commit 6a3c2aded6

    Change-Id: I68ba79417d8da102da8d91c74496961aef242dd9
    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-03 11:38:02 -03:00
raiden00pl
9b2fa8152c drivers/sensors/lsm6dsl.c: fix various compiler warnings 2020-01-03 08:09:26 -06:00
Xiang Xiao
91d483591d drivers/modem/altair/altmdm_sys.c: Fix modem/altair semaphore related compiler warning 2020-01-02 20:37:48 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Xiang Xiao
3187dde36c fix sim:bluetooth compiler error (#18)
wireless/bluetooth/bt_null.c:274:10: warning: implicit declaration of function 'bt_driver_register'; did you mean 'bt_netdev_register'? [-Wimplicit-function-declaration]

   return bt_driver_register(&g_bt_null);

sim_bringup.c:324:9: error: too few arguments to function 'bt_netdev_register'

   ret = bt_netdev_register();
2019-12-31 09:30:44 -06:00
Xiang Xiao
87cf5c58ae Correct some problems with network timed events when there are multiple network devices in the configuration.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>

    Ran nxstyle against many of the affected files.  But this job was too big for today.  Many of the network drivers under arch are highly non-compiant and generate many, many faults from nxstyle.  Those will have to be visited again another day.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    This effects all network drivers as well as timing related portions of net/: devif_poll_tcp_timer shouldn't be skipped in the multiple card case.  devif_timer will be called multiple time in one period if the multiple card exist, the elapsed time calculated for the first callback is right, but the flowing callback in the same period is wrong(very short) because the global variable g_polltimer is used in the calculation.  So let's pass the delay time to devif_timer and remove g_polltimer.
2019-12-24 10:37:30 -06:00
chao.an
5875f07a21 drivers/wireless/ieee80211/bcm43xxx/: Correct parameters passed to wd_start() in all calls. 2019-12-13 08:08:13 -06:00
Nathan Hartman
9655730ef8 Fix various typos and spelling errors. 2019-12-12 07:41:51 -06:00
Juha Niskanen
abdafaeccc drivers/power: Fix PM build failure with CONFIG_PM_GOVERNOR_MEMORY==1 2019-12-10 07:34:59 -06:00
Gregory Nutt
9e4602a2f4 drivers/mtd: Apply tools/nxstyle to a few files. Lots more to check. 2019-12-07 08:25:16 -06:00
Gregory Nutt
2761279839 drivers/bch, pipes, timers: Run drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-06 23:36:33 -06:00
Gregory Nutt
d1584d60a2 drivers/sensors: Run all sensor drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-06 19:07:34 -06:00
Gregory Nutt
715383adc7 Minor addition to commit cbde36e406 2019-12-05 15:20:48 -06:00
Gregory Nutt
cbde36e406 drivers/analog: Run all wireless drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-05 15:13:55 -06:00
Gregory Nutt
2a83c0808c drivers/net: Run all wireless drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-05 14:54:50 -06:00
Gregory Nutt
504b0e8b5b drivers/wireless: Run all wireless drivers through tools/nxstyle, correcting as many complaints as possible. 2019-12-05 11:49:12 -06:00
David Sidrane
f822107efb drivers/serial/Kconfig: Split serial Rx/Tx DMA. 2019-12-03 07:06:30 -06:00
Gregory Nutt
4e2b2e8ce7 Coding standard corrections in last PR. 2019-12-02 08:42:50 -06:00
kyChu
db49e62118 Merged in kyChuGit/nuttx/aht10_sensor (pull request #1084)
add new driver support for the ASAIR AHT10 temperature and humidity sensor

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-02 14:36:09 +00:00
Gregory Nutt
4465916c5e drivers/mmcsd/mmcsd_sdio.c: Correct typo noted in Issue 180 2019-11-30 09:27:55 -06:00
Gregory Nutt
108ffe7044 Within the OS, nxisg_sleep() should be used instead of sleep(). sleep() is a cancellation point and sets the errno value. Neither of which should be done inside the OS. 2019-11-29 19:03:24 -06:00
Gregory Nutt
244437257b drivers/: Within the OS, nxisg_usleep() should be used instead of usleep(). usleep() is a cancellation point and sets the errno value. Neither of which should be done inside the OS. 2019-11-29 17:37:39 -06:00
Ouss4
a284896ce1 drivers/mtd/sst26.c: Default memory type is 0x26. 2019-11-23 08:49:51 -06:00
kyChu
03a47a5fbd Merged in kyChuGit/nuttx/driver_update (pull request #1073)
Driver update

* drivers/mtd/Make.defs:  Add MTD driver for QuadSPI-based Winbond NOR FLASH

* stm32l4/stm32l4_qspi.c:  the "QSPI_DMA_PRIO" has been defined above

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-21 12:10:49 +00:00
kyChu
261a6ff758 Author: Gregory Nutt <gnutt@nuttx.org>
Misc changes made following recommendatinos of tools/nxstyle.

Author: kyChu <hello.kychu@gmail.com>

    drivers/mtd/w25qxxxjv.c:  Add QSPI-based Winbond NOR FLASH driver
    drivers/mtd/Kconfig:  include w25qxxxjv mtd driver to menuconfig
    mtd/mtd.h:  add function prototype of w25qxxxjv_initialize
2019-11-20 17:25:40 -06:00
Gregory Nutt
3473ce91a9 drivers/serial/Kconfig: Fix a syntax error in CONFIG_RPMSG_SERIALINIT default. 2019-11-16 11:27:28 -06:00
Juha Niskanen
99a501b668 drivers/syslog/ramlog.c: Fix ramlog readers never woken up when using ramlog as syslog or console.
We also make an attempt to avoid the thundering herd problem if there are multiple readers/pollers.

Patch also removes forcing CONFIG_RAMLOG_CRLF in nuttx/syslog/ramlog.h as there is no point of wasting precious RAM for useless characters.
2019-11-14 07:40:35 -06:00
ligd
efaba3be7d drivers/mtd/gd25.c: Add gd25_lock/unlock to case: enable 4-bytes address. 2019-11-12 09:02:19 -06:00
ligd
bf98b28737 drivers/mtd/gd25.c: Add gd25_lock/unlock to case: enable 4-bytes address 2019-11-12 09:01:10 -06:00
ligd
a3646986ea drivers/power/activity_governor.c: Fix timer can't start when meet very small pmtick. 2019-11-12 08:18:32 -06:00
ligd
12b93898d1 drivers/rptun/rptun.c: vring size should also be aligned. 2019-11-11 09:11:17 -06:00
Xiang Xiao
fa264ff7e7 drivers/rptun/rptun.c: Refine the start/stop flow to support the repeat boot. 2019-11-11 09:09:40 -06:00
Xiang Xiao
800b08b2aa drivers/rptun/rptun.c: Refine the rptun naming. 2019-11-10 08:45:14 -06:00
Gregory Nutt
a9ef2b4208 tools/nxstyle.c: Eliminate false positive 'Invalid character after asterisk in comment block'. 2019-11-09 12:10:43 -06:00
Gregory Nutt
c2cbcd24a4 Remove some headers from emtpy sections. 2019-11-09 09:19:51 -06:00
Matias Nitsche
e118d99bf5 drivers/power/pm: Historically, the NuttX PM subsystem has consisted of two functional components: (1) an "Upper" part that detects state changes based on a random walk driven by activity levels, and (2) and "lower" part that implementst the state changes.
This change decouples that upper activity-based logic from the lower random walk logic and allows use of other upper state detection logic (such as a custom, application-specific state machine).
2019-11-09 09:09:33 -06:00
Juha Niskanen
219d99451a drivers/syslog/syslog_device.c: Fix assert that assumes re-opened syslog file is the same. Logic in syslog_file_channel() is calling syslog_initialize() for the default syslog device as a recovery action after failed syslog_dev_initialize(). 2019-11-08 07:43:24 -06:00
Matouš Pokorný
4d59d6cbcc drivers/mtd/mtd_progmem.c: Small typo fix. 2019-11-07 07:46:22 -06:00
ligd
6710ba47d8 drivers/serial/serial_dma.c: Still need reset xmit buffer when meet TCOFLUSH. This is an amendment to 8fb19a4359. 2019-11-07 06:40:21 -06:00
Gregory Nutt
c8831ac3c8 drivers/serial/serial_io.c and serial_dma.c: Fix some long lines. 2019-11-06 07:10:24 -06:00
ligd
8fb19a4359 drivers/serial/serial_dma.c: Avoid uart_xmitchars_done() move the tail bigger then head. If ioctl(TCOFLUSH) occurs between uart_xmitchars_dma() and uart_xmitchars_done(), TCOFLUSH will reset xmit buffer, then uart_xmitchars_done() will move the 'tail' ahead of 'head', then sends lots of wrong data. 2019-11-06 07:07:30 -06:00
Gregory Nutt
3e8366775f Run tools/nxstyle against some files. 2019-11-05 19:39:36 -06:00
Xiang Xiao
3a32937b9b drivers/wireless/ieee80211/bcm43xxx: Move drivers/wireless/ieee80211/ to drivers/wireless/ieee80211/bcm43xxx/
since the directory only contains only BCM43362 and BCM43438 related code.
2019-11-05 15:38:01 -06:00
David Sidrane
f078a2496b drivers/serial/serial_io.c: Uses signal numbers, but does not include signal.h. This has not problems but missing signal definitions have been seen in certain cases. 2019-11-04 16:24:41 -06:00
Alin Jerpelea
7153598124 Merged in alinjerpelea/nuttx (pull request #1066)
drivers: modem: altair: auto select SPI

The Altair hardware is connected to SPI and will not work without SPI support
The SPI_EXCHANGE is automaticaly enabled (default y) when SPI is selected.

Since SPI is mandatory it should be auto selected

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-04 14:24:44 +00:00
ligd
3480f7a0bc drivers/serial/serial.c: Only real uart will call pm_activity(). 2019-11-03 19:56:28 -06:00
Xiang Xiao
0c50499027 drivers/addrenv.c: Move up_addrenv_ implemenation to common folder. 2019-11-03 19:45:05 -06:00
Petro Karashchenko
e805bc0660 Various drivers: Cloned logic. On error, memory was freed, but the error was not returned. It just continued as though no error happened. 2019-11-03 19:31:49 -06:00
Xiang Xiao
5d2db59424 drivers/rptun/rptun.c: Switch open/close/seek/read to file_* version. 2019-11-03 07:33:04 -06:00
Xiang Xiao
383ce02442 drivers/rptun/rptun.c and fs/hostfs/hostfs_rpmsg.c: Fix 64-bit build issue in rpmsg driver. 2019-11-03 07:28:17 -06:00
Guiding Li
8b92305265 This commit brings in the drivers needed to support OpenAMP. These changes were ported from https://github.com/FishsemiCode/nuttx. The current state: Most drivers do now compile but are not yet verfied.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.

Squashed commit of the following:

Author: Xiang Xiao <xiaoxiang@pinecone.net>
    include/nuttx/b2c.h and libx/libc/string:  Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.

Author: Gregory Nutt <gnutt@nuttx.org>
    Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
    Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
    tools/:  Fix the minor issue in Makefile

Author: Gregory Nutt <gnutt@nuttx.org>
    drivers/rptun/rptun.c:  Review for coding standard.  Run against tools/nxstyle.
    tools/LibTargets.mk:  Fix some TABs that were turned into spaces by a copy-paste.
    fs/hostfs:  Add configure and build support for hostfs RPC.
    drivers/timer:  Add configure and build support for syslog RTC.
    drivers/syslog:  Add configure and build support for syslog RPC.
    drivers/serial:  Add configure and build support for serial RPC.
    Kconfig, tools/*.mk. openamp/:  Add basic OpenAMP build support.
    drivers/rptun:  Add configure and build support for OpenAMP tunnel drivers.
    drivers/net:  Update Make.defs and Kconfig for OpenSDA support.
    Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c.  These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux.  Removed because we want to separate the activities.  We will just try to get the basic OpenAMP support in place for now.
    Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h.  These are specific to the Xiaomi application.

Author: zhuyanlin <zhuyanlin@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Jianli Dong <dongjianli@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.

Author: Guiding Li <liguiding@pinecone.net>
    This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx.  Initial commit is source files only.  Additional changes to Kconfig and Make.defs files still needed.
2019-11-02 11:30:33 -06:00
Gregory Nutt
0002258f17 drivers/mmcsd/mmcsd_sdio.c: Commit 29612c40c5 slipped on by me: None of the common code may include ANY GCC dependencies. Fixed appropriately by adding a definition for the compiler dependency in include/nuttx/compiler.h. 2019-10-31 18:02:14 -06:00
Juha Niskanen
dc3edca5a7 drivers/mtd/gd25.c: spi_devid argument was not used in initialization. Commit 4fc41b55b to GD25 driver was always using priv->spi_devid initialized to zero by kmm_zalloc(). This commit initializes it from the supplied function argument. 2019-10-31 07:43:21 -06:00
David S. Alessio
29612c40c5 drivers/mmcsd/mmcsd_sdio.c: Align DMA buffer for MBURST size. 2019-10-31 07:18:47 -06:00
David Sidrane
43a3a0f400 Merged in david_s5/nuttx/master_k66_ethernet (pull request #1064)
NXP k66 Ethernet

* Kinetis:Add TJA1100 Phy

* Kinetis:enet.c formated with nxstyle

* net:mii Cleanup TJA1100 Support

      Formating and adding mask and shifts

* net:Kconfig Cleanup formatting

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-30 18:29:54 +00:00
Gregory Nutt
e3665c1fb4 drivers/wireless/ieee80211: Add tools/nxstyle to all of the C files in this directory. 2019-10-29 16:56:24 -06:00
Gregory Nutt
2a22a64f36 drivers/wireless/ieee80211/mmc_sdio.c: In sdio_io_rw_extended(), the behavior of the DMA setup differs, depending on the hardware capability SDIO_CAPS_DMABEFOREWRITE. If this capability is set, then the DMA setup much be done before the transfer setup. Dave Marples modified this file for the i.MXRT USDHC which does have the SDIO_CAPS_DMABEFOREWRITE (commit 970295d0fe). Xiao Xiang reports that this change breaks the Wifi on the Photon which does not report the SDIO_CAPS_DMABEFOREWRITE and suggests reverting the change. In reality both changes are correct but must be conditioned on the DMA capability of the underlying SDIO device. 2019-10-29 16:02:33 -06:00
David Sidrane
5f65012449 drivers/mmcsd/mmcsd_sdio.c: Enter a removed card state On a failure. If we fail to read cardstatus in mmcsd_transferready consider this a hard error and set the card to removed. 2019-10-29 10:05:10 -06:00
David Sidrane
b7073a366b drivers/mmcsd/mmcsd_sdio.c: Set wrbusy after success of all the operations. Any failure could leave wrbusy set when it should not be if the operation failed. 2019-10-29 10:03:18 -06:00
Xiang Xiao
824666db9a drivers/wireless/ieee80211/bcmf_chip_43362.c: Fix bcmf_chip_43362 compile error. 2019-10-29 08:01:55 -06:00
Xiang Xiao
4fc41b55b3 drivers/mtd/gd25.c and gd5f.c: Change missed in previous patch set. Without this change, the compiler will complain that spi_devid cannot be found. 2019-10-29 07:48:17 -06:00
Gregory Nutt
2852b3a8c8 drivers/power: Run tools/nxstyle against all .c and .h files in this directory. 2019-10-28 18:28:41 -06:00
DisruptiveNL
41d9365f06 drivers/can/mcp2515.c and boards/arm/stm32/nucleo-f4x1re: MCP2525 SPI STD-EXT ID fixes. Verified on MCP2525 tested on nucleo-f4x1re. 2019-10-28 08:02:15 -06:00
Gregory Nutt
9628582ced drivers/mkrd.c: Fix a warning found in build testing that occurs when CONFIG_DEBUG_INFO is enabled. 2019-10-26 16:54:59 -06:00
Gregory Nutt
6a10254915 drivers/Kconfig: If CONFIG_DRVR_MKRD is selected, then we must also auto-select CONFIG_FS_READABLE. 2019-10-26 16:18:55 -06:00
Gregory Nutt
2549d07494 drivers/Kconfig: If CONFIG_DRVR_MKRD is selected, then we must auto-select CONFIG_FS_WRITABLE. 2019-10-26 15:56:41 -06:00
Gregory Nutt
07edaa088c drivers/Kconfig: Add an option, CONFIG_DRVR_MKRD, to control whether or not the mkrd() implementation is build. Otherwise, if mkrd() is built unconditionally, it will be drawn into every build whether it is used or not and will increase the build size. 2019-10-26 11:43:34 -06:00
Gregory Nutt
03bf18d097 drivers/mkrd.c: Forgot to add file in last commit. 2019-10-26 10:24:04 -06:00
Gregory Nutt
be325924fb This commit corrects a problem with NSH: NSH was calling the OS internal function ramdisk_register() in violation of the portable POSIX interface. This commit solves the problem by introducing a new boardctl() function BOARDIOC_MKRD which moves the RAM disk creation into the OS.
Squashed commit of the following:

    drivers/:  Run tools/nxstyle against all drivers/*.c.

    boards/boardctl.c:  Add new boardctl() command, BOARDIOC_MKRD, that can be used to create a RAM disk.  This will replace the illegal call to ramdisk_register() currently used by NSH.

    drivers/mkrd.c:  Add wrapper around ramdisk_register() for creating a proper ramdisk.
2019-10-26 09:35:32 -06:00
Gregory Nutt
dae3640dc5 drivers/modem/altair/Kconfig: Default for CONFIG_MODEM_ALTMDM should be 'n' and it must depend on CONFIG_SPI_EXCHANGE. 2019-10-25 16:12:59 -06:00
YanLin Zhu
6d63ba711b drivers/mtd/gd25.c: Add 4byte address operation for capacity larger than 128Mbit. 2019-10-25 07:31:41 -06:00
Gregory Nutt
3e4449eb1f drivers/usbhost/Kconfig: Change default for CONFIG_HIDKBD_POLLUSEC per recommendation of Jeff Theusch. 2019-10-23 09:07:23 -06:00
Jeff Theusch
f745166bfd drivers/usbhost/usbhost_hidkbd.c: Fix keyboard debounce algorithm used when CONFIG_HIDKBD_NODEBOUNCE is undefined. 2019-10-23 08:39:09 -06:00
Alin Jerpelea
f7af996f1d Merged in alinjerpelea/nuttx (pull request #1059)
boards: cxd56xx: spresense: add board_timerhook function

* boards: cxd56xx: spresense: add board_timerhook function

    in preparation for SDK we muts have a weak board_timerhook function

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: usbhost: add missing endif

    By accident an endif was missing.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: audio: add build barrier

    The audio implementation should not be beuilt if the config
    CONFIG_CXD56_AUDIO is not set.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arch:arm:cxd56xx: add ge2d.h header

    The header is used by imageproc.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-23 13:12:21 +00:00
Gregory Nutt
ca14affc46 Fix a trivial typo introduced in the last commit. 2019-10-22 17:47:49 -06:00
Gregory Nutt
88de97a926 drivers/usbhost: Remove all traces of support for the installable GPL RTL8187 USB host driver. 2019-10-22 17:44:16 -06:00
Masayuki Ishikawa
7389f86561 Merged in masayuki2009/nuttx.nuttx/stm32f4dis_with_gs2200m (pull request #1057)
stm32f4dis with gs2200m

* drivers: wireless: Add SPI_SELECT() to _read/write_data() in gs2200m.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* boards: stm32f4discovery: Add support for gs2200m

    NOTE: GS2200M for Spresense works with mikroe STM32F4 Discovery Shield (slot3)

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-22 13:38:41 +00:00
Gregory Nutt
230c80b8e1 Cosmetic changes from review of last PR. 2019-10-21 08:51:47 -06:00
Alin Jerpelea
07f9154e5b Merged in alinjerpelea/nuttx (pull request #1056)
boards: cxd56xx: add board support for LTE modem and modem driver

* drivers: modem: add altair modem driver

    Add modem driver for the altair modem

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: add board support for LTE modem

    Add the Altair LTE modem support on the Spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: cxd56xx: spresense: add LTE defconfig

    Add the Altair LTE modem defconfig for spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-21 14:14:33 +00:00
Masayuki Ishikawa
dacd041a94 Merged in masayuki2009/nuttx.nuttx/fix_serial_driver_for_smp (pull request #1052)
drivers: serial: Fix data corruption when outputting data in SMP mode

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-16 13:09:03 +00:00
Masayuki Ishikawa
2c16d756cc Merged in masayuki2009/nuttx.nuttx/gs2200m_with_reset (pull request #1050)
Gs2200m with reset

* include: wireless: Add reset handler to struct gs2200m_lower_s

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* drivers: wireless: Add reset and unreset sequence in gs2200m.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* boards: cxd56xx: Add reset handler to cxd56_gs2200m.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-15 21:03:33 +00:00
Anjana
fae7e63479 We have ported NuttX on Renesas RX65N Micro-controller. This port includes following interfaces
1. Serial (UART) driver (13 ports)
2. Ethernet driver

This port is provided on two boards
1. RSK RX65N-2MB
2. GR-Rose

The port is built on Cygwin environment.

As part of this port, we have created two documents
1. Readme.txt for each board
2. User manual to provide information about development environment setup
Both these documents are placed under
1. /boards/renesas/rx65n/rx65n-grrose
2. /boards/renesas/rx65n/rx65n-rsk2mb

We have run 'nxstyle' for coding guidelines and 'ostest' for testing NuttX features on test platform.
We have shared the log with no errors as confirmation of valid port.
2019-10-11 23:36:57 +08:00
raiden00pl
df1bcc4229 Merged in raiden00/nuttx_sim (pull request #1047)
drivers/pipes/fifo.c: mkfifo should return -1 and set errno on failure

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-10-11 08:03:44 +00:00
Gregory Nutt
6a683b0b54 Fix some typos in comments. 2019-10-11 15:53:17 +08:00
Juha Niskanen
b4f6a3a878 drivers/usbdev/cdcacm.c: Fix memory leak of RX failsafe timer. 2019-10-08 08:01:30 -06:00
Dave Marples
83e458873f drivers/wireless/bluetooth/bt_uart_bcm4343x.c: Fix small a small bug
found during testing.
drivers/wireless/bluetooth/bt_uart_shim.c:  Change the task tname for
the HCI receiver task to bring it into line with the transmitter task.
2019-10-08 07:55:47 -06:00
Xiang Xiao
3bc62f1ccc Change space to tab and help to ---help--- in Kconfig files. 2019-10-05 21:39:12 -06:00
Dave Marples
de70e689cd drivers/wireless/bluetooth/bt_uart_bcm4343x.c: BCM4343x HCIUART support. 2019-10-04 09:29:51 -06:00
Gregory Nutt
d9e47a17b8 Fix a typo introduced with 0dbb22f61c. 2019-10-02 15:31:07 -06:00
Gregory Nutt
0dbb22f61c drivers/wireless/ieee802154/mrf24j40/mrf24j40.c: Correct erroneous isolation of address mode field and subsequent bad comparison. 2019-10-02 12:50:43 -06:00
Gregory Nutt
5058911f46 drivers/crypto/dev_urandom.c: Revert part of fe983a4471. The change was ill informed and introduced warnings when CONFIG_DEV_URANDOM_RANDOM_POOL is selected. As noted by Juha Niskanen in commit comments. 2019-10-01 07:13:19 -06:00
Nathan Hartman
46aaec7ba0 Fix minor typos in docs and comments. 2019-09-29 12:52:20 -06:00
Bernd Walter
338f09acfc drivers/net and net/: Use ntoh() when printing IPv6 addresses so that the addresses appear in friendlier host order vs. network order. 2019-09-24 10:06:42 -06:00
Gregory Nutt
fe983a4471 Minor, cosmetic changes. 2019-09-23 12:58:31 -06:00
Dave Marples
05bbbec3e1 Add support for the BCM43438A1 Bluetooth capability. It also adds a serial 'shim' to allow any regular serial port that can support a Bluetooth H4 interface (i.e. it has RTS/CTS) to be used to drive a Bluetooth device (Get a handle to it via hci_uart_getdevice("/dev/xxx") and then pass it to the btuart_register function.
Most of the bluetooth and wifi chips appear to need external firmware, and the 43438 is no exception. Fortunately, since Cypress got involved, these are much more straightforward to obtain and are shipped as part of their SDK, which is downloadable from their website.  Those firmwares are already provided as C arrays, so their names just need updating to;

const unsigned char bt_firmware_hcd -> The bt firmware array.

const int bt_firmware_len = sizeof(bt_firmware_hcd);
2019-09-21 07:16:37 -06:00
Juha Niskanen
e8b5dd4528 Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
Alin Jerpelea
54ef3efc35 Merged in alinjerpelea/nuttx (pull request #1033)
boards: spresense: Add board initialization for isx012

Add isx012 initialization to the board and include the needed headers

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-18 11:42:35 +00:00
Masayuki Ishikawa
2154a02fa1 Merged in masayuki2009/nuttx.nuttx/fix_comments_in_gs2200m (pull request #1032)
drivers/wireless/gs2200m.c: Fix comments

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-18 11:34:00 +00:00
Juha Niskanen
ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Juha Niskanen
8fa646f0e8 drivers/syslog: syslog_force does not set errno so do not test against it. Some changes to comments. 2019-09-16 07:48:48 -06:00
YanLin Zhu
bcdf9074fe drivers/mtd/gd5f.c: Add gigadevice SPI NAND FLASH driver. 2019-09-15 08:33:22 -06:00
YanLin Zhu
8b10b8ad25 drivers/mtd/gd25.c: Add support for GD25 device with 256-Mbit capacity. 2019-09-15 08:19:06 -06:00
zhangbo_a
636d180219 drivers/mtd/gd25.c: Add support for a new FLASH vendor. 2019-09-15 08:17:19 -06:00
Gregory Nutt
57bd46d931 Fix some typos in the ChangeLog. 2019-09-13 19:01:05 -06:00
Nathan Hartman
366053e464 Fix typos, 1 in a #define, others in comments. This changes one definition: _MQ_TIMEDRECIEVE is changed to _MQ_TIMEDRECEIVE. It appears this symbol is not used anywhere. 2019-09-11 08:56:56 -06:00
Gregory Nutt
cc694e9862 Fix some new warnings found in build testing. 2019-09-10 08:20:53 -06:00
Gregory Nutt
46d435fc65 Various cosmetic changes. 2019-09-09 14:47:47 -06:00
ligd
ead2c26be8 drivers/ioexpander/gpio_lower_half.c: Remove limitation when pintype > GPIO_INTERRUPT_PIN. 2019-09-09 07:36:17 -06:00
Augusto Fraga Giachero
f08ab217b0 drivers/rf/dat-31r5-sp.c: dd support to the DAT-31R5-SP+ digital attenuator. Creates a the new device driver directory drivers/rf/ to support drivers related to RF peripherals. It also adds support for the DAT-31R5-SP+ digital attenuator. 2019-09-05 13:28:28 -06:00
Matous Pokorny
925d16b7b8 drivers/sensors/isl29023.c: Add basic driver of ISL29023 ambient light sensor. The basic driver can set operational mode, range, and resolution. It can also read lux value in continuous mode. Interrupt and the alarm is not implemented. 2019-09-04 11:26:26 -06:00
Augusto Fraga Giachero
68bbc8438c drivers/timers/pwm.c: Move the pwm/pwm.c driver to timers/pwm.c, The drivers/pwm contained only one .c file (pwm.c), so to avoid the proliferation of sub-directories inside drivers/ is better to move the pwm.c driver to drivers/timers. The pwm.h header was moved to include/nuttx/timers to keep consistency, so all files referencing it need to be updated. 2019-09-02 07:57:10 -06:00
Masayuki Ishikawa
fc250074b3 Merged in masayuki2009/nuttx.nuttx/gs2200m_supports_SIOCGIFHWADDR (pull request #1027)
gs2200m supports SIOCGIFHWADDR

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-02 13:08:34 +00:00
Augusto Fraga Giachero
d6ad7ebd47 drivers/sensors/adt7320.c: Add support for the ADT7320 temperature sensor. 2019-08-28 15:35:43 -06:00
Augusto Fraga Giachero
4710ae736c drivers/analog/dac7554.c: Add support to the DAC7554 digital-to-analog converter. 2019-08-28 07:01:17 -06:00
ligd
9fc5db7b39 drivers/timers/rtc: If the RTC time is successfully set, then update the current system time to match. 2019-08-26 10:02:48 -06:00
ligd
8867609ec1 drivers/power/pm_update.c: Fix g_pmcount 16-bits overflow whenCONFIG_PM_XXENTER_COUNT set big value. 2019-08-26 09:51:40 -06:00
Gregory Nutt
cb340cbfdb Correct more uses of C11 features in common code. 2019-08-24 17:59:26 -06:00
Alin Jerpelea
a91d86523c Merged in alinjerpelea/nuttx (pull request #1018)
boards: cxd56xx: add SCU sensors

* drivers: platform: add Avago APDS9930 Proximity and Ambient light Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Rohm BH1721FVC Ambient Light Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Rohm BH1745NUC Color Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Rohm BM1383GLV/BM1383AGLV Pressure Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Rohm BM1422GMV/BM1422AGMV Magnetic Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Bosch BMI160 Sensor support

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Bosch BMP280 Barometic Pressure Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Kionix KX022/KX122 Acceleration Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Murata LT1PA01 Proximity and Ambient light Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: spresense: add Rohm RPR0521RS Proximity and Ambient light Sensor

    This sensor is connected to the SCU on spresense board

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: sensors: bmi160: add optional I2C address

    Add a menu option for the case when the SDO pin is pulled to VDDIO

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-22 12:49:05 +00:00
Gregory Nutt
962ccb0f68 arch/arm/src/s32k1xx: This is a rough port of the i.MXRT Ethernet driver to the S32K1xx. The i.MXRT uses the same IP. Completely untested at this point. 2019-08-21 17:33:54 -06:00
Gregory Nutt
7ad9dfb610 drivers/mtd/mx25lx.c: Minor changes to conform to coding standard detected by tools/nxstyle. 2019-08-21 16:16:39 -06:00
jjlange
7b6cff6f84 Merged in jjlange/nuttx/mx25l_4B (pull request #1016)
Add support for 4-byte addressing on >128Mb Macronix flash parts

* Save CONFIG_ARCH_BOARD_CUSTOM when running 'make savedefconfig'

* Only use PCLKSEL0 for ADC on LPC176x family.

* Made grep search expression more specific.

* Added missing '=' to second grep

* Revert "Only use PCLKSEL0 for ADC on LPC176x family."

    This reverts commit 835b5e9d6fcbea02cb0203c063b0e121fa57ba9e.

* Revert "Added missing '=' to second grep"

    This reverts commit 38b51f0c6d9612de755c102a53846ca7488cdf14.

* Added a missing '=' in the second grep statement

* Added support for 4-byte addressing on >128Mb Macronix flash parts

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-21 22:09:45 +00:00
Gregory Nutt
6ddd4752b0 Eliminate new warnings found in build testing. 2019-08-21 13:45:31 -06:00
Gregory Nutt
cc945b00e0 drivers/mmcsd/mmcsd_sdio.c: Correct a misplaced #endif. 2019-08-21 11:22:59 -06:00
Nathan Hartman
be5a40c656 Fix typos in comments. 2019-08-21 09:32:59 -06:00
Ivan Ucherdzhiev
f2c6a3f108 drivers/mmcsd/mmcsd_sdio.c: Copy/paste error fix for MMC. 2019-08-21 09:26:54 -06:00
Ivan Ucherdzhiev
19c070e0d1 drivers/mmcsd: Added support for MMC(eMMC) bigger than 2 GB (Tested with IMXRT1050EVKB and samsung eMMC 16GB). arch/arm/src/imxrt: IMXRT uSDHC driver cmd line reset logic modified. 2019-08-21 09:23:29 -06:00
Gregory Nutt
fe6f9b1f24 drivers/eeprom/i2c_xx24xx.c: Cosmetic changes for issues detected by tools/nxstyle and review of PR. 2019-08-21 07:48:28 -06:00
David Alessio
885bf254e9 Merged in david_alessio/nuttx/feature/devc-at24cs-uuid (pull request #1013)
register a character driver for UUID of AT24CSxx chips

Allows the UUID to read as a file or displayed from an nsh prompt
with:  hexdump /dev/eeprom.uuid

Approved-by: Alan Carvalho de Assis <acassis@gmail.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-21 13:41:16 +00:00
Alin Jerpelea
c6355f58d6 Merged in alinjerpelea/nuttx (pull request #1014)
boards: add stub drivers folder for later use

* boards: add stub drivers folder for later use

    The board/drivers folder is added for future use.

    In this folder we should place drives that are platform specific and
    depend on HW that is present only on a specific platform.

    NOTE: All shared drivers should go to the regular driver folder
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* tools: shift BOARD_DIR one level up

    In preparation for drivers and common folders we are moving the
    BOARD_DIR path up one level.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* tools: add drivers/platform symlink

    Link the boards/<arch>/<chip>/drivers dir to drivers/platform

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* drivers: add platform specifc drivers extension

    There are platforms that use specific drivers and we should be able to
    include those drivers in the build

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* board: cxd56xx: drivers: add AK09912 driver for SCU

    This is a platform specific driver connected on the SCU unit.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-21 13:39:29 +00:00
Anthony Merlino
c184d8fca3 Merged in antmerlino/nuttx/xbee-iobuser-fix (pull request #1010)
xbee: Fixes one instance of the use of IOBUSER_WIRELESS_MAC802154 which isn't available without the software MAC layer. Instead we use IOBUSER_WIRELESS_RAD802154 throughout the whole driver since it is always available when IEEE 802.15.4 support is enable

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 22:50:21 +00:00
Anthony Merlino
c024a1f569 Merged in antmerlino/nuttx/xbee-prefix (pull request #1009)
drivers/ieee802154/xbee: Add configuration option for setting the default prefix to use when bringing up the network and setting the IP address.

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 22:24:32 +00:00
Nathan Hartman
985dea60a1 Fix some typos in README.txt files. 2019-08-19 11:30:12 -06:00
Michael Jung
469859b9f1 Kconfig, include/debug.h, and drivers/contactless: Add debug macros for contactless. The various contactless device drivers currently define device specific debug macros within their local header files. This patch adds generic ctls[info|warn|err] macros for the overall contactless subsystem to be used in future drivers. Ported the two currently available contactless device drivers (mfrc522.c and pn532.c) to these generic logging macros and fixed some logging bugs
along the way.
2019-08-19 11:27:23 -06:00
Anthony Merlino
70404ed0dc Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
Iobinstrumentation

* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.

* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.

* fs/procfs: Starts adding support for /proc/iobinfo

* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 22:42:25 +00:00
Anthony Merlino
b4c103053d drivers/wireless/ieee802154/xbee: Detect lockup and reset XBee in xbee_req_data 2019-08-16 16:24:14 -04:00
Anthony Merlino
3529be7d9b drivers/wireless/ieee802154/xbee: Cancel query timeout upon receiving the expected response. Add protection for race condition that can cause association timeout to continue firing repeatedly 2019-08-16 16:23:27 -04:00
Anthony Merlino
bc60397e48 drivers/wireless/ieee802154/xbee: Adds CONFIG_XBEE_LOCKUP_WORKAROUND option and corresponding logic to workaround an issue where the XBee locks up and stops responding.
This typically happens when there is a lot of data being received over the link. When the XBee stops responding, many times, querying the XBee kicks it out of this state. However, occasionally the XBee is completely locked up and the XBee has to be reset. This change handles these conditions by periodically (if not naturally occuring) querying the XBee. If during any query, the XBee does not respond within a certain number of attempts, the XBee is reset.
2019-08-16 16:23:12 -04:00
Anthony Merlino
8fc7ee9cec drivers/wireless/iee802154/xbee: Support "WR" AT command for writing parameters to non-volatile memory. 2019-08-16 16:21:31 -04:00
Anthony Merlino
aad2fae1a1 drivers/wireless/ieee802154/xbee: Initialize the short address to the unspecified address and query for the extended address on init. 2019-08-16 16:21:31 -04:00