This sample is designed to respond to the Linux
rpmsg sample client.
It should be platform independent and based on the
the integration of a resource table in the elf file.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Add a k_timeout_t type, and use it everywhere that kernel API
functions were accepting a millisecond timeout argument. Instead of
forcing milliseconds everywhere (which are often not integrally
representable as system ticks), do the conversion to ticks at the
point where the timeout is created. This avoids an extra unit
conversion in some application code, and allows us to express the
timeout in units other than milliseconds to achieve greater precision.
The existing K_MSEC() et. al. macros now return initializers for a
k_timeout_t.
The K_NO_WAIT and K_FOREVER constants have now become k_timeout_t
values, which means they cannot be operated on as integers.
Applications which have their own APIs that need to inspect these
vs. user-provided timeouts can now use a K_TIMEOUT_EQ() predicate to
test for equality.
Timer drivers, which receive an integer tick count in ther
z_clock_set_timeout() functions, now use the integer-valued
K_TICKS_FOREVER constant instead of K_FOREVER.
For the initial release, to preserve source compatibility, a
CONFIG_LEGACY_TIMEOUT_API kconfig is provided. When true, the
k_timeout_t will remain a compatible 32 bit value that will work with
any legacy Zephyr application.
Some subsystems present timeout (or timeout-like) values to their own
users as APIs that would re-use the kernel's own constants and
conventions. These will require some minor design work to adapt to
the new scheme (in most cases just using k_timeout_t directly in their
own API), and they have not been changed in this patch, instead
selecting CONFIG_LEGACY_TIMEOUT_API via kconfig. These subsystems
include: CAN Bus, the Microbit display driver, I2S, LoRa modem
drivers, the UART Async API, Video hardware drivers, the console
subsystem, and the network buffer abstraction.
k_sleep() now takes a k_timeout_t argument, with a k_msleep() variant
provided that works identically to the original API.
Most of the changes here are just type/configuration management and
documentation, but there are logic changes in mempool, where a loop
that used a timeout numerically has been reworked using a new
z_timeout_end_calc() predicate. Also in queue.c, a (when POLL was
enabled) a similar loop was needlessly used to try to retry the
k_poll() call after a spurious failure. But k_poll() does not fail
spuriously, so the loop was removed.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Kernel timeouts have always been a 32 bit integer despite the
existence of generation macros, and existing code has been
inconsistent about using them. Upcoming commits are going to make the
timeout arguments opaque, so fix things up to be rigorously correct.
Changes include:
+ Adding a K_TIMEOUT_EQ() macro for code that needs to compare timeout
values for equality (e.g. with K_FOREVER or K_NO_WAIT).
+ Adding a k_msleep() synonym for k_sleep() which can continue to take
integral arguments as k_sleep() moves away to timeout arguments.
+ Pervasively using the K_MSEC(), K_SECONDS(), et. al. macros to
generate timeout arguments.
+ Removing the usage of K_NO_WAIT as the final argument to
K_THREAD_DEFINE(). This is just a count of milliseconds and we need
to use a zero.
This patch include no logic changes and should not affect generated
code at all.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
We rename the nRF91 Dev Kit board target for the NRF52840
controller (nrf52840_pca10090) to nrf9160dk_nrf52840. We
update all associated references in the supportive
documentation and all nRF9160-related cofigurations and
overlay files in the samples and tests in the tree. We
also remove an un-referenced board image file that had
erroneously been part of the documentation of this platform.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We rename the nRF91 Dev Kit board target (nrf9160_pca10090)
to nrf9160dk_nrf9160. We update all associated references
in the supportive documentation and all nRF9160-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit removes the Kconfig MAC address configurations for the
`sam_e70_xplained` board, as these have been migrated to use the device
tree configurations.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The MAX_PAYLOAD_SIZE must reflect the size of COAP_BLOCK_x. This is
necessary becase BLOCK size represents max payload size. The current
value create inconsistencies for coap lib. The same way,
MAX_DOWNLOAD_DATA must allocate sufficient space for MAX_PAYLOAD_SIZE
plus all space for coap header etc.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This is a follow-up to commit 4253eae005.
The board known earlier as nrf52840_pca10056 is now named
nrf52840dk_nrf52840.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Use the scan types defined in bluetooth.h instead of the hci defined
ones. Although they have the same value it is best to avoid using the
hci.h header in applications.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Deprecate BT_LE_ADV defines in hci.h that are expected to be used by the
application in the scan received callback to identify the advertising
PDU type. These defines are mixing HCI input parameters and advertising
PDU types. Internally it is acceptable to mix these, but at the API we
should to mix in them.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Rename filter_dup parameters used for scanning filter options to the
more generic name options, and make scan filter options follow same
naming patters as advertising and initiator scan options.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Deprecate bt_create_conn_le and rename it to in order to add return
code, new arguments and to follow the established naming convention.
Add API for the application to control the scan parameters of the
initiator role. This allows the application more scheduling control
of the initiator in multi-role scenarios. Also provides options to
configure the initiator for LE Coded PHY for long range support.
We deprecate the old way of creating connection to make the name more
consistent with the rest of the API.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
We can build the openamp library configured with VirtIO master
support, VirtIO slave support, or both. By default both master
and slave code is enabled. We can reduce code footprint by only
build master or slave as needed.
Expose Kconfig options for Master & Slave and set them accordingly in
the sample.
Here's the code reduction we see:
For the total image we see as 1260 byte reduction:
Memory region Used Size Region Size %age Used
FLASH [Master & Slave]: 30308 B 256 KB 11.56%
FLASH [Master only] : 29048 B 256 KB 11.08%
On the remote side we see a 828 byte reduction:
Memory region Used Size Region Size %age Used
FLASH [Master & Slave]: 11564 B 64 KB 17.65%
FLASH [Slave only] : 10736 B 64 KB 16.38%
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Just to get something to test for PM, via frdm_k64f board. So only this
board will get PM enabled.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The nRF52840 DK board target, so far known as nrf52840_pca10056,
is renamed to nrf52840dk_nrf52840.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
AN521 is a dual core FPGA on MPS2+ with both cores are CM33. Add openAMP
to support on it.
Core 0 is primary core, it runs as master, core 1 is remote, it runs
as slave.
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Add configuable shared memory address for openAMP samples. There is a
plan to add more platforms supported for openAMP in zephyr.
Each platform can specify the shared memory address and device by
device tree and add it's support in openAMP samples.
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
gpio_pin_get() returns a negative value in case of error and
callbacks_configure was assigning this value to an unsigned variable.
Fixes: #22643
Coverity CID :208206
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
In addition to the existing plain TCP MQTT test, add the same test
with TLS applied. Robert Lubos provided the updated test_cert.h, which
contains the same certificate as in the echo samples.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
OpenThread NCP sample application.
Tested on FRDM-K64 with RF2XX connected via USB to a Linux machine
running wpantund.
Signed-off-by: Markus Becker <markus.becker@tridonic.com>
This doesn't sacrifice any readability when compiled for boards that
don't support this alias.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is joint work with Kumar Gala (see signed-off-by).
Document the changes to the generated node macros in macros.bnf,
moving the old file to legacy-macros.bnf and putting it in its own
section.
The actual generated macros are now a low-level detail, so rewrite the
foregoing sections as examples in terms of the new <devicetree.h> APIs.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The documentation motivates this function by saying it is more
efficient than the core 64-bit version. This was untrue when
originally added, and is untrue now. Mark the function deprecated and
replace its sole in-tree use with the trivial equivalent.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Allocates segmented message buffers as slabs in a common pool for RX and
TX. This reduces memory requirements for both TX and RX, as TX messages
can be stored without the network and advertising buffer overhead, and
RX can use only the slabs it needs, instead of allocating a full size
segmented message. This approach also removes the need for decrypting
the segments for each retransmission, reducing overall processing load.
Slab based segmentation for tx also introduces queuing of segmented
messages, which allows the application layer to send multiple messages
to the same destination without violating Bluetooth Mesh specification
v1.0.1, section 3.6.4.1. This mechanism is provided through a flag that
blocks segmented messages to a destination which a message is already
being sent to until the previous message finishes.
This changes the SDU size configuration to a symmetrical
RX_SEG_MAX/TX_SEG_MAX pair of configurations, plus a new segment pool
side configuration. It also removes the binding between the TX_SEG_MAX
config and the advertising buffers, reducing the minimum advertising
buffer count from 6 to 3.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Cloud to device communication supported with simple
subscribe topic details. Details are added for how to send
messages from cloud.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Name all subsystem reference consistently with an '_api' postfix and
clean up naming and folder structure in some cases.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Various kconfig symbols where defined specifically for board
nucleo_l432kc. Though, most are generic to the sample so should moved
directly to sample prj.conf
Some others parts of boards default configuration so could be removed
as well.
Last remove CONFIG_OPENOCD_SUPPORT as sample has no dependency with
this symbol.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
No use starting the application if the network interface is down.
So start to listen connection management events and start the
TCP and UDP handlers only after network is up and ready.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Modify the mqtt_publisher sample app to return an exit code after
its tests have been run. Add Kconfig options to set the number of
test iterations per TCP connection as well as the number of TCP
connections to make to the server while keeping the default values
intact. Further add a config overlay file to lower the number of
TCP connections and test iterations used.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Without it, the sample crashes for qemu_x86 with:
[00:00:03.080,000] <err> os: Page fault at address 0x7275632f
(error code 0x10)
[00:00:03.080,000] <err> os: Linear address not present in page tables
[00:00:03.080,000] <err> os: PDPTE: Non-present
...
Increase by reasonable, but small amount, to keep watching stack usage
growth trends in Zephyr.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Sample code that showcase PECI API get device CPU information
then monitors temperature.
Verified in Modular MEC1501 connected to computer (PECI host).
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Remove data length and phy update set to 'n' on board that does not
support these features anyway. BT_CTLR_DATA_LEN_SUPPORTED and
BT_CTLR_PHY_UPDATE_SUPPORTED are both set to 'n'.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove BT_CTLR_DTM_HCI=y config which is not supported for this board.
This produced the following warning:
warning: BT_CTLR_DTM_HCI was assigned the value
'y' but got the value 'n'. Check these unsatisfied dependencies:
BT_CTLR_DTM_HCI_SUPPORT (=n).
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor conf files to use prj.conf + board/<board>.conf configuration.
This allows us to have put common configurations into the prj.conf and
have board specific configs in each board file.
This also respects adding additional prj.conf files such as
-DCONF_FILE='nrf5.conf debug.conf' to add debug configuration.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update main stack size for nrf5 boards. This is to support an
alternative hci_driver that has a higher stack size usage in hci driver
open. Measured stack usage in this case to 808/1024.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add sample of how to handle eSPI host warnings when these are
intercepted by app code.
Replace printk with logging macros to standardize the sample.
Log additional details about peripheral channel notifications.
Remove unnecessary trailing \n from logging messages.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Sample code that demonstrates power management features on
MEC15xx-based boards.
It showcases how an app can enter into light and deep sleep.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This sample has nrf51_pca10028 on its platform_whitelist but lacks
configuration and overlay files that would make it possible to build
this sample for that board. This commit provides such files.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Once the MQTT ping response has been received from the server, the
application is then notified with the MQTT_EVT_PINGRESP event.
Signed-off-by: PK Chan <pak.kee.chan@nordicsemi.no>
This change removes the hardcoded subsystem list in gen_kobject_list.py
favor of marking the relevant driver API structs with the _subsystem
sentinel.
Signed-off-by: Corey Wharton <coreyw7@fb.com>
In order to run the TTCN-3 based sanity check, add a TCP
sample app and instructions for running the sanity check.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Coverity thinks this is a long because FLASH_TEST_REGION_OFFSET is a
signed value. Zephyr doesn't use standard types so make it a u32_t.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This was silently corrupting memory on x86-64.
Enable CONFIG_TEST so that this is detected properly,
and increase the stack size appropriately.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This sample requires led0 in the board devicetree's /aliases.
Improve the error message when that is not available.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Improve the documentation of the blinky sample, fixing typos, adding
links to the relevant DT documentation and cleaning up a bit.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
And an overlay for the nRF52840 DK to be able to build the sample after
the transition to Device Tree.
Fixes#23148.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
To ease maintenance of samples and tests some SoCs define
CONFIG_WDT_DISABLE_AT_BOOT=y to disable the watchdog. Ensure the option
is set to n for samples and tests that require watchdog module not to be
disabled during boot.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The sample contained calls that were not using the return
value, which was detected by Covery Scan as an issue. This
commit fixes it by changing to (void).
Fixes#18378
CID#203537
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
Handle connected callback with error status not releasing the default
conn object in central samples. This can happen when the initiator fails
to create the connection within 3 seconds and is canceled by the host.
Also restart the scan role in this case.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The one page on devicetree is too long. Split it into multiple pages
to make it easier to digest and more squintable. This is basically
just moving content around; minimal changes have been made apart from
redoing some transitions and adding a couple of introductory paragraphs.
Rename the 'device-tree' Sphinx :ref: target while we are here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
After running command --list-test-duplicates
I found out that some test cases have same names (duplicated).
To get rid of it, I decided to change names in .yaml files
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This test can't be evaluated with sanitycheck, it
requires special set-up on multiple AMP cores to
function properly. Add build_only tag.
Fixes: #19643Fixes: #22317
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels. Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Replace Kconfig configuration data with devicetree bindings using
(ADC) io channels. Rework the sample to document expectations about
the relationship between the reference voltage and the divider input
voltage, and update the sensor configuration to support Nordic SAADC.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Fix the Python3 CANopen module installation instructions to refer to
the 'python-can' package instead of the nonexistent 'can' package.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add information about how to build and test atsamr21_xpro board with
IEEE 802.15.4 RF2xx driver.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add special configuration for SAMR21 SoC. Since it have only 32k SRAM,
all possible application buffers need to be shrinked.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add information about how to build and test atsamr21_xpro board with
IEEE 802.15.4 RF2xx driver.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add special configuration for SAMR21 SoC. Since it have only 32k SRAM,
all possible application buffers need to be shrinked. This
configuration was tested with two boards for more than 2H with success.
[02:18:57.635,00] net_echo_server_sample: IPv6 UDP: Sent 333000 packets
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add sample for AES Galois/Counter Mode (GCM) of operation with a MACsec
GCM-AES test vector.
Also improve existing code by declaring expected ciphertext arrays as
constant.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
The default DTS of VEGABoard does not enable the necessary nodes
for the SW LL to function; as such an overlay is needed for
each sample that is intended to be run on the VEGABoard. Some
of the samples miss this overlay so this patch adds them.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
The existing stack_analyze APIs had some problems:
1. Not properly namespaced
2. Accepted the stack object as a parameter, yet the stack object
does not contain the necessary information to get the associated
buffer region, the thread object is needed for this
3. Caused a crash on certain platforms that do not allow inspection
of unused stack space for the currently running thread
4. No user mode access
5. Separately passed in thread name
We deprecate these functions and add a new API
k_thread_stack_space_get() which addresses all of these issues.
A helper API log_stack_usage() also added which resembles
STACK_ANALYZE() in functionality.
Fixes: #17852
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
All board defconfig files currently set the architecture in addition to
the board and the SoC, by setting e.g. CONFIG_ARM=y. This spams up
defconfig files.
CONFIG_<arch> symbols currently being set in configuration files also
means that they are configurable (can be changed in menuconfig and in
configuration files), even though changing the architecture won't work,
since other things get set from -DBOARD=<board>. Many boards also allow
changing the architecture symbols independently from the SoC symbols,
which doesn't make sense.
Get rid of all assignments to CONFIG_<arch> symbols and clean up the
relationships between symbols and the configuration interface, like
this:
1. Remove the choice with the CONFIG_<arch> symbols in arch/Kconfig and
turn the CONFIG_<arch> symbols into invisible
(promptless/nonconfigurable) symbols instead.
Getting rid of the choice allows the symbols to be 'select'ed (choice
symbols don't support 'select').
2. Select the right CONFIG_<arch> symbol from the SOC_SERIES_* symbols.
This makes sense since you know the architecture if you know the SoC.
Put the select on the SOC_* symbol instead for boards that don't have
a SOC_SERIES_*.
3. Remove all assignments to CONFIG_<arch> symbols. The assignments
would generate errors now, since the symbols are promptless.
The change was done by grepping for assignments to CONFIG_<arch>
symbols, finding the SOC_SERIES_* (or SOC_*) symbol being set in the
same defconfig file, and putting a 'select' on it instead.
See
https://github.com/ulfalizer/zephyr/commits/hide-arch-syms-unsquashed
for a split-up version of this commit, which will make it easier to see
how stuff was done. This needs to go in as one commit though.
This change is safer than it might seem re. outstanding PRs, because any
assignment to CONFIG_<arch> symbols generates an error now, making
outdated stuff easy to catch.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The loramac-node library uses math functions from math.h that
are not included in the minimal lib.
This commit changes the samples project config to always build
with newlib and adds a dependency to newlib.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
VEGABoard BLE controller implementation supports HCI over UART;
as such enable this configuration when building the hci_uart
sample.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Add STM32 CRYP driver support and a corresponding build-only test to
the crypto sample project.
Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
MetaIRQs are described in docs and exercised in tests, but there's no
sample explaining how they are intended to be used to perform
interrupt bottom half processing.
This simple tool spawns a set of worker threads at different
priorities (some cooperative) which process "messages" (which require
CPU time to handle) received from a fake "device" implemented with
timer interrupts. The device hands off the events directly to a
MetaIRQ thread which is expected to parse and dispatch them to the
worker threads.
The test demonstrates that no matter the state of the system, the
MetaIRQ thread always runs synchronously when woken by the ISR and is
able to preempt all worker threads to do its job.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Try and build the flash_shell on all platforms that have a flash driver
rather than a limited set of know platforms. This hopefully acts as a
build coverage test for all the flash drivers.
The flash shell requires around 10K of memory so limit it to systems
with 12K or more.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reduce the default timeout in the CANopen sample from 50 milliseconds
to 1 millisecond. This vastly improves performance of the sample and
matches the example code present in the CANopenNode stack.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The DIS service requires BT_SETTINGS otherwise it will not have a
settings handler. Instead DIS will only use Kconfig to set it's
values.
Fixes: #22478
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
UDP portion of the echo_client sends 1 packet with the sample data.
(TCP can send chunks of it depending on the response of the send()
function.) Not every network interface can send a UDP packet large
enough to handle the size of the sample data.
Let's make sure to account for the network interface MTU when deciding
the amount of sample data to send.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/22447
Signed-off-by: Michael Scott <mike@foundries.io>
Use new API to configure and interact with GPIOs. Move GPIO
initialization from sample into driver. The existing physical/line
level control has been kept rather than converting to logical level
signals.
Also improve error messages.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Treat Kconfig-specific GPIOs as active-high (default) and use the
logic-level API to interact with them.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update bluetooth hcp_spi sample to new GPIO API.
Following changes have been done:
- Use new gpio api functions
- Introduce define for dt generated gpio flags
- Update 96b_carbon_nrf51.dts according to new bindings
- Gpio IRQ pin is configured to output inactive
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Use new configuration API, replace callback enable/disable with
interrupt enable/disable, and set active level in devicetree source.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert to the new GPIO API using logical levels, and remove the
duplicate implementation of LED control that existed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update devicetree sources and bindings, switch to new GPIO API. Use
devicetree property name to identify interrupt signal.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert to the new API, using raw access since there is no Device-Tree
definitions for this particular sample.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Conver to the new GPIO API, using raw access since there is no DT
definitions for this particular usage of the pins.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update sample overlays. Add GPIO flags to configuration state.
Refactor to split out setup/handle/process phases. Switch to new API
replacing callback dis/enable with interrupt dis/enable.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Converts the sdhc spi driver to the new gpio api. Updates device trees
for the olimexino_stm32 and nrf52840_blip boards to set appropriate
active high/low polarity for the spi chip select pin.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Since this was converted to the setup/handle/process idiom in master
the conversion is straightforward.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit updates the HMC5883L driver to use the new GPIO API.
Also add a note explicitly describing the active state of the DRDY
pin in the binding file.
Tested on frdm_k64f.
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
Update sample overlay for missing chip select and to deconflict with
UART TXD. Add GPIO flags to configuration state. Replace callback
enable with interrupt enable.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a sample overlay. Add GPIO flags to configuration state. Replace
callback enable with interrupt enable.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Update the gpio_counter sample app for the UP Squared board:
() Update configuration calls to use new flags.
() Separate pin configuration into setting it to input, and
setting the pin for interrupt.
() Use gpio_pin_set() instead of gpio_pin_write().
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds a board overlay for up_squared to be used with
the GPIO sample. Using the overlay is because the pins
being used are not actually LED and switch but GPIO pins
used as such.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update sample application to use new GPIO API:
- GPIO flags defined by the devicetree
- replace gpio_pin_write with gpio_pin_set function
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Update ALERT active level in all devicetree files. Capture GPIO flags
in static configuration. Add internal API to enable and disable
interrupt, to release the handlers when an alert occurs, and to
re-enable the signal when the handler completes. Check for alerts
received during periods when the interrupt was disabled.
Extend the example to handle both above and below range triggers and
alerts that are present on startup.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert the GPIO based driver to the new GPIO API. (Only the
gpio_configure() call is affected).
Move configuration to DT where appropriate for both SPI and GPIO
drivers, only leaving the SPI vs. GPIO decision in Kconfig (in
addition to the basic enable for the driver.) Move some files around
to clean up as a result of this change.
led_ws2812 sample changes:
- make the pattern easier to look at by emitting less light
- use led_strip alias from DT to get strip device, allocate
appropriate struct led_rgb buffer, etc.
- move the pins around and remove 96b_carbon support (I have no board
to test with)
GPIO driver specific changes:
- str is required to write OUTSET/OUTCLR, not strb. The registers
are word-sized.
- the str[b] registers must all be in r0-r7, so "l" is the correct GCC
inline assembly constraint for both "base" and "pin"
SPI driver specific changes:
- match the GPIO driver in not supporting the update_channels API
method, which never made sense for this type of strip
- return -ENOMEM when the user tries to send more pixel data
than we have buffer space for instead of -EINVAL
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Switched from deprecated gpio_pin_write to gpio_pin_set and also add the
LED GPIO flags to the gpio configuration.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
Convert the sample to use the new GPIO API and additionally:
- add some error messages for unsuccessful GPIO API calls
- correct the index of `def_val` element used in the `right_button`
callback, to match the one used when the callback is installed
- use flags defined in devicetree for the pin that drives the LED
(for consistency, as this does not make much difference for a pin
that is only toggled)
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Implement the new GPIO driver APIs for the HT16K33 and update the
driver to use the new GPIO flags.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Update gpio_pin_configure() to take into account GPIO flags defined by
the devicetree. Use gpio_pin_get/gpio_pin_set to verify reading/writing
of logical pin values. Use gpio_pin_interrupt_configure() to configure
interrupts.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Eliminates CI build warnings such as this which breaks the build:
warning: NET_SOCKETS_POSIX_NAMES
(defined at subsys/net/lib/sockets/Kconfig:13) was assigned the value
'n' but got the value 'y'.
The testcase involves no offloading, which means it does not apply to
cc32xx.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This PR eliminates the Kconfig warnings seen in build by setting the
options to the appropriate values for cc32xx platforms. They were
causing CI failures.
Fixes#22388
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Use the voltage divider devicetree binding to demonstrate measurement
of battery voltage for two Nordic-based boards that have the necessary
circuitry.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This test uses bare variables to synchronize state between threads,
but had forgotten volatile qualifiers on all the data. So the
compiler was free to reorder and make assumptions that aren't valid
when the values are being written from other CPUs.
Single-cpu operation was fine because the code would always hit an
external function call like k_sleep() that would force it to re-read
from memory every time there was a context switch (timeslicing isn't
enabled on this test and the threads are cooperative), but on SMP the
volatiles can change at any time and we could see spurious state
mixups and hangs.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add Kconfig option NET_SAMPLE_SEND_ITERATIONS that sets the number of
times the Zephyr echo client sample sends its data. By default the
value is zero, which means indefinite, and demonstrates the same
behavior as before.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Extends the keyboard scan callback row and column arguments from 8-bits
to 32-bits to support a touch panel driver implementation.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This count is assigned to CONFIG_BT_ACL_RX_COUNT which expects a number
in the range of 1-64, otherwise kconfig fails.
Fixes#22259
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Write initial content of the display before blanking_off.
This allow faster update of the electronic ink displays as
the controller do not update the pannel when the banking
is enabled (currently this behaviour is only implemented
in gd7965 driver).
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Switch to `NET_SOCKET_REGISTER` mechanism over the offloaded API
registration.
Including the following fixes from the review:
* The fd returned by the socket accept call needs to be finalized,
similar to how it is done for socket creation.
* sl_RecvFrom() in TI SimpleLink Host driver does not support NULL
pointers for 'from' address and address length, and sl_SendTo() does
not ignore the destination address when in connection mode, so passing
NULL would cause a failure. These issues have been reported to TI
(CC3X20SDK-1970, CC3X20SDK-1971).
Let's use sl_Recv and sl_Send to implement recvfrom/sendto in the case
of NULL addresses.
* simplelink_poll() should not process negative file descriptors in the
fds array after sl_Selecti() returns. A negative fd value indicates
that the entry is invalid and should be ignored.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added support for native_posix targets.
Added setting FS back-end initialization which is used by
native_posix targets.
The test harness was adapted to the fact that key-value pairs
read-out order might be different for each back-end when call
settings_load().
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added sample for the settings subsystem.
The sample shows how to:
-initialize and register handler
-implement handles
-save and load data using registered handlers
-load subtree
-save or delete a certain value
-load subtree values or a value directly
- example on how to write data to the
setting destination and how to read data
from the setting destination using runtime API.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Fixed bug in udp.c in echo_client and echo_server samples.
The bug causes UDP sockets to not close if socket id is 0.
Signed-off-by: Magne Værnes <magne.varnes@nordicsemi.no>
Make sure that the echo-server compiles ok if IPv6 or IPv4 is
disabled when VLAN is enabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adjust the configuration file, disable the SPI
driver and enable the QSPI driver and flash node.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Kamil Lazowski <Kamil.Lazowski@nordicsemi.no>
A configuration file attempted to select the external flash memory for
this platform, but there was no overlay that redefined the storage
partition to be on that device rather than the SOC flash.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Change to display RSSI and SNR values of the received data.
This change helps to test LoRa's communication distance and
communication quality.
Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
In order to better handle incoming data, wait() should return
the # of sockets with data returned by poll().
Based on this new return value, we can call mqtt_input() in a
smarter way.
Signed-off-by: Michael Scott <mike@foundries.io>
Now that mqtt_live() can send an EAGAIN message meaning: no ping
was generated, let's handle that in process_mqtt_and_sleep() by
skipping the call to mqtt_input() since no data will be expected.
Signed-off-by: Michael Scott <mike@foundries.io>
Introduce a new counter API function for reading the current counter
value (counter_get_value()) and deprecate the former counter_read() in
favor of this.
Update all drivers and calling code to match the new counter API.
The previous counter driver API function for reading the current value
of the counter (counter_read()) did not support indicating whether the
read suceeded. This is fine for counters internal to the SoC where the
read always succeeds but insufficient for external counters (e.g. I2C
or SPI slaves).
Fixes#21846.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Make sure that we do not calculate terminating \n when comparing
the received data to sent data because the \n is not part of
the lorem_ipsum buffer.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample keeps failing in CI due to some SMP issues currently being
addressed. Exclude until we have a fix.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sample app compiled with the GSM modem driver enabling PPP.
This sample was tested with a Reel Board UART_1 connected via the
external board/connector and a FONA 808 modem. Reel board specific
suppor is found in boards/.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit introduces the can-primary alias to identify
the primary CAN interface.
This alias is used for all samples and tests, so they don't
need to probe the right interface.
Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The build infrastructure should not be adding the drivers subdirectory
to the include path. Fix the legacy uses that depended on that
addition.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
drivers/display.h was being included both as a double-quote direct
include and an angle-quote in the drivers parent directory. Both
resolve to the same file. Remove the unqualified reference.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
I2C interrupts usage should be the preferred way. This commit
enables them by default in the STM32 I2C driver itself.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Echo-server sample should not bail out on failed
accept() calls. This sample should close socket
in case of any errors and keep listening on socket
for further incoming connections.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Current sample certs and keys are not signed. Adding
signed certificates and keys. CA file also added.
This helps users to test with different kind of
configurations.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
With a recent change introduced a connectable advertiser will reserve
a connection object when started. In the disconnected callback the
disconnected connection object is not yet released, so the application
is not able to allocate this connection object for a new connectable
advertiser until after the disconnected callback.
reserve conn commit: 46bf20036a
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Enable CONFIG_TEST so that we get the necessary defines for
console output when a fatal error happens, as well as assertion
checking.
Remove an unnecessary self-abort in main(), this causes an
assert to fail. Letting main() return does the same thing, more
gracefully.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A sample implementing NATS protocol that is not part of the Zephyr
networking subsystem. The implementation is not maintained and only
served as a proof of concept.
Related to #20017
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a sample that demonstrates (and tests) that custom drivers can be
maintained outside of Zephyr.
The sample is fairly minimal with few dependencies and should
therefore be very portable. It also includes a sample.yaml that should
ensure that it does not regress.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
There was some unlocked initialization code in the "enc" thread that
would race with the "pt" and "ct" threads if another CPU was available
to run them (it was safe on UP because "enc" entered the queue first
and was cooperative, the others wouldn't run until it blocked).
Move it to main() and remove the enc_state guard variable which is no
longer doing anything.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Replaced NFFS mentions by LittleFS in all <board>.dts comments
to storage partitions.
Replaced NFFS by LittleFS in a few boards documentation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
NFFS configuration was removed.
Added working configuration for nRF boards.
Documentation aligned to fact that littlefs is supported.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This patch addapt the sample to using LittleFS as the FS back-end.
After NFFS will be removed this ensures mcumgr FS command functionality.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
smp_svr cleanu
Some architectures require more space on the stack when running samples
and tests while the philosopher test (cmsis_rtos_v1) is still using a
fixed-size stack size.
Since the test is going to use CMSIS v1 we cannot directly use
CONFIG_TEST_EXTRA_STACKSIZE to grow the stack size because the extra
space allocated can excess the maximum size allowed by CMSIS and defined
by CONFIG_CMSIS_THREAD_MAX_STACK_SIZE, causing the sample to halt on the
assertion (thread_def->stacksize <= CONFIG_CMSIS_THREAD_MAX_STACK_SIZE).
To avoid this problem (and align the test to what has been already done
on the philosopher test using CMSISv2) we set the stack size to the
maximum allowed size of CONFIG_CMSIS_THREAD_MAX_STACK_SIZE.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Add sample demonstrating the integration of CANopenNode in Zephyr to
support the CANopen protocol.
This fixes#15278.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
`TLS_PEER_VERIFY` and `TLS_DTLS_ROLE` options accept specific values,
yet no symbols were defined for them. In result, magic numbers were used
in several places, making the code less readable.
Fix this issue, by adding the missing symbols to the `socket.h` header,
and using them in places where related socket options are set.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This add details how build and flash the application. This diferentiate
between SoC and transceivers to help understand what user need to do to
build and flash successfully.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Create overlay-rf2xx.conf overlay file to enable Atmel rf2xx
transceivers on this application.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
generated_dts_board.h is pretty redundant and confusing as a name. Call
it devicetree.h instead.
dts.h would be another option, but DTS stands for "devicetree source"
and is the source code format, so it's a bit confusing too.
The replacement was done by grepping for 'generated_dts_board' and
'GENERATED_DTS_BOARD'.
Two build diagram and input-output SVG files were updated as well, along
with misc. documentation.
hal_ti, mcuboot, and ci-tools updates are included too, in the west.yml
update.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Move LVGL sample from samples/gui/lvgl to samples/display/lvgl to have
a unified location for display related samples.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Remove ST7789V display sample as there is a unified display sample
in samples/drivers/display.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Remove ILI9340 display sample as there is a unified display sample
in samples/drivers/display.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
OpenThread settings implementation built on top of Zepyhr settings
submodule.
With this solution, OpenThread settings are identified with keys of
the following format: `ot/id/instance`, where `id` is assigned by
OpenThread stack, and `instance` is a 32-bit random number, both in
hex. The implementation makes use of `settings_load_subtree_direct`
function to iterate over settings instances. This allows the
OpenThread settings layer to be a fully transparent shim layer between
OpenThread/Zephyr APIs.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.
SHT3XD_TRIGGER is already being selected by
SHT3XD_TRIGGER_GLOBAL_THREAD, which is enabled in the same configuration
file.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Define CONFIG_NET_CONFIG_IEEE802154_DEV_NAME value necessary to enable
atsamr21_xpro board on wpanusb sample.
The documentation was updated referencing the atsamr21_xpro board.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Added harness config to sample in order for the sanitycheck tool
to run and understand whether the samples output is as expected.
Signed-off-by: Łukasz Hejnak <lukasz.hejnak@nordicsemi.no>
Add missing information to existing files in anticipation of whinage
from recently modified CI License checks.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.
This symbol is select'ed automatically by the X86_MMU, ARM_MPU, and
ARC_MPU symbols.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Assignments have no effect on promptless symbols. Flagged by
https://github.com/zephyrproject-rtos/zephyr/pull/20742.
These configuration files all enable UART_CONSOLE, which selects
CONSOLE_HAS_DRIVER.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
BT_DEBUG is a promptless helper symbol, defined in
subsys/bluetooth/common/Kconfig. It is selected by BT_DEBUG_LOG, which
these configuration files also enable.
Flagged by https://github.com/zephyrproject-rtos/zephyr/pull/20742.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The regular expressions used by this test to determine
success or failure get confounded if the log subsystem
drops the wrong messages due to buffers being full.
Just use minimal logging which synchronously logs
everything.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add sample for reading the temperature of a 3-wire PT100 sensor using
the Texas Instruments LMP90100 Sensor Analog Frontend (AFE) Evaluation
Board (EVB) shield.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Correct handling of device encoded temperature values, which combine a
12-bit 2s complement signed value with a separate sign bit. Rework
conversion between device and sensor temperature representations to
support negative temperatures in both domains.
Use a much simpler trigger configuration where the alert is driven by
comparator output, rather than as an interrupt that requires a pair of
I2C transactions to read and clear the flag.
Refactor the trigger infrastructure to use the setup/handle/process
idiom, which reduces duplicated code and to correctly detect alerts
present when the triggers are set.
Completely replace the sample with something that demonstrates
updating upper and lower threshold values to track moving
temperatures.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add a sample for the MPU6050 that demonstrates on-demand and triggered
display of all sensor data.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
When a trigger was enabled the original implementation would do
nothing more than print "Waiting for a threshold event", without
describing what such an event would look like.
Rework to maintain a window of +/- 0.5 Cel around the most recent
in-window temperature, and reset that window whenever a trigger occurs
or a non-trigger reading is outside the window. Time-out and display
the temperature if no event occurs in a reasonable time.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The device address can only be 0x48 through 0x1B. C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.
Move this to a boards subdirectory so we can add other overlays
without cluttering the root.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add support for requesting an inverted PWM pulse (active-low) when
setting up the period and pulse width of a PWM pin. This is useful
when driving external, active-low circuitry (e.g. an LED) with a PWM
signal.
All in-tree PWM drivers is updated to match the new API signature, but
no driver support for inverted PWM signals is added yet.
All in-tree PWM consumers are updated to pass a flags value of 0
(0 meaning default, which is normal PWM polarity).
Fixes#21384.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The usb_transport_init() does not return a value when it fails to
initialize the USB device. So add a return value there.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Update sample.yaml file for ST7789v sample to also build with
st7789v_waveshare_240x240 shield.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
The $srctree environment variable is already set to point to the Zephyr
root, so no need to do
source "$(ZEPHYR_BASE)/Kconfig.zephyr"
in samples. Just
source "Kconfig.zephyr"
works.
(Things would break if $srctree was set to anything else, because every
'source' in the Kconfig files will be relative to it.)
Also add a 'mainmenu' title to the littlefs sample. It shows up at the
top of menuconfig/guiconfig. Source Kconfig.zephyr instead of Kconfig to
avoid overriding it.
As a sidenote, $(FOO) is better $FOO in Kconfig. $FOO is legacy syntax
that Kconfiglib only supports to be compatible with old Linux kernels.
$(FOO) uses the Kconfig preprocessor.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
x86-mmu now crashes with default 1K, bump to 2K, which hopefully might
work even for 64-bit archs.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Factorize definitions for ssd1306_128x32 and sd1306_128x64 shields
and move to conditional Kconfig.
As part of this change, direct drivers Kconfig symbols enabling
(I2C, SSD1306) are removed as they are application responsibility.
Also disabling SSD16XX is removed as SSD16XX should not be enabled
by default.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
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>
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>
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>
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>
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>
Before introducing the code for ARM64 (AArch64) we need to relocate the
current ARM code to a new AArch32 sub-directory. For now we can assume
that no code is shared between ARM and ARM64.
There are no functional changes. The code is moved to the new location
and the file paths are fixed to reflect this change.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
The TCP code expects that we know when the socket has called accept()
in order to continue connection attempt.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
By this commit user gets possibility to register USB
device satutus callback. This callback represents device state
and is added so user could know what happend to USB device.
Callback is registered by providing it to usb_enable()
USB api is extended by this callback handler.
Samples using using USB are by default provide no callback
and the usb_enable() is called with NULL parameter.
Status callback registered by hid class is deleted as now
USB device has global callback for all classes within device.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Some drivers may be unable to write less than 4 bytes. Increase the
test to use at least 4 bytes and refactor so the logic is no longer
explicitly size-dependent.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Rename global variable ciphertext used in cbc_mode() to
cbc_ciphertext and move it closer to cbc_mode(). Also, move
global variable iv into cbc_mode() to be consistent with
other *_mode() methods.
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
SOC_FAMILY_NRF has no prompt. Assignments in configuration files have no
effect on symbols without prompts. A prompt means the symbol is
user-configurable.
SOC_FAMILY_NRF is instead enabled indirectly through being selected by
other symbols.
Detected through some work-in-progress improved error checking.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When networking is selected, building the test
fails with:
error: static assertion failed: "Too many traffic classes"
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
This reverts commit da0f3311ff. It was
clearly intended to be a debugging aid when developing TCP2, not
intended for mainline. This fixes building this sample on POSIX
systems with Makefile.posix.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The sample needs key.c file but that cannot be generated by
sanitychecker. So disable compilation by sanitycheck.
Eventually we should make it possible to compile the sample
using some pre-defined values so that the sample will not
bit-rot but that is for later.
Fixes#21450
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit provides a sample dummy application demonstrating
the usage of the added dynamic Tx power control over the HCI
commands and HCI interfaces.
Signed-off-by: Andrei Stoica <stoica.razvan.andrei@gmail.com>
MQTT Azure and Google IoT samples are based on cloud
infrastructure. It would be nice to place all cloud
based samples in one single folder.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).
So, correct the different samples and tests that were defined
otherwise.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The application main() in Zephyr is defined as having a prototype:
void main(void), as expected by the kernel init (bg_thread_main).
So, correct the different samples and tests that were defined
otherwise.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This samples demonstrates how to connect to Azure Cloud
IoT hub which is based on MQTT protocol. User has to
create an account in Azure Cloud and provide those details
using Kconfig options. This sample first acquires DHCPv4
address and opens a secure connection with Azure cloud.
Then opens a MQTT connection and publish messages randomly.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Remote wakeup for Nordic SoCs should always be enabled.
Thus do not depend it for each SoC. Instead depend it on
chosen driver.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
The example should work on the cc3220sf_launchxl by following the same
flow as on other boards, ie. by connecting with plain http by default
and use TLS only when an overlay is specified. We update the
configuration for cc3220_launchxl to not use TLS by default and the
README to point users to the right overlay file to use.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.
Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.
Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Added some preprocessor directive so that code get compile
for some more nRF52 boards which has only one LED & one button.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Changes in MOVE message handler are as per Mesh Model
Specification which says:
"Upon receiving a Generic Move Set message, the Generic Level
Server shall respond with a Generic Level Status message.
The target Generic Level state is the upper limit of the
Generic Level state when the transition speed is positive,
or the lower limit of the Generic Level state
when the transition speed is negative."
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed global variable 'default_tt' & code depend on it
which is redundant as per latest implementation.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added support of constrain_temperature() function.
Used constrain_lightness() & constrain_temperature()
whereever possible.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Separately saved default & last target values of lightness,
temperature & delta_uv on flash (using settings layer).
Signed-off-by: Vikrant More <vikrant8051@gmail.com>