Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
precision_clock_pps_config Struct Reference

Configuration of a Precision Clock PPS instance. More...

#include <zephyr/precision_timing/precision_clock_pps.h>

Data Fields

uint32_t channel
 Zero-based scheduled-output channel armed by the instance.
enum precision_clock_output_width_policy width_policy
 High-pulse width policy for the one-second waveform.
precision_time_t pulse_width_ns
 Exact active-high pulse width in nanoseconds.
precision_time_t start_guard_ns
 Non-negative guard added to the provider's minimum lead time before aligning the first output edge to a whole-second boundary.
precision_time_t step_limit_ns
 Non-negative clock-discontinuity threshold in nanoseconds.
uint32_t poll_interval_ms
 Positive interval between polls, representable as a finite kernel timeout.
precision_clock_pps_callback_t callback
 Event callback, or NULL to accumulate events for polling instead.
void * user_data
 Opaque caller context, available to the callback as pps->config.user_data.

Detailed Description

Configuration of a Precision Clock PPS instance.

The configuration is copied into the instance by precision_clock_pps_init() and never mutated afterward. The waveform period is always one second, so it is not configurable. The pulse_width_ns field is consulted only when width_policy is PRECISION_CLOCK_OUTPUT_WIDTH_EXACT.

Each instance supplies its own configuration. The Kconfig values used by PRECISION_CLOCK_PPS_CONFIG_DEFAULTS are optional initialization defaults, not device-wide or driver configuration.

Field Documentation

◆ callback

precision_clock_pps_callback_t precision_clock_pps_config::callback

Event callback, or NULL to accumulate events for polling instead.

◆ channel

uint32_t precision_clock_pps_config::channel

Zero-based scheduled-output channel armed by the instance.

◆ poll_interval_ms

uint32_t precision_clock_pps_config::poll_interval_ms

Positive interval between polls, representable as a finite kernel timeout.

◆ pulse_width_ns

precision_time_t precision_clock_pps_config::pulse_width_ns

Exact active-high pulse width in nanoseconds.

Used only when width_policy is PRECISION_CLOCK_OUTPUT_WIDTH_EXACT, where it must be positive and shorter than the one-second period.

◆ start_guard_ns

precision_time_t precision_clock_pps_config::start_guard_ns

Non-negative guard added to the provider's minimum lead time before aligning the first output edge to a whole-second boundary.

◆ step_limit_ns

precision_time_t precision_clock_pps_config::step_limit_ns

Non-negative clock-discontinuity threshold in nanoseconds.

When the absolute discrepancy between clock and monotonic elapsed time exceeds it, after allowing for both clock reads' sampling intervals, the clock is treated as having taken a hard step and the output is stopped and rearmed.

◆ user_data

void* precision_clock_pps_config::user_data

Opaque caller context, available to the callback as pps->config.user_data.

◆ width_policy

enum precision_clock_output_width_policy precision_clock_pps_config::width_policy

High-pulse width policy for the one-second waveform.


The documentation for this struct was generated from the following file: