No need to set the status to -ETIMEDOUT in connect callback
if user did not want to have a timeout when doing a TCP connect.
Change-Id: I6d6e565a8d12bcefbcd9de751e789b5e43aad244
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
A connection refused needs to be exposed to the user, otherwise the
connection will be stuck as a zombie forever.
This patch also adds a ENOTCONN check in net_context_recv() to match
the one that was already there in net_context_send().
Change-Id: I4f9ae46dd849f68ed97976add7da5daf1932cf55
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The net_context_connect() callback was being invoked synchronously
with the transmission of the SYN packet. That's not very useful, as
it doesn't tell the user anything they can't already figure out from
the return code. Move it to the receipt of the SYNACK instead, so the
app can know that it's time to start transmitting. This matches the
Unix semantics more closely, where connect(2) is a blocking call that
wakes up only when the connection is live.
Change-Id: I11e3cca8572d51bee215274e82667e0917587a0f
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
With CONFIG_NET_DEBUG_L2_BLUETOOTH is disabled the code generate the
following warning:
subsys/net/ip/l2/bluetooth.c: In function 'eir_found':
subsys/net/ip/l2/bluetooth.c:301:16: warning: unused variable 'addr' [-Wunused-variable]
bt_addr_le_t *addr = user_data;
^
Change-Id: I1a1ca20c4f2e4fa8aa2a551d2fffa1f86874760e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When checking if the L2CAP channel is connected it is not enough to check
if the conn member is set since the connection may still be pending.
Change-Id: I93a2328943b0ca0e42cdb5c525b30c7cdddd1c18
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add configs for MCR20A device to echo_server and echo_client.
Change-Id: Ic0e310c0eb2eefe6ce5752a20b0c079b7ea8757c
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add driver and configuration for the MCR20A 802.15.4
transceiver.
Jira: ZEP-1429
Change-Id: I0b17b688220a47c2f0e5cde269064bbd0dec824a
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add overwrites header file for MCR20 Register values.
Overwrite values are non-default register values that
configure the transceiver device to a more optimally
performing posture.
(Excerpt from the documentation part of MCR20Overwrites.h)
Origin: Kinetis MKW2xD and MCR20A Connectivity Software
URL: https://www.nxp.com/
(The complete URL can be found in the ext/hal/nxp/mcux/README)
Revision: (REV 1.0.0)
Maintained-by: External
Change-Id: Id96db2ad70279c0b11d749d65e9148244d8fdc2f
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Only CONFIG_NET_SLIP_TAP will select SLIP, UART_PIPE,
UART_INTERRUPT_DRIVEN and SLIP_TAP. Otherwise apps will crash on
qemu.
Jira: ZEP-1617
Change-Id: Ibefbe708deb05e28b43ed4225211a5af655cec8d
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use printk(), snprintk() instead of printf() and snprintf().
CONFIG_STDOUT_CONSOLE is anyway disabled by default so printf()
will not output anything without it.
Change-Id: I5899741df2e187dae7b4602d074e9b4cbb9952aa
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use printk(), snprintk() instead of printf() and snprintf().
CONFIG_STDOUT_CONSOLE is anyway disabled by default so printf()
will not output anything without it.
Change-Id: Ide24e4d669e9821289189ed28e30a596120d9611
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use printk(), snprintk() instead of printf() and snprintf().
CONFIG_STDOUT_CONSOLE is anyway disabled by default so printf()
will not output anything without it.
Change-Id: I9ad778e318fe999e79ec34182f2de8574e45b7d4
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The debug config was incorrect.
Change-Id: Id32cbcfb809acc9e4ab202b401d25e41a7531c42
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Instructions to verify DHCPv4 client functionality in QEMU and
FRDM_K64F.
Change-Id: I623128186387c0c3237c8e759b949a3d0fde0993
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
After queueing full packet to RX queue we set pkt_curr to NULL, if we
get right after that SLIP_END we shall check for pkt_curr to avoid
NULL pointer assignment.
Coverity-CID: 157574
Change-Id: I2be40a652867e73b4a1994f529dc21980ecb35b4
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Older default value of 2 is too small for even simple uses, for
example enabling just CONFIG_NETWORKING, CONFIG_NET_IPV4,
CONFIG_NET_SLIP_TAP makes a Zephyr application hang on start up
(apparently, waiting to allocate more buffers). While value of 3
is enough to cover the above options, set new default to 4 to
accommodate configurations with IPv4/IPv6/UDP/TCP enabled.
While the new default slightly increases RAM footprint, it's
apparently better for users who are short of it to optimize it
explicitly, rather than potentially make every Zephyr beginner
wonder why enabling networking breaks applications in non-obvious
way.
Change-Id: I76e83517f0d914ce616a930c3c48ee5c52567b88
Jira: ZEP-1619
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Some applications are not prepared for using multicast address and
specifying the interface, so it may be convenient for the user to be
able to use a unicast address when communicating with the
samples. This aligns this sample with most of the networking samples.
Change-Id: Ic97ea5a346a650751b6e2cbfefad25a3e700278c
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Samples instructions are to follow the rst format so they are
consistent with the rest of the documentation.
Change-Id: I37f06139484a4632e5b9c720ce1317feab68358b
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Add a label in the arduino 101 document for the flashing
bluetooth instructions, and link to that instead of the
wiki page (deprecated).
Change-Id: Ie39240cdf4881356f634d21ead1d7ae93ccd60a1
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
We're using SPDX tags for Apache 2.0 licensing instead of the
Apache 2.0 boilerplate comment block.
Change-Id: I9e56f918ab4ed4d127dbe64538c9fa62886386a8
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Change hard url into :ref: to board documentation
Change-Id: I9d8a585bb0e7274cf3233eadac2e303cc98ef86a
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
At the default sample rate of 400 Hz, there is not enough bandwidth on
the UART at 115200 baud to print every sample. Fix by decimating the
sensor data by 4 before printing to the console.
This issue was discovered after fixing ZEP-1507.
Change-Id: I451ec9873ca93fe417d5d5a2d6d13b5e921c7611
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fixes fxos8700_gpio_callback() to pass a pin number to
gpio_pin_disable_callback() rather than a pin mask.
Jira: ZEP-1507
Change-Id: I15bfbf4d3377f22942aa549377472d2b1142c32b
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Ben and Al are spending most of their time on other projects.
Change-Id: Ic0e9182539ca9515a2b4b0d431637692d892d0c5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
I will look after this for the time being until we can
designate a fulltime maintainer.
Change-Id: I1b76a3a5657ef0c828e7012ad7828ccf7d2fda32
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Remove dev driver and integrate it in the default pinmux driver.
Jira: ZEP-958
Change-Id: I55670240f8a21749d3a6ae22e300e16ba80a2fb6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
According to include/gpio.h, GPIO_INT_LEVEL is 0,
which means the branch to test GPIO_INT_LEVEL is
always false and GPIO_INT_LEVEL cases will always
pass.
This patch also fixes another minor bug in main.c.
Coverity-CID: 160074
Change-Id: I1fefa978e65bf801f244b4c2960cb87a26b0829e
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
According to Coverity, rand() is a risk function.
So we use another method to generate random value.
Coverity-CID: 160070
Change-Id: Icb7e06cd43cb8bade6596cc37e9d04bfc59e1de7
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
Rather than having a different set of include paths between offsets.o
and all other objects lets just use ZEPHYRINCLUDE. This removes any
headaches with needing includes from other paths to get offsets.o to
build.
Change-Id: I827a6a3d94f786487217bb414e4a25bd8fee4e00
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Basic interrupt driven i2c driver for the NRf5 series.
The NRf5 series hardware imposes a constraint that various peripherals
cannot be used simultaneously. This driver does not implement mutual
exclusion against SPI, or SPIs drivers (yet).
Change-Id: I308d93bc486eef95db7b95c6b7c9beafc0d7e97f
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Fold the OPEN_DRAIN GPIO interface into the DRIVE_STRENGTH interface.
The latter is more flexibile, suporting a larger range of hardware
capability.
Change-Id: I7ee01c8d375e3e4fe8ad10c075e365d246e83c75
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
The STM32 GPIO driver extended the generic GPIO driver interace with
the concept of OPEN_DRAIN. There is previous discussion about
representing such concepts in the GPIO interface in a more general
fashion here:
https://lists.zephyrproject.org/archives/list/devel@lists.zephyrproject.org/thread/6DCFUAKCOOOBHUO3ZK45ES6IQXOEOFWN/
The DRIVE STRENGTH interface supports the concepts of OPEN DRAIN and
other variants supports by other vendors hardware.
Adjust the STM32 GPIO driver to use the DRIVE STRENGTH interface. A
following patch will address the simplication of gpio.h
Change-Id: I56b0792ec2b21f1adc673dff019288dc8573d005
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Extended the nRF5 GPIO driver to support configurable pin drive
strengths.
Change-Id: I59c42b8a69cc37b594c2388b892d3accd7b19807
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Provide a mechanism to configure different pin drive strengths on
hardware with that capability.
Configuration flags are provided to select each of DFLT, ALT and
DISCONNECT drive strengths independently for low and high outputs.
This provides sufficient flexbility to configure all of the drive
strength capability in at least nRF5 hardware.
The flags are chosen such that in the absence of a drive strength
flag a driver selects DFLT drive strength. This ensures that an
existing application that omits a flag continues to observe the
preexisting behaviour.
The behaviour of the drive strength flags is documented such that a
driver for hardware that does not support a particular drive strength
will simply defalt to the standard drive strength for that hardware.
Change-Id: I9894cc5e739a1899a4ecf795f2a5980b95b0c7a0
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Update elm-chan FAT FS with latest sources. Updated README with changes
made to default configurations.
Change-Id: I3c868479506042d174ac7df360ce62931d8ac5af
Jira: ZEP-1338
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
The 0.9 SDK is not released yet!!
This reverts commit 7995e6207c.
Change-Id: I550d1aa27ba7a06ff2cda09496ceb92645a17460
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
In RISCV, stack always grows by a multiple of 16 bytes, even if we are saving
data of size < 16 bytes onto the stack.
Hence, for riscv32 architecture increase stack size to 512 for
threads_customdata, otherwise we experience stack overflow.
Change-Id: I805bc346b8a2c2f4ad6d0db622eb262290af942b
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>