Fix issue reported by coverity regarding using volatile variable
in zassert_equal macro.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Port all users of 'set_conf_file' to use the built-in rules
instead. This follows the convention-over-configuration principle to
make the system as a whole simpler and more consistent.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The qmsi 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: Savinay Dharmappa <savinay.dharmappa@intel.com>
Tests were failing because:
1. `alarm_cnt` was not reset before the test.
2. one test was failing because it was expecting that setting
`top_value` for channel_alarm is too high value but in fact
it is accepted and `top_value+1` is too much.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The code has been using non DT_ prefixed defines for DT generated
defines. Switch to use DT_ prefixed ones as we want to deprecated
the non DT_ prefixed defines.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The function to set channel alarm is called counter_set_channel_alarm.
To match the name of the function performing the reverse operation this
commit renames counter_disable_channel_alarm() function to
counter_cancel_channel_alarm().
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
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>
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>
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>
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>
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>
Using `COUNTER_2_NAME` when all other properties are
`COUNTER_TIMER2_foo` is confusing. Make the names consistent.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
RTC1 (not RTC0) is excluded because it is used as the system clock.
Also document that TIMER0 and RTC0 may be rejected when CONFIG_BT_LL_SW
is enabled.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>