Skip to content

Rename DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER #6351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TESTS/mbed_drivers/lp_ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "unity/unity.h"


#if !DEVICE_LOWPOWERTIMER
#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] Low power ticker not supported for this target
#endif

Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbed_drivers/lp_timeout/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#if !DEVICE_LOWPOWERTIMER
#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] Low power timer not supported for this target
#endif

Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbed_drivers/lp_timer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "rtos.h"
#include "hal/us_ticker_api.h"

#if !DEVICE_LOWPOWERTIMER
#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] test not supported
#endif

Expand Down
4 changes: 2 additions & 2 deletions TESTS/mbed_hal/lp_ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "lp_ticker_api_tests.h"
#include "hal/lp_ticker_api.h"

#if !DEVICE_LOWPOWERTIMER
#error [NOT_SUPPORTED] test not supported
#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] Low power timer not supported for this target
#endif

using namespace utest::v1;
Expand Down
6 changes: 3 additions & 3 deletions TESTS/mbed_hal/lp_us_tickers/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void ticker_event_handler_stub(const ticker_data_t * const ticker)
if (ticker == get_us_ticker_data()) {
us_ticker_clear_interrupt();
} else {
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
lp_ticker_clear_interrupt();
#endif
}
Expand Down Expand Up @@ -411,7 +411,7 @@ utest::v1::status_t hf_ticker_setup(const Case *const source, const size_t index
return greentea_case_setup_handler(source, index_of_case);
}

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
utest::v1::status_t lp_ticker_setup(const Case *const source, const size_t index_of_case)
{
intf = get_lp_ticker_data()->interface;
Expand Down Expand Up @@ -444,7 +444,7 @@ Case cases[] = {
Case("hf ticker overflow test", hf_ticker_setup, ticker_overflow_test),
Case("hf ticker increment test", hf_ticker_setup, ticker_increment_test),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi

Maybe not the good PR... but maybe we should rename hf ticker into us ticker here ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do it in a separate PR. I need this one ASAP to get docs generated .

Case("hf ticker speed test", hf_ticker_setup, ticker_speed_test),
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
Case("lp ticker init is safe to call repeatedly", lp_ticker_setup, ticker_init_test),
Case("lp ticker info test", lp_ticker_setup, ticker_info_test),
Case("lp ticker interrupt test", lp_ticker_setup, ticker_interrupt_test),
Expand Down
6 changes: 3 additions & 3 deletions TESTS/mbed_hal/lp_us_tickers_freq/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void ticker_event_handler_stub(const ticker_data_t * const ticker)
if (ticker == get_us_ticker_data()) {
us_ticker_clear_interrupt();
} else {
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
lp_ticker_clear_interrupt();
#endif
}
Expand Down Expand Up @@ -111,7 +111,7 @@ utest::v1::status_t hf_ticker_case_setup_handler_t(const Case * const source, co
return greentea_case_setup_handler(source, index_of_case);
}

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
utest::v1::status_t lp_ticker_case_setup_handler_t(const Case * const source, const size_t index_of_case)
{
intf = get_lp_ticker_data()->interface;
Expand All @@ -130,7 +130,7 @@ utest::v1::status_t ticker_case_teardown_handler_t(const Case * const source, co
Case cases[] = {
Case("hf ticker frequency test", hf_ticker_case_setup_handler_t, ticker_frequency_test,
ticker_case_teardown_handler_t),
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
Case("lp ticker frequency test", lp_ticker_case_setup_handler_t, ticker_frequency_test,
ticker_case_teardown_handler_t),
#endif
Expand Down
2 changes: 1 addition & 1 deletion doxyfile_options
Original file line number Diff line number Diff line change
Expand Up @@ -2070,7 +2070,7 @@ PREDEFINED = DOXYGEN_ONLY \
DEVICE_I2CSLAVE \
DEVICE_I2C_ASYNCH \
DEVICE_INTERRUPTIN \
DEVICE_LOWPOWERTIMER \
DEVICE_LPTICKER \
DEVICE_PORTIN \
DEVICE_PORTINOUT \
DEVICE_PORTOUT \
Expand Down
2 changes: 1 addition & 1 deletion doxygen_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"SEARCH_INCLUDES": "YES",
"INCLUDE_PATH": "",
"INCLUDE_FILE_PATTERNS": "",
"PREDEFINED": "DOXYGEN_ONLY DEVICE_ANALOGIN DEVICE_ANALOGOUT DEVICE_CAN DEVICE_ETHERNET DEVICE_EMAC DEVICE_FLASH DEVICE_I2C DEVICE_I2CSLAVE DEVICE_I2C_ASYNCH DEVICE_INTERRUPTIN DEVICE_LOWPOWERTIMER DEVICE_PORTIN DEVICE_PORTINOUT DEVICE_PORTOUT DEVICE_PWMOUT DEVICE_RTC DEVICE_TRNG DEVICE_SERIAL DEVICE_SERIAL_ASYNCH DEVICE_SERIAL_FC DEVICE_SLEEP DEVICE_SPI DEVICE_SPI_ASYNCH DEVICE_SPISLAVE DEVICE_STORAGE \"MBED_DEPRECATED_SINCE(f, g)=\" \"MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M)=\" \"MBED_DEPRECATED(s)=\"",
"PREDEFINED": "DOXYGEN_ONLY DEVICE_ANALOGIN DEVICE_ANALOGOUT DEVICE_CAN DEVICE_ETHERNET DEVICE_EMAC DEVICE_FLASH DEVICE_I2C DEVICE_I2CSLAVE DEVICE_I2C_ASYNCH DEVICE_INTERRUPTIN DEVICE_LPTICKER DEVICE_PORTIN DEVICE_PORTINOUT DEVICE_PORTOUT DEVICE_PWMOUT DEVICE_RTC DEVICE_TRNG DEVICE_SERIAL DEVICE_SERIAL_ASYNCH DEVICE_SERIAL_FC DEVICE_SLEEP DEVICE_SPI DEVICE_SPI_ASYNCH DEVICE_SPISLAVE DEVICE_STORAGE \"MBED_DEPRECATED_SINCE(f, g)=\" \"MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M)=\" \"MBED_DEPRECATED(s)=\"",
"EXPAND_AS_DEFINED": "",
"SKIP_FUNCTION_MACROS": "NO",
"EXCLUDE_PATTERNS": "*/tools/* */targets/* */features/mbedtls/* */features/storage/* */features/unsupported/* */BUILD/* */rtos/TARGET_CORTEX/rtx*/* */cmsis/* */features/FEATURE_COMMON_PAL/* */features/FEATURE_LWIP/* */features/FEATURE_UVISOR/* */features/nanostack/* */ble/generic/* */ble/pal/*"
Expand Down
2 changes: 1 addition & 1 deletion drivers/LowPowerTicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "drivers/Ticker.h"
#include "platform/NonCopyable.h"

#if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
#if defined (DEVICE_LPTICKER) || defined(DOXYGEN_ONLY)

#include "hal/lp_ticker_api.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/LowPowerTimeout.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "platform/platform.h"

#if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
#if defined (DEVICE_LPTICKER) || defined(DOXYGEN_ONLY)

#include "hal/lp_ticker_api.h"
#include "drivers/LowPowerTicker.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/LowPowerTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "drivers/Timer.h"
#include "platform/NonCopyable.h"

#if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
#if defined (DEVICE_LPTICKER) || defined(DOXYGEN_ONLY)

#include "hal/lp_ticker_api.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/Ticker.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {

// When low power ticker is in use, then do not disable deep-sleep.
Ticker(const ticker_data_t *data) : TimerEvent(data), _function(0), _lock_deepsleep(true) {
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
_lock_deepsleep = (data != get_lp_ticker_data());
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Timer::Timer() : _running(), _start(), _time(), _ticker_data(get_us_ticker_data(

Timer::Timer(const ticker_data_t *data) : _running(), _start(), _time(), _ticker_data(data), _lock_deepsleep(true) {
reset();
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
_lock_deepsleep = (data != get_lp_ticker_data());
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion hal/lp_ticker_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "device.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "hal/ticker_api.h"

Expand Down
2 changes: 1 addition & 1 deletion hal/mbed_lp_ticker_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#include "hal/lp_ticker_api.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

static ticker_event_queue_t events = { 0 };

Expand Down
4 changes: 2 additions & 2 deletions rtos/TARGET_CORTEX/mbed_rtx_idle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {

using namespace mbed;

#ifdef MBED_TICKLESS
#if (defined(MBED_TICKLESS) && defined(DEVICE_LPTICKER))

#if (defined(NO_SYSTICK))
/**
Expand Down Expand Up @@ -227,7 +227,7 @@ static void default_idle_hook(void)
core_util_critical_section_exit();
}

#endif // MBED_TICKLESS
#endif // (defined(MBED_TICKLESS) && defined(DEVICE_LPTICKER))

static void (*idle_hook_fptr)(void) = &default_idle_hook;

Expand Down
2 changes: 1 addition & 1 deletion targets/TARGET_ARM_SSG/TARGET_BEETLE/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static uint32_t lp_ticker_overflows_delta = 0;
/* lp_ticker Overflow limit */
static uint32_t lp_ticker_overflow_limit = 0;

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
/**
* Interrupt Handler
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "lp_ticker_api.h"
#include "fsl_rtc.h"
Expand Down Expand Up @@ -241,4 +241,4 @@ void lp_ticker_clear_interrupt(void)
lptmr_schedule = 0;
}

#endif /* DEVICE_LOWPOWERTIMER */
#endif /* DEVICE_LPTICKER */
2 changes: 1 addition & 1 deletion targets/TARGET_NORDIC/TARGET_NRF5/flash_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
*/

#if DEVICE_FLASH
#if (defined(DEVICE_FLASH) && defined(DEVICE_LPTICKER))

#include "hal/flash_api.h"
#include "hal/lp_ticker_api.h"
Expand Down
4 changes: 2 additions & 2 deletions targets/TARGET_NORDIC/TARGET_NRF5/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#include "lp_ticker_api.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "common_rtc.h"
#include "mbed_critical.h"
Expand Down Expand Up @@ -60,4 +60,4 @@ void lp_ticker_clear_interrupt(void)
nrf_rtc_event_clear(COMMON_RTC_INSTANCE, LP_TICKER_EVENT);
}

#endif // DEVICE_LOWPOWERTIMER
#endif // DEVICE_LPTICKER
2 changes: 1 addition & 1 deletion targets/TARGET_NORDIC/TARGET_NRF5/trng_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
*/

#if defined(DEVICE_TRNG)
#if (defined(DEVICE_TRNG) && defined(DEVICE_LPTICKER))

#include "hal/trng_api.h"
#include "hal/lp_ticker_api.h"
Expand Down
8 changes: 4 additions & 4 deletions targets/TARGET_NORDIC/TARGET_NRF5/us_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void COMMON_RTC_IRQ_HANDLER(void)
us_ticker_irq_handler();
}

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
if (m_common_sw_irq_flag & LP_TICKER_SW_IRQ_MASK) {
m_common_sw_irq_flag &= ~LP_TICKER_SW_IRQ_MASK;
lp_ticker_irq_handler();
Expand Down Expand Up @@ -133,7 +133,7 @@ void common_rtc_init(void)
#if defined(TARGET_MCU_NRF51822)
nrf_rtc_event_clear(COMMON_RTC_INSTANCE, OS_TICK_EVENT);
#endif
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
nrf_rtc_event_clear(COMMON_RTC_INSTANCE, LP_TICKER_EVENT);
#endif
nrf_rtc_event_clear(COMMON_RTC_INSTANCE, NRF_RTC_EVENT_OVERFLOW);
Expand All @@ -142,7 +142,7 @@ void common_rtc_init(void)
// events will be enabled or disabled as needed (such approach is more
// energy efficient).
nrf_rtc_int_enable(COMMON_RTC_INSTANCE,
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
LP_TICKER_INT_MASK |
#endif
US_TICKER_INT_MASK |
Expand All @@ -156,7 +156,7 @@ void common_rtc_init(void)
#if defined(TARGET_MCU_NRF51822)
OS_TICK_INT_MASK |
#endif
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER
LP_TICKER_INT_MASK |
#endif
US_TICKER_INT_MASK);
Expand Down
2 changes: 1 addition & 1 deletion targets/TARGET_NUVOTON/TARGET_M451/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "lp_ticker_api.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "sleep_api.h"
#include "mbed_wait_api.h"
Expand Down
2 changes: 1 addition & 1 deletion targets/TARGET_NUVOTON/TARGET_M480/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "lp_ticker_api.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "sleep_api.h"
#include "mbed_wait_api.h"
Expand Down
2 changes: 1 addition & 1 deletion targets/TARGET_NUVOTON/TARGET_NANO100/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "lp_ticker_api.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "sleep_api.h"
#include "mbed_wait_api.h"
Expand Down
2 changes: 1 addition & 1 deletion targets/TARGET_NUVOTON/TARGET_NUC472/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "lp_ticker_api.h"

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "sleep_api.h"
#include "mbed_wait_api.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "lp_ticker_api.h"
#include "fsl_snvs_hp.h"
Expand Down Expand Up @@ -131,4 +131,4 @@ void lp_ticker_clear_interrupt(void)
GPT_ClearStatusFlags(GPT2, kGPT_OutputCompare1Flag);
}

#endif /* DEVICE_LOWPOWERTIMER */
#endif /* DEVICE_LPTICKER */
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* $Rev: $
* $Date: $
******************************************************************************
* Copyright 2016 Semiconductor Components Industries LLC (d/b/a �ON Semiconductor�).
* Copyright 2016 Semiconductor Components Industries LLC (d/b/a �ON Semiconductor�).
* All rights reserved. This software and/or documentation is licensed by ON Semiconductor
* under limited terms and conditions. The terms and conditions pertaining to the software
* and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
* (�ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software�) and
* (�ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software�) and
* if applicable the software license agreement. Do not use this software and/or
* documentation unless you have carefully read and you agree to the limited terms and
* conditions. By using this software and/or documentation, you agree to the limited
Expand All @@ -32,7 +32,7 @@
*/

#include "device.h"
#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "cmsis_nvic.h"
#include "lp_ticker_api.h"
Expand Down Expand Up @@ -79,4 +79,4 @@ void lp_ticker_clear_interrupt(void)
fRtcClearInterrupt();
}

#endif /* DEVICE_LOWPOWERTIMER */
#endif /* DEVICE_LPTICKER */
10 changes: 5 additions & 5 deletions targets/TARGET_STM/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
*******************************************************************************
*/

#if DEVICE_LOWPOWERTIMER
#if DEVICE_LPTICKER

#include "rtc_api_hal.h"

#if MBED_CONF_TARGET_LOWPOWERTIMER_LPTIM
#if MBED_CONF_TARGET_LPTICKER_LPTIM

LPTIM_HandleTypeDef LptimHandle;

Expand Down Expand Up @@ -283,7 +283,7 @@ void lp_ticker_clear_interrupt(void)
__HAL_LPTIM_CLEAR_FLAG(&LptimHandle, LPTIM_FLAG_CMPM);
}

#else /* MBED_CONF_TARGET_LOWPOWERTIMER_LPTIM */
#else /* MBED_CONF_TARGET_LPTICKER_LPTIM */

void lp_ticker_init(void)
{
Expand Down Expand Up @@ -319,6 +319,6 @@ void lp_ticker_clear_interrupt(void)
NVIC_ClearPendingIRQ(RTC_WKUP_IRQn);
}

#endif /* MBED_CONF_TARGET_LOWPOWERTIMER_LPTIM */
#endif /* MBED_CONF_TARGET_LPTICKER_LPTIM */

#endif /* DEVICE_LOWPOWERTIMER */
#endif /* DEVICE_LPTICKER */
Loading