#include <windows.h>
Data Structures | |
struct | BCDFREQ |
This structure is used to store the BCD values representing each decade. More... | |
struct | PTSDevice |
This structure is used to hold parameters that describe the particular functionallity of a specific PTS device. More... | |
Defines | |
#define | ERROR_STR_SIZE 25 |
#define | BCDBYTEMASK 0x0F0F0F0F |
#define | ID_MHz100 0x0 |
#define | ID_MHz10 0x1 |
#define | ID_MHz1 0x2 |
#define | ID_kHz100 0x3 |
#define | ID_kHz10 0x4 |
#define | ID_kHz1 0x5 |
#define | ID_Hz100 0x6 |
#define | ID_Hz10 0x7 |
#define | ID_Hz1 0x8 |
#define | ID_pHz 0x9 |
#define | ID_latch 0xA |
#define | ID_UNUSED 0xF |
#define | PHASE_INVALID 0x100 |
#define | FREQ_ORANGE 0x101 |
#define | DWRITE_FAIL 0x200 |
#define | DEVICE_OPEN_FAIL 0x201 |
#define | NO_DEVICE_FOUND 0x202 |
Functions | |
SPINPTS_API int | set_pts (double frequency, int phase, PTSDevice *device) |
SPINPTS_API char * | spinpts_get_error () |
SPINPTS_API char * | spinpts_get_version () |
To get the latest version of this code, or to contact us for support, please visit http://www.spincore.com
#define BCDBYTEMASK 0x0F0F0F0F |
Mask for the controller flags. This is used to construct control words to be sent to the PTS.
#define DEVICE_OPEN_FAIL 0x201 |
Error code referring to an error opening the device driver.
#define DWRITE_FAIL 0x200 |
Error code referring to an error writing to the device.
#define ERROR_STR_SIZE 25 |
Error string length.
#define FREQ_ORANGE 0x101 |
Error code referring to an out of range frequency value.
#define ID_Hz1 0x8 |
Corresponds to controller flag for the 1 Hz decade.
#define ID_Hz10 0x7 |
Corresponds to controller flag for the 10 Hz decade.
#define ID_Hz100 0x6 |
Corresponds to controller flag for the 100 Hz decade.
#define ID_kHz1 0x5 |
Corresponds to controller flag for the 1 kHz decade.
#define ID_kHz10 0x4 |
Corresponds to controller flag for the 10 kHz decade.
#define ID_kHz100 0x3 |
Corresponds to controller flag for the 100 kHz decade.
#define ID_latch 0xA |
Corresponds to the controller flag to set the latch on the PTS.
#define ID_MHz1 0x2 |
Corresponds to controller flag for the 1 MHz decade.
#define ID_MHz10 0x1 |
Corresponds to controller flag for the 10 MHz decade.
#define ID_MHz100 0x0 |
Corresponds to controller flag for the 100 MHz decade.
#define ID_pHz 0x9 |
Corresponds to controller flag for the 0.1 Hz decade. Also the controller flag for the phase. (If phase is supported.)
#define ID_UNUSED 0xF |
Used controller flag (could be used in a later revision.)
#define NO_DEVICE_FOUND 0x202 |
Error code referring to the inability to locate a PTS device.
#define PHASE_INVALID 0x100 |
Error code referring to an invalid phase value.
SPINPTS_API int set_pts | ( | double | frequency, | |
int | phase, | |||
PTSDevice * | device | |||
) |
Set the frequency and phase to a PTS Device. The PTSDevice parameter is optional. Specifying a PTS Device structure will include frequency and phase bounds checking when setting the device.
frequency | Double values (greater than 0.) | |
phase | Must be equal to 0, 90, 180, 270 | |
device | (OPTIONAL) Pointer to PTSDevice structure. This argument can be NULL. |
SPINPTS_API char* spinpts_get_error | ( | ) |
Decodes error codes defined in spinpts.h
SPINPTS_API char* spinpts_get_version | ( | ) |
Gets the current version of the SpinPTS API being used.