libtiepie-hw 1.3.3
Loading...
Searching...
No Matches
Resolution

Functions to control the oscilloscope resolution. More...

Collaboration diagram for Resolution:

Modules

 Auto resolution mode
 Functions to control the auto resolution mode.
 

Functions

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_resolutions (tiepie_hw_handle handle, uint8_t *list, uint32_t length)
 Get an array with the supported resolutions of the specified oscilloscope.
 
TIEPIE_HW_API uint8_t tiepie_hw_oscilloscope_get_resolution (tiepie_hw_handle handle)
 Get the current resolution of the specified oscilloscope.
 
TIEPIE_HW_API uint8_t tiepie_hw_oscilloscope_set_resolution (tiepie_hw_handle handle, uint8_t value)
 Set the resolution of the specified oscilloscope.
 
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_is_resolution_enhanced (tiepie_hw_handle handle)
 Check whether the currently selected resolution is enhanced or a native resolution of the hardware.
 

Detailed Description

Functions to control the oscilloscope resolution.

The resolution determines how accurate the amplitude of a signal can be measured. The higher the resolution, the more accurate the input signal can be reconstructed.

devices can support multiple resolutions, use tiepie_hw_oscilloscope_get_resolutions() to determine the available resolutions for a device.

Besides native hardware resolutions, also enhanced resolutions can be available for a device. Use tiepie_hw_oscilloscope_is_resolution_enhanced() to determine whether the current resolution is a native hardware resolution or an enhanced resolution.

The resolution can be set manually, but can also be set automatically, when auto resolution mode is enabled.

Function Documentation

◆ tiepie_hw_oscilloscope_get_resolutions()

TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_resolutions ( tiepie_hw_handle  handle,
uint8_t *  list,
uint32_t  length 
)

Get an array with the supported resolutions of the specified oscilloscope.

The caller must assure that the array is available and that enough memory is allocated.

Parameters
[in]handleA device handle identifying the oscilloscope.
[out]listA pointer to an array to contain the supported resolutions, or NULL.
[in]lengthThe number of elements in the array.
Returns
Total number of supported resolutions, or 0 when unsuccessful.
Status values
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
Example
uint8_t Resolution_count = tiepie_hw_oscilloscope_get_resolutions(h_device, NULL, 0);
uint8_t* Resolutions = malloc(sizeof(uint8_t) * Resolution_count);
Resolution_count = tiepie_hw_oscilloscope_get_resolutions(h_device, Resolutions, Resolution_count);
printf("Scp_get_resolutions:\n");
for(i = 0 ; i < Resolution_count ; i++)
printf("- %u bits\n", Resolutions[ i ]);
free(p_resolutions);
TIEPIE_HW_API uint32_t tiepie_hw_oscilloscope_get_resolutions(tiepie_hw_handle handle, uint8_t *list, uint32_t length)
Get an array with the supported resolutions of the specified oscilloscope.
See also
tiepie_hw_oscilloscope_get_resolution
tiepie_hw_oscilloscope_set_resolution
Since
1.0

◆ tiepie_hw_oscilloscope_get_resolution()

TIEPIE_HW_API uint8_t tiepie_hw_oscilloscope_get_resolution ( tiepie_hw_handle  handle)

Get the current resolution of the specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
The current resolution in bits, or 0 when unsuccessful.
Status values
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
See also
tiepie_hw_oscilloscope_get_resolutions
tiepie_hw_oscilloscope_set_resolution
Since
1.0

◆ tiepie_hw_oscilloscope_set_resolution()

TIEPIE_HW_API uint8_t tiepie_hw_oscilloscope_set_resolution ( tiepie_hw_handle  handle,
uint8_t  value 
)

Set the resolution of the specified oscilloscope.

Parameters
[in]handleA device handle identifying the oscilloscope.
[in]valueThe required resolution in bits.
Returns
The actually set resolution in bits, or 0 when unsuccessful.
Remarks
Changing the resolution may affect the sample rate, record length and/or channel trigger enabled.
Setting the resolution will set auto resolution mode to TIEPIE_HW_ARM_DISABLED.
Status values
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
See also
tiepie_hw_oscilloscope_get_resolutions
tiepie_hw_oscilloscope_get_resolution
Since
1.0

◆ tiepie_hw_oscilloscope_is_resolution_enhanced()

TIEPIE_HW_API tiepie_hw_bool tiepie_hw_oscilloscope_is_resolution_enhanced ( tiepie_hw_handle  handle)

Check whether the currently selected resolution is enhanced or a native resolution of the hardware.

Parameters
[in]handleA device handle identifying the oscilloscope.
Returns
TIEPIE_HW_BOOL_TRUE if the current resolution is enhanced, TIEPIE_HW_BOOL_FALSE otherwise.
Status values
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
Since
1.0