Move the logging for transactions to the functions that actually access
registers and sample data. This avoids needed to repeat this code when
I2C starts calling these functions.
Signed-off-by: Simon Glass <sjg@chromium.org>
Update the language to refer to a bus instead of SPI. This will make it
more applicable with I2C support is added.
Signed-off-by: Simon Glass <sjg@chromium.org>
This member holds the SPI bus pointer. Change its name to make that
more obvious and so that it can be used for an I2C bus also.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present there are three separate read functions and two write
functions. This makes it harder to provide an interface that can work
with either SPI or I2C.
Use bmi160_read() for all reads and create a new bmi160_write()
function for all writes.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present this driver only supports a single instance. It sets up some
of its config in the init routine. It is better to put config in
constant data so that multiple instances can be supported and RAM space
is minimised.
Update the driver accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Currently a 'bmi160' pointer is used to point to the driver data. This
confusing, as the driver uses both data and config. Rename the variable
to 'data' like the bme280 driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
This driver uses verbose names for the config and data structures, which
makes it harder to see which one we are talking about. Shorten it, like
the bme280 driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: #28893
Now using get_filename_component(REALPATH) to ensure full path with
symlinks and `..` resolved.
Having `..` in path causes the gcc generated dependency file to contain
`\` in path on windows. This confuses ninja.
The result is that ninja consider the file missing, and thus invokes a
CMake run to create the file, resulting in endless loop.
By ensuring that full path (containing `/` which is already ensured)
when calling gcc, then all paths will be posix style, making ninja
happy.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
1. Add more detail info to make the purpose and process
of the test cases more clear which include test goal,
test step, input, judging criteria, constraints, etc.,
and these can be seen in our Zephyr documentations.
2. Add some negative test code.
Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
All net_bufs allocated to modem_cmd_handler's data->rx_buf are consumed
synchronously in ublox-sara-r4.c in the same thread. This means that
allocating them with timeout makes no sense, because timeout
will *always* be hit when there are no more buffers in net_buf_pool.
Get rid of the unnecessary timeout, as it doesn't help and just slows
down processing of incoming data, increasing possibility of data
overrun.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
All net_bufs allocated to modem_cmd_handler's data->rx_buf are consumed
synchronously in gsm_ppp.c in the same thread. This means that
allocating them with timeout makes no sense, because timeout
will *always* be hit when there are no more buffers in net_buf_pool.
Get rid of the unnecessary timeout, as it doesn't help and just slows
down processing of incoming data, increasing possibility of data
overrun.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
All net_bufs allocated to modem_cmd_handler's data->rx_buf are consumed
synchronously in esp.c in the same thread. This means that allocating
them with timeout makes no sense, because timeout will *always* be hit
when there are no more buffers in net_buf_pool.
Get rid of the unnecessary timeout, as it doesn't help and just slows
down processing of incoming data, increasing possibility of data
overrun.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
So far a dedicated buffer was used for data read from modem
interface. New net_bufs were allocated and filled later, which means
that data was lost when no more net_bufs were available in the pool.
Prevent data loss by allocating net_buf before attempting any read on
modem interface. Process incoming data in a loop as long as reading from
interface results in new data. Also remove dedicated buffer
(data->read_buf) and directly fill net_buf content instead. As a side
effect there are less memory copy operations and RAM usage is reduced.
Pre-allocated net_buf is now always appended to data->rx_buf. When there
was no (more) data read from interface to such net_buf, then this empty
net_buf will be on the end of data->rx_buf fragment list. Update
skipcrlf() and findcrlf() implementations to explicitly check for each
net_buf length, instead of blindly assuming them to have at least single
byte.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
cmd_handler_process() does two major things:
- reads data from modem interface and fills data->rx_buf,
- processes data in data->rx_buf.
Split implementation accordingly to two separate functions, which
improves readability (less automatic variables to follow at once) and
simplifies refactoring of each action.
No functional change was intended in this commit.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
The existing testcase's doxygen describes are the general
implementation idea of a function.On this basis, adding
more descriptive statements to describe which conditions need
to be preset when running the testcase, which test techniques
are applied, and describe the testcase Design steps in detail.
Make it more readable.
Signed-off-by: Ying ming <mingx.ying@intel.com>
1. Add more detail info to make the purpose and process
of the test cases more clear which include test goal,
test step, input, judging criteria, constraints, etc.,
and these can be seen in our Zephyr documentations.
2. Add some negative test code.
Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
1. Add more detail info to make the purpose and process
of the test cases more clear which include test goal,
test step, input, judging criteria, constraints, etc.,
and these can be seen in our Zephyr documentations.
2. Add more negative testcase.
Signed-off-by: YouhuaX Zhu <youhuax.zhu@intel.com>
The DMA bindings had duplicate description: keys. Merge the two
descriptions into one to fix the issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
remove "platform_allow" to enable test case run on more platforms,
only a few archs and platforms are excluded.
Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
Breathe>=4.23.0 renders \xrefitem, including its specializations like
\deprecated, so add the proper `()` to symbols existing in previously
declared \deprecated messages so they are properly resolved.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Previous Breathe versions had issues parsing anonymous unions/structs
which was fixed recently, so those can be removed from .known-issues.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Breathe>=4.23.0 brings in basic xrefitem rendering support and fixes
issues parsing anonymous struct/unions. This version also adds a config
knob for showing or hiding enumerator values, so set it to generate
documentation compatible with previous versions.
Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
Fixes#28456
This commit extends `target_ld_options()` with a NO_SPLIT flag.
Specifying `NO_SPLIT` will ensure that all linker flags will be applied
together when testing the compiler and linker.
This allows a caller to ensure that flags are tested together.
This fixes the RISC-V case where the flags `-mabi` and `-march` were
omitted because they were tested individually.
Note, the update of `target_ld_options()` will allow the same flag on
`zephyr_ld_options()`
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
MCUBoot was synchronized up to:
https://github.com/JuulLabs-OSS/mcuboot/commit/c625da4
- Removed the flash_area_read_is_empty() port implementation
function
- Added watchdog feed on nRF dvices.
See CONFIG BOOT_WATCHDOG_FEED option.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Divided doxygen API documentation into zephyr-internal API and
user API.
This make sense as user shall not use zephyr-internal API.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added information about that offsets are expressed in relation to
the flash memory beginning address.
This info was missing which cause misunderstanding of the concept
while contributing.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Some LWM2M backends/servers, such as emxq, expect the sequence numbers
to begin on 0.
This change is in line with how other lwm2m clients, such as Anjay and
Wakama, starts the notification sequence.
Signed-off-by: Viktor Sjölind <viktor.sjolind@endian.se>
This commit adds posibility to save zephyr version in the xml reports.
It adds 'properties' attribute to testsuite attribute. 'properties'
can contain multiple 'property' attributes. Zephyr version is added
as such 'property'.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Fix arguments unused when not enabling Extended Scanning
which was introduced in
commit 0cef1e43c9 ("Bluetooth: controller: Extended
Scanning Coded PHY duration and period").
Fixes#29442.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This fixes the documentation instructions for building the SMP Pi
sample program, which incorrectly listed an underscore instead of
a path separator slash.
Signed-off-by: Steve Winslow <steve@swinslow.net>
It is useful to see the name of the handler thread for debugging
purposes so set it when starting the handler thread.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The commit 93e5181f ("net: context: Add locking for concurrent
access") added net_context locking to only IPv4 sockets.
That is not enough and we need locking also to other supported
socket address families like IPv6, SocketCAN and packet socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fix application conn param update submitted before the timeout of
CONFIG_BT_CONN_PARAM_UPDATE has expired being ignored when
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Rename the update_work handler to deferred_work since this handler
is being multiplexed for different kinds of deferred work, not just
updating the connection parameters.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move auto-initiation of the peripheral connection parameter update,
this handling would only submit the delayed work with the timeout once
all other auto initiated procedures had completed. This behavior means
that the delay would not be set on when the connection was established
but instead relative to the previous procedures.
Based on the connection interval used, the instant(s) used, and the
number of auto procedures this delay becomes indeterminate.
Submit the work once connected, the constraint that existed in the
zephyr link layer earlier about requesting only one control procedure
at a time has been removed.
This also brings all the handling of the timeout work to the connection
state handling, which makes it easier to track this behavior in code.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Document the behavior of the bt_conn_le_conn_update API when the
local device is the peripheral role.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This is to make the gpio-i2c initialization occur after the GPIO pin
clock initialization.
Signed-off-by: Cassini Zhuang <cassini.zhuang@hansonggroup.com>
This suite now uses far less memory and is much simpler.
We still maintain coverage of all the memory domain APIs
and ensure that the maximum number of partitions can be
applied.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The tests test_mem_part_auto_determ_size and
test_mem_part_auto_determ_size_per_mpu are supposed to
just be checking the construction of automatic memory
partitions.
test_mem_part_auto_determ_size had a bunch of extraneous
stuff covered by other test cases and reserved three
different thread stacks.
These two tests have been drastically simplified and
combined.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
test_mem_part_inherity_by_child_thr duplicates logic already
present in test_permission_inheritance. That test puts a
buffer called 'inherit_buf' in 'inherit_memory_partition'
and shows that it is accessible by a child thread by
writing to it.
Delete this unnecessary test.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Tests are now grouped in the C file they occur in.
test_mark_thread_exit_uninitialized no longer occurs twice.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>