Commit b2d9ae9c authored by deuce's avatar deuce
Browse files

Linux apparently doesn't implement TIOC?DTR ioctls

parent 064a0798
......@@ -150,12 +150,26 @@ int comGetModemStatus(COM_HANDLE handle)
BOOL comRaiseDTR(COM_HANDLE handle)
{
return(ioctl(handle, TIOCSDTR)==0);
int status;
if(ioctl(handle, TIOCMGET, &status)==-1)
return FALSE;
status |= TIOCM_DTR;
if(ioctl(handle, TIOCMSET, &status)==-1)
return FALSE;
return TRUE;
}
BOOL comLowerDTR(COM_HANDLE handle)
{
return(ioctl(handle, TIOCCDTR)==0);
int status;
if(ioctl(handle, TIOCMGET, &status)==-1)
return FALSE;
status &= ~TIOCM_DTR;
if(ioctl(handle, TIOCMSET, &status)==-1)
return FALSE;
return TRUE;
}
BOOL comWriteByte(COM_HANDLE handle, BYTE ch)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment