1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/ztimer: rename required_pm_mode to block_pm_mode

This commit is contained in:
Karl Fessel 2021-03-05 18:28:27 +01:00
parent c8cb79c3cf
commit 951fa14d70
3 changed files with 13 additions and 13 deletions

View File

@ -337,7 +337,7 @@ struct ztimer_clock {
ztimer_now_t checkpoint; /**< cumulated time at last now() call */
#endif
#if MODULE_PM_LAYERED || DOXYGEN
uint8_t required_pm_mode; /**< min. pm mode required for the clock to run */
uint8_t block_pm_mode; /**< min. pm mode to block for the clock to run */
#endif
};

View File

@ -224,9 +224,9 @@ void ztimer_init(void)
ztimer_periph_timer_init(&ZTIMER_TIMER, CONFIG_ZTIMER_USEC_DEV,
ZTIMER_TIMER_FREQ, WIDTH_TO_MAXVAL(CONFIG_ZTIMER_USEC_WIDTH));
# ifdef MODULE_PM_LAYERED
LOG_DEBUG("ztimer_init(): ZTIMER_TIMER setting required_pm_mode to %i\n",
LOG_DEBUG("ztimer_init(): ZTIMER_TIMER setting block_pm_mode to %i\n",
CONFIG_ZTIMER_TIMER_BLOCK_PM_MODE);
ZTIMER_TIMER_CLK.required_pm_mode = CONFIG_ZTIMER_TIMER_BLOCK_PM_MODE;
ZTIMER_TIMER_CLK.block_pm_mode = CONFIG_ZTIMER_TIMER_BLOCK_PM_MODE;
# endif
#endif
@ -234,9 +234,9 @@ void ztimer_init(void)
LOG_DEBUG("ztimer_init(): initializing rtt\n");
ztimer_periph_rtt_init(&ZTIMER_RTT);
# ifdef MODULE_PM_LAYERED
LOG_DEBUG("ztimer_init(): ZTIMER_RTT setting required_pm_mode to %i\n",
LOG_DEBUG("ztimer_init(): ZTIMER_RTT setting block_pm_mode to %i\n",
CONFIG_ZTIMER_RTT_BLOCK_PM_MODE);
ZTIMER_RTT_CLK.required_pm_mode = CONFIG_ZTIMER_RTT_BLOCK_PM_MODE;
ZTIMER_RTT_CLK.block_pm_mode = CONFIG_ZTIMER_RTT_BLOCK_PM_MODE;
# endif
#endif
@ -244,9 +244,9 @@ void ztimer_init(void)
LOG_DEBUG("ztimer_init(): initializing rtc\n");
ztimer_periph_rtc_init(&ZTIMER_RTC);
# ifdef MODULE_PM_LAYERED
LOG_DEBUG("ztimer_init(): ZTIMER_RTC setting required_pm_mode to %i\n",
LOG_DEBUG("ztimer_init(): ZTIMER_RTC setting block_pm_mode to %i\n",
CONFIG_ZTIMER_RTC_BLOCK_PM_MODE);
ZTIMER_RTC_CLK.required_pm_mode = CONFIG_ZTIMER_RTC_BLOCK_PM_MODE;
ZTIMER_RTC_CLK.block_pm_mode = CONFIG_ZTIMER_RTC_BLOCK_PM_MODE;
# endif
#endif

View File

@ -125,8 +125,8 @@ static void _add_entry_to_list(ztimer_clock_t *clock, ztimer_base_t *entry)
#ifdef MODULE_PM_LAYERED
/* First timer on the clock's linked list */
if (list->next == NULL &&
clock->required_pm_mode != ZTIMER_CLOCK_NO_REQUIRED_PM_MODE) {
pm_block(clock->required_pm_mode);
clock->block_pm_mode != ZTIMER_CLOCK_NO_REQUIRED_PM_MODE) {
pm_block(clock->block_pm_mode);
}
#endif
@ -260,8 +260,8 @@ static void _del_entry_from_list(ztimer_clock_t *clock, ztimer_base_t *entry)
#ifdef MODULE_PM_LAYERED
/* The last timer just got removed from the clock's linked list */
if (clock->list.next == NULL &&
clock->required_pm_mode != ZTIMER_CLOCK_NO_REQUIRED_PM_MODE) {
pm_unblock(clock->required_pm_mode);
clock->block_pm_mode != ZTIMER_CLOCK_NO_REQUIRED_PM_MODE) {
pm_unblock(clock->block_pm_mode);
}
#endif
}
@ -276,8 +276,8 @@ static ztimer_t *_now_next(ztimer_clock_t *clock)
/* The last timer just got removed from the clock's linked list */
clock->last = NULL;
#ifdef MODULE_PM_LAYERED
if (clock->required_pm_mode != ZTIMER_CLOCK_NO_REQUIRED_PM_MODE) {
pm_unblock(clock->required_pm_mode);
if (clock->block_pm_mode != ZTIMER_CLOCK_NO_REQUIRED_PM_MODE) {
pm_unblock(clock->block_pm_mode);
}
#endif
}