Commit Graph

502 Commits (e7cab5c8dc37acabbf716479c57bd2f6388cdf4f)

Author SHA1 Message Date
Martin Kojtal 00696e623f Merge pull request #3378 from NXPmicro/K66_ENET
K66F: Enable LWIP feature
2016-12-09 15:36:58 +01:00
Martin Kojtal 04f940de2d Merge pull request #3324 from LMESTM/dev_i2c_common_code
Dev i2c common code
2016-12-09 15:30:00 +01:00
Bogdan Marinescu 337c1af22c Don't send events on close()
It's currently possible to generate a socket event when a non-blocking socket is closed:

1. _pending is set to 0 in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L22
   when the socket is created.
2. close() calls event() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.cpp#L66
3. event() increments _pending, and since _pending is 1 it will call _callback() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L167

However, if send() (for example) is called, this can happen:

- send() is called and sets _pending to 0.
- when the data is sent, event() is called, which sets _pending to 1 and calls _callback().
- if close() is called at this point, there won't be an event generated for close() anymore,
  since _pending will be set to 2.

Same thing for recv. Also, same thing for TCPServer and UDPSocket.

This PR changes the initial value of _pending to 1 instead of 0, so that
events are never generated for close().
2016-12-07 17:52:16 +02:00
Mahadevan Mahesh 428e8b23c1 K66F: Enable LWIP feature
Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
2016-12-06 12:37:02 -06:00
Martin Kojtal ab46684d5d Merge pull request #3336 from mikaleppanen/lwip_dhcp_parse_corr
Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7…
2016-12-02 15:51:19 +01:00
Martin Kojtal ab2e869a24 Merge pull request #3157 from SiliconLabs/SiliconLabs-EFR32
[Silicon Labs] Adding support for EFR32MG1 wireless SoC
2016-12-02 15:46:35 +01:00
Laurent MEUNIER 014a48d402 Add more supported boards to I2C master slave asynch test 2016-11-30 08:23:13 +01:00
Martin Kojtal e261e30d05 Merge pull request #3193 from mikaleppanen/lwip_ipv6_eth_down_supp
Added clearing of ipv6 addresses to lwip bringdown function
2016-11-29 18:13:35 +01:00
Martin Kojtal c7d5ef09d0 Merge pull request #3341 from ARMmbed/ns_timeout-rename
Rename timeout.c to not collide with Timeout.cpp
2016-11-29 18:09:35 +01:00
Martin Kojtal 93c08f340a Merge pull request #3062 from jamike/TARGET_STM_USBDEVICE_FS
TARGET_STM :USB device FS
2016-11-29 18:07:11 +01:00
Seppo Takalo 119c118e22 Rename timeout.c to not collide with Timeout.cpp
IAR builds put all object files in same directory, so same
prefix is not allowed.
2016-11-29 17:32:28 +02:00
Mika Leppänen 420d5c3bac Squashed 'features/FEATURE_LWIP/lwip-interface/lwip/' changes from d7a6c6d..cd60f73
cd60f73 Merge branch 'mbed-os-lwip-rc2-maint' into mbed-os-lwip-rc2-maint-prefixed
3a50479 fixed bug #49676 (Possible endless loop when parsing dhcp options) & added unit test for that

git-subtree-dir: features/FEATURE_LWIP/lwip-interface/lwip
git-subtree-split: cd60f73f110829e00df46593fea5db26bcfb1662
2016-11-29 15:00:02 +02:00
Simon Hughes 46411f7f73 CFSTORE issue 3327: fix to build CFSTORE SRAM mode (disabling flash storage). 2016-11-28 16:09:00 +00:00
Anna Bridge fd7d5eca14 Merge pull request #3270 from AlessandroA/update_uvisor
uVisor: Update to v0.26.1
2016-11-24 13:22:14 +00:00
Russ Butler f843d49247 Merge pull request #3267 from SeppoTakalo/mesh_refactor
ONME-2857: Ethernet interface for Nanostack
2016-11-22 12:59:50 -05:00
Alessandro Angelino 1321e12eca uVisor: Update to v0.26.1 2016-11-22 17:24:05 +00:00
Michel Jaouen bc17759226 USBHAL.h : fix indentation 2016-11-22 10:52:10 +01:00
Michel Jaouen ad09abb71f USBAudio , USBSerial :fix call back 2016-11-22 10:52:03 +01:00
Martin Kojtal f7068eb57a Merge pull request #3279 from yanesca/mbedtls-hardware-acceleration-configuration
Move crypto hardware acceleration configuration.
2016-11-21 23:22:16 +00:00
Martin Kojtal a987cc0bee Merge pull request #3271 from ARMmbed/odin_wifi_default_on
WiFi: Make WiFi default networking interface on Odin board
2016-11-21 23:19:02 +00:00
Mizuho 56d71a429e added static specifer in green_metrics.cpp 2016-11-19 08:17:05 +09:00
Janos Follath e9144ad771 Apply new naming convention to mbed TLS macros 2016-11-18 15:01:01 +00:00
Steven Cooreman 245e2e2e2d Revert "[EFR32] Adding hardware acceleration for mbed TLS"
This reverts commit c0301b15d2.
2016-11-18 11:05:36 +01:00
Steven Cooreman ad773716ff [EFR32] Move Nanostack driver to Nanostack folder
mbed compile doesn't support two different FEATURE_X folders being merged, so we'll have to move our nanostack driver into the Nanostack folder for the time being.
2016-11-18 10:58:36 +01:00
Janos Follath 9137574e4d Move mbed TLS configuration symbol to macro section
The configuration option for the mbed TLS specific hardware acceleration
has to be in the macro section and not in the device capabilities
section in targets.json.

The option has also been renamed to better reflect its function.
2016-11-18 09:55:16 +00:00
Janos Follath 80aedd2f39 Move crypto hardware acceleration configuration
The crypto hardware acceleration might require defining a lot of mbed
TLS specific macros. Enumerating all of them in `targets.json` creates
too much noise, therefore we move it into a target specific mbed TLS
header.

The target with crypto hardware acceleration has to
        - indicate its capability in `targets.json` by adding "CRYPTO"
          to the "device_has" section
        - has to define his crypto hardware acceleration related macros
          in an `mbedtls_device.h` header
        - place the `mbedtls_device.h` file in the
          `features/mbedtls/targets/TARGET_XXXX`
          directory specific to the target
2016-11-17 14:38:04 +00:00
Martin Kojtal 3aac153fa8 Merge pull request #3254 from pan-/nrf_long_write
[BLE - NRF5] Add support for long write requests.
2016-11-16 17:45:02 +00:00
Martin Kojtal 5750f31d6d Merge pull request #3238 from LMESTM/dev_i2c_stm32f4hal
Dev i2c stm32f4hal
2016-11-16 17:42:12 +00:00
Martin Kojtal 98029e3906 Merge pull request #3065 from geky/nsapi-remove-same-thread-asserts
nsapi - Remove assertions on same-thread send/recv
2016-11-16 17:41:13 +00:00
Seppo Takalo 3d5962db48 Return localhost from NanostackInterface::get_ip_address()
For NetworkStack::gethostbyname() to properly validate the
IP address version, we must return a valid address from
Networkstack::get_ip_address().
2016-11-16 19:07:23 +02:00
Bartek Szatkowski 20b7f05721 WiFi: Make WiFi default networking interface on Odin board
That disables Ethernet by default and makes sure the Ethernet tests are
not failing when it's disabled.
2016-11-16 12:00:09 +00:00
Seppo Takalo 9f8fe897d8 Add documentation for NanostackEthernetInterface. 2016-11-15 15:30:39 +02:00
Vincent Coubard c59e057717 Fix documentation of function allocateLongWriteRequest. 2016-11-15 13:25:10 +00:00
Vincent Coubard 969c63040e Various fixes regarding typos, dead code and consistency. 2016-11-15 13:22:12 +00:00
Seppo Takalo ae885ca0e9 Implement Ethernet interface for Nanostack.
* New Phy type: NanostackEthernetPhy
* New tasklet: enet_tasklet.
* New Interface: NanostackEthernetInterface,
  inherited from MeshInterfaceNanostack
2016-11-15 13:15:52 +02:00
Seppo Takalo 7732adb8a0 Rename NanostackRfPhy to NanostackPhy
This is to allow other types of PHY drivers than just RF.
Mesh-API does not actually care about driver type, it is drivers
responsibility to register right handlers with Nanostack.

* Implement a wrapper class NanostackRfPhy to ensure backward
  compatibility.
* Remove mesh_connect()/disconnect() functions from MeshInterface
  This job is already done in inherited classes.
* LoWPANNDInterface and ThreadInterface should only be used with
  NanostackRfPhy.
2016-11-15 13:12:18 +02:00
Seppo Takalo 6ba755e444 Move MeshInterfaceNanostack to own file.
+Also nanostack_lock() moved to mesh_system.h
+Added includes into NanostackInterface.h to be backward
compatible
2016-11-15 13:12:18 +02:00
Seppo Takalo 27cced74fb Get rid of Mesh6LoWPAN_ND and MeshThread classes.
* Move all the functionality to LoWPANNDInterface and
    ThreadInterface classes.
* AbstractMesh class modified to be pure virtual
* Thread/6LoWPAN specific functionality totally separated.
    Now linker will drop the unreferenced classes.
* MeshInterfaceNanostack now inherits from AbstractMesh
2016-11-15 13:12:18 +02:00
Seppo Takalo 62558e9cff Get rid of AbstractNetworkInterface class. 2016-11-15 13:12:18 +02:00
Seppo Takalo 154d66404a Get rid of MeshInterfaceFactory. 2016-11-15 13:12:18 +02:00
Seppo Takalo 53cc28f4c5 Remove some references to YOTTA_CFG. 2016-11-15 13:12:18 +02:00
Sam Grove b6cc841a54 Merge pull request #3248 from LMESTM/fix_i2c_f411re_pins
test i2c slave: use standard Arduino pins for NUCLEO_F411RE
2016-11-14 21:50:59 -06:00
Sam Grove 71d253c86d Merge pull request #3240 from ARMmbed/ns_integration
Ns integration
2016-11-14 21:50:33 -06:00
Anna Bridge 405f8937a7 Merge pull request #3191 from tung7970/fix-mbedos
Fix lwip_mac_address buffer overflow and set_ip_bytes out of bound access
2016-11-10 17:05:38 +00:00
Anna Bridge 805af00b87 Merge pull request #3194 from NXPmicro/Update_K64_SDK_Drivers
Update K64 sdk drivers
2016-11-10 17:05:02 +00:00
Vincent Coubard 453045ab74 [BLE - NRF5] Add support for long write requests. 2016-11-10 16:58:07 +00:00
Anna Bridge 5fd81b37c3 Merge pull request #3232 from geky/nsapi-fix-gethostbyname-unspec-literal
nsapi - Fix missing NSAPI_UNSPEC check in gethostbyname for ip literals
2016-11-10 16:54:27 +00:00
Laurent MEUNIER 458752262e test i2c slave: use standard Arduino pins for NUCLEO_F411RE 2016-11-10 15:25:46 +01:00
Bartek Szatkowski db15c1a0a3 WiFi: Minor fixes to docs and includes 2016-11-10 09:40:48 +00:00
Mika Leppänen 4babe02b62 Added clearing of ipv6 addresses to lwip bringdown function 2016-11-10 09:07:35 +02:00