|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
Autonomous one-pulse-per-second clock output service. More...
#include <stdbool.h>#include <stdint.h>#include <zephyr/kernel.h>#include <zephyr/precision_timing/precision_clock_output.h>#include <zephyr/sys/util.h>Go to the source code of this file.
Data Structures | |
| struct | precision_clock_pps_config |
| Configuration of a Precision Clock PPS instance. More... | |
| struct | precision_clock_pps_state |
| Coherent snapshot of an instance's autonomous PPS output state. More... | |
| struct | precision_clock_pps |
| Caller-owned autonomous one-pulse-per-second output instance. More... | |
Macros | |
| #define | PRECISION_CLOCK_PPS_CONFIG_DEFAULTS |
| Initialize PPS configuration from subsystem Kconfig defaults. | |
Typedefs | |
| typedef void(* | precision_clock_pps_callback_t) (struct precision_clock_pps *pps) |
| Callback invoked when a PPS poll produces one or more events. | |
Enumerations | |
| enum | precision_clock_pps_event { PRECISION_CLOCK_PPS_EVENT_NONE = 0 , PRECISION_CLOCK_PPS_EVENT_ARMED = BIT(0) , PRECISION_CLOCK_PPS_EVENT_RECOVERED = BIT(1) , PRECISION_CLOCK_PPS_EVENT_HARD_STEP = BIT(2) , PRECISION_CLOCK_PPS_EVENT_OUTPUT_INACTIVE = BIT(3) , PRECISION_CLOCK_PPS_EVENT_READ_ERROR = BIT(4) , PRECISION_CLOCK_PPS_EVENT_READ_RECOVERED = BIT(5) , PRECISION_CLOCK_PPS_EVENT_STATUS_ERROR = BIT(6) , PRECISION_CLOCK_PPS_EVENT_STATUS_RECOVERED = BIT(7) , PRECISION_CLOCK_PPS_EVENT_STOP_ERROR = BIT(8) , PRECISION_CLOCK_PPS_EVENT_START_ERROR = BIT(9) } |
| Events reported by the autonomous PPS service. More... | |
| enum | precision_clock_pps_phase { PRECISION_CLOCK_PPS_STOPPED = 0 , PRECISION_CLOCK_PPS_STARTING , PRECISION_CLOCK_PPS_ARMING , PRECISION_CLOCK_PPS_ACTIVE , PRECISION_CLOCK_PPS_REARMING , PRECISION_CLOCK_PPS_STOPPING } |
| Lifecycle phase of an autonomous PPS instance. More... | |
Functions | |
| int | precision_clock_pps_init (struct precision_clock_pps *pps, const struct precision_clock *precision_clk, const struct precision_clock_pps_config *config) |
| Initialize a one-pulse-per-second output instance. | |
| int | precision_clock_pps_start (struct precision_clock_pps *pps) |
| Start autonomously arming and maintaining the output. | |
| int | precision_clock_pps_state_get (struct precision_clock_pps *pps, struct precision_clock_pps_state *state) |
| Copy the current autonomous PPS output state. | |
| int | precision_clock_pps_stop (struct precision_clock_pps *pps) |
| Stop an autonomous PPS output instance. | |
Autonomous one-pulse-per-second clock output service.