5.11. Set TTL-In-/Outputs direction with DapiSpecialCommand
5.11.1. DAPI_SPECIAL_CMD_SET_DIR_DX_1
Beschreibung
Dieser Befehl setzt die Richtung von 8 hintereinanderliegenden
TTL-Ein/Ausgängen (1-Bit weise).
Definition
void DapiSpecialCommand(ULONG handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1,
ULONG ch, ULONG dir, 0);
Parameter
handle = Dies ist das Handle eines geöffneten Moduls
ch = Muss immer 0 sein!
dir = Gibt die Richtung für 8 Kanäle an (1=output / 0=input) / Bit 0
steht für Kanal 0, Bit 1 für Kanal 1 ...
Bemerkung
Nur für USB-MINI-TTL8!
Verwenden
Sie
DAPI_SPECIAL_CMD_SET_DIR_DX_8
Programmierbeispiel
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x01 , 0);
// Set Dir of TTL-I/O CH0 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x02 , 0);
// Set Dir of TTL-I/O CH1 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x04 , 0);
// Set Dir of TTL-I/O CH2 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x08 , 0);
// Set Dir of TTL-I/O CH3 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x10 , 0);
// Set Dir of TTL-I/O CH4 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x20 , 0);
// Set Dir of TTL-I/O CH5 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x40 , 0);
// Set Dir of TTL-I/O CH6 to output, others to input
DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_SET_DIR_DX_1, 0, 0x80 , 0);
// Set Dir of TTL-I/O CH7 to output, others to input
für
andere
Befehl.
DELIB API reference | Seite 316
TTL-Module
den