Commit Graph

3053 Commits

Author SHA1 Message Date
Gregory Nutt
851d683571 drivers/wireless/ieee80211/bcmf_sdpcm.c: Remove incorrect OR condition. Always true, would always cause allocation failure. Noted by Shao Li in Issue 127. 2018-10-26 05:26:26 -06:00
Gregory Nutt
bde9b10b1d drivers/wireless/ieee80211/bcmf_core.c: There were two functions that have a address issue. In bcmf_read_sbreg and bcmf_write_sbreg, SBSDIO_SB_OFT_ADDR_MASK should be used before map address space. Noted by Shao Li in Bitbucket issue #126. 2018-10-25 06:52:02 -06:00
Dave Marples
ba95cfe067 Eliminate some warnings. 2018-10-25 06:48:11 -06:00
Dave Marples
d1c01e1135 With these changes the SDMMC card for LPC4330 is now working properly BUT it needs more testing, especially with different cards etc. This code should be applicable to all members of the lpc43xx family.
In addition to the problems that were previously identified there were a few other bits and pieces outstanding;

  * Timing was dependent on CPU speed rather than absolute time
  * End of transfer handling was a bit mixed up
  * It's possible for data to still be in the FIFO (i.e. not have reached
    the card) when a next write is requested, so we need to wait for that to
    complete
  * Interrupt Status could be carried over from one transfer episode to the
    next, corrupting progress
  * Multi-descriptor DMA writing simply wasn't implemented, but there were no
    indications ... it just failed silently
2018-10-24 18:06:38 -06:00
Sakari Kapanen
dafa180d8d nuttx/drivers/usbdev/rndis.c: Account for CONFIG_NET_GUARDSIZE in allocation of packet buffer
nuttx/drivers/usbdev/rndis.c:  Make USB device parameters configurable
2018-10-24 09:06:09 -06:00
Gregory Nutt
805c1bc2b9 Cosmetic changes for coding standard fixes. 2018-10-20 18:15:44 -06:00
Daniel P. Carvalho
3abe871a80 drivers/sensors/ina226.c: Add INA226 device driver. 2018-10-19 09:04:56 -06:00
Ken Pettit
aa9771751b drivers/mtd/s25fl1.c: During a MTDIOC_GEOMETRY ioctl call, the driver was incorrectly reporting the blocksize to be the same as the erasesize. The blocksize should be 256 (the page size). This patch fixes that, and now the SmartFS configration is working. 2018-10-18 07:02:02 -06:00
David Sidrane
9547b186df Merged in david_s5/nuttx/Lampoo-master-spi-flash (pull request #735)
drivers/mtd: add support to Macronix MX25LF25635F serial NOR flash

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-17 23:24:45 +00:00
Gregory Nutt
68c8a4c5a2 Update TODO list, Kconfig help text. 2018-10-08 14:45:00 -06:00
Gregory Nutt
378aa1a055 drivers/wireless/ieee80211/Kconfig: Update Kconfig help text. 2018-10-08 09:03:42 -06:00
Gregory Nutt
31e4981192 drivers/wireless/ieee802.11: Extend Add capabilility to get firmware from a mounted file system to BCM43362. Also fix some compile/link issues introduced in the previous commit. 2018-10-07 15:00:13 -06:00
Ramtin Amin
b539d04cfb drivers/wireless/ieee802.11: Add capabilility for Broadcom chips to get firmware and CLM data from a mounted file system vs. in-memory data structures. 2018-10-07 10:03:39 -06:00
Alan Carvalho de Assis
c4a906aef4 drivers/leds/max7219.c: Support all digits presented in the MAX7219 datasheet. 2018-09-29 11:16:45 -06:00
Dave Marples
91eb792e56 Corrections for the i.MXRT Ethernet:
(1) Now the Ethernet is completely re-initialized when an error occurs by means of taking the interface down and back up but the PHY is _not_ renegotiated for that case because that is very time consuming and an error in the Ethernet is no reflection on the state of the PHY anyway.

(2) Explicitly sets the expected PHY address to zero (this could be moved into the config) rather than searching for it which takes ages, and it's zero anyway for this board (that's the broadcast address, and anything that cannot respond on that has multiple PHYs, so that would be a new board).

(3) Allows for the renegotiation of the PHY to be optional when a reset is needed. If a non-renegotiated reset doesn't result in good comms to the PHY then it'll automatically be escalated to a renegotiated one.

(4) Only performs a reset for errors that need it (the CRITICAL_ERROR define).  The list of errors that need reset are somewhat arbitrarily chosen based on my prejudices and might need to be revisited, but certainly the jabber errors don't need reset, the partial packet is thrown away by the layer above anyway.

(5) Re-loads the multicast table on reset.

(6) Adds a bit more logging into the imxrt Ethernet module.
2018-09-28 07:25:48 -06:00
Gregory Nutt
6d2cce99e1 fs/spiffs: Fix more problems found in testing. It is getting closer but examples/fstest is still showing problem. 2018-09-26 10:05:43 -06:00
Harri Luhtala
2d750d461b drivers/net/enc28j60.c: Adjust debug trace levels. Correct typos in some comments. 2018-09-25 07:07:04 -06:00
Gregory Nutt
b823fd83bd arch/arm/src/armv7-a: Replicate the same fix was previously commited for the armv7-r. 2018-09-20 21:40:29 -06:00
EunBong Song
0f18e8cc32 Merged in ebsong/nuttx (pull request #722)
Pull request for mtd/progmem refactoring.

* mtd/progmem: change up_progmem_npages to up_progmem_neraseblocks

    page is a unit for read/write operation.
    eraseblock is a unit for erase operation.
    up_progmem_npages is a little bit confusing because it returns number of
    erase blocks in flash memory. This patch changes up_progmem_npages to
    up_progmem_neraseblocks. There is no logical change.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* mtd/progmem: up_progmem_erasesize.

    Change argument name to be more readable.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* mtd/progmem: up_progmem_eraseblock

    Change up_progmem_erasepage to up_progmem_eraseblock.
    eraseblock is more readable name than erasepage.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* mtd/progmem: change up_progmem_eraseblock's return value.

    up_progmem_eraseblock erase a block. so it's better to return the erase block
    size than page size.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/cortex-r : fix wrong cp15_flash_dcache.

    change mcrne to mcr for unconditional dcache.

    Signed-off-by: sungduk.cho <sungduk.cho@samsung.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-21 03:18:38 +00:00
Masayuki Ishikawa
03f5e8e5c2 Merged in masayuki2009/nuttx.nuttx/fix_rndis (pull request #721)
drivers/usbdev: Fix buffer overrun check in rndis.c

The rndis driver has been working since 13 Nov 2017.
However, I finally found that it depends on network and buffer
configurations. If a receiving TCP packet is devided into smaller
ones based on USB max packet size, this condition check works
correctly.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-20 12:50:58 +00:00
Juha Niskanen
3d14b63e8f drivers/timers: RTC_PERIODIC is no longer EXPERIMENTAL, remove unimplemented EXPERIMENTAL RTC configuration variables. 2018-09-17 06:27:37 -06:00
raiden00pl
af8a002a10 Merged in raiden00/nuttx_h7 (pull request #720)
I2C support for STM32H7

* stm32h7/chip.h: update peripherals

* stm32h7x3xx_rcc.h: update definitions

* stm32h7x3xx_rcc.c: remove some unused code and configure I2C clocks

* stm32h7: add lower half I2C driver (based on F7 I2C driver)

* configs/nucleo-h743zi: add LSM303AGR and LSM6DSL configuration

* Remove whitespace

* sensors/lsm303agr.c, sensors/lsm6dsl.c: add mising include, remove whitespace

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-16 15:58:25 +00:00
Gregory Nutt
3a4984a40b Rename file_close_detached() to juse file_close() for better consistency in naming. 2018-09-15 13:04:56 -06:00
Gregory Nutt
b48f46f1c8 Correct some errors found in build testing using recent commits. 2018-09-15 12:47:54 -06:00
Gregory Nutt
a83b6d990b Replace callse to ioctl() in the OS to file_ioctl() 2018-09-15 11:47:24 -06:00
Gregory Nutt
a7fd58c4db Squashed commit of the following:
many locations:  Change occurences of open() followed by file_detach() to file_open().  Change most non-controversion calls to open() to nx_open().

    fs/inode/fs_fileopen.c:  Flesh out file_open() with some interim, placeholder logic.

    fs/inode/fs_fileopen.c:  Add a framework for a file_open() implementation (no real logic in place yet).

    fs/vfs/fs_open.c:  Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
Gregory Nutt
9546481054 Fix some typographical errors. 2018-09-14 06:55:45 -06:00
Gregory Nutt
993321dda6 drivers/serial: Add support for Ctrl-Z. This works just like the recently added Ctrl-C support except that SIGSTP is sent when the Ctrl-Z characters is encountered vs. SIGINT. 2018-09-02 15:36:25 -06:00
Ouss4
adda352b15 drivers/sensors/dhtxx.c: Driver for DHTxx sensor. 2018-09-01 07:25:30 -06:00
Gregory Nutt
a7265d71c6 This commit adds support for default signal actions for SIGSTOP, SIGSTP, and SIGCONT.
Squashed commit of the following:

    Add procfs support to show stopped tasks.  Add nxsig_action() to solve a chicken and egg problem:  We needed to use sigaction to set default actions, but sigaction() would refuse to set actions if the default actions could not be caught or ignored.

    sched/signal:  Add configuration option to selectively enabled/disable default signal actions for SIGSTOP/SIGSTP/SIGCONT and SIGKILL/SIGINT.  Fix some compilation issues.

    sched/sched:  Okay.. I figured out a way to handle state changes that may occur while they were stopped. If a task/thread was already blocked when SIGSTOP/SIGSTP was received, it will restart in the running state.  I will appear that to the task/thread that the blocked condition was interrupt by a signal and returns the EINTR error.

    sched/group and sched/sched:  Finish framework for continue/resume logic.

    sched/signal:  Roughing out basic structure to support task suspend/resume
2018-08-30 10:27:18 -06:00
Xiang Xiao
51708745f6 drivers/serial/serial_dma.c: Fix typo error in uart_recvchars_dma() 2018-08-29 08:31:43 -06:00
Juha Niskanen
827d316dce drivers/audio/audio_i2s.c: Fix bad NULL pointer check 2018-08-29 06:19:19 -06:00
Xiang Xiao
09c907b446 drivers/serial/serial.c: Fix warning: 'value computed is not used' 2018-08-29 06:10:53 -06:00
EunBong Song
d33b0640fe Merged in ebsong/nuttx (pull request #712)
Pull request for cortex-r4 codes

* arm/armv7-r: Add general interrupt controller.

    This is based on armv7-a gic controller code.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/armv7-r: add invalidate dcache in arm_head.S

    Adding invalidate dcache as a comment in arm_head.S.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/armv7-r: Fix some wrong configuration of program status register.

    PSR_E_BIT bit should be set for big endian system.
    PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4.
    So we don't need to set this bit.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/armv7-r: Fix some wrong MPU register definition.

    Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as
    arm cortex-r4 reference manual.

    Region Base Address Register 0-4 bits are reserved.
    MPU Region Access control register type 3-5 bits.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* driver/mtd: fix compilation error.

    This commit fixes below compilation errors.

    CC:  mtd/smart.c
    mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=]
     static const uint8_t gWearBitToLevelMap4[] =
                          ^~~~~~~~~~~~~~~~~~~
    mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=]
     static const uint8_t gWearLevelToBitMap4[] =
                          ^~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    make[1]: *** [smart.o] Error 1

    Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 01:50:41 +00:00
liuzhuang
8343f0f55a drivers/net/lan91c111.c: Change MAX_NETDEV_MTU to MAX_NETDEV_PKTSIZE 2018-08-28 15:24:02 -06:00
Gregory Nutt
dcb3d4b050 sched/signal: Add logic and an interface to determin if a signal can be caught or ignored. sigaction now correctly returns EINVAL on any attempt to catch or ignore such signals (only SIGKILL for now and only if CONFIG_SIG_DEFAULT=y). 2018-08-28 12:39:03 -06:00
Gregory Nutt
0756cf66ed sched/signal: Add support for SIGINT in addition to SIGKILL. drivers/serial: Use SIGINT instead of SIGKILL when control-C is pressed. 2018-08-28 12:15:31 -06:00
Gregory Nutt
0b60bbc6d3 Update some Kconfig comments. 2018-08-28 10:51:34 -06:00
Gregory Nutt
e7ce9bbfc4 drivers/serial: Integrate new Ctrl-C logic with the ISIG flag in the termios c_lflag. Fix several compiler errors resulting from recently flurry of renaming. 2018-08-28 09:15:29 -06:00
Gregory Nutt
15a1e44586 drivers/mtd/ftl.c: Reduce size of stack buffer from 64 to a maximum size as determined from NAME_MAX 2018-08-28 08:19:15 -06:00
Xiang Xiao
8b5ac497ad drivers/mtd/ftl.c: Support initialization of an FTL block device with a custom name 2018-08-28 07:15:57 -06:00
Xiang Xiao
41a1e76735 drivers/mtd/mtd_partition.c: Copy the partition name to internal buffer so that the caller can free the name argument 2018-08-28 07:09:59 -06:00
wangyanjiong
25f2bcea38 drivers/mtd: Add gd25 driver 2018-08-28 06:31:54 -06:00
Gregory Nutt
00c6793e61 drivers/power/pm_register.c: Fix an error found in build testing. 2018-08-27 16:13:07 -06:00
ligd
a02f919bec drivers/power: PM: Add timer to decrease PM level automatically 2018-08-27 13:28:48 -06:00
zhuguangqing
1bbe9baa29 drivers/pm: PM: Add PM_RESTORE to notify driver that device exit WFI so the driver could restore state. For example, WDT may stop counting before enter low power state and restore the counting agian in PM_RESTORE notification 2018-08-27 13:26:33 -06:00
Xiang Xiao
ef5b781061 drivers/power: PM: Make power manager service available as soon as possible: (1) Initialize g_pmglobals at the definition, (2) skip hold the lock if OS isn't ready 2018-08-27 13:24:13 -06:00
zhuguangqing
7f4064e511 drivers/pm: PM: Decrease the power state in the reverse order. Since the child driver need power off before parent driver. 2018-08-27 13:22:11 -06:00
Xiang Xiao
af284c1e23 drivers/power/: PM: Don't update the power state in work thread: (1) Simplify the code logic and remove the work queue dependence, (2) Power calculation is too simple to delay into the work queue 2018-08-27 13:20:28 -06:00
zhuguangqing
7d9787d530 drivers/power: PM: Add pm_querystate function 2018-08-27 13:18:09 -06:00
Xiang Xiao
006b7d3963 drivers/power: PM: Add pm_stay and pm_relax function so special apps(e.g. mediaplayer) could disable suspend during playback much like linux kernel counterpart 2018-08-27 13:16:34 -06:00
Xiang Xiao
6c057e608b Squashed commit of the following:
drivers/timers/arch_timer.c: implement timer arch API on top of timer driver interface

    drivers/timers/arch_alarm.c:  Implement alarm arch API on top of oneshot driver interface

    drivers/timers/arch_rtc.c:  Implement RTC arch API on top of RTC driver interface

    include/nuttx/timers/rtc.h:  Extend struct rtc_time by adding tm_nsec if RTC supporst hiresolution time.
2018-08-27 11:55:30 -06:00
Gregory Nutt
c0d234a474 Squashed commit of the following:
drivers/serial/Kconfig:  It is no longer necessary to restrict Ctrl-C handling to the FLAT build

    sched/signal:  Add a new configuration option to select signal default actions, separate handling of signal default actions from both task startup logic and from the serial TTY Ctrl-C logic.  Add a signal set in the group structure to keep track of what signals have been set to the default action.  In dispatching signals in PROTECTED or KERNEL mode, use this signal set to determine if the default signal handler is attached and dispatch the signal in kernel mode for the default actions.
2018-08-27 11:40:09 -06:00
zhuyanlin
459d9f2851 Squashed commit of the following:
driver/ioexpander:  Add gpio_pin_unregister function to GPIO driver
  driver/ioexpander:  Add pinset struct to GPIO driver for interrupt pins larger than 64
  driver/ioexpander:  Initialize pintype/inttype when registering ioexpander device
  driver/ioexpander:  Add SETPINTYPE ioctl command to the GPIO driver
2018-08-27 09:25:11 -06:00
ZhongAn
85a993999e drivers/audio/audio_i2s.c: Add audio_i2s device driver. 2018-08-27 08:52:08 -06:00
Xiang Xiao
eb02b28428 drivers/audio: Move the I2S character driver to a dedicated folder. 2018-08-27 07:26:22 -06:00
Xiang Xiao
0308a86435 drivers/pwm: Move pwm.c into pwm folder 2018-08-27 07:17:34 -06:00
Xiang Xiao
ff1cba6ab5 drivers/crypto: Move dev_urandom.c into new crypto folder. 2018-08-27 07:14:01 -06:00
Xiang Xiao
49548da297 net/Kconfig: Uncomment the prompt of NET_SLIP_PKTSIZE 2018-08-26 14:28:35 -06:00
Gregory Nutt
8530fe0a7c Update some comments. 2018-08-26 13:14:26 -06:00
Xiang Xiao
ead2c40cd4 Squashed commit of the following:
drivers/serial/uart_16550.c: Support 16550 auto hardware flow control

    drivers/serial/uart_16550.c:  Add configuration option CONFIG_16550_SUPRESS_INITIAL_CONFIG.  This is identical to the standard configuration in arch/Kconfig CONFIG_SUPPRESS_UART_CONFIG, but with scope of only the 16550 driver.
2018-08-26 11:37:16 -06:00
anchao
fa08e69cca drivers/serial/uart_16550.c: Add serial termios handling 2018-08-26 11:30:51 -06:00
Xiang Xiao
b426e35ed2 drivers/serial/uart_16550.c: Fix UART 16550 warning when disable HAVE_16550_CONSOLE. 2018-08-26 11:28:57 -06:00
ligd
1cbaae77cc drivers/serial/uart_16550.c: Add stub implementations of DMA-related methods in the 16550 UART v-table. 2018-08-26 11:22:44 -06:00
Xiang Xiao
46e47c8dcf Squashed commit of the following:
drivers/serial/uart_16550.c:  Add a configuration, analogous to the STM32 configuration option, to suppress the NuttX standard re-ordering for /dev/ttySN for special case of the 16550 UART.

    config/serial: UART 16550: Add CONFIG_SERIAL_UART_ARCH_MMIO option so the a memory mapped device doesn't need to provide uart_getreg() and uart_putreg() implementations.

    u16550_txempty() should check UART_LSR_TEMT to avoid some data left in the transmit FIFO
2018-08-26 11:17:33 -06:00
Xiang Xiao
ea62b13fd0 drivers/serial/serial.c: In DMA mode, the use of uart_disablexinit() is insufficient to protect a critical section. enter/leave_critical_section() must be used in those cases if CONFIG_SERIAL_DMA=y 2018-08-26 10:30:48 -06:00
Xiang Xiao
9e922873d4 drivers/serial: Move head/tail pointer reset to uart_recvchars_dma since dma may be still transferring in the background. 2018-08-26 10:03:30 -06:00
Xiang Xiao
4465cccdbd drivers/serial/serial.c: Don't overwrite nwritten unconditionally on UART write failure. 2018-08-26 09:56:02 -06:00
xuanlin
c8df5f3df3 drivers/serial/serial.c: Support UART direct write for non console device 2018-08-26 09:47:25 -06:00
ligd
4c4d2b54a3 Send poll() notification when the Tx buffer is flushed 2018-08-26 09:39:16 -06:00
Gregory Nutt
55b7938f0a drivers/serial/Kconfig: Make feature dependent on CONFIG_BUILD_FLAT. 2018-08-26 08:56:16 -06:00
ligd
11f8dc735c Squashed commit of the following:
drivers/serial:  Add Ctrl-C/Ctrl-X support.  This is an initial working implementation that still requires that several details be resolved.

    sched/task/task_start.c: Add default signal action to SIGKILL.
2018-08-26 08:49:08 -06:00
Gregory Nutt
729a65f3ab drivers/serial/pty.c: Add support so that a PTY can poll for both IN/OUT event simultaneously. 2018-08-26 07:27:19 -06:00
ligd
38cd556af8 Write to a pipe when there are no readers from the pipe should return -EPIPE. 2018-08-26 07:17:31 -06:00
Xiang Xiao
1ee6083de3 Squashed commit of the following:
drivers/syslog:  Channel configuration.  Decouple SYSLOG_SERIAL_CONSOLE and ARCH_LOWPUTC.  Since some hardware can output log to the special debug channel not serial.

    drivers/syslog/vsyslog.c: Support pre-pending a prefix string to log output if enabled.  This very useful to identify which cpu send out the log in AMP SoC.

    drivers/syslog/vsyslog.c: Make timestamp output same as linux kernel.  It's very useful if NuttX syslog retarget to Linux syslog.
2018-08-26 06:49:35 -06:00
Gregory Nutt
72fd2a5e34 drivers/wireless/ieee80211/bcmf_sdio.c: Bring in another fix from the 'Haywire' port. 2018-08-25 12:05:07 -06:00
Gregory Nutt
693bf54dbc drivers/wireless/ieee80211/bcmf_sdio.c: Bring in some fixes from the 'Haywire' port. 2018-08-25 12:02:33 -06:00
Xiang Xiao
3eb34186b5 drivers/net/lan91c111.c: Change loopback_out to devif_loopback 2018-08-25 10:25:35 -06:00
Gregory Nutt
9bc951a335 Rename devif_loopback_out to devi_loopback 2018-08-25 08:33:21 -06:00
Gregory Nutt
11a1b2598e Fix some naming convention violations in the last commit. 2018-08-25 08:30:28 -06:00
DisruptiveNL
cd2ced4d9a drivers/sensors and configs/nucleo-l476g: Add support for LSM303AGR and LSM6DSL sensors 2018-08-25 08:19:31 -06:00
Xiang Xiao
149748e4ed drivers/net: drivers/net: Add support for Microchip LAN91C111 driver 2018-08-24 11:07:07 -06:00
Xiang Xiao
fc194cf2ec drivers/timers: Add a new method to the struct oneshot_operations_s interface to get the current time from a oneshot timer driver (if it is available from the lower half) 2018-08-24 10:21:29 -06:00
Xiang Xiao
a6c68d233d drivers/timers: Add maxtimeout method to the struct timer_ops_s interface 2018-08-24 10:16:17 -06:00
Xiang Xiao
0074afa0ac net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire. 2018-08-24 09:21:33 -06:00
Xiang Xiao
e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Xiang Xiao
467d2a58ea Replace non critical PANIC with DEBUGPANIC to save the code space 2018-08-24 06:21:15 -06:00
Gregory Nutt
2722fd8192 tools/nxstyle.c: Add capability to detect multiple blank lines. Single spacing required by the coding standard. Also coding standard fixes to server .c files for problems found during testing nxstyle. 2018-08-24 05:51:44 -06:00
Gregory Nutt
1f1ead3099 drivers/wireless/ieee80211: Used nxstyle to find coding standard violations, then corrected them. 2018-08-22 17:35:17 -06:00
Gregory Nutt
dbe9b7ffb7 drivers/wireless/ieee80211/bcmf_bdc.c: Trivial check for NULL pointer. 2018-08-22 17:02:23 -06:00
Gregory Nutt
1d55bfaef8 drivers/wireless/ieee80211/bcmf_netdev.c: Add missing logic to poll for more Tx data after the last transfer completes. 2018-08-22 16:58:32 -06:00
Gregory Nutt
cc31f22213 tools/nxstyle.c: Back out part of a recent addition that was causing too many false alarms. drivers/wireless/ieee80211: Make a couple of files conform to the coding standard (and other cosmetic fixes). 2018-08-21 12:46:00 -06:00
Gregory Nutt
8e203e09d4 Costmetic changes 2018-08-19 11:19:43 -06:00
ichael Jung
aad8f6e45f drivers/usbdev/cdcecm.c: Adds USB Device Support for CDC/ECM 2018-08-16 08:49:11 -06:00
Dmitriy Linikov
b6151ce997 drivers/net/tun.c: Fixed custom tun devname formatting. 2018-08-14 07:13:41 -06:00
Gregory Nutt
8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
Gregory Nutt
4e5cf1229c drivers/mmcsd/Kconfig: three configuration settings were within ifdef/endif and led to warning: xxx selects xxxx which has unmet direct dependencies. Fix by moving settings to drivers/Kconfig and outside of the ifdef-endif. Also renamed CONFIG_SDIO_PREFLIGHT to CONFIG_ARCH_HAVE_SDIO_PREFLIGHT to follow naming of similar hidden architecture capability configurations. 2018-08-05 17:58:17 -06:00
Gregory Nutt
c2267a57a0 Kconfig files: Fix several errors noted by Alex Denisov in Bitbucket issue 115. 2018-08-05 10:48:02 -06:00
Gregory Nutt
056d704cf9 This commit brings in a fragmentary, experimental implementation of NETLINK sockets. There is not too much to that socket support on this initial commit, just the netlink socketer framework. However, I decided to bring it into master because there is a enough that I would not want to lose what is in place. And since it is dependent on CONFIG_EXPERIMENATL, its presence on master should be innocuous.
Squashed commit of the following:

    net/netlink:  Mark netlink support as EXPERIMENTAL.
    net/netlink/netlink_sockif.c:  Add netlink_getpeername to the socket interface.
    net:  Add getpeeername() support for netlink sockets.
    include/netpacket/netlink.h:  Add a few more definitions and structures used at the NetLink interface.  Still missing many.
    net/netlink:  Add basic framework for Netlink socket support.
    include/:  Add basic Netlink definitions.
2018-08-03 13:22:36 -06:00
Gregory Nutt
10069067c1 include/nuttx/i2c/i2c_master.h: Rename I2C_M_NORESTART to I2C_M_NOSTART since it may be used in other contexts than a repeated start. Add comments to clarilfy setup for repeated start. 2018-08-03 08:51:55 -06:00
Gregory Nutt
ee28cd9aeb include/nuttx/i2c/i2c_master.h: Add a definition to distinguish a new START of messages from a repeated start. No lower-half I2C drivers actually implement this new flag bit, however. drivers/i2c/i2c_writeread.c: Use new repeated START definition where appopriated. Other: Some cosmetic changes, updates to README files, etc. 2018-08-03 07:43:57 -06:00
Gregory Nutt
f649db2405 Costmetic changes during review of MAX3421E logic. 2018-08-02 13:58:26 -06:00
Russ Webber
ee21bcfaa8 Merged in russkel/nuttx/russkel/adxl345-remove-comment-references-to-tou-1533231727620 (pull request #702)
adxl345: remove comment references to touchscreens

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-02 17:59:59 +00:00
Daniel Pereira Carvalho
d755b07a06 drivers/analog: Add driver for digital to analog converted DAC7571.
configs/nucleo-l432kc:  Add support for a connect DAC7571 converter.
2018-08-02 06:40:48 -06:00
Gregory Nutt
1d70e7f4b0 Revert "drivers/input/ft5x06.c: Back out part of last PR. I think that is correct to detach the interrupt handler when the drivers is unlinked."
No... I was misled.  The shutdown function is usually called when the
driver is unlinked.  But not in this case.  In this case, it is simply
called when the last reference is closed.  And no, you don't want to
detach the interrupt handler in that case.  My bad.

This reverts commit b79e6b9c9a.
2018-08-01 17:41:07 -06:00
Gregory Nutt
b79e6b9c9a drivers/input/ft5x06.c: Back out part of last PR. I think that is correct to detach the interrupt handler when the drivers is unlinked. 2018-08-01 17:38:48 -06:00
Marcin Wyrwas
18ca531b40 Merged in plwm/nuttx/stm32f746g-disco-touchscreen (pull request #701)
stm32f746g-disco: touchscreen support

* fixed FT5x06 driver to correctly close (previously it unregistered interrupt handler during close)
* added LittlevGL demo for STM32F746G-DISCO

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-01 21:31:39 +00:00
Gregory Nutt
221bbad682 drivers/usbhost/usbhost_max3421e.c: Fix unmatched SPI lock/unlock. 2018-07-31 12:55:19 -06:00
Gregory Nutt
d252c7947d drivers/usbhost/usbhost_max3421e.c: Mutual exclusion semaphore must be re-entrant. 2018-07-30 17:31:40 -06:00
Gregory Nutt
8b2dc155a0 drivers/usbhost/usbhost_max3421e.c: Fix several errors found in early testing. 2018-07-30 16:56:19 -06:00
Gregory Nutt
41666dafa8 drivers/usbhost/usbhost_max3421e.c: Fix an error in reading the pending interrupts. Aos fix a number of typos and update a README. 2018-07-29 15:06:44 -06:00
Alan Carvalho de Assis
f887bdb6d6 Squashed commit of the following:
configs/stm32f4discovery/src: Add board support to MAX7219 as numeric display controller

    drivers/leds/max7219.c: Add support to MAX7219 to control 7-segment displays
2018-07-22 15:13:39 -06:00
Gregory Nutt
b75103e264 Update some comments. 2018-07-22 05:56:11 -06:00
Gregory Nutt
92890552f1 drivrs/mmcsd: Partial reversion of commit 17b6c7ba39. Backed out all block callback logic controlled CONFIG_SDIO_BLK_CALLBACK. Usage of this feature by applications is a blatant violation of the POSIX interface standard. 2018-07-20 10:08:01 -06:00
Bob Feretich
17b6c7ba39 drivers/mmcsd/mmcsd_sdio.c: Fix an error that was causing SDIO multiple block transfers from achieving full performance. Also adds a feature controlled by CONFIG_SDIO_BLK_CALLBACK that bypasses the normal mechanism for obtaining sector data for transfer. 2018-07-20 09:55:33 -06:00
Gregory Nutt
cca8771c4a include/nuttx/sensors/bh1750fvi.h: Eliminate a warning. 2018-07-15 07:20:07 -06:00
Gregory Nutt
49d6f44d96 drivers/usbhost/usbhost_max3421e.c: Select full duplex mode as the first step of the initialization. 2018-07-14 14:11:05 -06:00
Gregory Nutt
a74246d14e Squashed commit of the following:
Update some comments
    drivers/usbhost/usbhost_max3421e.c:  Fix issue with uninitialized data.
2018-07-14 13:40:13 -06:00
Gregory Nutt
38073a523a drivers/usbhost/husbhost_max3421e.c: Corret how VBUS power is controlled. 2018-07-14 08:50:08 -06:00
Gregory Nutt
29474a2b08 Trivial update to some comments and debug statement formats. 2018-07-14 07:11:25 -06:00
Gregory Nutt
dae6d954bf configs/lc823450-xgevk/src: Eliminate some warnings. drivers/usbhost: Update comments. 2018-07-13 14:41:31 -06:00
Gregory Nutt
9383e20002 drivers/usbhost/usbhost_max3421e.c: Improve debug/trace output formats. 2018-07-13 13:50:58 -06:00
Masayuki Ishikawa
50347a1068 Merged in masayuki2009/nuttx.nuttx/fix_i2schar (pull request #681)
drivers/audio: Fix compile error in i2schar.c (CONFIG_DEBUG_ASSERTIONS=y)

Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-13 11:53:37 +00:00
Gregory Nutt
b8665996d5 Revert 0eff3d530f: This removes the kx224, bh1749nuc and bh1790glc. These are very nicely written drivers, but they are based on some external sequencer logic which is not available to everyone. Hence, these are inapropriate to carry in the NuttX repository. 2018-07-11 15:36:33 -06:00
Gregory Nutt
235d580984 drivers/sensors/bh1749nuc.c, bh1790glc.c, and x224.c: From review of commit 0eff3d530f, remove dependency on the CXD56_SCU, modify inclusions and some naming for compatibility with other sensor drivers. 2018-07-10 16:16:15 -06:00
Juho Valkama
0eff3d530f Merged in jutava/nuttx (pull request #673)
Master

* drivers/sensors: added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* bh1790glc.h created online with Bitbucket

* bh1790glc.h deleted online with Bitbucket

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* drivers/sensors: Added drivers for kx224, bh1749nuc and bh1790glc

    They are reliant on the cxd56_scu.

* README.txt: minor typo fix

* Minor typo fix

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-10 12:38:25 +00:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Alan Carvalho de Assis
a764e4ab5c drivers/leds/pca9635pw.c configs/stm32f4discovery/src/stm32_pca9635.c: Fix pca9635pw LED driver compilation 2018-07-07 16:24:11 -06:00
Mateusz Szafoni
8416d9a966 Merged in raiden00/nuttx (pull request #668)
Master

* libdsp: initial commit

* libdsp: cosmetics

* stm32f334-disco/buckboost: use a PID controller from libdsp

* stm32_adc.h: fix typo

* stm32_dac.c: set OUTEN bit for DAC1CH2 and DAC2CH1

* stm32_hrtim: cosmetic changes

* power/motor: direction parameter is now int8 + add overload fault

* libdsp: all floats with f-sufix

    libdsp: add precision option for library

    libdsp: add debug option for library and assertions in functions

    libdsp: add current samples correction for SVM3

    libds: add some motor control specific functions

    libdsp: add basic speed observer

    libdsp: fix phase shift in SMO observer

    libdsp: add more logic to FOC

    config/sim/dsptest: add dsptest configuration

* libdsp/lib_motor.c: remove unused comparation

* libdsp/lib_observer.c: update some comments

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-07 17:04:57 +00:00
Gregory Nutt
22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt
daa3fcc781 include/nuttx/spi/spi.h: Add a definition for a USBHOST SPI device. drivers/usbhost/usbhost_max3421e.c: Review and correct SPI locking usage. 2018-07-04 08:55:43 -06:00
Gregory Nutt
75f7663427 This commit adds support for the Maxim M3421E USB host driver.
Squashed commit of the following:

    drivers/usbhost/usbhost_max3421e.c:  Add USB tracing support.  Fix compilation errors when assertions and debug is enabled.
    drivers/usbhost/usbhost_max3421e.c:  Fixes to get a clean compilation.
    drivers/usbhost/usbhost_max3421e.c:  Drivers is basically code complete.
    drivers/usbhost/usbhost_max3421e.c:  Missed a little bit of logic in the last commit.
    drivers/usbhost/usbhost_max3421e.c:  Completes implementatin of control transfers.
    drivers/usbhost/usbhost_max3421e.c:  Implements low-level part of packet receive.
    drivers/usbhost/usbhost_max3421e.c:  Reorder some functions add a little more transfer-related logic.
    drivers/usbhost/usbhost_max3421e.c:  Completes basic logic path for sending normal packets.
    drivers/usbhost/usbhost_max3421e.c:  Correct handling of SNDFIFO double buffering.
    drivers/usbhost/usbhost_max3421e.c:  Not necessary to set the ACKSTAT bit in host mode.  Clean up some comments.
    drivers/usbhost/usbhost_max3421e.c:  Mostly cosmetic cleanup
    drivers/usbhost/usbhost_max3421e.c:  Revise some previous logic.  Looks like the MAX3421E can handle 16 channels in host mode.  A little bit of work on packet transfer logic.
    Copy paste error fix
    drivers/usbhost/usbhost_max3421e.c:  Add some channel allocation logic.
    drivers/usbhost/usbhost_max3421e.c:  Add some initialization logic.
    drivers/usbhost/usbhost_max3421e.c:  Add logic to determine if a full or low speed device has been connected.
    drivers/usbhost/usbhost_max3421e.c:  Add interrupt handling and bus reset logic.
    drivers/usbhost/usbhost_max3421e.c:  Add framework for an MAX3421E host driver.  Initial commit is just the STM32 OTGFS host driver with a few new SPI-related functions.
2018-07-03 18:49:51 -06:00
Gregory Nutt
3e9ba72441 net/sixlowpan: Fix typo uint16->uint16_t. Also picks up some cosmetic USB host changes. 2018-07-01 10:05:15 -06:00
Gregory Nutt
7dec38b18f drivers/Kconfig: Global configuration variable CONFIG_FB_TRANSPARENCY is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32, stm32f7, and same5: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version. 2018-06-28 12:31:51 -06:00
Gregory Nutt
ba53219821 drivers/Kconfig: Global configuration variable CONFIG_FB_CMAP is only defined in architecture-specific Kconfig files and then multiple times. Add the single global definition in drivers/Kconfig. arch/arm/src/stm32 and stm32f7: Rename the architecture-specific variables appropriately. Selecting the architecture-specific version will also select the global version. 2018-06-28 12:01:55 -06:00
Gregory Nutt
a0e169ad7b net/: Fix a sixlowpan typo bug recently introduced; Rename g_ipv6_allzeroaddre with the more meaning g_ipv6_unspecaddr since the all-zero address is the IPv6 unspecified address (sometime IN6_ADDR_ANY). Remove more inline tests for IPv6 multicast with tcommint net_is_addr_mcast() macro. Update some comments. 2018-06-23 12:53:27 -06:00
Gregory Nutt
cb374e6e62 arch/: Clean up some naming and spacing. 2018-06-20 15:38:06 -06:00
Gregory Nutt
01b740c66b arch/arm/src/efm32: Support for common vector handling is forced for all EFM32 chips. Yes the architecture provides support for the old-style dedicated vector handling which can never be compiled. Furthermore, the old-style dedicated vector handling is deprecated in favor of common vector handling. The commit resolves this inconsistency be removing support for the dedicated vector handling from the EFM32 architecture support. 2018-06-19 13:37:00 -06:00
Gregory Nutt
691676ac6b Eliminate some new warnings found in build testing. 2018-06-17 15:26:18 -06:00
Alan Carvalho de Assis
5fb988bdc8 ~configs/xmc4500-relax: Add support to MAX6675 on XMC4500-Relax board. drivers/sensors/max6675.c: Increases SPI frequency from 400Khz to 4MHz. 2018-06-16 13:48:19 -06:00
Gregory Nutt
8fdbb1e0a4 Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t
Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
2018-06-16 12:16:13 -06:00
Juha Niskanen
5b899b76c4 drivers/sensors: Add support for Telair T6713 carbon dioxide sensor 2018-06-15 06:52:16 -06:00
Anthony Merlino
2f921fbe8e Merged in antmerlino/nuttx/xbee-timeout-fix (pull request #656)
drivers/xbee: Fixes issue with timeouts.  Timeouts were in ticks but should have been in ms.  This caused false triggers of timeout causing redundant packets, etc.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-13 03:21:45 +00:00
Juha Niskanen
083c1ae639 drivers/audio: Fix some DEBUGASSERTs and compile failures. 2018-06-11 07:00:27 -06:00
Gregory Nutt
a94e3284b3 syslog: Enable is partial, crippled version of syslog_flush(); arch/: Call syslog_flush() from assertion handling logic. 2018-06-07 16:29:16 -06:00
Masayuki Ishikawa
fb07bd7e27 Adds loopback test for digital MIC on lc823450 via i2schar driver.
Squashed commit of:

  configs/lc823450-xgevk: Enable DMDIN0 (Digital MIC)
  I2S: Add ioctl interface to i2s_ops_s and i2schar driver
  arch/arm/src/lc823450: Add DGMIC in lc823450_i2s.c
  configs/lc823450-xgevk: Add i2schar driver to lc823450_wm8776.c
  configs/lc824350-xgevk: Enable AUDIO_I2SCHAR in audio/defconfig
  configs/lc823450-xgevk: Update README.txt
2018-06-05 10:34:22 -06:00
Gregory Nutt
c74e9fd6da Update a readme and some comments. 2018-05-27 15:13:54 -06:00
Gregory Nutt
f3392e0a6c drivers/serial: Add a timeout to uart_tcdrain(). Even if tcflush() is used to discard buffered data, the close() can still hang if (a) hardware flow control is enabled, (b) CTS == 1, and (c) there is data stuck in the hardware Tx FIFO. tcflush() does not currently clear the MCU serial drivers' hardware Tx FIFOs. This is a workaround for that. 2018-05-27 11:39:34 -06:00
Gregory Nutt
548cd2892a arch/arm/src/imxrt and configs/imxrt1050-evk: Add PHY access support needed to support the network monitor. Cannot enable it yet... I am getting hardfaults when I enable the PHY interrupt. 2018-05-25 13:02:41 -06:00
Gregory Nutt
9da3d4a2a9 drivers/lcd and configs/olimex-lpc1766stk: Remove support for the Nokia6100 LCD. That LCD uses a 9-bit SPI interface (the 9th bit being the command/data bit that is normally a discrete). That communication was never successfully integrated. I now believe that it would would require some special support from the low-level, MCU SPI driver to manage that 9th bit. The deleted code is still available in the Obsoleted repository in the nuttx/drivers/lcd, nuttx/configs/olimex-lpc1766stk, and Patches directories. 2018-05-19 16:46:21 -06:00