Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nrf_rtc_timer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016-2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_TIMER_NRF_RTC_TIMER_H
8#define ZEPHYR_INCLUDE_DRIVERS_TIMER_NRF_RTC_TIMER_H
9
10#include <zephyr/sys_clock.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
18#define NRF_RTC_TIMER_MAX_SCHEDULE_SPAN BIT(23)
19
33typedef void (*z_nrf_rtc_timer_compare_handler_t)(int32_t id,
34 uint64_t expire_time,
35 void *user_data);
36
44int32_t z_nrf_rtc_timer_chan_alloc(void);
45
50void z_nrf_rtc_timer_chan_free(int32_t chan);
51
56uint64_t z_nrf_rtc_timer_read(void);
57
66uint32_t z_nrf_rtc_timer_compare_evt_address_get(int32_t chan);
67
78uint32_t z_nrf_rtc_timer_capture_task_address_get(int32_t chan);
79
88bool z_nrf_rtc_timer_compare_int_lock(int32_t chan);
89
98void z_nrf_rtc_timer_compare_int_unlock(int32_t chan, bool key);
99
106uint32_t z_nrf_rtc_timer_compare_read(int32_t chan);
107
133int z_nrf_rtc_timer_set(int32_t chan, uint64_t target_time,
134 z_nrf_rtc_timer_compare_handler_t handler,
135 void *user_data);
136
162int z_nrf_rtc_timer_exact_set(int32_t chan, uint64_t target_time,
163 z_nrf_rtc_timer_compare_handler_t handler,
164 void *user_data);
165
176void z_nrf_rtc_timer_abort(int32_t chan);
177
186uint64_t z_nrf_rtc_timer_get_ticks(k_timeout_t t);
187
199int z_nrf_rtc_timer_nrf53net_offset_get(void);
200
214int z_nrf_rtc_timer_trigger_overflow(void);
215
216#ifdef __cplusplus
217}
218#endif
219
220#endif /* ZEPHYR_INCLUDE_DRIVERS_TIMER_NRF_RTC_TIMER_H */
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__INT32_TYPE__ int32_t
Definition: stdint.h:74
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
Kernel timeout type.
Definition: sys_clock.h:65
Variables needed for system clock.