Tscope5
|
Definitions of serial port functions. More...
Go to the source code of this file.
Functions | |
Response registration | |
Serialports can be used as response devices. See timer.c for more information about response registration. | |
int | ts5_define_serialport_response_input (char *portname) |
Define a serial port as a response input device. More... | |
int | ts5_define_serialport_button (int device, int button) |
Define a serial port button as a response button. More... | |
int | ts5_get_num_serialports () |
Get the number of serial ports that are connected to the system. More... | |
int | ts5_get_num_serialport_buttons (int device) |
Get the number of buttons available on a serial port. More... | |
Trigger input/output | |
The serial ports can be used as trigger input/output devices. See timer.c for more information about trigger input/output. | |
int | ts5_define_serialport_trigger_input (char *portname) |
Define a serial port as a trigger input device. More... | |
void | ts5_simulate_serialport_trigger_input (int device, unsigned char value, double interval) |
Turn on serial port input simulation. More... | |
int | ts5_define_serialport_trigger_output (char *portname) |
Define a serial port as a trigger output device. More... | |
void | ts5_send_serialport_trigger (int device, unsigned char value) |
Send a trigger trough a serial port. More... | |
TS5_SERIALPORT * | ts5_get_serialport (int device) |
Get a pointer to a serial port. More... | |
Definitions of serial port functions.
Definition in file serialport.c.
int ts5_define_serialport_response_input | ( | char * | portname | ) |
Define a serial port as a response input device.
portname | Name of the serial port (COM1, ... on Windows, /etc/tty... on Posix systems). |
Definition at line 42 of file serialport.c.
int ts5_define_serialport_button | ( | int | device, |
int | button | ||
) |
Define a serial port button as a response button.
device | Number of the serial port (devices are numbered from 1). |
button | Number of the button (buttons are counted from 1). |
Currently serial ports only support button press events, no button release events.
Definition at line 69 of file serialport.c.
int ts5_get_num_serialports | ( | ) |
Get the number of serial ports that are connected to the system.
Definition at line 128 of file serialport.c.
int ts5_get_num_serialport_buttons | ( | int | device | ) |
Get the number of buttons available on a serial port.
device | Number of the serial port (devices are numbered from 1). |
Definition at line 144 of file serialport.c.
int ts5_define_serialport_trigger_input | ( | char * | portname | ) |
Define a serial port as a trigger input device.
portname | Name of the serial port (COM1, ... on Windows, /etc/tty... on Posix systems). |
Definition at line 181 of file serialport.c.
void ts5_simulate_serialport_trigger_input | ( | int | device, |
unsigned char | value, | ||
double | interval | ||
) |
Turn on serial port input simulation.
device | Number of the serial port. |
value | Input value that has to be simulated (0-255, 0 turns the simulation off). |
interval | Interval in seconds between two triggers. |
Definition at line 206 of file serialport.c.
int ts5_define_serialport_trigger_output | ( | char * | portname | ) |
Define a serial port as a trigger output device.
portname | Name of the serial port (COM1, ... on Windows, /etc/tty... on Posix systems). |
Definition at line 237 of file serialport.c.
void ts5_send_serialport_trigger | ( | int | device, |
unsigned char | value | ||
) |
Send a trigger trough a serial port.
device | Number of the serial port (devices are numbered from 1). |
value | The trigger value that has to be sent (0-255). |
Definition at line 259 of file serialport.c.
TS5_SERIALPORT* ts5_get_serialport | ( | int | device | ) |
Get a pointer to a serial port.
device | Number of the serial port (devices are numbered from 1). |
Definition at line 315 of file serialport.c.