|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
Precision Timing Shell APIs. More...
Data Structures | |
| struct | precision_timing_shell_entry |
| Immutable shell registration for a lifetime-static precision clock. More... | |
Macros | |
| #define | PRECISION_TIMING_SHELL_REGISTER(_name, clock_ptr) |
| Statically register a precision clock with the precision timing shell. | |
Precision Timing Shell APIs.
| #define PRECISION_TIMING_SHELL_REGISTER | ( | _name, | |
| clock_ptr ) |
#include <zephyr/precision_timing/precision_timing_shell.h>
Statically register a precision clock with the precision timing shell.
Defines an immutable, linker-collected registry entry that exposes clock_ptr under the name _name in the precision_clock shell command. The _name identifier is converted to a string literal and must be a valid C identifier composed of ASCII letters, digits, and underscores. Duplicate names are not detected at compile time; avoid them, because the shell reports the first matching entry.
The clock object referenced by clock_ptr must have static storage duration (for example, a file-scope or static object). Its precision_clock::api pointer may be NULL until the owning adapter initializes it. The name is still listed, but commands that use the clock return -ENODEV. Initialize the adapter before allowing concurrent shell access; do not reinitialize it afterwards.
Place this macro at file scope, not inside a function. It emits no registry entry when CONFIG_PRECISION_TIMING_SHELL is disabled.
| _name | Unique shell instance name (C identifier). Converted to a string. |
| clock_ptr | Pointer to a lifetime-static Precision Clock. |