Esempio n. 1
0
cell ft_get_modem_control (cell handle)
{
	unsigned short modemstat;
	if ((ft_errno = ftdi_poll_modem_status((ft_handle)handle, &modemstat)) != 0)
		return 0;

	cell outstat = 0;
	if (modemstat & 0x10) outstat |= TIOCM_CTS;
	if (modemstat & 0x20) outstat |= TIOCM_DSR;
	if (modemstat & 0x40) outstat |= TIOCM_RI;
	if (modemstat & 0x80) outstat |= TIOCM_CAR;

	return outstat;
}
Esempio n. 2
0
unsigned short Context::poll_modem_status()
{
    unsigned short status = 0;
    ftdi_poll_modem_status(d->ftdi, &status);
    return status;
}