Include stdlib.h to suppress a missing declaration
warning for exit() when compiled as a Linux target.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Add comment that explains why a different byte order is used for the
3-byte opcode on the CID part of the opcode.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use 24-bit functions for byteorder and net_buf in order to make the
byteorder used more readable.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix tx_time calculation for the case that BT_CTRL_PHY is defined and
there has not been a feature exchange.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix tx_time calculation for the case that BT_CTRL_PHY is defined and
there has not been a feature exchange.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Credits are 2 octects long so an s16_t positive portion can only half to
the theorical maximum number of credits, so instead this uses u16_t and
do a bound check instead of checking for negative values.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With the changes that introduced a queue k_sem is only used with
K_NO_WAIT which means it is no longer possible to wait/block for credits
so the usage of k_sem is no longer needed and can be safely replaced
with atomic_t just to count the available credits at a given instant.
Fixes#19922
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add printing of the remote version information whenever the new
CONFIG_BT_REMOTE_VERSION option is enabled.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Make remote features and remote version accesible to the application
through the bt_conn_get_remote_info object. The host will auto initiate
the procedures. If the procedures have not finished with the application
calls bt_conn_get_remote_info then EBUSY will be returned.
The procedures should finish during the first 10 connection intervals.
Signed-off-by: Sverre Storvold <Sverre.Storvold@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor the handling of the host auto initiated LL procedures.
This makes it easier to add new auto initiated procedures as well as
reduced the maintenance by reducing code duplication.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit reverts the change that moved the remote version event from
a priority event to a normal event. This is done because the strategy
for using this event has been changed and will be used with a callback
instead of a semaphore that could be locked from the RX thread.
This commit retains the infrastructure that was added in the controller
so that moving events to priority processing is still possible.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
We have been using thread, th and t for thread variables making the code
less readable, especially when we use t for timeouts and other time
related variables. Just use thread where possible and keep things
consistent.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The RTC peripheral found in the SAMD5x/SAME5x MCUs is very
simmilar to the one found in existing sam0 devices with only
a few changes to register names and the clock source selection.
Signed-off-by: Benjamin Valentin <benpicco@googlemail.com>
How prompts work is better documented nowadays, and these comments might
not be that helpful if you don't know.
There are lots promptless symbols that don't have a comment.
Also fix up some comments in arch/Kconfig that seem misplaced/redundant,
and clean up some whitespace (no blank line after a comment makes it
look like it only applies to the symbol directly after it to me).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Same deal as in commit bd6e04411e ("kconfig: Clean up header comments
and make them consistent") and commit 1f38ea77ba ("kconfig: Clean up
'config FOO' (two spaces) definitions"), for some newly-introduced
stuff.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Xtensa requires building a new toolchain for a specific SoC.
By default xtools built Xtensa toolchains all have prefix of
xtensa-zephyr-elf. In order to distinguish different toolchains,
they are now placed in their own directories under their SoC
name. This allows us to have multiple Xtensa toolchains
targeting multiple SoCs.
The additional level in path name is introduced in SDK v0.11
and sdk-ng master.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
A single menu within an if like
if FOO
menu "blah"
...
endmenu
endif
can be replaced with
menu "blah"
depends on FOO
...
endmenu
Fix up all existing instances.
Also remove redundant extra menus underneath 'menuconfig' symbols.
'menuconfig' already creates a menu.
Also remove the menu in arch/arm/core/aarch32/Kconfig around the
"Floating point ABI" choice. The choice depends on FLOAT, which depends
on CPU_HAS_CPU, so remove the 'depends on CPU_HAS_FPU' too.
Piggyback removing a redundant 'default n' for BME280.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add Add STM32_OSPEEDR_VERY_HIGH_SPEED flag for SPI1_SCK to function
properly. This is needed for the proper communication with the LoRa
modem. Without this flag, the received data is mangled when burst
read is performed.
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Allow to build also for general boards with supported ieee802154 and
usb, like reel_board, etc.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Create cc2520 overlay file. Can be used with:
cmake -DBOARD=quark_se_c1000_devboard \
-DOVERLAY_CONFIG=overlay-cc2520.conf ..
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The CONFIG_UP_SQUARED_{ATOM,CELERON,PENTIUM} symbols are unused after
commit c5e582038c ("boards/x86/up_squared: default to new local APIC
timer").
Since these symbols are the only thing in boards/x86/up_squared/Kconfig,
which is osource'd in in board/Kconfig, just remove the entire file.
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The minimum possible mempool block size is either 8 or 16 for 32-bit or
64-bit targets respectively. Defining BYTES_TO_WRITE to 4 and using that
with K_MEM_POOL_DEFINE() won't produce the expected result i.e. only 1
block at any time could be allocated instead of 4.
Yet, the test does run successfully regardless of the block allocation
loop in tpipe_block_put().
It turns out that the pipe buffer is large enough to consume all the
block data synchronously, meaning that the mempool block is freed right
away and available for the next loop iteration. This also means that the
asynchronous delivery mechanism is never exercized.
Fix both issues by defining PIPE_LEN and BYTES_TO_WRITE in terms of
_MPOOL_MINBLK with the expected factor of 4, and adding a new test
using the half-sized pipe where the pipe buffer gets saturated and
mempool memory blocks are actually queued for asynchronous consumption.
The source data string has to be extended to accommodate larger pipe
sizes too.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit introduces a new Kconfig symbol MCUMGR_SMP_BT_AUTHEN.
When selected it configures the Bluetooth mcumgr transport to require
an authenticated connection.
If the Bluetooth mcumgr transport is selected then this new symbol is
selected by default. Bluetooth SMP is also selected to ensure Zephyr
is configured with Bluetooth security features enabled to provide
Bluetooth authentication APIs to the user's app. Users can choose to
disable this level of security for the Bluetooth mcumgr transport if
they do not require it.
Fixes#16482
Signed-off-by: Nick Ward <nix.ward@gmail.com>
This adds support for the EC (embedded controller) on a Google
reference board with codename "kukui". This board uses the STM32F098RC
chip. We built an application for the board and verified UART
functionality on the board.
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
The check introduced in #18777 uses incorrect CMake syntax.
IN_LIST requires the list variable name, not its content.
Signed-off-by: Jack Dähn <jack@jkdhn.me>
Although this sensor is demonstrated by the X-NUCLEO-IKS01A3 sample,
maintenance of the driver is simplified if it can be tested in
isolation. Provide a sample modeled on hts221.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Implement thread foreach processing with limited locking
to allow threads processing that may take more time but allows
missing some threads processing when the thread list is modified.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
- Added support for TMP117 in existing driver for TMP116
The Texas Instruments TMP117 is a higher precision upgrade
from TMP116. It shares most functionality, but has a
differing device ID.
This patch will run with the hardware IDs of both devices.
- Fixed an int promote issue in tmp116_channel_get
Negative temperature values in drv_data->sample were not
processed correctly.
The error occured during integer promotion from u16_t to s32_t
in this code line:
tmp = (s32_t)drv_data->sample * TMP116_RESOLUTION;
By first promoting to s16_t, the correct result is obtained:
tmp = (s16_t)drv_data->sample * (s32_t)TMP116_RESOLUTION;
- Made temperature resolution compatible to sensor API
The fractional part of the temperature was returned as a
multiple of 10^-7 deg.Celsius.
This differs from the resolution sugegsted by the sensor API,
which is 10^-6.
The driver is now returning temperature readings with
a resolution of 10^-6 deg. Celsius.
- The changed driver was tested using following hardware:
TMP117 attached to disco_l475_iot1 via i2c1
Signed-off-by: Hans Wilmers <hans@wilmers.no>