The function return type was declared incorrectly. Also, the magic
checking for i after exiting the loop could cause some false positive
compiler warnings. Instead, return directly from the loop (with the
downside of duplicating a few lines of code).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It's in practice impossible for the time between two beacons to be
more than 50 hours (the approximate wrap-around time for a 32-bit
millisecond timer), so we can use a 32-bit timestamp instead of a
64-bit one for the beacon tracking.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The LE scanning and advertising implementations were allocating and
holding buffers (the scan & advertising parameters respectively) while
at the same time potentially sending other commands (such as setting
the local private address). If these APIs would end up being called
simultaneously from different contexts, this could lead to a deadlock
in trying to allocate HCI command buffers, especially considering that
the default HCI command buffer count is 2.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Some toolchains, such as the one provided by Espressif for the ESP32,
or ISSM provided by Intel, will contain only the compiler, linker, and
supporting tools. Other binaries needed by the build system that are
provided by the Zephyr SDK need to be found somewhere else.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
sanitycheck was incorrectly documenting that --extra-args would pass
on it's input unchanged to Make.
In reality --extra-args acts as a way to define extra CMake cache
entries. The key-value entries will be prefixed with -D before being
passed to CMake.
E.g
"sanitycheck -x=USE_CCACHE=0"
will translate to
"cmake -DUSE_CCACHE=0"
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
USE_CCACHE has been deprecated. ccache now defaults to being enabled
and users can define the CMake variable -DUSE_CCACHE=0 to turn it off.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Version 0.2.8 of this library has been released on Aug 29, and this
patch updates the library from version 0.2.7. A summary of changes
is available at the official repository at:
https://github.com/01org/tinycrypt/releases/tag/v0.2.8
A number of the changes we already had in tree, so the import to sync
with v0.2.8 is pretty minor.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move the dts files into the board dir so that board ports can be more
standalone. This will allow us at some point to have board ports
outside of the tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move the dts fixup files into the board dir so that board ports can be
more standalone. This will allow us at some point to have board ports
outside of the tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Allow for DTS_SOURCE to be defined in other locations (ie by board
directory code). Thus allow the board to set any location to find the
dts source file.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Allow for DTS_BOARD_FIXUP_FILE to be defined in other locations (ie by
board directory code). Thus allow the board to set any location to find
the fixup file.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename the variables related to DTS fixup to be clear what they are used
for. This also lets us introduce a SOC level DTS fixup in the future
that is distinct from the board one.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update the documentation for the Bluetooth samples not to refer to the
old style of building using make. Instead, simply refer to the general
instructions.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
CMake requires "-D" for every macro that is passed into it. Add the
relevant "-D" for the Make variant of the extension.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
During large USB transfer it's pretty common to call ep_write whereas
the previous TX transfer is not achieved and so the TX FIFO space is
not available. Sleeping 20ms in this case introduce a relatively high
latency and reduce the throughput.
This can be observed when pinging the board with CDC-ECM net class.
ping reply is split into 2 USB TX transfer, the second one is only
triggered after 20ms, making ping latency > 20ms.
To fix this, just continuously read the FIFO availabilty and fire TX
as soon as possible.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Rename netusb project file to be more general and support sanity build
for 96b_carbon board.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In the same way as dw driver, check that FIFO is empty before
writing any new data. This patch introduces a boolean semaphore
which is requested before any new TX transfer and released on
transfer completion.
This fixes usb-ecm support on 96b_carbon board.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
When sending a packet with AR flag set, the ACK frame that should be
replied to it must holp the same sequence number, so let's verify this
properly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There will be place where validating only this part of the frame will be
necessary. This will avoid to run the little bit heavier
ieee802154_validate_frame().
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add extensions/zephyr to the documentation. This is where Sphinx
extensions customized for Zephyr will live.
Within, add application.py. This provides a directive,
zephyr-app-commands, which generates commands in the docs to build,
flash, debug, etc. an application. For now, these are Unix shell
specific. Later on, they can be customized to generate additional
formats, perhaps with extra options.
After this is used throughout the tree, doing this with an extension
enables global changes with changes to the directive implementation
only.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Unify the format and mechanisms used in the different Getting Started
guides so that they are consistent in:
- The way Kconfig is built
- Avoiding using -B and -H CMake options
- -DBOARD instead of export
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We no longer want to pin users to 3.8.2. Instead we tolerate the warning
and therefore ask users to get the latest CMake package from their
distro.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>