Skip to content
Snippets Groups Projects
Commit b2d9ae9c authored by deuce's avatar deuce
Browse files

Linux apparently doesn't implement TIOC?DTR ioctls

parent 064a0798
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment