2019-06-26 19:27:31 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Nordic Semiconductor ASA
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
#ifndef ZEPHYR_DRIVERS_CLOCK_CONTROL_NRF_CLOCK_CALIBRATION_H_
|
|
|
|
#define ZEPHYR_DRIVERS_CLOCK_CONTROL_NRF_CLOCK_CALIBRATION_H_
|
|
|
|
|
2022-05-06 16:25:46 +08:00
|
|
|
#include <zephyr/sys/onoff.h>
|
2019-06-26 19:27:31 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Initialize LFCLK RC calibration.
|
|
|
|
*
|
2020-02-03 19:58:30 +08:00
|
|
|
* @param mgrs Pointer to array of onoff managers for HF and LF clocks.
|
2019-06-26 19:27:31 +08:00
|
|
|
*/
|
2020-02-03 19:58:30 +08:00
|
|
|
void z_nrf_clock_calibration_init(struct onoff_manager *mgrs);
|
2019-06-26 19:27:31 +08:00
|
|
|
|
|
|
|
/**
|
2020-08-10 19:38:29 +08:00
|
|
|
* @brief Calibration done handler
|
2019-06-26 19:27:31 +08:00
|
|
|
*
|
2020-08-10 19:38:29 +08:00
|
|
|
* Must be called from clock event handler.
|
2019-06-26 19:27:31 +08:00
|
|
|
*/
|
2020-08-10 19:38:29 +08:00
|
|
|
void z_nrf_clock_calibration_done_handler(void);
|
2019-06-26 19:27:31 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Notify calibration module about LF clock start
|
|
|
|
*/
|
2020-02-07 20:27:13 +08:00
|
|
|
void z_nrf_clock_calibration_lfclk_started(void);
|
2019-06-26 19:27:31 +08:00
|
|
|
|
|
|
|
/**
|
2020-02-07 20:27:13 +08:00
|
|
|
* @brief Notify calibration module about LF clock stop
|
2019-06-26 19:27:31 +08:00
|
|
|
*/
|
2020-02-07 20:27:13 +08:00
|
|
|
void z_nrf_clock_calibration_lfclk_stopped(void);
|
2019-06-26 19:27:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* ZEPHYR_DRIVERS_CLOCK_CONTROL_NRF_CLOCK_CALIBRATION_H_ */
|