libtiepie-hw 1.3.3
|
Functions to control the clock source of the oscilloscope. More...
Functions | |
TIEPIE_HW_API uint32_t | tiepie_hw_oscilloscope_get_clock_sources (tiepie_hw_handle handle) |
Get the supported clock sources of the specified oscilloscope. | |
TIEPIE_HW_API uint32_t | tiepie_hw_oscilloscope_get_clock_source (tiepie_hw_handle handle) |
Get the currently selected clock source of the specified oscilloscope. | |
TIEPIE_HW_API uint32_t | tiepie_hw_oscilloscope_set_clock_source (tiepie_hw_handle handle, uint32_t value) |
Set the clock source of the specified oscilloscope. | |
TIEPIE_HW_API uint32_t | tiepie_hw_oscilloscope_get_clock_source_frequencies (tiepie_hw_handle handle, double *list, uint32_t length) |
Get an array with the supported clock source frequencies of the specified oscilloscope. | |
TIEPIE_HW_API double | tiepie_hw_oscilloscope_get_clock_source_frequency (tiepie_hw_handle handle) |
Get the current clock source frequency of the specified oscilloscope. | |
TIEPIE_HW_API double | tiepie_hw_oscilloscope_set_clock_source_frequency (tiepie_hw_handle handle, double value) |
Set the clock source frequency of the specified oscilloscope. | |
Functions to control the clock source of the oscilloscope.
Oscilloscopes can support multiple clock sources, use tiepie_hw_oscilloscope_get_clock_sources() to determine the available clock sources for an oscilloscope.
When an oscilloscope supports selecting an external clock source, refer to the instrument manual for the location of the external clock input and the specifications of the required external clock signal.
Depending on the instrument, an external clock input can support multiple input frequencies. Use tiepie_hw_oscilloscope_get_clock_source_frequencies() to determine which frequencies are supported.
By default the clock source is set to: Internal (TIEPIE_HW_CS_INTERNAL).
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_sources | ( | tiepie_hw_handle | handle | ) |
Get the supported clock sources of the specified oscilloscope.
[in] | handle | A device handle identifying the oscilloscope. |
0
when unsuccessful. TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_source | ( | tiepie_hw_handle | handle | ) |
Get the currently selected clock source of the specified oscilloscope.
[in] | handle | A device handle identifying the oscilloscope. |
0
when unsuccessful. TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_set_clock_source | ( | tiepie_hw_handle | handle, |
uint32_t | value | ||
) |
Set the clock source of the specified oscilloscope.
[in] | handle | A device handle identifying the oscilloscope. |
[in] | value | The requested clock source, a TIEPIE_HW_CS_* value. |
0
when unsuccessful. TIEPIE_HW_STATUS_INVALID_VALUE | |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_clock_source_frequencies | ( | tiepie_hw_handle | handle, |
double * | list, | ||
uint32_t | length | ||
) |
Get an array with the supported clock source frequencies of the specified oscilloscope.
The caller must assure that enough memory is allocated. This function is only available when the clock source is set to TIEPIE_HW_CS_EXTERNAL.
[in] | handle | A device handle identifying the oscilloscope. |
[out] | list | A pointer to an array for the clock source frequencies, or NULL . |
[in] | length | The number of elements in the array. |
0
when unsuccessful. TIEPIE_HW_STATUS_NOT_SUPPORTED | The oscilloscope does not support external clock or the clock source is not set to TIEPIE_HW_CS_EXTERNAL. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_oscilloscope_get_clock_source_frequency | ( | tiepie_hw_handle | handle | ) |
Get the current clock source frequency of the specified oscilloscope.
This function is only available when the clock source is set to TIEPIE_HW_CS_EXTERNAL.
[in] | handle | A device handle identifying the oscilloscope. |
0
when unsuccessful. TIEPIE_HW_STATUS_NOT_SUPPORTED | The oscilloscope does not support external clock or the clock source is not set to TIEPIE_HW_CS_EXTERNAL. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API double tiepie_hw_oscilloscope_set_clock_source_frequency | ( | tiepie_hw_handle | handle, |
double | value | ||
) |
Set the clock source frequency of the specified oscilloscope.
This function is only available when the clock source is set to TIEPIE_HW_CS_EXTERNAL.
[in] | handle | A device handle identifying the oscilloscope. |
[in] | value | The required clock source frequency in Hz. |
0
when unsuccessful. TIEPIE_HW_STATUS_VALUE_CLIPPED | The requested clock source frequency is outside the valid range and clipped to the closest limit. |
TIEPIE_HW_STATUS_VALUE_MODIFIED | The requested clock source frequency is within the valid range but not available. The closest valid value is set. |
TIEPIE_HW_STATUS_INVALID_VALUE | |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The oscilloscope does not support external clock or the clock source is not set to TIEPIE_HW_CS_EXTERNAL. |
TIEPIE_HW_STATUS_INVALID_HANDLE | The handle is not a valid oscilloscope handle. |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |