v24Close()

Closes the interface.

Synopsis

int v24Close(int handle);

Parameter

Parameter Description
handle The handle of v24Open

Return value

0 if OK, otherwise -1.

Error

Missing or wrong arguments.

Description

Closes the interface.

Example

main()
{
  int write, read, close, handle;
  string get;
  time max;
  //handle = 240;
  handle = v24Open("COM2", 9600, "8N1");
  DebugN(handle);
  max = 10;
  read = v24Read(handle, get, max);
  DebugN(read);
  delay(5);
  close = v24Close(handle);
  DebugN(close);
  DebugN("Get: " + get);
}

Assignment

Communication functions

Availability

CTRL