nrfxlib API 2.7.99
Loading...
Searching...
No Matches
mpsl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
16#ifndef MPSL_H__
17#define MPSL_H__
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <stdint.h>
24#include <stdbool.h>
25#include "nrf.h"
26#include "nrf_peripherals.h"
27#include "nrf_errno.h"
28#include "mpsl_clock.h"
29
35#define MPSL_HIGH_IRQ_PRIORITY 0
36
38#define MPSL_BUILD_REVISION_SIZE 20
39
41#if defined(PPI_PRESENT)
42#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 19) | (1UL << 30) | (1UL << 31))
43#elif defined(GRTC_PRESENT)
44#define MPSL_RESERVED_PPI_CHANNELS (1UL << 0)
45#elif defined(DPPIC_PRESENT)
46#define MPSL_RESERVED_PPI_CHANNELS ((1UL << 0) | (1UL << 1) | (1UL << 2))
47#else
48#error Unknown NRF series.
49#endif
50
58typedef void (*mpsl_assert_handler_t)(const char * const file, const uint32_t line);
59
81int32_t mpsl_init(mpsl_clock_lfclk_cfg_t const * p_clock_config, IRQn_Type low_prio_irq, mpsl_assert_handler_t p_assert_handler);
82
90void mpsl_uninit(void);
91
97
108int32_t mpsl_build_revision_get(uint8_t * p_build_revision);
109
116
123
130
137
147
153
158void mpsl_pan_rfu(void);
159#ifdef __cplusplus
160}
161#endif
162
163#endif // MPSL_H__
164
void mpsl_low_priority_process(void)
MPSL low priority processing handler.
void(* mpsl_assert_handler_t)(const char *const file, const uint32_t line)
Bitmask of (D)PPI channels reserved for MPSL.
Definition: mpsl.h:58
void mpsl_pan_rfu(void)
RFU.
int32_t mpsl_build_revision_get(uint8_t *p_build_revision)
Obtain build revision.
void mpsl_uninit(void)
Uninitialize MPSL. Stops clocks and scheduler. This will release all peripherals and reduce power usa...
void MPSL_IRQ_RADIO_Handler(void)
RADIO interrupt handler.
void mpsl_calibration_timer_handle(void)
Application needs to call this when calibration shall occur.
int32_t mpsl_init(mpsl_clock_lfclk_cfg_t const *p_clock_config, IRQn_Type low_prio_irq, mpsl_assert_handler_t p_assert_handler)
MPSL initialization.
void MPSL_IRQ_CLOCK_Handler(void)
POWER_CLOCK interrupt handler.
bool mpsl_is_initialized(void)
Returns true if MPSL is already initialized, false otherwise.
void MPSL_IRQ_RTC0_Handler(void)
RTC0 interrupt handler.
void MPSL_IRQ_TIMER0_Handler(void)
TIMER0 interrupt handler.
Type representing LFCLK oscillator source.
Definition: mpsl_clock.h:58