Commit Graph

385 Commits

Author SHA1 Message Date
raiden00pl
79b3bec208 Merged in raiden00/nuttx_lora (pull request #825)
Master

arch/arm/src/stm32f0l0: SPI support for F0

arch/arm/src/stm32f0l0/Kconfig: L0 parts should select STM32F0L0_STM32L0

arch/arm/src/stm32f0l0/hardware: unify names for ADC/DAC/DMA/CAN

drivers/wireless/lpwan/sx127x/sx127x.c: return immediately when ISR0 is called but sx127x is not initialized

configs/nucleo-f091rc: support for sx127x

configs/nucleo-l073rz: cosmetics

configs/b-l072z-lrwan1/include/board.h: use HSI as default clock source and fix typo in SPI1 pins

Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-16 20:53:16 +00:00
Xiang Xiao
fb63c0a293 sched/signal and related changes to other OS subsystems. 2019-01-27 09:28:59 -06:00
Xiang Xiao
5e8ae23edc drivers/timers/oneshot.c: Support signal notification through SIGEV_THREAD
drivers/timers/rtc.c:  Support signal notification through SIGEV_THREAD
drivers/input/ajoystick.c:  Support signal notification through SIGEV_THREAD
drivers/input/djoystick.c:  Support signal notification through SIGEV_THREAD
drivers/input/button_upper.c:  Support signal notification through SIGEV_THREAD
drivers/sensors/zerocross.c: Support signal notification through SIGEV_THREAD
drivers/wireless/ieee802154:  Support signal notification through SIGEV_THREAD
drivers/lcd/ft80x.c: Support signal notification through SIGEV_THREAD
2019-01-27 08:53:12 -06:00
Gregory Nutt
bb2391358c Cosmetic changes for coding style for last PR 2019-01-20 07:38:55 -06:00
raiden00pl
a7d4abd8d2 Merged in raiden00/nuttx_lora (pull request #821)
Initial support for sx127x radio

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-20 13:03:11 +00:00
Anthony Merlino
c897790e55 Merged in antmerlino/nuttx/sixlowpan-ieee802154-address-endianness (pull request #790)
sixlowpan/ieee802154: IEEE802.15.4 stores and uses addresses in little endian order.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 15:06:41 +00:00
Anthony Merlino
b48a62a7d4 Merged in antmerlino/nuttx/sixlowpan-ul-bit (pull request #787)
sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases whe

* sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases where the IID is derived from say, a short address, this bit should be forced to 0, indicating that it is locally administered.

    See:

    https://tools.ietf.org/html/rfc4291#section-2.5.1
    https://tools.ietf.org/html/rfc4944#section-6
    https://tools.ietf.org/html/rfc2464#section-4

* sixlowpan: Account for endianness with U/L bit.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 13:34:41 +00:00
Anthony Merlino
52aae032f7 Merged in antmerlino/nuttx/remove-ipv6-checks (pull request #785)
Fixes usage of CONFIG_BIG_ENDIAN; should be CONFIG_ENDIAN_BIG

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 20:35:15 +00:00
Gregory Nutt
f67e27cf76 arch/arm/src/tiva/hardware: Add CCFG register definition files. 2018-12-11 09:35:07 -06:00
Lwazi Dube
39c51e668f drivers/wireless/bluetooth/bt_uart_cc2564.c: Add cc2564 driver. 2018-12-11 06:58:31 -06:00
Gregory Nutt
09f4dee6bc All network drivers! Change pre-processor logic that selects the high priority work queue or gives preferential treatment to the high priority work. All network logic must run on the low priority work queue! Or suffer the consequences. 2018-11-21 07:57:26 -06:00
Anthony Merlino
260d29a187 Merged in antmerlino/nuttx/xbee-getset-txpwr (pull request #747)
Xbee getset txpwr

* drivers/wireless/ieee802154/xbee: Minor improvements to debug facilities.

* drivers/wireless/ieee802154/xbee: Add support for setting/getting tx power.

    TODO: The input/output arguments from the MLME primitive are intended to be an int32_t dbm value. However this change simply reports the power level register of the XBee. Need to add look-up table to back calculate the dbm value.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-01 19:05:04 +00:00
Gregory Nutt
6d93658ff8 Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP. 2018-10-31 15:03:51 -06:00
Gregory Nutt
11cc274eef Trivial, cosmetic changes from review of last PR. 2018-10-28 06:55:20 -06:00
Mateusz Szafoni
7329c81503 Merged in raiden00/nuttx_h7 (pull request #742)
Add basic SPI support for H7

* stm32h7: basic SPI support (nodma, noirq)

* nucleo-h743zi: nrf24l01 support

* nrf24l01.c: fix compilation errors

* stm32h7x3xx_rcc.c: enable SYSCFG clock

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-28 12:43:08 +00:00
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
Gregory Nutt
805c1bc2b9 Cosmetic changes for coding standard fixes. 2018-10-20 18:15:44 -06: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
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
Gregory Nutt
9bc951a335 Rename devif_loopback_out to devi_loopback 2018-08-25 08:33:21 -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
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
8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06: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
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
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
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
Gregory Nutt
fd844f8eac include/nuttx/wireless/bluetooth: Move Bluetooth header files from include/nuttx/wireless to include/nuttx/wireless/bluetooth for symmetry with other wireless technologies. 2018-04-29 12:43:09 -06:00
hhuysqt
144e335b85 drivers/wiresless/ieee80211: Correct some initialization problems with BCM43362 chip. Adds BCM43428 support. arch/arm/src: Add support for SDIO card to SDIO driver.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>
    include/nuttx/wireless/ieee80211:  Cosmetic, coding standard changes from review of last merge.
    drivers/wireless/ieee80211:  Cosmetic, coding standard changes from review of last merge.
    configs/photon:  Cosmetic, coding standard changes from review of last merge.
    arch/arm/src/stm32:  SDIO changes from last review:  Fix a few long lines and other coding standard issues; Make additions for SDIO card support dependent on a configuration option.

Author: hhuysqt <hyq9606@126.com>
    Return IEEE 802.11 MAC address just as ethernet does
    Modifyed bcmf_board_setup_oob_irq declaration
    Modified OOB ISR function types
    Add some logic according to WICED SDK
    Bug fixed: data_offset counts in 4-bytes
    Add BCM43438 logic for future developement
    Add tips on using telnet
    Use SDIO in-band interrupt instead of OOB interrupt, because Photon seems to unconnect the OOB interrupt line...
    add SDIO in-band interrupt logic
2018-04-26 08:10:23 -06:00
Gregory Nutt
9b83737821 drivers/wireless/bluetooth: Partition bt_uart.c adding bt_uart.h and bt_uart_generic.c. This will now permit adding HCI UART drivers that have custom initialization requirements.. such as parts the need to download a configuration file to the HCI UART before they are usable. 2018-04-19 17:48:04 -06:00
Anthony Merlino
7061d02f0f Merged in antmerlino/nuttx/xbee_timeout (pull request #629)
Xbee: Adds a timeout to send logic to handle case where XBee module fails to respond to a Transmit request with a Transmit Status

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-04-19 04:08:13 +00:00
Gregory Nutt
8ab2eb55d6 drivers/wireless: Add option to dump I/O buffers. Fix calculation of response length. 2018-04-18 12:46:47 -06:00
Gregory Nutt
1224db454b arch/arm/src/stm32 and drivers/wireless/bluetooth: Fix some buffer management errors in HCI UART upper and lower halves. 2018-04-18 08:17:15 -06:00
Gregory Nutt
27f624d881 drivers/wireless/bluetooth: Default BAUD must be 115200, Fix logic in Rx callback, Rx callback must execute on work queue. Now sends and receives one command and response. But hangs on the next. 2018-04-17 13:07:28 -06:00
Gregory Nutt
0271a6a5e9 drivers/wireless/bluetooth: Fix error in testing if interrupts enabled. 2018-04-17 07:13:03 -06:00
Gregory Nutt
5d2c226675 wireless/bluetooth and drivers/wireless/bluetooth: Simply the driver registration/initialization interface. 2018-04-14 11:33:29 -06:00
Gregory Nutt
fa287e8863 Various fixes/changes from intial testing of the HCI UART on the STM32F4-Discovery board. Re-organized how the Blutetooth network driver is initialized. Added lots of new debug output. Add a new STM32 F4 Discovery configuration for testing the HCI UART. Various fixes to get through initialization (still does not). 2018-04-14 09:23:08 -06:00
Gregory Nutt
d25549ac54 This commit adds a Bluetooth HCI UART lower half driver for the STM32
Squashed commit of the following:

    arch/arm/src/stm32:  Add Kconfig options needed by the HCI UART.  Various fixes to finally get a clean error free compile with no unexpected warnings.
    arch/arm/src/stm32:  In HCI UART, use spin_lock_irqsave() instead of enter_critical_section() whenever possible.
    arch/arm/src/stm32:  In HCI UART, fix up naming of configurations so that they are unique.  Still needs Kconfig settings.  Modify logic so that there can be multiple HCI UARTs, some supporting DMA and some not.
    arch/arm/src/stm32:  Integrate watermarks and software Rx flow control into the HCI UART driver.
    arch/arm/src/stm32:  Eliminate some HCI UART UART configuration options.  Per the HCI UART spec, the link will b 8 data bits, no parity, 1 stop bit... Always.
    arch/arm/src/stm32:  Trivial cleanup
    arch/arm/src/stm32:  Fixes most initial compilation issues STM32 HCI UART driver.  Still need to set up USART configuration parmeters for HCI UART
    arch/arm/src/stm32:  Completes first cut at STM32 HCI UART driver.
    arch/arm/src/stm32:  Completes most of read logic for HCI UART.  Still needs to be able to block if no read data is available.  Still missing write and flush logic.
    drivers/wireless:    Remove txenable from HCI UART methods.  arch/arm/src/stm32:  Reorganize some structures in HCI UART.
    arch/arm/src/stm32:  Still messaging the HCI uart driver.
    arch/arm/src/stm32:  Some trivial renaming.
    arch/arm/src/stm32:  A little more HCI-UART logic.
    arch/arm/src/stm32:  Initial setup to support HCI-UART.  Little more than the serial driver with some name changes and a few things removed.
2018-04-13 10:36:23 -06:00
Gregory Nutt
4fd814982d drivers/bluetooth: Extend device simulation. Now makes it all the way through initialization without error. wireless/bluetooth: Add support for IOCTL commangs to get BR/EDR and LE features. 2018-04-06 16:22:49 -06:00
Gregory Nutt
ea84215059 drivers/bluetooth: Extend NULL driver to support a little more testing. 2018-04-06 14:07:03 -06:00