Inline load_and_parse_dts() and generate_{keyvalue,include}_file().
Also specify UTF-8 for writing files, and fix some mis-indentation.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Flags take a single argument by default, and removing nargs=1 avoids
getting it as a single-element list.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Get rid of the parent_label variable.
Also avoid using "label" in two different senses (DT label and name of
define macro) within the same comment.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use the new i2c_write_read() wrapper to simplify the code.
Also add several overlays used to test the sensor on a variety of
boards, and conf file support for trigger testing.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The scatter/gather API for I2C assumes that all SoC implementations are
capable of supporting such operations, in particular performing a single
write (read) transaction that transfers from (to) multiple addresses in
memory. This is not the case: for some driver implementations a write
of a device register address followed by a write of data to be stored in
that register will produce two bus transactions and be mis-interpreted
by the receiving device.
Extend the documentation of the I2C message flags to provide more
information about the breadth of implementation variation in their
interpretation.
i2c_burst_write cannot be deprecated because we have no replacement.
Clarify in the description that the behavior is not portable.
i2c_burst_read is not being deprecated because it is in use throughout
Zephyr. The description is updated to reflect that it can be replaced
by i2c_write_read().
Deprecate unused convenience wrappers that depended on the burst APIs
but were never used in the tree.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Replace the sole use of i2c_burst_read_addr with a more generic API
function to allow the former to be deprecated along with its unreliable
sibling write and update functions.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
It is commonly necessary to execute a pair of I2C transactions where the
first is a write transaction that identifies information held on the
device and a second is a read transaction that retrieves the identified
information.
Add API that performs this operation generically, without restricting
the type or size of the identification or content messages. Follow the
argument order of the existing i2c_write and i2c_read methods.
This reduces the need to explicitly construct buffers for i2c_transfer,
or to use more restrictive API functions that perform a gather write
that is not reliable on all I2C bus driver implementations.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
error: a label can only be part of a statement and a declaration is not
a statement u32_t limit = _arc_v2_aux_reg_read(_ARC_V2_TMR0_LIMIT);
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The latest update of the SAM E70 HAL (commit 6ad7e13608) shifted the
GMAC priority queues related registers by 4 bytes. It is not cleared
yet, if it is change is a mistake or a change from 0 based indexing
to 1 based indexing. Indeed the main queue is the number 0, and the
first priority queue is therefore the number 1.
In the meantime revert that change, and use the old registers addresses
matching the datasheet.
Fixes#12945
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Introduces the ARCH_ROOT argument, similar to BOARD_ROOT and SOC_ROOT.
This enables support for out-of-tree architectures.
The ARCH_ROOT out-of-tree layout is expected to be the following:
* ${ARCH_ROOT}/arch/${ARCH}/
* ${ARCH_ROOT}/include/arch/${ARCH}/ (Optional)
Signed-off-by: Klaus Petersen <kape@oticon.com>
Instead of enabling Bluetooth by default on nRF5x boards, only enable
the controller if Bluetooth has been enabled by the applicaiton.
Fixes#5454Fixes#12215
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Few boards supporting RTC were missing rtc as supported rtc feature
in yaml files. Fix this.
Add counter to all boards supporting rtc as RTC IP now support
both rtc and counter API.
Change split in 3 parts in order to lower CI load and get shippable
happy.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Few boards supporting RTC were missing rtc as supported rtc feature
in yaml files. Fix this.
Add counter to all boards supporting rtc as RTC IP now support
both rtc and counter API.
Change split in 3 parts in order to lower CI load and get shippable
happy.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Few boards supporting RTC were missing rtc as supported rtc feature
in yaml files. Fix this.
Add counter to all boards supporting rtc as RTC IP now support
both rtc and counter API.
Change split in 3 parts in order to lower CI load and get shippable
happy.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Update counter_basic_api test to support STM32 RTC counter.
Add device to list and skipp not supported test cases.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Configure RTC on nucleo_f746zg.
It is supported through counter RTC API.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Provides a STM32 RTC driver using new counter API.
Driver does not support wrap related functions (set, get, ..)
Fixes#11373
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Enable testing of counter (COUNTER_{D}TMR_CMSDK) on mps2_an385 and
enable timers on v2m_beetle (TIMER_{D}TMR_CMSDK).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The CMSDK Dual Timer can be used as a timer or as a counter.
The unified interface proposed in #8340 unifies counter.h and rtc.h to
provide a common interface.
This patch modifies the timer implementation of the dual timer to
make it compliant with the new proposed interface.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The CMSDK Timer can be used as a timer or as a counter.
The unified interface proposed in #8340 unifies counter.h and rtc.h to
provide a common interface.
This patch modifies the timer implementation of the single timer to
make it compliant with the new proposed interface.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Enables debug logging in the counter_basic_api test. Fixes a build error
in the nrf counter drivers when logging is enabled.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The mcux rtc hardware supports a single alarm only and a fixed top
value, so restructure the counter_basic_api test to skip unsupported
features.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds a shim layer around the mcux rtc driver to adapt it to the zephyr
counter interface. Portions of this driver are reused from the existing
rtc driver in drivers/rtc/rtc_mcux.c.
The hardware supports a single alarm only and a fixed wrap value.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
In case of default top value, driver was calling top value
callback only on the first period. This was not expected behavior.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Tests i.MX EPIT timer peripheral driver. Since it supports zero number
of channel alarms, some tests had to be adjusted to look at the
number of channel alarms supported first.
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Enabled EPIT (Enhanced Periodic Interrupt Timer) in Cortex-M4 core
of Udoo Neo Full board so the counter API could be used there.
Origin: Original
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Add EPIT (Enhanced Periodic Interrupt Timer) peripheral support
for i.MX6SoloX soc.
Origin: Original
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Add shim driver for i.MX EPIT (Enhanced Periodic Interrupt Timer)
peripheral which can be used for i.MX6SoloX, i.MX7D and other i.MX socs.
Origin: Original
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Renamed:
- counter_set_wrap to counter_set_top_value
- counter_get_wrap to counter_get_top_value
- counter_get_max_wrap to counter_get_max_top_value
Updated nRF implementations and counter test.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Modify alarm callback to return user_data and channel_id.
Set_alarm and disable_alarm updated accordingly. Renamed
counter_*_ch_alarm to counter_*_channel_alarm. Updated test
and nrf implementations.
Updated doxygen comments.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
nrf_rtc_timer was selecting counter RTC1 instance even though it
is not using counter API at all.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>