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>
Split Link Layer implementation uses 80 bytes more ISR stack
in comparison to Legacy Link Layer, hence increase the
required ISR_STACK_SIZE for the BBC micro:bit and other
nRF51 QFAA SoC based mesh and mesh_demo samples.
Fixes#20414.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This sample demonstrates BLE peripheral for ST BLE Sensor.
You can test button notification and LED service using
ST BLE Sensor Android application
Signed-off-by: Marcio Montenegro <mtuxpe@gmail.com>
If we ran out of net_buf's while sending, ignore the issue
and try to finish the test instead. Solving the "running out
of network buffers" case would require careful tuning of
number of network buffers, buffer size, upload speed etc. which
is difficult to solve with generic buffer count options.
The user should tweak mainly the CONFIG_NET_BUF_TX_COUNT option.
Optionally CONFIG_NET_PKT_TX_COUNT can be changed too. Information
about these options is printed to console after the test is finished.
Fixes#20315
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add "sample quit" shell command which can be used to stop the
sample application and allows the generation of coverage report.
Fixes#21099
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The Nordic SOC doesn't support multiple system power states, only one
deep sleep state. Replace the old example with a simpler one that can
be used to measure CPU active, normal sleep, and system off modes.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The seasonal overhaul of test identifiers aligning the terms being used
and creating a structure. This is hopefully the last time we do this,
plan is to document the identifiers and enforce syntax.
The end-goal is to be able to generate a testsuite description from the
existing tests and sync it frequently with the testsuite in Testrail.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit removes the CMakeLists.txt file for the stale 'random'
driver sample.
The 'random' driver sample was previously renamed to 'entropy'.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The definition was removed in commit 7ccc7889fa ("logging: Remove
SYS_LOG implementation").
Adding detection of unused symbols in samples and tests to CI.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
In order to enable sample to be run and evaluated in sanitycheck,
add a harness_config to validate sample output:
- Add "regex" to match on sample output
- Add "timeout" to save some time when debugging
- Add "ordered" instruction. Since sample is running a while loop
test verdict can potentially be computed on previous run output,
issuing a wrong status.
Last, since sanitycheck regex does not play well them, rework
sample to output without parenthesis.
Tested on disco_l475_iot1
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Some of defines are present in several header files.
Those defines are the same with value but with different naming.
Common defines are brought to usb_common.h
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
echo_client and echo_server configuration for 802.15.4 and OpenThread is
covered by overlay files and default board configuration. Board-specific
configuration for frdm_kw41z was redundant in this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This adds a README.rst for the UP Squared board GPIO counter sample
using details in the application source code and giving context.
This offers overview, requirements, and instructions to build and
flash, in complement to the cited reference.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
The sensor API returns the temperature in celsisus degree. The Bluetooth
temperature characteristics uses M = 1, d = -2, b = 0, which corresponds
to a resolution of 0.01 degree. This means that the value returned by
sensor_value_to_double has to be multiplied by 100.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The mesh_badge sample uses a GATT Characteristic instead of a Mesh
Device Property to report the temperature. In addition to that the
status message is filled with with a GATT Unit instead of a the Mesh
Device Property.
Fix that by reporting a Present Device Operating Temperature, ie 0x0054
instead. This has the advantage of keeping the an s16t value to report
the temperature. This however change the marshalled format from B to A.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
When the value of an unknown sensor property ID is requested, the length
field should represent the value of zero, as explain in the comment in
sens_unknown_fill. However the marshalled representation of a zero
length is wrong in the code. The format A uses a 1-based uint4 length
value, so the range 0x0–0xF represents the range 1-16. The zero length
is represented by format B using the 0x7F value.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The functionality of samples/drivers/gpio sample application duplicates
already existing code in samples/basic/blinky and samples/basic/button.
This commit removes the gpio sample application.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Bool symbols implicitly default to 'n'.
A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though.
Also replace some
config
prompt "foo"
bool/int
with the more common shorthand
config
bool/int "foo"
See the 'Style recommendations and shorthands' section in
https://docs.zephyrproject.org/latest/guides/kconfig/index.html.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Removes redundant and invalid configurations from the bluetooth/mesh
sample. Removes some stale disabled config entries.
Fixes L2CAP related warning in config step of sample.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Switch to using the synchronous bt_init call before starting the main
loop in the peripheral samples. This is to avoid sending notifications
before bluetooth has been properly initialized.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The following samples:
- boards/nrf91/nrfx
- boards/nrf52/power_mgr
are actually not specific to nRF91 and nRF52 Series SoCs, respectively,
hence the current naming of the above board/ subdirectories may be
misleading. Thus, use nrf/ directory for holding all nRF board specific
samples that apply to several boards.
Paths to the moved samples that are mentioned in their documentation
are also updated accordingly.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This define is not of use anymore since there's a global net_buf user
data Kconfig variable and its definition already guarantees a
sufficient minimum for Bluetooth.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For some reasons SOC_SERIES_SAME70 was selected in civetweb sample,
which prevents build on other platforms.
This issue was silent since sample yaml file limits sample testing on
sam_e70_xplained.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
echo_server crashes if the coverage is enabled due to the insufficient
stack size.
Use bigger stack size when the coverage is enabled.
Fixes#20797
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Use malloc/free instead of k_malloc/k_free in operator new/delete
implementation or use libstdc++ implementation when available.
Further updated cpp_synchronization sample to enable minimal libc heap
as virtual destructor requires operator delete which depends on free.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Corrected & improved transition implementation so that
no_transition_work thread will not get triggered twice at the
end of transition.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
User can set transition time as Zero & delay as non-zero value.
In that case, we have to depend upon timer.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. If you reset the x_nucleo_shield3 board
the LSM6DSO enter in hot join, as INT1 '1' level is preserved by
the level shifter.
This commit switch to INT2 to generate DRDY interrupt, so that INT1
always remain to logical '0' level.
Fixes: #20933
Signed-off-by: Armando Visconti <armando.visconti@st.com>
This test is failing on platforms requiring a bigger stack size. This
issue is fixed by adding the missing CONFIG_TEST_EXTRA_STACKSIZE to
tweak the thread stack size.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Fix scanning so that we always use active scanning in case the UUID we
are looking for is in the scan response, and disable duplicate filtering
to handle devices that modify their advertising data at runtime, such as
smartphones reacting to apps being opened and closed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update the sample to indicate which device it was using, which helps
mitigate the existing problems identifyin Arduino I2C buses. Also
output a summary of results so cases where no devices are found
provide output after the Starting... line.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
It is important to clarify when to launch audio capture command in
order to avoid that initial boot characters enter into the audio
file leading to bad initial data.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
As noted in the issue #20666 discussion, though the console is not used
by this sample app, it can't really be "disabled" using this Kconfig
option, so remove the CONFIG_SERIAL=n line.
Fixes: #20666
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Some architectures require more space on the stack when running samples
and tests. Use the CONFIG_TEST_EXTRA_STACKSIZE also on the philosophers
sample to deal with such cases.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
A reference to CONFIG_CAN_AUTO_BOFF_RECOVERY was added in commit
1b88658f9f ("samples: driver: Extend CAN sample"), but it's never been
defined as a Kconfig symbol.
Should have been CONFIG_CAN_AUTO_BUS_OFF_RECOVERY according to
alexanderwachter, so change it to that.
Adding detection of unused symbols in samples and tests to CI.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Corrected spellings in printk messages plus removed
unnecessary blank lines.
In case of Gen. Move client's message to Server, reduced
values of delta & transition time to improve demonstration.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The device address can only be 0x18 through 0x1F. C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The i2c_msg API details do not work correctly with Nordic TWI. Switch
to the higher-level and simpler API for register read and write. Also
add a tree configuration on a Nordic-based board.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Commit 16d8ce519c introduced changes
that caused this sample to no longer behave according to documentation
and for some hardware to no longer work at all.
On nRF51 SoCs for instance, the reported number of cycles per second
is 16M, what makes the calculated max_period and min_period to be 16
and 0 microseconds, respectively, what effectively makes it impossible
for the sample to return to the initial blinking frequency. Moreover,
with such short PWM periods, the blinking is not even noticeable.
This patch partially reverts the changes mentioned above, and instead
of calculating max_period and min_period basing on the reported clock
rate, it tries to only decrease the max_period if needed, accordingly
to what the used hardware can handle.
Documentation is also updated to mention the possible change in
observed behavior of the sample on some hardware.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Name convention for nordic USB driver changed
Kconfig files for custom boards have to be udapted accordingly.
Changes affect only name convention change.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
By adding new SoC to Zephyr drivers has to be updated.
Commit affects:
- USB driver
- support for nRF52833 added.
- support for USB_DEVICE_REMOTE_WAKEUP in hid-mouse added.
- SPI
- IEEE 802.15.4
- CLOCK CONTROL
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
There are compiler error about the entry functions of two threads
not returning anything. So add return statement to fix it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Removed unnecessary global variable & replaced them with different
variable defined in struct light_ctl_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed redundant coding which was related to old implementation.
Now Server will publish the new state information to the model’s Publish
Address only when there is mismatch between target & current values.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Fix build reply function. The sample uses return value
from net_pkt_read() to determine data length,
but the return value is 0 on success.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add internal API to enter and exit deep power-down mode. Add Kconfig
option to return to DPD whenever device is not active.
When device power management becomes more mature it should be possible
to implement it, which would allow use of DPD without having to enter
and exit DPD between consecutive transactions.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit converts the existing hcm5883l 3-axis magnetometer
driver to use device tree for the I2C and GPIO selection.
It also adds a basic sample application for this sensor, using the
frdm-k64f development board to demonstrate how the interrupt
GPIO pin and I2C bus can be selected.
Signed-off-by: Kevin Townsend <kevin@ktownsend.com>
Add a special target that's marked build_only so the BLE SW LL
implementation on VEGABoard is built daily. This helps ensuring
that it doesn't get inadvertedly broken by subsequent updates.
The name of the target is peripheral_hr_rv32m1_vega_ri5cy
and it can be run with the following command:
sanitycheck -v --all -p rv32m1_vega_ri5cy \
-x=CMAKE_REQUIRED_FLAGS=-Wl,-dT=/dev/null \
--test samples/bluetooth/peripheral_hr/\
sample.bluetooth.peripheral_hr_rv32m1_vega_ri5cy
Note: The extra CMake flags are required if running with the official
VEGABoard compiler, due to this linker issue:
https://github.com/pulp-platform/pulpino/issues/240
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Add the required specific HW configuration for SW defined
BLE LL on RV32M1 SoC, by means of DTS overlays:
- enable INTMUX0 channels 2 & 3
- route Generic FSK RF0 interrupt to INTMUX channel 3
- route LPTMR1 interrupt to INTMUX channel 2
This change is done for all Bluetooth samples that are intended to
run on RV32M1 using BLE SW LL.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Complement GPIOTE HAL function calls with the NRF_GPIOTE parameter.
Update nrfx_gpiote_init() function call with the newly introduced
parameter.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert bmg160 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert bmm150 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert max44009 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert mcp9808 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert sx9500 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert tmp112 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert th02 sensor driver and sample app to utilize device tree.
Introduce a dts board overlay on the frdm_k64f board to ensure we at
least have a single platform in which the sample gets built.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Mark the old time conversion APIs deprecated, leave compatibility
macros in place, and replace all usage with the new API.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Several macros were documented as deprecated but lacked the
infrastructure to produce deprecation warnings. Add the deprecation
marker, and fix the in-tree references to the deprecated spellings.
Note that one non-deprecated macro should have been deprecated, and
is, referring to a newly added line control bit.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Adds the model extension concept to the access layer, as described in
the Mesh Profile Specification, Section 2.3.6. Extensions are
implemented as a tree, using two pointers in each model:
The extends pointer points to the first extended model, and the next
pointer points to the next sibling or (if the NEXT_IS_PARENT flag is
set) the parent model in the tree, forming a cyclical "Left-child
right-sibling" (LCRS) tree. The tree root can be obtained by calling
bt_mesh_model_root_get(), and the extended models can be walked by
calling bt_mesh_model_tree_walk().
According to the Mesh Profile Specification Section 4.2.3, all models in
the same extension tree share one subscription list per element. This is
implemented by walking the model's extension tree, and pooling the
subscription lists of all models in the same element into one. If the
config server adds a subscription to a model, it may be stored in any of
the model tree's models' subscription lists. No two models in the same
extension tree and element will have duplicate groups listed. This
allows us to increase extended models' capacity for subscriptions
significantly.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Replace CONFIG_WDT_0_NAME with DT_ALIAS_WATCHDOG_0_LABEL in samples and
test code. Now that all drivers are DT aware we don't ever set the
Kconfig option.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update shield description and sample to allow testing of LIS3MDL
sensor IRQ pin.
Update sample yaml file to state dependency on arduino_gpio.
Additionally, fix redundant line in sample yaml
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit removes the disco sample because it is basically
the same as blinky but with two LESs and adds no new value
to the samples.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Previous defconfig for dma is DMA_STM32F4X in this board, while the new
generic driver uses DMA_STM32 to enable DMA support, and also dma driver
of stm32 now needs HEAP_MEM_POOL_SIZE to be big enough to hold dma
stream instances.
Additional .conf files are added for also adding HEAP_MEM_POOL_SIZE
configuration to two test cases.
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
As the iPerf2 protocol is not documented properly, depend on
exact iPerf 2.0.5 version when testing.
Fixes#20313
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use this short header style in all Kconfig files:
# <description>
# <copyright>
# <license>
...
Also change all <description>s from
# Kconfig[.extension] - Foo-related options
to just
# Foo-related options
It's clear enough that it's about Kconfig.
The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)
git ls-files '*Kconfig*' | \
xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Enable the MX25R32 SPI NOR Flash on the VEGAboard and provide board
config file for the spi_flash sample.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
convert sample and test yaml filters that utilize a DT_ define to
instead use a dt_ function. The intent is to remove the Kconfig
generated DT defines and just make directy queries into the device tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move _LINKER and _ASMLANGUAGE to target.cmake because of how we pick the
linker script that might be used. This way regardless of how or where a
linker.ld gets included we will always set _LINKER & _ASMLANGUAGE (so
any header that needs check based on those defines they can,
specifically generated_dts_board.h)
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This sample showcases efficient utilization of SMP system
with processing of independent resource-hungry workloads.
With no cross-dependencies between workers and no usage of shared
resources (during heavy-lifting itself) we may demonstrate almost
linear scaling of efficiency. I.e. 2 cores do the same amount of
calculations twice faster than only 1 core. 4 cores complete
the same calculations 2 times faster than 2 cores.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
We try to demonstrate some concepts for user mode:
- Multiple logical applications, each with their own memory
domain
- Creation of a sys_mem_pool and assignment to a memory
partition
- Use of APIs like k_queue_alloc_append() which require
thread resource pools to be configured
- Management of permissions for kernel objects and drivers
- Show how application-specific system calls are defined
- Show IPC between ISR and application (using k_msgq) and
application-to-application IPC (using k_queue)
Fixes: #14683
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
add sample for syst format output to prove the output can be
decoded by the existing decoder.
Fixes: #19841.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Quit the accept loop if there is a socket related error as there
is no point of continuing in this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Achieved using CONFIG_NET_CONFIG_CLOCK_SNTP_INIT option, i.e. querying
time over network using SNTP.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
PSK support is added to echo-client.c and echo-server.c.
If enabled, a header is included which contains the PSK.
If the default dummy PSK header is used, a warning is issued.
The header can be changed via Kconfig.
Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
Not a top-level zephyr core API and tied to third party environment, so
move it to where the code is in lib/updatehub.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
There are two set of code supporting x86_64: x86_64 using x32 ABI,
and x86 long mode, and this consolidates both into one x86_64
architecture and SoC supporting truly 64-bit mode.
() Removes the x86_64:x32 architecture and SoC, and replaces
them with the existing x86 long mode arch and SoC.
() Replace qemu_x86_64 with qemu_x86_long as qemu_x86_64.
() Updates samples and tests to remove reference to
qemu_x86_long.
() Renames CONFIG_X86_LONGMODE to CONFIG_X86_64.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This samples captures frames from video capture device (in any format),
and sends them to its TCP client.
Tested with:
- mimxrt1064 + MT9M114 video sensor.
- Gstreamer 1.8.3 running on host
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Simple video sample getting frames from video capture device.
Tested with mimxrt1064_evk and MT9M114 sensor.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
In order to be able to run the sanity check, don't open the socket
if the test protocol is enabled.
Also add a debug print at the recv().
This commit will be dropped:
- As soon as the sanity check site accomodates
- As soon as the integration is complete
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit adds sample code for bus state checking.
Printing the counter state is moved to own thread because the
ISR was blocking too long (messages were lost)
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Configures the default instance of the sdhc driver for the
mimxrt1050_evk board so applications don't have to configure it
explicitly. Similarly, enables the gpio instance required by the sdhc
driver.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Configures the default sdhc driver for the imx rt soc series so
applications don't have to configure it explicitly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Configures the default sdhc disk volume name to "SD" when fatfs is
enabled. This prevents applications from having to configure it
explicitly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This adds a multithreaded dumb HTTP server sample application similar
to dumb_http_server with following differences
* support both IPv4 and IPv6 simultaneously
* support multiple incoming connections
* support TLS connections
* ignore POSIX compatibility
This app can be used for testing. Note that the app will always
serve a same static HTML page to caller regardless of HTTP request
parameters.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Key overwrite feature allows to overwrite old pairing key
records when key storage is full and a new pairing request occurs,
or new keys are distributed. If enabled when key storage is full and
a keys storage slot is requested, the oldest keys added will be
removed. So new devices can be paired with no limitations and no need
to determine, which devices should be unpaired to free key storage
space explicitly in application. To enable the feature set
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y.
Oldest keys are determined by minimum value of up-counting aging
counter. If you set CONFIG_BT_KEYS_SAVE_AGING_COUNTER_ON_PAIRING=y
aging counter values will be updated each time the secure connection
is established. This might increase flash wear out if at least two
secure connections are established and shut down periodically. When
the option disabled aging counter is still updated on each new secure
connection, but not stored to flash.
Signed-off-by: Sergiy Nikolayenko <sergiy_nikolayenko@jabil.com>
This sensor defaults to no trigger, in which case no observations will
be read from the device. Set to use the work queue (global) trigger.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
With the changes in PR #19836 applications now need to explicitly
include hci.h to use defines from it. Fix two sample/tests apps which
were missing this.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For Genric OnPowerUp equal to 0x02 (Restore):
If a transition was in progress when powered down, the element
restores the target state when powered up. Otherwise the element
restores the state it was in when powered down.
This commit implements above mentioned logic.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This illustrates how a keyboard matrix (laptop keyboard) reports
key events to a user application. In addition, it shows how to
handle the typematic rate and delay from user space.
Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
Some of the socket samples had wrong information about what default
board to use. Currently there is no default board and user must
select the board when building the application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The Peripheral Device Information Service (DIS) sample implements it's
own custom settings backend in order to load runtime settings.
This results in errors when the BT stack tries to save entries through
the custom handler since no save handler exists.
Error messages:
- bt_settings: Failed to save ID (err -2)
- bt_gatt: Failed to save Database Hash (err -2)
Since this is not a sample of how to do custom settings backend it is
best simply to remove using the custom backend, as it is not required
in order to load runtime settings.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
samples/bluetooth/peripheral couldn't build on nucleo_f429zi
since settings dependency on flash erase bock size.
On this series, flash erase are done per sector with sector
having varying size, so erase block size can't be used directly.
This has to be sorted, but for now nucleo_f429zi is removed from
sample withelist to unlock CI.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The hexdump was earlier printed using 8 bytes in one line like this
[00:00:00.131,143] <wrn> sample_instance.inst2: Example of hexdump:
01 02 03 04 05 06 07 08 |........
09 0a 0b 0c 0d 0e 0f 10 |........
11 12 13 14 15 16 17 18 |........
19 1a 1b 1c 1d 1e 1f 20 |.......
21 22 |!"
This is not utilizing the width of the output best way possible.
Better utilization of the output is to print 16 bytes in one line
like this:
[00:00:00.131,136] <wrn> sample_instance.inst2: Example of hexdump:
01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 |........ ........
11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |........ .......
21 22 |!"
In order to make it easier to find / calculate the bytes in the
output, print the output bytes in 8 byte groups.
This has the benefit that it is easier to map the Zephyr hex output
to Wireshark output which prints the bytes like this.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Re-run with updated script to convert integer literal delay arguments
to k_thread_create and K_THREAD_DEFINE to use the standard timeout
macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
found some references to files (via :zephyr_file: and :zephyr-app:) that
were moved, so the links were broken
Fixes: #19660
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
DTSpec writes this as a single word, presumably to make it easier to
grep for / more precise. Follow along in the rest of the docs now that
our main DT docs page agrees with this usage.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Instead of printk(), use logging macros so that all the output
from IP stack and sample is nicely interleaved.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Network shell is useful to have in order to debug things so
enabling it for this sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This option determines the name under which the device represented by
the `sw_pwm` node is registered in the system. But when the value of
this option does not match the `label` property of the `sw_pwm` node,
a problem arises when the `sw_pwm` node is referenced by a "pwm-leds"
compatible node, since the `*_PWMS_CONTROLLER` macro that is generated
for this referencing node contains a non-existing device name (as it is
the `label` property value, not the Kconfig option value).
This commit solves the issue described above by removing the Kconfig
option and replacing all of its occurrences in sample applications
by the standard macro generated for the `sw_pwm` node, containing
the value of the `label` property of this node.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Adds zero configuration based on LLMNR. This should be working in
Windows out of the box, zephyr can be accessed with http://zephyr/.
Can be combined with netusb configuration (RNDIS is supported in
Windows).
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use the int_literal_to_timeout Coccinelle script to convert literal
integer arguments for kernel API timeout parameters to the standard
timeout value representations.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Application board.overlay files tend to be paired with
boards/board.conf files that extend the functionality of a board.
Move the overlay files to the same location as the config files that
they work with.
A few overlay files that are paired with a prj_board.conf file in the
application root directory are left in place.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
By default only one listener is enabled, but if user specifies
CONFIG_NET_SAMPLE_NUM_HANDLERS with value larger than 1, then
multiple threads are created, and each will be able to accept
connections.
Fixes#19374
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This application's primary purpose is to provide some useful data to
the author of an x86 board support package for Zephyr-- it's not a
good sample. It's not a good test either, but as a test it at least
prevents regressions in multiboot/ACPI builds.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
ACPI is predominantly x86, and only currently implemented on x86,
but it is employed on other architectures, so rename accordingly.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Simple naming change, since MULTIBOOT is clear enough by itself and
"namespacing" it to X86 is unnecessary and/or inappropriate.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
x86 has more complex memory maps than most Zephyr targets. A mechanism
is introduced here to manage such a map, and some methods are provided
to populate it (e.g., Multiboot).
The x86_info tool is extended to display memory map data.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This sample demonstrates basic use of the x86 multiboot and ACPI
systems, and also provides some useful information about the board
it's booted on: data handed over by the multiboot loader (which is
either QEMU or GRUB at this point), basic APIC CPU topology, and
timer driver frequency (computed empirically).
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Mostly build tests now, will be extended to verify CTF output once we
have this feature in sanitycheck.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Disabling SMP mode for certain tests was a one-release thing, done to
avoid having to triage every test independently (MANY are not
SMP-safe), and with the knowledge that it was probably hiding bugs in
the kernel.
Turn it on pervasively. Tests are treated with a combination of
flagging specific cases as "1cpu" where we have short-running tests
that can be independently run in an otherwise SMP environment, and via
setting CONFIG_MP_NUM_CPUS=1 where that's not possible (which still
runs the full SMP kernel config, but with only one CPU available).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add support to LIS2MDL trigger, dynamic odr configuration as well as
temperature data reading.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
PR #18780 introduces a way to decouple pthread support from the general
CONFIG_POSIX_API global switch. This commit modifies the build of
SimpleLink components to take advantage of it, since SimpleLink
libraries only require pthread, sem, clock, and sleep support, not
entire POSIX API.
This fixes the build errors in the http_get sample introduced
by the merge of #18736. As such, this patch also removes
cc3220sf_launchxl exclude from sample.yaml of that sample.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This change is done so that there is no need to additionaly include
<nrfx.h> before <soc/nrfx_coredep.h> (what might be a bit surprising)
and so that <nrfx_config.h> doesn't need to be include separately for
nRF SoCs requiring a special mapping of peripheral accessing symbols.
This commit removes also no longer needed inclusions and updates
the hal_nordic module with required minor correction of nrfx_glue.h.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit implements generic function to decide
witch functions to call for selected value name with given
loading parameters.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit allows loading data from settings permanent storage
directly to the given callback function.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This adds support to set different permissions to CCCD so security can
be checked when enabling notification which conforms to:
BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part G page 2360:
'3.3.3.3 Client Characteristic Configuration
Authentication and authorization may be required by the server to
write the configuration descriptor.'
In addition to that also ensure that notification are not re-enabled
until the proper security level is reached to conform to the following
statement:
'10.3.1.1 Handling of GATT indications and notifications
A client “requests” a server to send indications and notifications
by appropriately configuring the server via a Client Characteristic
Configuration Descriptor. Since the configuration is persistent
across a disconnection and reconnection, security requirements must
be checked against the configuration upon a reconnection before
sending indications or notifications. When a server reconnects to a
client to send an indication or notification for which security is
required, the server shall initiate or request encryption with the
client prior to sending an indication or notification. If the client
does not have an LTK indicating that the client has lost the bond,
enabling encryption will fail.'
Fixes#17983
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix a Coverity warning when using %d to print the result
of a sizeof(...)
Since the result of the sizeof() use in the example
will always fit in a int, simply cast the result
to a int so the %d is always correct.
Fixes: #18373
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Now that we have support for properly combine conditions from multiple
"filter" clauses in one sample.yaml file (e.g. from "common" and
test-specific sections), use it instead of previous adhoc syntax
relying on string concatenation.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add console testing harness for expected output. This allows us
to validate that the test is running properly on hardware.
We expect output of the form:
Master core received a message: 1
Master core received a message: 3
Master core received a message: 5
...
Master core received a message: 95
Master core received a message: 97
Master core received a message: 99
OpenAMP demo ended.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add console testing harness for expected output. This allows us
to validate that the test is running properly on hardware.
We expect output of the form:
Hello World from MASTER! ARM
Received: 1
Received: 2
Received: 3
...
Received: 20
Received: 21
Received: 22
...
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add some mbedTLS tweaks for OpenThread in overlay-ot.conf.
Add sample configuration to enable Commissioner/Joiner, disabled by
default.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Remove FRDM-K64F board config and overlay from cfb_shell sample.
Enable test for the shield ssd1306_128x32.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
The CMSIS layer doesn't like large stacks, and x86 in long mode
requires large stacks, so we disable these tests for now (as was
previously done on the x86_64 port for the same reasons).
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
In long mode, x86 does not support static IDTs or OpenOCD,
so disable the tests related to these features.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Update configuration of arduino_due board to use a common gpio_sam
driver rather than sam3x specific gpio_atmel_sam3. The gpio_atmel_sam3
driver is going to be deprecated.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
The LIS2MDL is not a combo device, but pure magnotemeter.
Hence, '-magn' extension is not adding information and can
be removed from dts compatible name as well as binding filename.
Instead specify '-i2c' or '-spi' to distinguish between the names.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Also modified to timeout to 1000ms in order to support watchdogs like
WWDG with smaller timeouts.
Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
Update a number of boards that have arduino_gpio and arduino_i2c
support in their dts files to show that they support that in the
board.yaml file. This allows coverage on several shield tests that
utilize the tags 'arduino_gpio' and 'arduino_i2c'.
Exlucde stm32mp157c_dk2 from some of the samples right now since the
connector on the board doesn't support A2/A3. Also remove the duplicate
of exluding disco_l475_iot1.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There are build issues with this sample now that it requires that the
board dts have an arduino_header node. Add depends_on: arduino_gpio
to sample.yaml so we only build this if the board has that header.
Also remove a duplicate line for excluding the disco_l475_iot1 platform.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Change arduino_header depend to arduino_gpio as that is more meaningful.
Its easy to mistake arduino_header to mean the board has an arduino
header in general. What we want to depend on is that we have the gpio
connector in the dts that has 'arduino_header' as the node label.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Removes the special stack config setting in the Bluetooth Mesh sample to
allow it to run with other Bluetooth controllers.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Renames the nrf51_blenano config file to something generic and uses that
same config for the nrf51_ble400 board, which has the same constraints.
Cannot rely on the CONFIG_SOC_NRF51_QFAA variable, as the CONF_FILE
variable must be set before the boilerplate.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Remove setting GPIO_DIR_OUT in the dts overlay for mcp2515 as a
precursor to new GPIO API work. The flag isn't used for cs-gpio,
as we hard code GPIO_DIR_OUT in the spi controller code.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Build errors were introduced by the merge of #18736. Until PR #18780 is
approved to allow the SimpleLink libraries to build without
CONFIG_POSIX_API, this patch excludes cc3235sf_launchxl from the test
build.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Empty sequences in Python are falsy, so
if len(config_file) != 0:
can be simplified to
if config_file:
pylint warning:
C1801: Do not use `len(SEQUENCE)` to determine if a sequence is
empty (len-as-condition)
Simplify the code a bit with os.path.join(), which indirectly gets rid
of the warning. os.path.join('', 'foo') returns 'foo', so things work
out when os.path.basename() returns '' (no directory) as well.
I'm getting rid of pylint warnings for a CI check.
Also replace a '== None' with 'is None', which is more common.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Several user mode tests cannot run on twr_ke18f because
either the platform does not have a sufficient number of
MPU regions required for the tests, or, the tests also
require HW stack protection (which has been, by default,
excluded in user mode tests for twr_ke18f board). We
excluded the board from all those tests.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
While trying out the hello_world sample built for QEMU, I was expecting
the sample app to exit and I'd return to a command prompt. Nope. You
need to exit QEMU manually, so add that step to the sample instructions.
Looking around, there are more uses of QEMU like this that could use
this added step after running the sample app.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
With CONFIG_POSIX_API enabled, these samples now build under Zephyr
with exactly the same source as e.g. Linux (or in general, other POSIX
systems). However, building without CONFIG_POSIX_API (i.e. with
CONFIG_NET_SOCKETS_POSIX_NAMES aux option) is retained for now.
Add testcase definitions to build these samples with CONFIG_POSIX_API
in CI.
Fixes: #17353
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
If mDNS is enabled, then do the mDNS query always. Earlier we did
the query after we had received response to the normal DNS query.
Also there is no need to print DNS id for mDNS queries as the id
is always 0.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Error checking was missing following call to
counter_set_channel_alarm.
This was reported in coverity report 203523.
Fixes#18374
Additionally remove unneeded err initialization in main function
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit extends existing logging sample in order to present
logger usage from user mode thread.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Instead of having a mix of west and CMake/ninja instructions for
building and flashing, document it using only west. This will help
clarify that west is the default build tool in Zephyr and should also
reduce confusion over what tool to use.
Note that the biggest change is changing the default in
doc/extensions/zephyr/application.py for :tool:, from all to west.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We do not need the return values from various calls to pthread_*()
functions.
Coverity-CID: 203462
Coverity-CID: 203535
Fixes#18376Fixes#18377
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Set harness to led as a placeholder to avoid running samples on
platforms that do not have the needed hardware.
Fixes#17439
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Match the logging changes made in samples/.../usb/cdc_acm to the
cdc_acm_composite sample. This allows any device testing checks to work
properly.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename AUTHENTICATION, to AUTH, since this is a well established short
form of the word.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Rename bt_conn_security to bt_conn_set_security, this makes the API
naming more consistent.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Rename security level enum, using level and number instead of low,
medium, high and fips.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add console testing harness for expected output. This allows us
to validate that the test is running properly on hardware.
We expect output of the form (the Reboot_counter will increment
overtime).
Id: 1, Address: 192.168.1.1
Id: 2, Key: ff fe fd fc fb fa f9 f8
Id: 3, Reboot_counter: 5
Id: 4, Data: DATA
Id: 5, Longarray: 0 1 2 3 4 5 6 7 8 9 ... 7f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add simple console testing harness for expected output. This allows us
to validate that the test is running properly on hardware.
We expect the sample to report back somthing like:
Counter received: 1
Counter received: 2
Counter received: 3
Counter received: 4
...
etc.
So have a simple regex check for it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add security error to security_changed callback. Call this callback when
security has failed and provide current security level and error.
Reason for failure can be.
- Pairing procedure failed, pairing aborted before link encryption.
- Link encrypt procedure failed
- Link key refresh procedure failed.
Fix missing bt_conn_unref on encryption key refresh with error status.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
When LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP is enabled:
- Mark the first server as a bootstrap server
- Create second server and security instances (used by bootstrap
server)
This allows bootstrap support to be tested out of the box with
the following:
- setup Leshan bss-server-demo (bootstrap server) on port 5783
- setup Leshan server-demo (lwm2m server) on port 5683
- add an entry into the bootstrap server:
LWM2M Server=coap://[2001:db8::2]:5683
- build the sample like so:
west build -t run -b qemu_x86 \
-s zephyr/samples/net/lwm2m_client/ -- \
-DCONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y \
-DCONFIG_LWM2M_PEER_PORT=5783
Signed-off-by: Michael Scott <mike@foundries.io>
CONFIG_NET_SOCKETS_POSIX_NAMES is incompatible with POSIX_API, so it's
disabled by the build system. It's no longer required anyway.
It is a leftover from before #16557 was merged.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Use LOG_LEVEL_INF as defautl log level and use LOG_INF
for important messages. Relax while loop and
give CPU resources to low priority threads like logging.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This removes the necessity of registering the storage for CCC and make
it part of the declaration itself.
Fixes#18547
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mark harness as TBD as we haven't defined how to test/validate this
sample on real hardware. As such marking it 'harness: TBD' will get it
skipped from being attempted to run on hardware via --device-testing
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Was "pkconfig", which may confuse users whether some different tool
than the standard pkgconfig is meant.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The order of the fonts in ROM has changed.
Since the sorting is not wrong, correct the
order in the application.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.
Background from issue #17997:
Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.
Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.
See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Adding required fields to the devicetree overlay of the CAN sample as
this is often used as a reference. Also use these fields instead of the
KConfig entries.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
The CAN sample is rewritten to be board independent.
The CAN controller and LED is determined automatically and the
button is removed.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
SOCKS5 support added to echo_client. Details are added
in README file about how to verify this feature using
echo-client with echo-server running on Linux host.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Reduce the RAM usage in two of the Bluetooth samples in order for them
to fit in the BBC Microbit's RAM.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
* this is a simple sample to show how
secure applicaiton and non-secure application work
together. More details are in README.rst
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit includes tweaks in several tests, so
that the tests can be passing on ARM QEMU targets,
mps2_an385 and mps2_an521 with Qemu 4.x release.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This adds a basic app which puts some rectangles on the display
It's hard to write an equivalent README to the rest of the sample
documentation, as the LCD I have uses a custom board thrown together for
testing. (ie other LCDs have publicly available modules)
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
This commit adds a sample configuration for 6LoCAN to the
echo_client and echo_server example.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit is an implementation of 6LoCAN, a 6Lo adaption layer for
Controller Area Networks. 6LoCAN is not yet standardised.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
The maximum period a PWM controller can generate depends on its input
clock and its resolution (16-bit, 32-bit...). Setting a 1s max period
generates error with some hardwares (mimxrt1064_evk) because of clock
limitation.
This patch fixes this issue by calculating maximum period of the PWM
device to adjust max and min periods accordingly.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
There's desire to be able to customize parameters on a per-filesystem
basis, which means we need a way to override the Kconfig defaults which
are global. This also means the littlefs data structure cannot own the
cache and lookahead buffers.
Switch to using a macro to define the littlefs data structure. The
default version uses the Kconfig constants. A custom one takes
arguments providing the most likely partition-specific parameters.
Finally the user is free to bypass the helper macros and set any
parameters desired, though validation is limited and only present when
CONFIG_DEBUG is enabled.
Extend the test suite with a performance module, which confirms that
these settings have an impact proportional to the log of changes to the
cache or IO sizes.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add support for the littlefs file system in the fs shell. Update
the sample to use the same partition configuration as the littlefs
example for the SPI NOR test platform.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The message talks about seconds but displays ticks. Adjusting the
parameter to convert ticks to seconds then. But also adding the ticks
since it is a valuable information when testing counter devices.
Fixing small style issue (parameter indentation) as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Modify mqtt_publisher sample to use mqtt_client_set_proxy().
Removed CONFIG_MQTT_LIB_SOCKS based setup.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Error codes are listed in header files and in the core spec as hex
values. Always print them in hex in debug for easier error code
checking.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Let's add support for recently added LwM2M objects:
- Connectitiy Monitoring
- Location
- IPSO Accelerometer
- IPSO Buzzer
- IPSO On/Off Switch
- IPSO Push Button
Currently, this is limited to compile enabled and manual creation
of objects via LwM2M server. Objects will respond to read/write
operations, but not have real HW backing.
Signed-off-by: Michael Scott <mike@foundries.io>
LwM2M allows for multiple instance resources such the power source
resources in the device object. These types of resources have
always been very hard to work with, and frankly were poorly
implemented.
This led to other issues where it was very hard to have
non-sequential resource instances, and each resource of this type
needed special getter / setter methods such as:
lwm2m_device_add_pwrsrc()
lwm2m_device_set_pwrsrc_voltage_mv()
Going forward, as more LwM2M objects are implemented this just
doesn't scale well.
To fix this:
- split the resource instance data out from the resource data.
This includes the data pointer information and resource
instance id.
- add resource id and resource instance id to the event callback
functions so user's can see in more detail what resources and
resource instances are being handled.
- allow generic functions like lwm2m_engine_get_*() and
lwm2m_engine_set_*() to access resource instance data.
- adjust object resource initialization macros to map resource
instances to resources at the time of object instance
creation.
- fix up the lwm2m_client as a reflection of all of these changes.
Signed-off-by: Michael Scott <mike@foundries.io>
By sending the temp value back to the LwM2M engine, it allows all of
the min/max values to be updated over time.
Fixes an issue where min/max values were not being updated.
Signed-off-by: Michael Scott <mike@foundries.io>
The native Zephyr LwM2M client enables the JSON formatter which
can use more of the packet buffers than the default 256 with
TLV formatting. Let's set the default to 512 in order to avoid
cutting off the output of larger READ operations.
In the future, we should establish block transfer buffers to
handler longer READ ops.
Signed-off-by: Michael Scott <mike@foundries.io>
Per IPSO Light Control definition from the OMA LwM2M registry:
http://www.openmobilealliance.org/tech/profiles/lwm2m/3311.xml
There is an optional "Application Type" string resource (5750) in the
Light Control object. This was missed in the initial implementation.
NOTE: sample will assign reference if needed.
Signed-off-by: Michael Scott <mike@foundries.io>
We are pre-allocating a storage variable for the application type
resource in the IPSO Timer object. This is an optional resource
which won't always be set by samples.
Let's leave out the pre-allocated variable and let the sample set
this reference if needed (it's optional).
Signed-off-by: Michael Scott <mike@foundries.io>
Now that strcspn() is implemented in our minimal libc, remove it from
the civetweb sample to avoid the linker complaining about multiple
definitions.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
k_cycle_get_32() returns an unsigned 32-bit integer, while the '%d'
specifier denotes a signed integer.
Using the proper C99 format specifier resolves the problem.
Signed-off-by: Reto Schneider <code@reto-schneider.ch>
This commit adds civetweb as a west module and a sample that uses it.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit enables the CAN shell for the sample code.
Also, the device shell is activated to find the proper device-name.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Show eSPI API driver usage, including early configuration,
send of virtual wire packets and callback mechanism
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
The `start_udp_and_tcp` funcion is a blocking function, therefore it
should not be called from the system workqueue, as it would stall it.
Because it was called in such a way, the retry mechanism, which
also relied on the system workqueue did not work properly.
This commit fixes the issue, by keeping the main application processing
in the main thread, and using a semaphore to synchronize with the
connection manager.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Particle mesh feather devices, and Nordic PCA10056, can both run
this example with the on-board JEDEC SPI NOR device if the driver
is enabled.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
There are multiple flash implementations. This sample was originally
written for the W25QXXDV driver, but has since been used for
jedec,spi-nor. The sample should work with multiple drivers.
Add device name sources for several drivers, falling back to spi-nor
which was recently used as a test filter.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
On some SoCs the frequency of the system clock is obtained at run time
as the exact configuration of the hardware is not known at compile time.
On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
directly introduces timing errors.
This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
to inline function sys_clock_hw_cycles_per_sec() which always returns
correct frequency of the system clock.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>