mirror of https://github.com/ARMmbed/mbed-os.git
Rename LOWPOWERTIMER to LPTICKER
parent
500be1fbac
commit
a305d849a8
|
@ -39,7 +39,7 @@ static const uint32_t DELAY_10S = 10;
|
||||||
static const uint32_t RTC_TOLERANCE = 1;
|
static const uint32_t RTC_TOLERANCE = 1;
|
||||||
static const uint32_t TOLERANCE_ACCURACY_US = (DELAY_10S * US_PER_SEC / ACCURACY_FACTOR);
|
static const uint32_t TOLERANCE_ACCURACY_US = (DELAY_10S * US_PER_SEC / ACCURACY_FACTOR);
|
||||||
|
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LPTICKER
|
||||||
volatile bool expired;
|
volatile bool expired;
|
||||||
|
|
||||||
void callback(void)
|
void callback(void)
|
||||||
|
@ -102,7 +102,7 @@ void rtc_init_test()
|
||||||
rtc_free();
|
rtc_free();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LPTICKER
|
||||||
/** Test that the RTC keeps counting in the various sleep modes. */
|
/** Test that the RTC keeps counting in the various sleep modes. */
|
||||||
|
|
||||||
void rtc_sleep_test()
|
void rtc_sleep_test()
|
||||||
|
@ -233,7 +233,7 @@ void rtc_enabled_test()
|
||||||
|
|
||||||
Case cases[] = {
|
Case cases[] = {
|
||||||
Case("RTC - init", rtc_init_test),
|
Case("RTC - init", rtc_init_test),
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LPTICKER
|
||||||
Case("RTC - sleep", rtc_sleep_test),
|
Case("RTC - sleep", rtc_sleep_test),
|
||||||
#endif
|
#endif
|
||||||
Case("RTC - persist", rtc_persist_test),
|
Case("RTC - persist", rtc_persist_test),
|
||||||
|
|
|
@ -87,7 +87,7 @@ void us_ticker_isr(const ticker_data_t * const ticker_data)
|
||||||
us_ticker_clear_interrupt();
|
us_ticker_clear_interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEVICE_LOWPOWERTIMER
|
#ifdef DEVICE_LPTICKER
|
||||||
void lp_ticker_isr(const ticker_data_t *const ticker_data)
|
void lp_ticker_isr(const ticker_data_t *const ticker_data)
|
||||||
{
|
{
|
||||||
lp_ticker_clear_interrupt();
|
lp_ticker_clear_interrupt();
|
||||||
|
@ -131,7 +131,7 @@ void sleep_usticker_test()
|
||||||
TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep());
|
TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep());
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEVICE_LOWPOWERTIMER
|
#ifdef DEVICE_LPTICKER
|
||||||
|
|
||||||
/* Test that wake-up time from sleep should be less than 10 ms and
|
/* Test that wake-up time from sleep should be less than 10 ms and
|
||||||
* low power ticker interrupt can wake-up target from sleep. */
|
* low power ticker interrupt can wake-up target from sleep. */
|
||||||
|
@ -220,7 +220,7 @@ utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
|
||||||
{
|
{
|
||||||
GREENTEA_SETUP(60, "default_auto");
|
GREENTEA_SETUP(60, "default_auto");
|
||||||
us_ticker_init();
|
us_ticker_init();
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LPTICKER
|
||||||
lp_ticker_init();
|
lp_ticker_init();
|
||||||
#endif
|
#endif
|
||||||
/* Suspend RTOS Kernel to enable sleep modes. */
|
/* Suspend RTOS Kernel to enable sleep modes. */
|
||||||
|
@ -230,7 +230,7 @@ utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
|
||||||
|
|
||||||
Case cases[] =
|
Case cases[] =
|
||||||
{ Case("sleep - source of wake-up - us ticker", sleep_usticker_test, greentea_failure_handler),
|
{ Case("sleep - source of wake-up - us ticker", sleep_usticker_test, greentea_failure_handler),
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LPTICKER
|
||||||
Case("deep-sleep - source of wake-up - lp ticker",deepsleep_lpticker_test, greentea_failure_handler),
|
Case("deep-sleep - source of wake-up - lp ticker",deepsleep_lpticker_test, greentea_failure_handler),
|
||||||
Case("deep-sleep - high-speed clocks are turned off",deepsleep_high_speed_clocks_turned_off_test, greentea_failure_handler),
|
Case("deep-sleep - high-speed clocks are turned off",deepsleep_high_speed_clocks_turned_off_test, greentea_failure_handler),
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "lp_ticker_api.h"
|
#include "lp_ticker_api.h"
|
||||||
#include "platform_devices.h"
|
#include "platform_devices.h"
|
||||||
|
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LPTICKER
|
||||||
/**
|
/**
|
||||||
* \brief Calculate clocks to us
|
* \brief Calculate clocks to us
|
||||||
*
|
*
|
||||||
|
|
|
@ -46,7 +46,7 @@ void NMI_Handler(void)
|
||||||
gpio_init_in(&gpio, PTA4);
|
gpio_init_in(&gpio, PTA4);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEVICE_RTC || DEVICE_LOWPOWERTIMER
|
#if DEVICE_RTC || DEVICE_LPTICKER
|
||||||
// Enable the RTC oscillator if available on the board
|
// Enable the RTC oscillator if available on the board
|
||||||
void rtc_setup_oscillator(RTC_Type *base)
|
void rtc_setup_oscillator(RTC_Type *base)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
#include "rtc_api.h"
|
#include "rtc_api.h"
|
||||||
|
|
||||||
#if DEVICE_RTC || DEVICE_LOWPOWERTIMER
|
#if DEVICE_RTC || DEVICE_LPTICKER
|
||||||
|
|
||||||
#include "pinmap.h"
|
#include "pinmap.h"
|
||||||
#include "fsl_rtc.h"
|
#include "fsl_rtc.h"
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
#include "rtc_api.h"
|
#include "rtc_api.h"
|
||||||
|
|
||||||
#if DEVICE_RTC || DEVICE_LOWPOWERTIMER
|
#if DEVICE_RTC || DEVICE_LPTICKER
|
||||||
|
|
||||||
#include "pinmap.h"
|
#include "pinmap.h"
|
||||||
#include "fsl_rtc.h"
|
#include "fsl_rtc.h"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#if DEVICE_RTC || DEVICE_LOWPOWERTIMER
|
#if DEVICE_RTC || DEVICE_LPTICKER
|
||||||
|
|
||||||
/* Use RTCC on devices that have it */
|
/* Use RTCC on devices that have it */
|
||||||
#if defined(RTCC_PRESENT)
|
#if defined(RTCC_PRESENT)
|
||||||
|
|
Loading…
Reference in New Issue