Commit Graph

31235 Commits

Author SHA1 Message Date
Gregory Nutt 70c59a9d91 This commit adds support for semi-standard IPPROTO_ICMP6 sockets. This is a replacement for the non-standard ICMPv6 ping support that violated the portable POSIX OS interface.
Squashed commit of the following:

    net/icmpv6: IPPROT_ICMP6 socket logic now builds without error.
    net/icmpv6:  Add support for read-ahead and poll(). Initial commit is just cloned from ICMP with the appropriate name changes.
    configs/:  All defconfig filess that include CONFIG_NET_ICMPv6_SOCKET=y need to select CONFIG_SYSTEM_PING6=y and deselect CONFIG_DISABLE_POLL.
    Update NSH documention to show that ping6 is now a built in command.
    net/icmpv6:  Add icmpv6_sendto.c and icmpv6_recvfrom.c.  Initial versions are just clones from icmp/ with appropriate name changes.
    net/icmpv6:  Clone some ICMP socket logic as the beginning of support for ICMPv6 socket support.
    Rename CONFIG_NET_ICMPv6_PING to CONFIG_NET_ICMPv6_SOCKET.  Move prototype for icmpv6_ping from include/nuttx/net/icmpv6 to net/icmpv6/icmpv6.h
2017-10-24 11:23:08 -06:00
Gregory Nutt bad3379bc4 net/icmp: Correct some comments, typings, spacing problems from last big ICMP socket change. 2017-10-23 14:27:31 -06:00
Gregory Nutt 2c8708c332 stm32f103-minimum: Add missing semi-colon from the last patch. 2017-10-23 12:20:07 -06:00
Jussi Kivilinna 45fdad5055 arch/arm/common/up_checkstack: fix assert panic when both TLS and interrupt stack are enable 2017-10-23 12:02:20 -06:00
Gregory Nutt fb3655e9f0 net/inet: Add check for protocol before handing out TCP and UDP sockets. 2017-10-23 09:58:11 -06:00
Gregory Nutt 261045e689 Update NSH documentation. 2017-10-23 09:23:11 -06:00
Gregory Nutt cccc86da09 This change adds support for semi-standard IPPROTO_ICMP AF_INET datagram sockets. This replaces the old ad hoc, nonstandard way of implementing ping with a more standard, socket interface.
Squashed commit of the following:

    net/icmp:  Finishes off icmp_recvfrom().
    net/icmp:  Add readahead support for IPPROTO_ICMP sockets.
    net/icmp:  Add poll() support for IPPROTO_ICMP sockets.
    net/icmp:  Add a connection structure for IPPROTO_ICMP sockets.
    net/icmp:  Implements sendto for the IPPROTO_ICMP socket.
    net/icmp:  Move icmp_sendto() and icmp_recvfrom() to separate files.  They are likely to be complex (when they are implemented).
    net/icmp:  Hook IPPROTO_ICMP sockets into network.  Fix some naming collisions.  Still missing basic ICMP send/receive logic.
    configs: apps/system/ping current need poll() enabled.
    configs: All defconfig files that use to enable low-level support must now enabled CONFIG_SYSTEM_PING.
    net/icmp:  Adds basic build framework to support IPPROTO_ICMP sockets.
2017-10-23 08:45:12 -06:00
Alan Carvalho de Assis c28b938600 stm32f103-minimum: Fix a compilation warning.
stm32f103-minimum:  Add an ADPS-9960 example configuration
2017-10-23 07:00:20 -06:00
Mateusz Szafoni 9105ac3e98 Merged in raiden00/nuttx (pull request #516)
Master

* stm32_hrtim: fix warnings related with RCC

* stm32f33xxx_adc: add some publicly visable interfaces and some code to support injected channels

* stm32f33xxx_dma: add public interface to handle with DMA interrupts

* stm32_hrtim: change some names and add some coments

* chip/stm32f33xxx_adc.h: cosmetics

* nucleo-f334r8: add logic for zero latency high priority interrupts example

* stm32: update some ADC-related configuration in Kconfig

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-22 15:46:13 +00:00
Gregory Nutt 9b31a81b00 Squashed commit of the following:
fs/fat:  Remove mkfatfs from the OS.  This is a user-space application and belongs in apps, not in the OS.
2017-10-20 12:36:25 -06:00
Gregory Nutt fc0a5e19d0 drivers/bch: The character driver to block device access now supports an IOCTL to get the geomtry of the underlying block device. 2017-10-20 11:36:44 -06:00
Mateusz Szafoni 704ad2faeb Merged in raiden00/nuttx (pull request #515)
stm32_adc.c: clear pending interrupts

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-20 17:15:48 +00:00
Juha Niskanen 9653255cff Merged in juniskane/nuttx_stm32l4/stm32l1_stm32l4_rtc_update_pr (pull request #514)
STM32L1, STM32L4 RTC: add periodic interrupts, update L1 RTC implementation

* STM32L4 RTC: add support experimental CONFIG_RTC_PERIODIC

* STM32 RTC: separate STM32L1 RTC into a separate file

    STM32L1 RTC is very close to F4 or L4 versions, with two alarms
    and periodic wakeup support so backported L4 peripheral to L1.

* RTC: add periodic alarms to upper and lower halves

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-20 17:15:17 +00:00
Alan Carvalho de Assis 0be36a6ac1 drivers/sensors/apds9960.c: Use work_queue to read/process data when receive an IRQ 2017-10-20 08:54:44 -06:00
Jussi Kivilinna b87739d174 arch/arm/src/stm32f7/i2c: fix I2C_M_NORESTART handling 2017-10-20 08:41:42 -06:00
Jussi Kivilinna fe9be72bec drivers/sensors/hts221: power-on sensor for loading calibration data 2017-10-20 08:33:44 -06:00
Jussi Kivilinna 09cee19cee include/nuttx/sensors/ioctl: deduplicate SNIOC_CFGR 2017-10-20 08:32:09 -06:00
Alan Carvalho de Assis 3268a6ac5f drivers/sensor: Add driver for the APDS-9960 gesture sensor 2017-10-20 06:37:38 -06:00
Gregory Nutt 9e73216bf2 net/tcp: Same change to tcp_send_buffered.c probably also applies to sixlowpan_tcpsend.c and inet_recvfrom.c 2017-10-19 16:45:00 -06:00
Gregory Nutt 8d023cb97f tcp_lost_connection() is called from two places in tcp_sendfile.c 2017-10-19 16:36:57 -06:00
Gregory Nutt 8c11a73d33 net/tcp: Same change to tcp_send_buffered.c probably also applies to tcp_sendfile.c. 2017-10-19 16:31:28 -06:00
Gregory Nutt 7d62a74915 Fix an error introduced in last commit. 2017-10-19 16:26:09 -06:00
Gregory Nutt 5a416be95b net/tcp: Same change to tcp_send_buffered.c probably also applies to tcp_send_unbuffered.c. 2017-10-19 16:14:38 -06:00
Mateusz Szafoni 09f3e9ce5c Merged in raiden00/nuttx (pull request #513)
Master

* stm32f33xxx_adc.c: fix some warnings and compilation error when extsel not in use

* nucleo-f334r8/adc: change serial console to USART2 (STLINK COM)

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-19 20:07:04 +00:00
Gregory Nutt cf5cba953d There was a possible recursion that could eventually overflow the stack. The error occurred when closing the socket with inet_close() while a socket callback was still queued. When the socket callback was executed by devif_conn_event(), this resulted in a call to psock_send_eventhandler() with TCP_CLOSE flag set which then called tcp_lost_connection(). tcp_shutdown_monitor() then called tcp_callback() again, which again called psock_send_eventhandler(), and so on.... Noted by Pascal Speck. Solution is also similar to a solution proposed by Pascal Speck. 2017-10-19 11:55:51 -06:00
Gregory Nutt bc40403516 There was a reference counting problem in the TPC logic of net_clone(). net_clone() which is the common logic underlying dup() and dup2() for sockets. When net_clone() calls net_start_monitor() and net_start_monitor() returns a failure (because the underlying TCP connection) then net_clone() must back out the reference count on the structure. Problem noted by Pascal Speck and this implementation of the solution is based on his suggestion. 2017-10-19 11:09:23 -06:00
Jussi Kivilinna 5ef548677a drivrs/mtd/filemtd.c: add block device MTD interface. Block MTD interface allows using block device directly as MTD instead of having to use file-system in between. NOTE that this provides the opposite capability of FTL which will let you use an MTD interface directly as a block device. 2017-10-19 09:53:41 -06:00
Alan Carvalho de Assis 0ef127e273 libc/match: Use of exp() vs expf() in logf() caused function to be slow. 2017-10-19 09:14:34 -06:00
Sebastien Lorquet 1182702b80 drivers/ioexpander: The IRQ subsystem now supports passing a void * parameter to IRQ handlers. Use that method to support multiple pc9555 devices, by passing a pointer to the device to the board defined irq handler. Now the CONFIG_ for multiple PCA devices just allocates device structures dynamically instead of statically when not enabled.
The same interrupt handler is entered with the device structure parameter in all situations,
multiple or single PCA. One should still be careful if multiple PCA devices share the same IRQ.
2017-10-19 08:10:40 -06:00
Mattias Edlund ee1330ed5e The timer frequencies (BOARD_TIMx_FREQUENCY) are incorrectly defined in configs/stm3240g-eval/include/board.h. Since the APB prescalers are set to divide by 4 and 2 respectively, the frequencies should be "2xAPBx" as said in the comment.  The correct frequencies are already defined but as STM32_APBx_TIMx_CLKIN. 2017-10-19 07:00:55 -06:00
Gregory Nutt ffca71b9bf Alexey T, Bitbuck Issue 73:
Lower part of STM32 CAN driver arch/arm/src/stm32/stm32_can.c uses all three hw tx mailboxes and clears TXFP bit in the CAN_MCR register (it means transmission order is defined by identifier and mailbox number).

This creates situation when order frames are put in upper part of CAN driver (via can_write) and order frames are sent on bus can be different (and I experience this in wild).

Since CAN driver API pretends to be "file like" I expect data to be read from fd the same order it is written. So I consider described behaviour to be a bug.

I propose either to set TXFP bit in the CAN_MCR register (FIFO transmit order) or to use only one mailbox.
2017-10-19 06:34:54 -06:00
Gregory Nutt 9b5f56ba5b BCM2708: The PiZero configuration now compiles and links cleanly. Still a few thngs missing internally. 2017-10-18 14:07:52 -06:00
Gregory Nutt e18e8573d1 BCM2708: Allow pass parameters with AUX interrupts; Add mini-UART break capability. 2017-10-18 13:57:54 -06:00
Gregory Nutt bcff0543f9 BCM2708: Add a little more Mini-UART logic. Still missing UART configuration logic. 2017-10-18 13:44:32 -06:00
Gregory Nutt 6235e72ce0 BCM2708: Add a little more Mini-UART logic. Still missing UART configuration logic. 2017-10-18 12:50:56 -06:00
Anthony Merlino 433b997bc6 Merged in antmerlino/nuttx/photon-spi (pull request #512)
photon: Support SPI1 and SPI3

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-18 18:22:29 +00:00
Anthony Merlino e9fa96258b net/: Fix some build issues noted when both IPv4 and IPv6 are enabled. 2017-10-18 11:08:56 -06:00
Gregory Nutt d29cb09da3 drivers/usbdev: Move test for NULL pointer before the pointer is deferences. Noted by Juha Niskanen. 2017-10-18 11:06:14 -06:00
Gregory Nutt cc09e77a94 fs/vfs: Fix after recent changes. write() was return negative values in errno. Noted by Jussi Kivilinna. 2017-10-18 10:17:55 -06:00
Gregory Nutt 25079a9c93 BCM2708: Fleshes out GPIO interrupt logic. 2017-10-18 10:13:10 -06:00
Gregory Nutt 63b93a9fba BCM2708: Add framework for a Mini-UART driver (incomplete) 2017-10-18 09:17:08 -06:00
Gregory Nutt 3316103efd BCM2708: Add hooks to support both Mini- and PL011 UARTs. 2017-10-18 08:09:24 -06:00
Gregory Nutt 8dd1bb03b2 drivers/usbdev: Add a debug assertion to CDC/ACM driver. 2017-10-18 07:10:34 -06:00
Gregory Nutt 85a1a3cc98 drivers/usbdev: Correct input flow control logic when watermarks are not enabled. Problem not by and change based on suggestion by Juha Niskanen. 2017-10-18 06:49:11 -06:00
Gregory Nutt 477a8d1aa7 BCM2708: Add support for AUX interrupts. 2017-10-17 17:08:54 -06:00
Gregory Nutt d160ae8a32 BCM2708: Add some build configuration and support logic for low-level serial otput (unfinished) 2017-10-17 16:26:52 -06:00
Gregory Nutt 851fa7ba85 BCM2708: Fixes off system timer logic for the Pi Zero. 2017-10-17 14:53:11 -06:00
Gregory Nutt ea23268f34 BCM2708: Add system timer register definitions and a partial implementation of the tickless mode timer. 2017-10-17 13:54:54 -06:00
Juha Niskanen d101fad026 Merged in juniskane/nuttx_stm32l4/stm32_rtc_small_patches_pr (pull request #511)
Stm32 rtc small patches

* RTC: canceling an alarm marks it as inactive

* STM32L4, STM32F4, STM32F7 RTC: fix reading alarm value that is more than 24h in future

* STM32F0 RTC: fix backup register count in stm32_rtcc.h

    All other STM32: SHIFTR_SUBFS_MASK was correct in STM32F0 only

* STM32L1: use correct EXTI line definitions

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-10-17 16:45:48 +00:00
Gregory Nutt 3750da237c BCM2708: Flesh out some GPIO logic. 2017-10-17 10:33:48 -06:00