Rename new occurrences of LOWPOWERTIMER to LPTICKER

pull/7009/head
Bartek Szatkowski 2018-05-24 10:28:07 -05:00
parent 3850c80b43
commit efd307fa79
4 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@
#include "mbed.h" #include "mbed.h"
#if !defined(MBED_CPU_STATS_ENABLED) || !defined(DEVICE_LOWPOWERTIMER) || !defined(DEVICE_SLEEP) #if !defined(MBED_CPU_STATS_ENABLED) || !defined(DEVICE_LPTICKER) || !defined(DEVICE_SLEEP)
#error [NOT_SUPPORTED] test not supported #error [NOT_SUPPORTED] test not supported
#endif #endif

View File

@ -34,13 +34,13 @@ static uint16_t deep_sleep_lock = 0U;
static us_timestamp_t sleep_time = 0; static us_timestamp_t sleep_time = 0;
static us_timestamp_t deep_sleep_time = 0; static us_timestamp_t deep_sleep_time = 0;
#if defined(MBED_CPU_STATS_ENABLED) && defined(DEVICE_LOWPOWERTIMER) #if defined(MBED_CPU_STATS_ENABLED) && defined(DEVICE_LPTICKER)
static ticker_data_t *sleep_ticker = NULL; static ticker_data_t *sleep_ticker = NULL;
#endif #endif
static inline us_timestamp_t read_us(void) static inline us_timestamp_t read_us(void)
{ {
#if defined(MBED_CPU_STATS_ENABLED) && defined(DEVICE_LOWPOWERTIMER) #if defined(MBED_CPU_STATS_ENABLED) && defined(DEVICE_LPTICKER)
if (NULL == sleep_ticker) { if (NULL == sleep_ticker) {
sleep_ticker = (ticker_data_t *)get_lp_ticker_data(); sleep_ticker = (ticker_data_t *)get_lp_ticker_data();
} }

View File

@ -29,7 +29,7 @@ static int (*_rtc_isenabled)(void) = rtc_isenabled;
static time_t (*_rtc_read)(void) = rtc_read; static time_t (*_rtc_read)(void) = rtc_read;
static void (*_rtc_write)(time_t t) = rtc_write; static void (*_rtc_write)(time_t t) = rtc_write;
#elif DEVICE_LOWPOWERTIMER #elif DEVICE_LPTICKER
#include "drivers/LowPowerTimer.h" #include "drivers/LowPowerTimer.h"
@ -63,13 +63,13 @@ static int (*_rtc_isenabled)(void) = _rtc_lpticker_isenabled;
static time_t (*_rtc_read)(void) = _rtc_lpticker_read; static time_t (*_rtc_read)(void) = _rtc_lpticker_read;
static void (*_rtc_write)(time_t t) = _rtc_lpticker_write; static void (*_rtc_write)(time_t t) = _rtc_lpticker_write;
#else /* DEVICE_LOWPOWERTIMER */ #else /* DEVICE_LPTICKER */
static void (*_rtc_init)(void) = NULL; static void (*_rtc_init)(void) = NULL;
static int (*_rtc_isenabled)(void) = NULL; static int (*_rtc_isenabled)(void) = NULL;
static time_t (*_rtc_read)(void) = NULL; static time_t (*_rtc_read)(void) = NULL;
static void (*_rtc_write)(time_t t) = NULL; static void (*_rtc_write)(time_t t) = NULL;
#endif /* DEVICE_LOWPOWERTIMER */ #endif /* DEVICE_LPTICKER */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -12,7 +12,7 @@
#warning Statistics are currently not supported without the rtos. #warning Statistics are currently not supported without the rtos.
#endif #endif
#if defined(MBED_CPU_STATS_ENABLED) && (!defined(DEVICE_LOWPOWERTIMER) || !defined(DEVICE_SLEEP)) #if defined(MBED_CPU_STATS_ENABLED) && (!defined(DEVICE_LPTICKER) || !defined(DEVICE_SLEEP))
#warning CPU statistics are not supported without low power timer support. #warning CPU statistics are not supported without low power timer support.
#endif #endif
@ -20,7 +20,7 @@ void mbed_stats_cpu_get(mbed_stats_cpu_t *stats)
{ {
MBED_ASSERT(stats != NULL); MBED_ASSERT(stats != NULL);
memset(stats, 0, sizeof(mbed_stats_cpu_t)); memset(stats, 0, sizeof(mbed_stats_cpu_t));
#if defined(MBED_CPU_STATS_ENABLED) && defined(DEVICE_LOWPOWERTIMER) && defined(DEVICE_SLEEP) #if defined(MBED_CPU_STATS_ENABLED) && defined(DEVICE_LPTICKER) && defined(DEVICE_SLEEP)
stats->uptime = mbed_uptime(); stats->uptime = mbed_uptime();
stats->idle_time = mbed_time_idle(); stats->idle_time = mbed_time_idle();
stats->sleep_time = mbed_time_sleep(); stats->sleep_time = mbed_time_sleep();